/* Sign-in, registration and account-recovery screens — same design language as the admin 2FA screens
   and the student portal (brand gradient panel + clean form card, light & dark). */
.au {
  --au-bg: #F4F1EA; --au-card: #FFFFFF; --au-ink: #0F172A; --au-ink-2: #334155; --au-muted: #64748B; --au-faint: #94A3B8;
  --au-line: #E4E0D6; --au-sunken: #F8F6F1; --au-accent: #D62839; --au-accent-2: #B01E30;
  --au-ok: #15803D; --au-ok-soft: #E8F7EE; --au-bad: #B42318; --au-bad-soft: #FDECEC;
  --au-grad: linear-gradient(150deg, #C21F3A 0%, #D23A5B 30%, #9B4A92 66%, #4E5CB3 100%);
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr;
  background: var(--au-bg); color: var(--au-ink); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}
html[data-theme="dark"] .au {
  --au-bg: #0B1020; --au-card: #121A2E; --au-ink: #E8ECF6; --au-ink-2: #C3CADB; --au-muted: #8B95AD; --au-faint: #5E6A86;
  --au-line: #232E48; --au-sunken: #0E1528; --au-ok-soft: rgba(34,197,94,.12); --au-ok: #4ADE80; --au-bad-soft: rgba(239,68,68,.14); --au-bad: #FCA5A5;
}
.au *, .au *::before, .au *::after { box-sizing: border-box; }
body.au-body { margin: 0; background: #F4F1EA; }
html[data-theme="dark"] body.au-body { background: #0B1020; }
.au a { color: inherit; }
.au [hidden] { display: none !important; }

/* ---------- Brand panel ---------- */
.au-brand { position: relative; overflow: hidden; background: var(--au-grad); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; }
.au-brand::before { content: ''; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(60% 50% at 100% 0%, rgba(255,210,122,.28), transparent 70%),
  radial-gradient(50% 45% at 0% 100%, rgba(20,24,60,.35), transparent 70%); }
.au-brand::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; opacity: .9;
  background: repeating-linear-gradient(-45deg, #fff 0 10px, #D62839 10px 20px, #fff 20px 30px, #1E3A8A 30px 40px); }
.au-brand > * { position: relative; }
.au-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; align-self: flex-start; }
.au-logo img { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 5px; box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); }
.au-logo b { display: block; font: 700 21px/1.1 'Fraunces', Georgia, serif; letter-spacing: -.01em; }
.au-logo small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 3px; }
.au-brand-mid { margin: auto 0; padding: 40px 0; max-width: 460px; }
.au-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); margin-bottom: 20px; }
.au-brand h2 { font: 700 38px/1.1 'Fraunces', Georgia, serif; margin: 0 0 14px; letter-spacing: -.02em; }
.au-brand h2 em { font-style: italic; color: #FFD27A; }
.au-brand p { margin: 0 0 28px; font-size: 15.5px; line-height: 1.6; opacity: .9; }
.au-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.au-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.au-points i { flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font-style: normal; }
.au-points i svg { width: 16px; height: 16px; }
.au-points b { display: block; font-weight: 700; }
.au-points span { opacity: .82; font-size: 13px; }
.au-proof { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px); }
.au-proof-avs { display: flex; }
.au-proof-avs span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; border: 2px solid rgba(255,255,255,.9); margin-left: -8px; }
.au-proof-avs span:first-child { margin-left: 0; }
.au-proof p { margin: 0; font-size: 13px; line-height: 1.4; opacity: .95; }
.au-brand-foot { font-size: 12px; opacity: .75; display: flex; gap: 14px; flex-wrap: wrap; }
.au-brand-foot a { color: #fff; text-decoration: none; }
.au-brand-foot a:hover { text-decoration: underline; }

/* ---------- Form side ---------- */
.au-side { display: flex; flex-direction: column; min-width: 0; padding: 22px 40px 28px; }
.au-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.au-home { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--au-muted) !important; text-decoration: none; padding: 8px 12px 8px 8px; border-radius: 99px; }
.au-home:hover { color: var(--au-ink) !important; background: var(--au-card); }
.au-home svg { width: 16px; height: 16px; }
.au-top-r { display: flex; gap: 8px; align-items: center; }
.au-top-link { font-size: 13px; color: var(--au-muted); }
.au-top-link a { font-weight: 700; color: var(--au-accent); text-decoration: none; }
.au-theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--au-line); background: var(--au-card); color: var(--au-ink-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.au-theme svg { width: 17px; height: 17px; }
.au-theme .sun { display: none; }
html[data-theme="dark"] .au-theme .sun { display: block; }
html[data-theme="dark"] .au-theme .moon { display: none; }

.au-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 0; }
.au-card { width: 100%; max-width: 440px; }
.au-card.wide { max-width: 560px; }
.au-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: var(--au-grad); box-shadow: 0 14px 28px -14px rgba(155,74,146,.8); }
.au-icon svg { width: 26px; height: 26px; }
.au-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--au-accent); margin-bottom: 8px; }
.au-card h1 { font: 700 32px/1.12 'Fraunces', Georgia, serif; margin: 0 0 8px; letter-spacing: -.02em; }
.au-lead { margin: 0 0 26px; font-size: 14.5px; line-height: 1.6; color: var(--au-muted); }
.au-lead b { color: var(--au-ink-2); }

.au-flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; border: 1px solid transparent; transition: opacity .4s; }
.au-flash svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.au-flash.ok { background: var(--au-ok-soft); color: var(--au-ok); border-color: rgba(21,128,61,.2); }
.au-flash.bad { background: var(--au-bad-soft); color: var(--au-bad); border-color: rgba(180,35,24,.2); }
.au-flash a { color: inherit; font-weight: 700; text-decoration: underline; }

.au-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.au-grid .full { grid-column: 1 / -1; }
.au-f { margin-bottom: 16px; min-width: 0; }
.au-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--au-ink-2); margin-bottom: 7px; }
.au-label small { font-weight: 500; color: var(--au-faint); font-size: 12px; }
.au-label a { font-size: 12.5px; font-weight: 700; color: var(--au-accent); text-decoration: none; }
.au-label a:hover { text-decoration: underline; }
.au-in { position: relative; }
.au-in > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--au-faint); pointer-events: none; }
.au-input { width: 100%; height: 50px; padding: 0 14px 0 42px; border: 1.5px solid var(--au-line); border-radius: 12px; background: var(--au-card); color: var(--au-ink);
  font: 500 14.5px/1 inherit; font-family: inherit; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
select.au-input { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394A3B8' stroke-width='2.4' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.au-input::placeholder { color: var(--au-faint); font-weight: 400; }
.au-input:focus { outline: none; border-color: var(--au-accent); box-shadow: 0 0 0 4px rgba(214,40,57,.13); }
.au-input.pw { padding-right: 48px; }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: none; border-radius: 10px; background: transparent; color: var(--au-faint); cursor: pointer; display: grid; place-items: center; }
.au-eye:hover { color: var(--au-ink); background: var(--au-sunken); }
.au-eye svg { width: 18px; height: 18px; }
.au-eye .off { display: none; }
.au-eye.on .on { display: none; }
.au-eye.on .off { display: block; }
.au-caps { display: none; margin-top: 6px; font-size: 12px; font-weight: 600; color: #B45309; }
.au-caps.show { display: block; }

.au-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.au-meter-bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.au-meter-bars i { height: 5px; border-radius: 4px; background: var(--au-line); transition: background .2s; }
.au-meter b { font-size: 12px; min-width: 48px; text-align: right; }
.au-match { margin-top: 6px; font-size: 12px; font-weight: 600; }

.au-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--au-muted); line-height: 1.5; margin: 2px 0 4px; }
.au-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--au-accent); flex-shrink: 0; }

.au-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 52px; margin-top: 6px; border: none; border-radius: 12px; cursor: pointer;
  font: 700 15px/1 inherit; font-family: inherit; color: #fff; background: linear-gradient(180deg, #DE3346, #C51F33);
  box-shadow: 0 12px 24px -12px rgba(214,40,57,.7), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .12s, box-shadow .15s, opacity .15s; }
.au-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(214,40,57,.75), inset 0 1px 0 rgba(255,255,255,.18); }
.au-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.au-btn svg { width: 18px; height: 18px; }
.au-fine { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: var(--au-faint); text-align: center; }
.au-fine a { color: var(--au-muted); font-weight: 600; }
.au-alt { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--au-line); text-align: center; font-size: 14px; color: var(--au-muted); }
.au-alt a { color: var(--au-accent); font-weight: 700; text-decoration: none; }
.au-alt a:hover { text-decoration: underline; }
.au-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 13.5px; font-weight: 600; color: var(--au-muted) !important; text-decoration: none; }
.au-back:hover { color: var(--au-accent) !important; }
.au-back svg { width: 16px; height: 16px; }
.au-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.au-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--au-ink-2); }
.au-steps li span b { font-weight: 700; color: var(--au-ink); }
.au-steps li > b { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--au-sunken); border: 1px solid var(--au-line); color: var(--au-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .au { grid-template-columns: minmax(320px, 40%) 1fr; }
  .au-brand { padding: 32px; }
  .au-brand h2 { font-size: 30px; }
  .au-side { padding: 20px 28px; }
}
@media (max-width: 880px) {
  .au { grid-template-columns: 1fr; }
  .au-brand { padding: 20px 18px 22px; }
  .au-brand-mid { padding: 16px 0 0; margin: 0; max-width: none; }
  .au-kicker, .au-points, .au-proof, .au-brand-foot { display: none; }
  .au-brand h2 { font-size: 22px; margin: 0 0 4px; }
  .au-brand p { font-size: 13.5px; margin: 0; }
  .au-side { padding: 14px 16px 28px; }
  .au-main { align-items: flex-start; padding: 16px 0 8px; }
  .au-card h1 { font-size: 26px; }
  .au-icon { display: none; }
}
@media (max-width: 520px) {
  .au-grid { grid-template-columns: 1fr; }
  .au-top-link span { display: none; }
  .au-input { font-size: 16px; } /* no iOS zoom on focus */
}
@media (prefers-reduced-motion: reduce) { .au-btn, .au-input { transition: none; } .au-btn:hover { transform: none; } }

/* ── Email code (OTP) pages ─────────────────────────────────── */
.au-input.au-otp { padding: 0 14px; height: 60px; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: .5em; text-indent: .5em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.au-input.au-otp::placeholder { letter-spacing: .5em; color: var(--au-line); }
.au-otp-help { margin-top: 7px; font-size: 12px; color: var(--au-faint); line-height: 1.5; }
.au-resend { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; font-size: 13.5px; color: var(--au-muted); }
.au-resend button { background: none; border: none; padding: 4px 2px; color: var(--au-accent); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.au-resend button:disabled { color: var(--au-faint); cursor: default; }
.au-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--au-faint); font-size: 12px; font-weight: 600; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--au-line); }
.au-btn.ghost { background: var(--au-card); color: var(--au-ink); border: 1.5px solid var(--au-line); box-shadow: none; text-decoration: none; margin-top: 12px; }
.au-btn.ghost:hover { border-color: var(--au-accent); color: var(--au-accent); }
