/* =========================================================
   Auth pages: login, register, password, two-factor
   Split layout: brand panel (left) + form panel (right)
   ========================================================= */

.auth { position: relative; overflow: hidden; padding: 1.5rem 1rem 4rem; }
@media (min-width: 1024px) { .auth { padding: 2.5rem 1.5rem 5rem; } }
.auth-grid { position: relative; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 1024px) { .auth-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.75rem; align-items: stretch; } }
.auth-grid.narrow { max-width: 520px; grid-template-columns: minmax(0, 1fr) !important; }

/* ---------- Brand panel ---------- */
.auth-side { position: relative; overflow: hidden; display: none; min-width: 0; flex-direction: column; justify-content: space-between; gap: 2.5rem; padding: 2.75rem; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(120% 90% at 0% 0%, #1d3fb8 0%, #0f1a3a 45%, #07090f 100%); box-shadow: var(--shadow-lg); isolation: isolate; }
@media (min-width: 1024px) { .auth-side { display: flex; min-height: 640px; } }
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(90% 90% at 50% 10%, #000 20%, transparent 80%); -webkit-mask-image: radial-gradient(90% 90% at 50% 10%, #000 20%, transparent 80%); pointer-events: none; z-index: -1; }
.auth-side .orb { position: absolute; border-radius: 999px; filter: blur(70px); opacity: .55; pointer-events: none; z-index: -1; animation: float-orb 16s ease-in-out infinite alternate; }
.auth-side .orb.a { width: 340px; height: 340px; right: -120px; top: -100px; background: #2f63ff; }
.auth-side .orb.b { width: 300px; height: 300px; left: -120px; bottom: -120px; background: #7c3aed; animation-delay: -8s; }
@keyframes float-orb { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-24px, 30px, 0); } }
.auth-side .brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; color: #fff; text-decoration: none; }
.auth-side .brand .mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(180deg, var(--brand-400), var(--brand-600)); box-shadow: 0 0 0 4px rgba(47,99,255,.25); }
.auth-side h2 { font-weight: 800; letter-spacing: -.035em; line-height: 1.06; font-size: clamp(2rem, 3.2vw, 2.75rem); margin-top: 1.5rem; }
.auth-side h2 em { font-style: normal; background: linear-gradient(90deg, #9db7ff, #d7c6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .lead { color: rgba(255,255,255,.7); margin-top: .9rem; font-size: 1rem; max-width: 38ch; }
.auth-feats { display: grid; gap: .8rem; margin-top: 1.9rem; }
.auth-feats li { display: flex; align-items: flex-start; gap: .85rem; font-size: .925rem; color: rgba(255,255,255,.88); }
.auth-feats .tile { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.auth-feats .tile svg { width: 18px; height: 18px; }
.auth-feats b { display: block; font-weight: 600; color: #fff; }
.auth-feats span { color: rgba(255,255,255,.62); font-size: .85rem; }
.auth-proof { display: flex; flex-wrap: wrap; gap: .6rem; }
.auth-proof .chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.85); }
.auth-proof .chip .dot { width: 7px; height: 7px; border-radius: 999px; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.2); }

/* ---------- Form panel ---------- */
.auth-panel { position: relative; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.75rem 1.4rem; }
@media (min-width: 640px) { .auth-panel { padding: 2.5rem; } }
.auth-panel .head { margin-bottom: 1.6rem; }
.auth-panel h1 { font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-size: clamp(1.6rem, 2.6vw, 2rem); }
.auth-panel .head p { color: var(--gray); margin-top: .45rem; font-size: .95rem; }
.auth-panel .alert { margin-bottom: 1.1rem; }
.auth-panel form > * + * { margin-top: 1.05rem; }
.auth-panel .cf-turnstile { min-height: 65px; }
.auth-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: #f1f5f9; border: 1px solid var(--line); margin-bottom: 1.4rem; }
.auth-tabs a { display: inline-flex; align-items: center; padding: .5rem 1.1rem; line-height: 1; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--gray); transition: all .18s ease; }
.auth-tabs a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }
.auth-mobile-brand { display: flex; align-items: center; justify-content: center; gap: .55rem; margin-bottom: 1.4rem; font-weight: 700; }
@media (min-width: 1024px) { .auth-mobile-brand { display: none; } }
.auth-mobile-brand .mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--brand-400), var(--brand-600)); }

.field { position: relative; min-width: 0; }
.field .control { position: relative; }
.field .label { display: flex; align-items: center; justify-content: space-between; }
.field .label a { font-weight: 500; color: var(--brand-600); }
.field .ico { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; transition: color .15s; }
.field .input { padding-left: 2.75rem; padding-top: .85rem; padding-bottom: .85rem; line-height: 1.35; }
.field .input:focus ~ .ico, .field .input:not(:placeholder-shown) ~ .ico { color: var(--brand-500); }
.field.has-eye .input { padding-right: 2.9rem; }
.field .eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #94a3b8; background: transparent; border: 0; cursor: pointer; transition: all .15s; }
.field .eye:hover { color: var(--ink); background: #f1f5f9; }
.field .eye svg { width: 18px; height: 18px; }
.field .eye .off { display: none; }
.field .eye[aria-pressed="true"] .on { display: none; }
.field .eye[aria-pressed="true"] .off { display: block; }
.field .error-text { display: flex; align-items: center; gap: .35rem; }
.caps-note { display: none; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .78rem; color: #b45309; }
.caps-note.show { display: flex; }

.strength { margin-top: .6rem; }
.strength .bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength .bars i { height: 5px; border-radius: 999px; background: #e2e8f0; transition: background .25s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: #fb7185; }
.strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.strength[data-level="3"] i:nth-child(-n+3) { background: #3b82f6; }
.strength[data-level="4"] i:nth-child(-n+4) { background: #10b981; }
.strength .txt { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .76rem; color: var(--gray); }
.strength .txt b { font-weight: 600; color: var(--ink-2); }

.check { position: relative; display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; font-size: .875rem; color: var(--ink-2); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 7px; border: 1.5px solid rgba(15,23,42,.2); background: #fff; display: grid; place-items: center; transition: all .15s; }
.check .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: all .15s; }
.check input:checked + .box { background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); border-color: var(--brand-600); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(47,99,255,.18); }
.check a { color: var(--brand-600); font-weight: 500; }

.auth-submit { position: relative; margin-top: .4rem; }
.auth-submit svg { width: 18px; height: 18px; flex: none; transition: transform .18s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.4rem 0; color: #94a3b8; font-size: .78rem; font-weight: 500; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-guest { display: flex; align-items: center; gap: .9rem; min-width: 0; text-decoration: none; padding: .9rem 1rem; border-radius: 16px; border: 1px dashed rgba(15,23,42,.16); background: #f8fafc; color: var(--ink-2); font-size: .875rem; transition: all .18s; }
.auth-guest:hover { border-color: var(--brand-400); background: var(--brand-50); }
.auth-guest .tile { flex: none; width: 38px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand-600); }
.auth-guest > span:not(.tile) { min-width: 0; }
.auth-guest b { display: block; font-weight: 600; color: var(--ink); }
.auth-guest span { color: var(--gray); font-size: .8rem; }
.auth-guest .arrow { margin-left: auto; color: #94a3b8; }
.auth-foot { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--gray); }
.auth-foot a { color: var(--brand-600); font-weight: 600; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.1rem; font-size: .74rem; color: #94a3b8; }
.auth-secure svg { width: 13px; height: 13px; }

.auth-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 1.2rem; background: var(--brand-50); color: var(--brand-600); }
.auth-icon svg { width: 26px; height: 26px; }
.auth-panel.text-center .head { text-align: center; }
.auth-panel .head.text-center h1, .auth-panel .head.text-center p { text-align: center; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.otp input { width: 100%; min-width: 0; aspect-ratio: 1 / 1.15; text-align: center; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid rgba(15,23,42,.12); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.otp input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 4px rgba(47,99,255,.14); }

@media (prefers-reduced-motion: reduce) { .auth-side .orb { animation: none; } }
