/* ================= AdsGen Auth ================= */
.aga-body {
	--bg: #0a0b10; --card: #141620; --field: #1a1d27; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
	--text: #f2f3f7; --muted: #8f95a8; --accent: #2ba89a; --accent-hi: #3cc4b4; --ink: #04201c; --err: #ff8aa3;
	margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
	font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
.aga-body *, .aga-body *::before, .aga-body *::after { box-sizing: border-box; }
.aga-bg {
	position: fixed; inset: 0; z-index: 0; pointer-events: none;
	background:
		radial-gradient(600px 420px at 0% 0%, rgba(43,168,154,.13), transparent 70%),
		radial-gradient(640px 480px at 100% 0%, rgba(110,90,200,.10), transparent 70%);
}
.aga-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }

/* Brand */
.aga-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; margin-bottom: 26px; }
.aga-brand__mark {
	width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff;
	background: linear-gradient(135deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 28px -4px rgba(43,168,154,.6);
}
.aga-brand__mark svg { width: 24px; height: 24px; }
.aga-brand__img { max-height: 40px; width: auto; }

/* Card */
.aga-card {
	width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line-2);
	border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.aga-title { font-size: 21px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.aga-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; overflow-wrap: anywhere; }
.aga-sub strong { color: var(--muted); font-weight: 500; }

.aga-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 16px; }
.aga-progress i { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); transition: background .3s; }
.aga-progress i.on { background: var(--accent); }

.aga-q { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #aab0c0; margin-bottom: 14px; }
.aga-q__ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(43,168,154,.16); color: var(--accent-hi); }
.aga-q__ic svg { width: 12px; height: 12px; }
.aga-h { font-size: 15.5px; font-weight: 800; margin: 0 0 3px; }
.aga-hint { font-size: 11.5px; color: var(--muted); margin: 0 0 16px; }
.aga-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }

/* Inputs */
.aga-input, .aga-search input {
	width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line-2);
	background: var(--field); color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.aga-input::placeholder, .aga-search input::placeholder { color: #626879; }
.aga-input:focus, .aga-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,168,154,.2); }
.aga-input.is-err { border-color: var(--err); }

.aga-search { position: relative; display: block; margin-bottom: 10px; }
.aga-search svg { position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--muted); }
.aga-search input { padding-left: 34px; }
.aga-search input::-webkit-search-cancel-button { filter: invert(.6); }

.aga-countries {
	list-style: none; margin: 0; padding: 0; max-height: 172px; overflow-y: auto; border-radius: 10px;
	border: 1px solid var(--line-2); background: var(--field); scrollbar-width: thin; scrollbar-color: #3a3f4f transparent;
}
.aga-countries li {
	display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 13px; font-size: 13px; font-weight: 600;
	cursor: pointer; border-bottom: 1px solid var(--line);
}
.aga-countries li:last-child { border-bottom: 0; }
.aga-countries li small { color: var(--muted); font-weight: 500; }
.aga-countries li:hover, .aga-countries li.is-focus { background: rgba(255,255,255,.04); }
.aga-countries li[aria-selected="true"] { background: rgba(43,168,154,.16); color: var(--accent-hi); }
.aga-countries li[aria-selected="true"]::after { content: "✓"; font-weight: 800; }
.aga-countries li[aria-selected="true"] small { display: none; }
.aga-countries .aga-empty { color: var(--muted); cursor: default; font-weight: 500; }

.aga-phone { display: flex; gap: 8px; }
.aga-dial {
	flex: 0 0 auto; min-width: 62px; height: 42px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px;
	border: 1px solid var(--line-2); background: var(--field); font-size: 14px; font-weight: 500;
}

/* Buttons */
.aga-row { display: flex; gap: 8px; margin-top: 12px; }
.aga-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
	border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
	transition: filter .2s, transform .15s, opacity .2s; color: var(--text);
}
.aga-btn:active { transform: scale(.98); }
.aga-btn:disabled { opacity: .55; cursor: not-allowed; }
.aga-btn--pri { background: var(--accent); color: var(--ink); }
.aga-btn--pri:hover:not(:disabled) { filter: brightness(1.1); }
.aga-btn--dark { background: linear-gradient(180deg, #1e2130, #171a24); border-color: var(--line-2); }
.aga-btn--dark:hover { border-color: rgba(255,255,255,.25); }
.aga-btn--grow { flex: 1; }
.aga-btn--sq { width: 38px; padding: 0; flex: 0 0 38px; }
.aga-btn--block { width: 100%; height: 42px; margin-top: 12px; }
.aga-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.aga-btn.is-loading::after {
	content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(4,32,28,.35); border-top-color: var(--ink); animation: aga-spin .7s linear infinite;
}
@keyframes aga-spin { to { transform: rotate(360deg); } }

.aga-msg { font-size: 12.5px; color: var(--err); min-height: 0; margin-top: 8px; }
.aga-msg:empty { display: none; }
.aga-msg.is-ok { color: var(--accent-hi); }

.aga-note { text-align: center; font-size: 11px; color: var(--muted); margin: 16px 0 0; }
.aga-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.aga-switch a, .aga-link { color: var(--accent-hi); font-weight: 700; text-decoration: none; }
.aga-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.aga-link:disabled { color: var(--muted); cursor: default; font-weight: 500; }

/* OTP */
.aga-otp { display: flex; justify-content: center; gap: 9px; margin: 4px 0 6px; }
.aga-otp input {
	width: 48px; height: 54px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--field);
	color: var(--text); text-align: center; font: inherit; font-size: 22px; font-weight: 800; outline: none; transition: border-color .2s, box-shadow .2s;
}
.aga-otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,168,154,.2); }
.aga-otp.is-err input { border-color: var(--err); animation: aga-shake .35s; }
@keyframes aga-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.aga-view[data-view="verify"] .aga-btn--pri { background: linear-gradient(90deg, #4aa79f, #1f7a72); box-shadow: 0 10px 30px -10px rgba(43,168,154,.6); }
.aga-resend { text-align: center; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

.aga-step { animation: aga-in .3s ease; }
@keyframes aga-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* Dashboard placeholder (inside theme) */
.aga-dash table { border-collapse: collapse; margin: 12px 0; }
.aga-dash th, .aga-dash td { text-align: left; padding: 6px 16px 6px 0; }

@media (max-width: 420px) {
	.aga-wrap { justify-content: flex-start; padding-top: 32px; }
	.aga-card { padding: 24px 18px; border-radius: 16px; }
	.aga-otp input { width: 46px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .aga-step, .aga-otp.is-err input { animation: none; } }
