:root {
	--ag-orange: #f08a1d;
	--ag-orange-2: #ff9a2e;
	--ag-orange-d: #d67812;
	--ag-card: rgba(14, 22, 38, .82);
	--ag-line: rgba(255,255,255,.12);
	--ag-text: #f4f6fa;
	--ag-muted: #9aa3b5;
}

html.ag-html, body.ag-body {
	margin: 0;
	min-height: 100%;
	background: #07090d;
	color: var(--ag-text);
	font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.ag-body { overflow-x: hidden; }

.ag-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(180deg, rgba(6,10,18,.55) 0%, rgba(6,10,18,.82) 100%),
		url("../assets/site/templates/default/images/bg/panel-bg-dwarf.png") center / cover no-repeat #07090d;
	transform: scale(1.04);
	filter: saturate(1.05);
}

.ag-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 20%, rgba(240,138,29,.14), transparent 55%);
	pointer-events: none;
}

.ag-wrap {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px 16px 28px;
	box-sizing: border-box;
	animation: agIn .55s cubic-bezier(.22,1,.36,1);
}

@keyframes agIn {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.ag-logo {
	display: block;
	margin: 0 0 14px;
	line-height: 0;
}
.ag-logo img {
	display: block;
	max-width: min(280px, 72vw);
	max-height: 86px;
	height: auto;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));
}

.ag-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 22px;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(10,14,22,.72);
	border: 1px solid rgba(255,255,255,.1);
	color: #dfe4ee;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .01em;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ag-back:hover {
	background: rgba(18,24,36,.9);
	border-color: rgba(240,138,29,.45);
	transform: translateY(-1px);
}

.ag-card {
	width: 100%;
	max-width: 520px;
	background: var(--ag-card);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0,0,0,.45);
	padding: 28px 32px 22px;
	box-sizing: border-box;
}

.ag-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}
.ag-card__head h1 {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.02em;
	color: #fff;
}
.ag-card__head p {
	margin: 0;
	font-size: 13.5px;
	color: var(--ag-muted);
	line-height: 1.45;
}

.ag-lang { position: relative; flex: 0 0 auto; }
.ag-lang__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: transparent;
	border: 0;
	color: #cfd6e4;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	cursor: pointer;
	padding: 4px 0;
}
.ag-lang__btn svg { width: 15px; height: 15px; opacity: .9; }
.ag-lang__menu {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 168px;
	background: #121a28;
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(0,0,0,.45);
	z-index: 20;
}
.ag-lang.is-open .ag-lang__menu { display: block; }
.ag-lang__menu a {
	display: block;
	padding: 10px 14px;
	color: #e8edf7;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
}
.ag-lang__menu a:hover,
.ag-lang__menu a.is-on { background: rgba(240,138,29,.16); color: #fff; }

.ag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	text-decoration: none;
	box-sizing: border-box;
	transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.ag-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ag-btn:active { transform: translateY(0); }
.ag-btn[disabled] { opacity: .65; cursor: wait; transform: none; }

.ag-btn-google {
	background: linear-gradient(180deg, var(--ag-orange-2), var(--ag-orange));
	color: #fff;
	box-shadow: 0 10px 24px rgba(240,138,29,.28);
	margin-bottom: 18px;
}
.ag-g {
	width: 22px;
	height: 22px;
	background: #fff;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 22px;
}
.ag-g svg { width: 16px; height: 16px; display: block; }

.ag-or {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	color: #8b94a7;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.ag-or::before, .ag-or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--ag-line);
}

.ag-field { margin: 0 0 14px; }
.ag-field label {
	display: block;
	margin: 0 0 7px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
}
.ag-field label span {
	font-weight: 500;
	color: var(--ag-muted);
	font-size: 12px;
}
.ag-field input[type="email"],
.ag-field input[type="password"],
.ag-field input[type="text"] {
	width: 100%;
	height: 46px;
	padding: 0 44px 0 14px;
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,.18);
	background: rgba(8,12,20,.55);
	color: #fff;
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.ag-field input::placeholder { color: #6f788a; }
.ag-field input:focus {
	border-color: rgba(240,138,29,.75);
	box-shadow: 0 0 0 3px rgba(240,138,29,.15);
}
.ag-eye {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: #9aa3b5;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ag-eye svg { width: 18px; height: 18px; }
.ag-pass { position: relative; }

.ag-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 6px 0 18px;
	font-size: 13px;
}
.ag-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #d7dce6;
	cursor: pointer;
	user-select: none;
}
.ag-check input { accent-color: var(--ag-orange); width: 15px; height: 15px; }
.ag-link {
	color: var(--ag-orange);
	text-decoration: none;
	font-weight: 700;
}
.ag-link:hover { color: var(--ag-orange-2); }

.ag-btn-main {
	background: linear-gradient(180deg, var(--ag-orange-2), var(--ag-orange-d));
	color: #fff;
	box-shadow: 0 10px 22px rgba(240,138,29,.22);
}
.ag-switch {
	margin: 18px 0 4px;
	text-align: center;
	color: var(--ag-muted);
	font-size: 13.5px;
}
.ag-msg {
	min-height: 0;
	margin: 0 0 12px;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
	color: #ffb4b4;
}
.ag-msg.is-ok { color: #9be7b0; }

.ag-foot {
	margin-top: 22px;
	text-align: center;
	color: #c9d0dc;
	font-size: 12.5px;
}
.ag-foot__copy { margin: 0 0 8px; opacity: .9; }
.ag-foot__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
}
.ag-foot__links button,
.ag-foot__links a {
	background: none;
	border: 0;
	padding: 0;
	color: #e8edf6;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	cursor: pointer;
	text-decoration: none;
}
.ag-foot__links button:hover,
.ag-foot__links a:hover { color: var(--ag-orange); }

.ag-modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(4,8,14,.72);
	backdrop-filter: blur(6px);
}
.ag-modal.is-open { display: flex; }
.ag-modal__box {
	width: min(720px, 100%);
	max-height: min(82vh, 820px);
	background: #121826;
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0,0,0,.5);
	display: flex;
	flex-direction: column;
	animation: agPop .28s cubic-bezier(.22,1,.36,1);
	overflow: hidden;
}
@keyframes agPop {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to { opacity: 1; transform: none; }
}
.ag-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 12px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.ag-modal__head h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
}
.ag-modal__x {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: rgba(255,255,255,.06);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}
.ag-modal__scroll {
	padding: 16px 18px 22px;
	overflow: auto;
	color: #d5dbe8;
	font-size: 13.5px;
	line-height: 1.65;
	white-space: pre-wrap;
	scrollbar-width: thin;
	scrollbar-color: rgba(240,138,29,.7) rgba(255,255,255,.06);
}
.ag-modal__scroll::-webkit-scrollbar { width: 8px; }
.ag-modal__scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.04); }
.ag-modal__scroll::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, var(--ag-orange-2), var(--ag-orange-d));
	border-radius: 99px;
}

.ag-google-official { display: none; }

@media (max-width: 560px) {
	.ag-card { padding: 22px 16px 18px; border-radius: 14px; }
	.ag-card__head { flex-direction: column; }
	.ag-card__head h1 { font-size: 20px; }
}
