/* ============================================================
   auth.css — pre-auth screens (login / forgot / reset)
   Hand-maintained plain CSS (like tokens.css, zg-grid.css).
   Light theme only. Everything scoped under .auth-shell.
   ============================================================ */

@font-face { font-family: 'InterAuth'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'InterAuth'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'InterAuth'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'InterAuth'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'InterAuth'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter/inter-800.woff2') format('woff2'); }

.auth-shell {
  --bg: #E9E4D6; --paper: #FAFAF7; --paper-2: #F4F1E8; --line: #E2DDCF; --line-2: #D3CCB8;
  --ink: #1B1D23; --ink-soft: #3E4150; --ink-mute: #6B6D78; --ink-faint: #9A9B9F;
  --accent: oklch(55% 0.12 255); --accent-hov: oklch(48% 0.13 255); --accent-ink: oklch(40% 0.14 255);
  --ok: oklch(60% 0.13 155); --ok-soft: oklch(94% 0.05 155); --ok-ink: oklch(38% 0.14 155);
  --danger: oklch(55% 0.17 25); --danger-ink: oklch(40% 0.17 25);
  --radius: 6px; --radius-lg: 10px;

  position: fixed; inset: 0; display: flex; overflow: hidden;
  background: var(--paper); color: var(--ink);
  font-family: 'InterAuth', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.auth-shell *, .auth-shell *::before, .auth-shell *::after { box-sizing: border-box; }

/* ---- brand panel ---- */
.auth-brand {
  flex: 0 0 46%; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #232a47 0%, #161b30 60%, #11152a 100%);
  padding: 48px 52px; display: flex; flex-direction: column;
}
.auth-brand__glow {
  position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 80% 110%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 60%);
}
.auth-brand__mosaic {
  position: absolute; top: 84px; right: -10px; z-index: 0;
  display: grid; grid-template-columns: repeat(6, 60px); grid-auto-rows: 60px; gap: 8px;
}
.auth-brand__mosaic span { border-radius: 4px; }
.auth-brand__logo { position: relative; z-index: 1; }
.auth-brand__logo img { height: 84px; width: auto; display: block; }

/* ---- form column ---- */
.auth-form { flex: 1; display: grid; place-items: center; padding: 40px; }
.auth-form__inner { width: 100%; max-width: 372px; display: flex; flex-direction: column; gap: 22px; }
.auth-form__head h2 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.auth-form__head p { margin: 7px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-mute); }
.auth-form__body { display: flex; flex-direction: column; gap: 16px; }

/* ---- field ---- */
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.auth-field__box {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px;
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .14s, box-shadow .14s;
}
.auth-field__box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 16%, transparent);
}
.auth-field__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-faint); display: grid; place-items: center; transition: color .14s; }
.auth-field__box:focus-within .auth-field__icon { color: var(--accent); }
.auth-field__icon svg { width: 18px; height: 18px; }
.auth-field__input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--ink); font-size: 14.5px; font-family: inherit; }
.auth-field__input::placeholder { color: var(--ink-faint); opacity: 1; }
.auth-field__reveal { border: none; background: transparent; cursor: pointer; color: var(--ink-faint); width: 20px; height: 20px; padding: 0; display: grid; place-items: center; }
.auth-field__reveal svg { width: 18px; height: 18px; opacity: .7; }
.auth-field__reveal--on svg { opacity: 1; }

/* ---- row (remember + forgot) ---- */
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-top: -2px; }
.auth-remember { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-mute); }
.auth-remember input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.auth-forgot { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.auth-forgot:hover { text-decoration: underline; }

/* ---- primary button ---- */
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 50px;
  border: none; cursor: pointer; border-radius: var(--radius); background: var(--accent); color: #fff;
  font-size: 14.5px; font-weight: 650; font-family: inherit; letter-spacing: .01em;
  box-shadow: 0 4px 12px color-mix(in oklab, var(--accent) 30%, transparent);
  transition: background .14s, box-shadow .14s, transform .14s;
}
.auth-btn:hover:not(:disabled) { background: var(--accent-hov); transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in oklab, var(--accent) 42%, transparent); }
.auth-btn:disabled { background: var(--line-2); color: var(--ink-faint); cursor: not-allowed; box-shadow: none; }
.auth-btn svg { width: 18px; height: 18px; transition: transform .14s; }
.auth-btn:hover:not(:disabled) svg { transform: translateX(2px); }

/* ---- checklist ---- */
.auth-checklist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.auth-checklist li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-mute); }
.auth-checklist__icon { width: 16px; height: 16px; flex-shrink: 0; display: grid; place-items: center; color: var(--ink-faint); }
.auth-checklist__icon svg { width: 16px; height: 16px; }
.auth-checklist li.is-ok { color: var(--ok-ink); font-weight: 500; }
.auth-checklist li.is-ok .auth-checklist__icon { color: var(--ok-ink); }

/* ---- banners / hints ---- */
.auth-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: 13.5px; line-height: 1.45; font-weight: 500; }
.auth-banner svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-banner--ok { background: var(--ok-soft); border: 1px solid color-mix(in oklab, var(--ok) 32%, transparent); color: var(--ok-ink); }
.auth-banner--error { background: color-mix(in oklab, var(--danger) 10%, var(--paper)); border: 1px solid color-mix(in oklab, var(--danger) 30%, transparent); color: var(--danger-ink); }
.auth-hint--error { margin-top: 7px; font-size: 12.5px; color: var(--danger-ink); }

/* ---- back link ---- */
.auth-back { display: inline-flex; align-items: center; gap: 7px; align-self: center; margin-top: 4px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--ink-mute); }
.auth-back:hover { color: var(--ink); }
.auth-back svg { width: 16px; height: 16px; transition: transform .14s; }
.auth-back:hover svg { transform: translateX(-2px); }

/* ---- brand status ---- */
.auth-stats { position: relative; z-index: 1; margin-top: auto; }
.auth-stats__status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.72); }
.auth-stats__dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,0.18); flex-shrink: 0; }
.auth-stats__version { margin-left: 6px; font-size: 12px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .auth-shell { flex-direction: column; }
  .auth-brand { flex: 0 0 auto; min-height: 120px; padding: 24px 28px; flex-direction: row; align-items: center; }
  .auth-brand__mosaic { display: none; }
  .auth-brand__logo img { height: 52px; }
  .auth-form { padding: 28px 20px; align-items: start; }
  .auth-stats { display: none; }
}
