/* ==========================================================================
   MY-Card — Auth & account recovery (editorial system)
   Split screen: form on paper (left) + midnight brand panel (right).
   Used by au_base.html → login, register, forgot/verify/reset, verify
   device, admin login. Load after editorial.css. Prefix: au-
   ========================================================================== */

/* The global back-pill + language pill don't belong on these screens —
   the shell carries its own home link and language switch. */
.au-page .mc-page-bar, .au-page .mc-lang-pill, .au-page .mnav { display: none !important; }
.ed.au-page { padding-bottom: 0; }
.ed.au-page.has-au-admin { background: #0D1729; }

/* Midnight surface tokens — shared by the brand panel, the mobile header
   and the whole admin variant. */
.au-brand, .au--admin {
  --ink: #F2EEE5; --ink-2: #BCC0CB; --ink-3: #8C93A3;
  --rule: rgba(242, 238, 229, 0.14); --rule-2: rgba(242, 238, 229, 0.07);
  --brand: #D8B878; --on-brand: #0D1729; --accent: #D8B878;
  --tint: rgba(216, 184, 120, 0.12); --surface: #16243D; --paper: #0D1729; --paper-2: #111D33;
}

/* ---------- Shell ---------- */
.au {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  min-height: 100vh; min-height: 100dvh;
}
.au-main {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh; min-width: 0;
  padding: 0 clamp(20px, 4.2vw, 64px);
}
.au-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 80px; }
.au-bar__home { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-2); transition: color 0.2s, gap 0.3s var(--ease); }
.au-bar__home:hover { color: var(--ink); gap: 0.7rem; }
.au-bar__home svg, .au-bar__home i { width: 16px; height: 16px; }
.au-bar__tools { display: flex; align-items: center; gap: 8px; }
.au-lang button { min-width: 38px; }

.au-body { flex: 1; display: grid; place-items: center; padding: clamp(16px, 3vw, 40px) 0 clamp(40px, 5vw, 64px); }
.au-col { width: 100%; max-width: 440px; display: grid; gap: 30px; align-content: start; }
.au-col--wide { max-width: 480px; }

.au-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  padding: 18px 0 22px; border-top: 1px solid var(--rule);
  font-size: 0.8rem; color: var(--ink-3);
}
.au-foot__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.au-foot__item svg, .au-foot__item i { width: 14px; height: 14px; color: var(--accent); }

/* ---------- Brand panel ---------- */
.au-brand {
  position: relative;
  background: #0D1729; color: var(--ink);
  min-width: 0;
}
html[data-ed-theme="dark"] .au-brand { background: #060A11; border-left: 1px solid rgba(242, 238, 229, 0.06); }
.au-brand__grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(242, 238, 229, 0.045) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(0deg, rgba(242, 238, 229, 0.045) 0 1px, transparent 1px 36px);
  mask-image: radial-gradient(60% 55% at 55% 45%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 55% at 55% 45%, #000 20%, transparent 80%);
}
/* Sticky inner column: logo / stage / copy stay in view while a long form scrolls */
.au-brand__in > .au-brand__logo, .au-brand__in > .au-stage, .au-brand__in > .au-brand__copy { position: relative; z-index: 1; }
.au-brand__in {
  position: sticky; top: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh; height: 100dvh;
  padding: 30px clamp(28px, 4vw, 64px) clamp(32px, 4vw, 52px);
  overflow: hidden;
}
.au-brand__logo {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 48; color: var(--ink);
  height: 50px;
}
.au-brand__mark { width: 26px; height: 26px; color: var(--accent); }
.au-brand__mark path[stroke] { stroke: #0D1729; }
.au-brand__tag {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  border-radius: 4px; padding: 2px 6px; margin-left: 4px;
}
.au-brand__copy { display: grid; gap: 14px; max-width: 30rem; }
.au-brand__kicker { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 0.7rem; }
.au-brand__kicker::after { content: ''; width: 2.5rem; height: 1px; background: currentColor; opacity: 0.5; }
.au-brand__line {
  font-family: var(--serif); font-weight: 380; font-variation-settings: 'opsz' 96;
  font-size: clamp(2rem, 2.9vw, 2.9rem); line-height: 1.04; letter-spacing: -0.028em;
  color: var(--ink); text-wrap: balance;
}
.au-brand__line em { font-style: italic; color: var(--accent); font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; }
.au-brand__sub { font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); max-width: 40ch; text-wrap: pretty; }

/* ---------- Stage + sample cards (adapted from .ed-idcard) ---------- */
.au-stage {
  position: relative; align-self: center; justify-self: center;
  width: min(100%, 470px); aspect-ratio: 1 / 0.86;
  margin: 12px 0;
}
.au-card {
  --c-bg: #FBFAF6; --c-fg: #10131A; --c-mute: #6E727C; --c-acc: #96702F;
  position: absolute; width: 80%; aspect-ratio: 85.6 / 54;
  border-radius: clamp(12px, 1.4vw, 16px);
  background: var(--c-bg); color: var(--c-fg);
  padding: clamp(14px, 1.9vw, 24px);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 30px 60px -18px rgba(0, 0, 0, 0.6), 0 60px 90px -40px rgba(0, 0, 0, 0.5);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.8s var(--ease);
}
.au-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.07), transparent 40%, rgba(0, 0, 0, 0.06)); }
.au-card--back {
  --c-bg: linear-gradient(150deg, #253A5F 0%, #16243D 72%); --c-fg: #F2EEE5; --c-mute: rgba(242, 238, 229, 0.62); --c-acc: #D8B878;
  top: 2%; right: 0; rotate: 7deg;
  box-shadow: inset 0 0 0 1px rgba(216, 184, 120, 0.22), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.au-card--front { bottom: 6%; left: 0; z-index: 2; rotate: -5deg; }
.au-card__sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.35) 48%, transparent 62%);
  background-size: 260% 100%; background-position: calc(50% + var(--shx, 0%)) 0;
  mix-blend-mode: soft-light;
  transition: background-position 0.8s var(--ease);
}
.au-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.au-card__brand { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--serif); font-size: clamp(0.72rem, 0.95vw, 0.88rem); color: var(--c-mute); }
.au-card__brand svg { width: 14px; height: 14px; color: var(--c-acc); }
.au-card__brand svg path[stroke] { stroke: var(--c-fg); }
.au-card__avatar { width: clamp(38px, 4vw, 50px); height: clamp(38px, 4vw, 50px); border-radius: 50%; display: grid; place-items: center; background: #16243D; color: #D8B878; border: 1.5px solid rgba(150, 112, 47, 0.45); }
.au-card__avatar svg { width: 55%; height: 55%; }
.au-card__avatar svg path[stroke] { stroke: #16243D; }
.au-card__name { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.05; letter-spacing: -0.02em; font-variation-settings: 'opsz' 72; color: var(--c-fg); }
.au-card__role { display: block; margin-top: 0.35rem; font-size: clamp(0.66rem, 0.9vw, 0.8rem); color: var(--c-mute); }
.au-card__role strong { color: var(--c-acc); font-weight: 500; }
.au-card__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem; font-family: var(--mono); font-size: clamp(0.55rem, 0.75vw, 0.68rem); letter-spacing: 0.03em; color: var(--c-mute); }
.au-card__foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-card__back-body { flex: 1; display: flex; align-items: center; gap: 1rem; }
.au-card__qr { flex: 0 0 34%; aspect-ratio: 1; background: #FBFAF6; color: #10131A; border-radius: 6px; padding: 6px; display: grid; }
.au-card__qr svg { width: 100%; height: 100%; }
.au-card__back-copy { font-size: clamp(0.6rem, 0.82vw, 0.76rem); line-height: 1.45; color: var(--c-mute); }
.au-card__back-copy strong { display: block; font-family: var(--serif); font-weight: 450; font-size: clamp(0.85rem, 1.2vw, 1.08rem); color: var(--c-fg); margin-bottom: 0.25rem; }

/* Slow drift + entrance (rotate/translate are separate properties so the
   pointer tilt on `transform` composes with them) */
.js .au-card--front { animation: auIn 1s var(--ease) 0.15s both, auDriftA 9s ease-in-out 1.2s infinite; }
.js .au-card--back  { animation: auIn 1s var(--ease) both, auDriftB 11s ease-in-out 1s infinite; }
@keyframes auIn { from { opacity: 0; translate: 0 36px; } }
@keyframes auDriftA { 0%, 100% { translate: 0 0; rotate: -5deg; } 50% { translate: 0 -12px; rotate: -3.4deg; } }
@keyframes auDriftB { 0%, 100% { translate: 0 0; rotate: 7deg; } 50% { translate: 0 10px; rotate: 8.6deg; } }
.js .au-brand__copy > * { animation: auRise 0.9s var(--ease) both; }
.js .au-brand__copy > :nth-child(2) { animation-delay: 0.1s; }
.js .au-brand__copy > :nth-child(3) { animation-delay: 0.2s; }
@keyframes auRise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Form head ---------- */
.au-head { display: grid; gap: 14px; }
.au-title {
  font-family: var(--serif); font-weight: 380; font-variation-settings: 'opsz' 96;
  font-size: clamp(2.3rem, 3.5vw, 3.15rem); line-height: 1.02; letter-spacing: -0.03em;
  color: var(--ink); text-wrap: balance;
}
.au-title em { display: block; font-style: italic; color: var(--accent); font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; }
.au-lede { color: var(--ink-2); font-size: 1rem; line-height: 1.6; text-wrap: pretty; }
.au-lede strong { color: var(--ink); font-weight: 560; }
.au-chip { justify-self: start; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2); background: var(--surface); }
.au-chip svg, .au-chip i { width: 14px; height: 14px; color: var(--accent); }

.js .au-col > * { animation: auRise 0.8s var(--ease) both; }
.js .au-col > :nth-child(2) { animation-delay: 0.07s; }
.js .au-col > :nth-child(3) { animation-delay: 0.14s; }
.js .au-col > :nth-child(4) { animation-delay: 0.21s; }

.au-done { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent); background: var(--tint); color: var(--accent); }
.au-done svg, .au-done i { width: 24px; height: 24px; }
.au-head .ed-kicker__n svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- Recovery steps ---------- */
.au-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: au-step; }
.au-steps li { display: grid; gap: 8px; font-size: 0.78rem; color: var(--ink-3); }
.au-steps li::before { content: ''; height: 2px; border-radius: 2px; background: var(--rule); }
.au-steps li.is-done::before { background: var(--ink-3); }
.au-steps li.is-current::before { background: var(--accent); }
.au-steps li.is-current { color: var(--ink); }
.au-steps b { font-family: var(--mono); font-weight: 400; color: var(--accent); margin-right: 0.35rem; font-size: 0.72rem; }

/* ---------- Notices (Django messages, shown inline) ---------- */
.au-notes { display: grid; gap: 8px; }
.au-note {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  background: var(--tint); color: var(--ink); font-size: 0.9rem; line-height: 1.45;
}
.au-note svg, .au-note i { width: 17px; height: 17px; margin-top: 1px; color: var(--accent); flex-shrink: 0; }
.au-note--error { border-color: color-mix(in oklab, #B3402A 40%, transparent); background: color-mix(in oklab, #B3402A 8%, var(--surface)); }
.au-note--error svg, .au-note--error i { color: #B3402A; }
.au-note--ok { border-color: color-mix(in oklab, #2F7A4F 40%, transparent); background: color-mix(in oklab, #2F7A4F 8%, var(--surface)); }
.au-note--ok svg, .au-note--ok i { color: #2F7A4F; }
.au-note--warn svg, .au-note--warn i { color: #B7832F; }
html[data-ed-theme="dark"] .au-note--error svg, html[data-ed-theme="dark"] .au-note--error i, .au--admin .au-note--error svg { color: #E48D78; }
html[data-ed-theme="dark"] .au-note--ok svg, html[data-ed-theme="dark"] .au-note--ok i { color: #7FC79C; }
.au-note p { margin: 0; }

/* ---------- Form ---------- */
.au-form { display: grid; gap: 20px; }
.au-field { display: grid; gap: 8px; min-width: 0; }
.au-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.au-label a { font-family: var(--sans); font-size: 0.84rem; letter-spacing: 0; text-transform: none; }
.au-control {
  position: relative; display: flex; align-items: center;
  height: 54px; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.au-control:hover { border-color: color-mix(in oklab, var(--ink) 28%, transparent); }
.au-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 13%, transparent); }
.au-control > svg, .au-control > i { width: 18px; height: 18px; margin-left: 16px; color: var(--ink-3); transition: color 0.2s; }
.au-control:focus-within > svg, .au-control:focus-within > i { color: var(--brand); }
.ed .au-control input:not([type="hidden"]):not([type="checkbox"]) {
  flex: 1; min-width: 0; width: 100%; height: 100%;
  border: 0; border-radius: 14px; background: transparent; box-shadow: none; outline: none;
  padding: 0 14px; margin: 0;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
}
.ed .au-control input::placeholder { color: var(--ink-3); opacity: 0.8; }
.ed .au-control input:-webkit-autofill,
.ed .au-control input:-webkit-autofill:hover,
.ed .au-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 60px var(--surface) inset;
  caret-color: var(--ink);
}
.au-field.is-invalid .au-control { border-color: #B3402A; }
.au-field.is-invalid .au-control:focus-within { box-shadow: 0 0 0 4px color-mix(in oklab, #B3402A 14%, transparent); }

.au-eye {
  flex-shrink: 0; width: 46px; height: 46px; margin-right: 4px;
  display: grid; place-items: center; border-radius: 10px; color: var(--ink-3);
  transition: color 0.2s, background 0.2s;
}
.au-eye:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.au-eye svg, .au-eye i { width: 18px; height: 18px; }
.au-eye [data-mc-eye="off"] { display: none; }
.au-eye[data-visible="true"] [data-mc-eye="on"] { display: none; }
.au-eye[data-visible="true"] [data-mc-eye="off"] { display: block; }

.au-err { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.84rem; color: #B3402A; line-height: 1.4; }
.au-err svg, .au-err i { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
html[data-ed-theme="dark"] .au-err, .au--admin .au-err { color: #E48D78; }
.au-err ul { margin: 0; padding: 0; list-style: none; }
.au-help { font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }
.au-help ul { margin: 6px 0 0; padding-left: 1.1rem; list-style: disc; display: grid; gap: 2px; }
.au-caps { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--accent); font-weight: 520; }
.au-caps[hidden] { display: none; }
.au-caps svg, .au-caps i { width: 15px; height: 15px; }

.au-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.au-check { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; user-select: none; font-size: 0.92rem; color: var(--ink-2); }
.au-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.au-check__box { width: 20px; height: 20px; border-radius: 6px; border: 1px solid color-mix(in oklab, var(--ink) 30%, transparent); background: var(--surface); display: grid; place-items: center; transition: background 0.2s, border-color 0.2s; }
.au-check__box svg { width: 13px; height: 13px; color: var(--on-brand); opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.2s var(--ease); }
.au-check input:checked + .au-check__box { background: var(--brand); border-color: var(--brand); }
.au-check input:checked + .au-check__box svg { opacity: 1; transform: none; }
.au-check input:focus-visible + .au-check__box { outline: 2px solid var(--brand); outline-offset: 3px; }

.au-submit { height: 56px; font-size: 1rem; position: relative; }
.au-submit__label { display: inline-flex; align-items: center; gap: 0.6rem; }
.au-submit__busy { display: none; align-items: center; gap: 0.6rem; }
.au-submit.is-busy .au-submit__label { display: none; }
.au-submit.is-busy .au-submit__busy { display: inline-flex; }
.au-submit.is-busy { cursor: progress; }
.au-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in oklab, currentColor 30%, transparent); border-top-color: currentColor; animation: auSpin 0.7s linear infinite; }
@keyframes auSpin { to { transform: rotate(360deg); } }
.au-submit.is-ready { animation: auNudge 0.6s var(--ease); }
@keyframes auNudge { 40% { transform: scale(1.02); } }

.au-divider { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.au-divider::before, .au-divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

.au-alt {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: border-color 0.3s;
}
.au-alt:hover { border-color: var(--ink); }
.au-alt__t { display: grid; gap: 2px; }
.au-alt__t strong { font-family: var(--serif); font-weight: 450; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); }
.au-alt__t span { font-size: 0.86rem; color: var(--ink-3); }
.au-alt__go { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; color: var(--ink); transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.3s var(--ease); }
.au-alt__go svg, .au-alt__go i { width: 17px; height: 17px; }
.au-alt:hover .au-alt__go { background: var(--brand); border-color: var(--brand); color: var(--on-brand); transform: rotate(-45deg); }

.au-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; font-size: 0.92rem; color: var(--ink-2); }
.au-links .ed-link { font-size: 0.92rem; }

/* Default Django {{ form.as_p }} output inside .au-form (legacy templates) */
.au-form--plain p { display: grid; gap: 8px; margin: 0; }
.au-form--plain label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.au-form--plain .helptext, .au-form--plain .helptext ul { font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }
.au-form--plain .helptext ul { margin: 0; padding-left: 1.1rem; list-style: disc; }
.au-form--plain .errorlist { margin: 0; padding: 0; list-style: none; color: #B3402A; font-size: 0.84rem; }
.au-form--plain input:not([type="hidden"]) {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
.au-form--plain input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 13%, transparent); }

/* ---------- Password strength (password-meter.js sets data-level 0–5) ---------- */
.au-meter { display: grid; gap: 10px; }
.au-meter__bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.au-meter__bars span { height: 3px; border-radius: 3px; background: var(--rule); transition: background 0.3s var(--ease); }
.au-meter[data-level="1"] .au-meter__bars span:nth-child(-n+1),
.au-meter[data-level="2"] .au-meter__bars span:nth-child(-n+2) { background: #B3402A; }
.au-meter[data-level="3"] .au-meter__bars span:nth-child(-n+3) { background: #B7832F; }
.au-meter[data-level="4"] .au-meter__bars span:nth-child(-n+4),
.au-meter[data-level="5"] .au-meter__bars span { background: #2F7A4F; }
html[data-ed-theme="dark"] .au-meter[data-level="4"] .au-meter__bars span:nth-child(-n+4),
html[data-ed-theme="dark"] .au-meter[data-level="5"] .au-meter__bars span { background: #7FC79C; }
.au-meter__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.8rem; color: var(--ink-3); }
.au-meter__words { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.au-meter__words span { display: none; }
.au-meter[data-level="0"] [data-l="0"], .au-meter:not([data-level]) [data-l="0"],
.au-meter[data-level="1"] [data-l="1"], .au-meter[data-level="2"] [data-l="2"],
.au-meter[data-level="3"] [data-l="3"], .au-meter[data-level="4"] [data-l="4"],
.au-meter[data-level="5"] [data-l="5"] { display: inline; }
.au-meter [data-pw-verdict], .au-meter [data-pw-fill] { display: none; }
.au-meter__checks { display: flex; flex-wrap: wrap; gap: 6px; }
.au-meter__checks li { display: inline-flex; align-items: center; gap: 0.3rem; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.au-meter__checks svg, .au-meter__checks i { width: 13px; height: 13px; }
.au-meter__checks .au-ico-on { display: none; }
.au-meter__checks li.is-ok { color: var(--ink); border-color: color-mix(in oklab, #2F7A4F 40%, transparent); background: color-mix(in oklab, #2F7A4F 7%, transparent); }
.au-meter__checks li.is-ok .au-ico-on { display: block; color: #2F7A4F; }
.au-meter__checks li.is-ok .au-ico-off { display: none; }
html[data-ed-theme="dark"] .au-meter__checks li.is-ok .au-ico-on { color: #7FC79C; }
.au-match { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--ink-3); }
.au-match[hidden] { display: none; }
.au-match svg, .au-match i { width: 15px; height: 15px; }
.au-match.is-ok { color: #2F7A4F; }
.au-match [data-ok], .au-match.is-ok [data-no] { display: none; }
.au-match.is-ok [data-ok] { display: inline; }
.au-rules summary { cursor: pointer; width: fit-content; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.au-rules summary::-webkit-details-marker { display: none; }
.au-rules summary::after { content: '+'; font-family: var(--mono); color: var(--accent); transition: transform 0.3s var(--ease); }
.au-rules[open] summary::after { transform: rotate(45deg); }
html[data-ed-theme="dark"] .au-match.is-ok { color: #7FC79C; }

/* ---------- OTP: one real input under six visual cells ---------- */
.au-otp { position: relative; }
.au-otp__cells { display: none; }
.ed .au-otp__input {
  width: 100%; height: 64px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink); text-align: center; font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.5em; padding: 0 0 0 0.5em;
}
.ed .au-otp__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 13%, transparent); }
.js .au-otp__cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 18px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.js .ed .au-otp__input, .js .au-otp .au-otp__input {
  position: absolute; inset: 0; z-index: 2; height: 100%;
  opacity: 0; border: 0; box-shadow: none; cursor: text;
  font-size: 16px; /* no iOS zoom */
}
.au-otp__cell {
  height: 68px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surface);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 400; font-size: 2rem; font-variation-settings: 'opsz' 72; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.25s var(--ease);
}
.au-otp__cell.is-filled { border-color: color-mix(in oklab, var(--ink) 45%, transparent); }
.au-otp__cell.is-filled span { animation: auPop 0.3s var(--ease); display: block; }
@keyframes auPop { from { transform: translateY(6px); opacity: 0; } }
.au-otp.is-focused .au-otp__cell.is-active { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 13%, transparent); }
.au-otp.is-focused .au-otp__cell.is-active:not(.is-filled)::after { content: ''; width: 1.5px; height: 28px; background: var(--brand); animation: auBlink 1s steps(1) infinite; }
@keyframes auBlink { 50% { opacity: 0; } }
.au-otp__sep { justify-self: center; width: 8px; height: 1.5px; background: var(--ink-3); }
.au-otp.is-complete .au-otp__cell { border-color: var(--accent); }
.au-otp__hint { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: var(--ink-3); }
.au-otp__hint span { display: inline-flex; align-items: center; gap: 0.35rem; }
.au-otp__hint svg, .au-otp__hint i { width: 14px; height: 14px; }

/* Resend + countdown */
.au-resend { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--rule); }
.au-resend__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-3); }
.au-resend__btn { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 560; color: var(--ink); padding: 6px 0; }
.au-resend__btn svg, .au-resend__btn i { width: 16px; height: 16px; }
.au-resend__btn:disabled { color: var(--ink-3); cursor: not-allowed; }
.au-resend__btn:not(:disabled):hover { color: var(--brand); }
.au-resend__bar { height: 2px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.au-resend__bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1s linear; }
.au-resend__bar[hidden] { display: none; }

/* ---------- Phone picker (register) ---------- */
.au-phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.au-country { position: relative; }
.au-country input[type="hidden"] { display: none; }
.au-country__btn {
  height: 54px; min-width: 116px; padding: 0 12px 0 14px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); color: var(--ink);
  font-family: var(--mono); font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.au-country__btn:hover { border-color: color-mix(in oklab, var(--ink) 28%, transparent); }
.au-country__btn[aria-expanded="true"], .au-country__btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 13%, transparent); }
.au-country__btn svg, .au-country__btn i { width: 15px; height: 15px; color: var(--ink-3); }
.au-country__flag { font-size: 1.15rem; line-height: 1; }
.au-country__dropdown {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 300px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--lift-3); overflow: hidden;
}
.au-country__dropdown.hidden, .au-country__empty.hidden { display: none; }
.au-country__search { padding: 10px; border-bottom: 1px solid var(--rule); }
.ed .au-country__search input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: inherit; font-size: 0.9rem; }
.ed .au-country__search input:focus { outline: none; border-color: var(--brand); }
.au-country [data-country-list] { max-height: 250px; overflow-y: auto; padding: 6px 0; margin: 0; list-style: none; }
.au-country [data-country-item] { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 0.9rem; cursor: pointer; color: var(--ink); }
.au-country [data-country-item]:hover, .au-country [data-country-item].active { background: var(--tint); }
.au-country [data-country-item] .flag { font-size: 1.1rem; }
.au-country [data-country-item] .label { display: flex; flex-direction: column; line-height: 1.2; }
.au-country [data-country-item] .label small { font-family: var(--mono); color: var(--ink-3); font-size: 0.74rem; }
.au-country__empty { padding: 14px; text-align: center; font-size: 0.88rem; color: var(--ink-3); }

/* ---------- Admin / operator console variant ---------- */
.au--admin { background: #0D1729; color: var(--ink); }
.au--admin .au-brand { background: #060A11; border-left: 1px solid rgba(216, 184, 120, 0.16); }
html[data-ed-theme="dark"] .au--admin { background: #0A1220; }
.au--admin .au-control, .au--admin .au-otp__cell { background: #121E34; }
.au--admin .au-foot__item svg { color: var(--accent); }
.au--admin .ed-lang button.is-active { background: var(--accent); color: #0D1729; }
.au-card--pass {
  --c-bg: linear-gradient(155deg, #1B2B47 0%, #0D1729 75%); --c-fg: #F2EEE5; --c-mute: rgba(242, 238, 229, 0.6); --c-acc: #D8B878;
  top: 6%; left: 8%; width: 84%; rotate: -4deg;
  box-shadow: inset 0 0 0 1px rgba(216, 184, 120, 0.4), 0 40px 80px -24px rgba(0, 0, 0, 0.8);
}
.js .au-card--pass { animation: auIn 1s var(--ease) both, auDriftA 10s ease-in-out 1s infinite; }
.au-card--pass .au-card__name { color: #F2EEE5; }
.au-card--pass .au-card__avatar { background: rgba(216, 184, 120, 0.12); border-color: rgba(216, 184, 120, 0.5); color: #D8B878; }
.au-card--pass .au-card__avatar svg { width: 46%; height: 46%; }
.au-card__chip { display: block; width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #E6CD98, #A9823E); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); position: relative; }
.au-card__chip::before { content: ''; position: absolute; inset: 7px 0; border-top: 1px solid rgba(0, 0, 0, 0.22); border-bottom: 1px solid rgba(0, 0, 0, 0.22); }
.au-stamp {
  position: absolute; left: 0; bottom: 0; z-index: 3;
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 1px dashed rgba(216, 184, 120, 0.7); color: #D8B878;
  font-family: var(--mono); font-size: 0.6rem; line-height: 1.35; letter-spacing: 0.14em; text-transform: uppercase;
  rotate: 12deg; background: rgba(6, 10, 17, 0.7);
}
.js .au-stamp { animation: auStamp 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both; }
@keyframes auStamp { from { opacity: 0; scale: 1.6; } }
.au-warn { display: flex; gap: 0.6rem; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in oklab, var(--accent) 50%, transparent); font-size: 0.86rem; color: var(--ink-2); line-height: 1.5; }
.au-warn svg, .au-warn i { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ---------- Bangla ---------- */
.ed:lang(bn) :is(.au-title, .au-brand__line, .au-alt__t strong, .au-card__name) { letter-spacing: 0; }
.ed:lang(bn) :is(.au-title, .au-brand__line) em { font-style: normal; }
.ed:lang(bn) .au-title { line-height: 1.22; font-weight: 500; font-size: clamp(2rem, 3vw, 2.7rem); }
.ed:lang(bn) .au-brand__line { line-height: 1.25; font-weight: 500; }
.ed:lang(bn) :is(.au-label, .au-divider, .au-brand__kicker, .au-meter__words) { letter-spacing: 0.02em; text-transform: none; }
.ed:lang(bn) .au-label { font-size: 0.82rem; }
.ed:lang(bn) .au-steps li { font-size: 0.84rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .au { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .au-brand__sub { display: none; }
}
@media (max-width: 960px) {
  .au { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .au-brand { order: -1; border-left: 0 !important; }
  .au-brand__in { position: relative; height: 64px; display: flex; align-items: center; padding: 0 var(--gutter); }
  .au-brand__grid, .au-stage, .au-brand__copy { display: none; }
  .au-brand__logo { height: auto; font-size: 1.2rem; }
  .au-main { min-height: 0; padding: 0 var(--gutter); }
  /* Tools float over the slim midnight header */
  .au-bar {
    position: absolute; top: 0; right: var(--gutter); z-index: 3; height: 64px;
    --ink: #F2EEE5; --ink-2: #BCC0CB; --ink-3: #8C93A3; --rule: rgba(242, 238, 229, 0.2); --paper: #0D1729;
  }
  .au-bar__home { display: none; }
  .au-bar .ed-iconbtn { width: 36px; height: 36px; }
  .au-bar .ed-lang button.is-active { background: #F2EEE5; color: #0D1729; }
  .au-body { place-items: start center; padding: 36px 0 48px; }
  .au-foot { justify-content: center; text-align: center; }
}
@media (max-width: 420px) {
  .au-col { gap: 26px; }
  .au-otp__cells { gap: 6px !important; grid-template-columns: repeat(3, minmax(0, 1fr)) 12px repeat(3, minmax(0, 1fr)) !important; }
  .au-otp__cell { height: 58px; font-size: 1.7rem; }
  .au-country__btn { min-width: 104px; }
  .au-steps li { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js .au-card--front, .js .au-card--back, .js .au-card--pass, .js .au-stamp,
  .js .au-brand__copy > *, .js .au-col > *, .au-otp__cell.is-filled span, .au-submit.is-ready { animation: none; }
  .au-card, .au-card__sheen { transition: none; }
  .au-otp.is-focused .au-otp__cell.is-active:not(.is-filled)::after { animation: none; }
  .au-spin { animation-duration: 1.6s; }
}

/* ---------- Admin login follows the operator palette ("Graphite & Garnet", see ed-app.css) ---------- */
.ed.au-page.has-au-admin { background: #161B24; }
.au--admin, .au--admin .au-brand {
  --ink: #EDEFF3; --ink-2: #B3B9C4; --ink-3: #858C99;
  --rule: rgba(232, 234, 238, 0.12); --rule-2: rgba(232, 234, 238, 0.06);
  --brand: #E36B7A; --on-brand: #161B24; --accent: #E36B7A;
  --tint: rgba(227, 107, 122, 0.12); --surface: #232A36; --paper: #161B24; --paper-2: #1C222D;
}
.au--admin { background: #161B24; }
html[data-ed-theme="dark"] .au--admin { background: #0E1116; }
.au--admin .au-brand { background: #0A0D12; border-left-color: rgba(227, 107, 122, 0.18); }
.au--admin .au-control, .au--admin .au-otp__cell { background: #1C222D; }
.au--admin .ed-lang button.is-active { color: #161B24; }
.au--admin .au-card--pass {
  --c-bg: linear-gradient(155deg, #2A323F 0%, #161B24 75%); --c-acc: #E36B7A;
  box-shadow: inset 0 0 0 1px rgba(227, 107, 122, 0.4), 0 40px 80px -24px rgba(0, 0, 0, 0.8);
}
.au--admin .au-card--pass .au-card__avatar { background: rgba(227, 107, 122, 0.12); border-color: rgba(227, 107, 122, 0.5); color: #E36B7A; }
.au--admin .au-card__chip { background: linear-gradient(135deg, #E9A2AC, #9E2B3A); }
.au--admin .au-stamp { border-color: rgba(227, 107, 122, 0.7); color: #E36B7A; background: rgba(10, 13, 18, 0.7); }

@media (max-width: 640px) { .au-label, .au-divider, .au-brand__kicker { font-size: 0.75rem; } }
