/* ============================================================
   AUTH SHELL — login, register, password reset, invite (template: users/auth_shell.html)
   >= 769px : split-screen card (brand panel + form), as on the original login page.
   <= 768px : no card, no box: the form is flat and edge-to-edge under the site header.
   Tokens: variables.css (--flow-gutter, --field-gap, --label-gap, --field-h).
   ============================================================ */

.au-page {
    --au-header-h: 64px;
    min-height: calc(100vh - var(--au-header-h));
    min-height: calc(100dvh - var(--au-header-h));
    background: #07070e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: clip;            /* clip, not hidden: keeps the page a plain scroll container for sticky children */
}
/* grid overlay */
.au-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
    background-size: 52px 52px;
    pointer-events: none;
}
/* glow orbs: radial gradients already fade out, so no blur filter is needed (a blurred 500px layer is costly) */
.au-orb { position: absolute; border-radius: 50%; pointer-events: none; animation: au-orb-float 9s ease-in-out infinite; }
.au-orb-1 { width: 620px; height: 620px; background: radial-gradient(circle, rgba(220, 38, 38, .22) 0%, transparent 68%); top: -22%; left: -14%; }
.au-orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(220, 38, 38, .12) 0%, transparent 68%); bottom: -14%; right: -6%; animation-delay: 3.5s; }
@keyframes au-orb-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-28px) scale(1.04); } }

/* ── card ───────────────────────────────────────── */
.au-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 980px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, .1), 0 40px 100px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
    display: flex;
}

/* ── brand panel ────────────────────────────────── */
.au-side {
    flex: 0 0 40%;
    background: linear-gradient(155deg, #0e0d1a 0%, #100a0a 100%);
    padding: 3.5rem 2.8rem;
    border-right: 1px solid rgba(255, 255, 255, .06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.au-side::before { content: ''; position: absolute; top: -90px; left: -80px; width: 340px; height: 340px; background: radial-gradient(circle, rgba(220, 38, 38, .3) 0%, transparent 65%); pointer-events: none; }
.au-side::after  { content: ''; position: absolute; bottom: -60px; right: -60px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(220, 38, 38, .14) 0%, transparent 65%); pointer-events: none; }
.au-logo { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 1; margin-bottom: 3rem; text-decoration: none; }
.au-logo img { height: 36px; width: auto; }  /* filter + mix-blend-mode: dark-theme-fixes.css (.al-logo img) */
.au-logo span { font-size: 1.1rem; font-weight: 900; color: #fff; letter-spacing: .04em; }
.au-side-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.au-badge {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(220, 38, 38, .13); color: var(--primary-text); border: 1px solid rgba(220, 38, 38, .28);
    border-radius: 50px; padding: .28rem .85rem;
    font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-mono);
    margin-bottom: 1.4rem; width: fit-content;
}
.au-h { font-size: clamp(1.9rem, 3.5vw, 2.7rem); font-weight: 900; color: #fff; line-height: 1.08; margin: 0 0 .9rem; letter-spacing: -.02em; }
.au-h span { background: linear-gradient(135deg, #f87171, #dc2626); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.au-side-desc { color: rgba(255, 255, 255, .6); font-size: .9rem; margin: 0 0 2rem; line-height: 1.6; }
.au-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.au-perk { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .72); font-size: .875rem; }
.au-perk-ic { width: 28px; height: 28px; border-radius: 8px; background: rgba(220, 38, 38, .14); border: 1px solid rgba(220, 38, 38, .24); display: flex; align-items: center; justify-content: center; color: var(--primary-text); font-size: .7rem; flex-shrink: 0; }
.au-stats { display: flex; gap: 1.5rem; padding-top: 1.8rem; border-top: 1px solid rgba(255, 255, 255, .06); position: relative; z-index: 1; margin-top: 2.5rem; }
.au-stat-val { font-size: 1.35rem; font-weight: 900; color: #fff; line-height: 1; }
.au-stat-lbl { font-size: .7rem; color: rgba(255, 255, 255, .5); text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-mono); margin-top: .2rem; }

/* ── form panel ─────────────────────────────────── */
.au-main {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, .022);
    padding: 3.5rem 3.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.au-eyebrow {
    display: flex; align-items: center; gap: .6rem;
    font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
    color: var(--primary-text); font-family: var(--font-mono); margin-bottom: 1.4rem;
}
.au-eyebrow::before, .au-eyebrow::after { content: ''; flex: 0 0 30px; height: 1px; background: rgba(220, 38, 38, .38); }
.au-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .35rem; }
.au-icon {
    width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(220, 38, 38, .12); border: 1px solid rgba(220, 38, 38, .3);
    color: var(--primary-text); font-size: 1.15rem;
}
.au-icon--ok { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); color: #4ade80; }
.au-title { font-size: 1.8rem; font-weight: 900; color: #fff; margin: 0 0 .3rem; letter-spacing: -.02em; line-height: 1.15; }
.au-head .au-title { margin: 0; }
.au-lead { color: rgba(255, 255, 255, .78); font-size: 1rem; line-height: 1.55; margin: 0 0 1.75rem; }
.au-head + .au-lead { margin-top: .6rem; }

/* fields */
.au-field { margin-bottom: 1.1rem; }
.au-field > label,
.au-label {
    display: block; margin: 0 0 var(--label-gap);
    font-size: .875rem; font-weight: 600; line-height: 1.3; color: rgba(255, 255, 255, .88);
}
.au-wrap { position: relative; }
.au-field :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
    width: 100%;
    min-height: var(--field-h);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: .6rem .9rem;
    color: #fff;
    font-size: 16px;           /* 16px: iOS Safari zooms the page into smaller fields */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--dur-fast, .15s) var(--ease-out, ease-out), box-shadow var(--dur-fast, .15s) var(--ease-out, ease-out), background-color var(--dur-fast, .15s) var(--ease-out, ease-out);
}
.au-field .au-wrap > input { padding-left: 2.6rem; }
.au-field .au-wrap > input.has-pw { padding-right: 3rem; }
.au-field .au-wrap > input.has-status { padding-right: 2.4rem; }
.au-field :is(input, select, textarea):focus { border-color: rgba(220, 38, 38, .6); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.au-field input.inv { border-color: rgba(239, 68, 68, .55); box-shadow: 0 0 0 3px rgba(239, 68, 68, .1); }
.au-field input::placeholder { color: rgba(255, 255, 255, .42); }
.au-field input:-webkit-autofill, .au-field input:-webkit-autofill:hover, .au-field input:-webkit-autofill:focus, .au-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #12111c inset !important; -webkit-text-fill-color: #fff !important; caret-color: #fff;
}
.au-ic { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .5); font-size: .85rem; pointer-events: none; transition: color var(--dur-fast, .15s); }
.au-field .au-wrap > input:focus ~ .au-ic { color: var(--primary-text); }
.au-pw-btn {
    position: absolute; right: .15rem; top: 50%; transform: translateY(-50%);
    width: var(--tap-min); height: var(--tap-min); min-height: 0; padding: 0;
    background: none; border: 0; color: rgba(255, 255, 255, .6); cursor: pointer; font-size: .95rem; line-height: 1;
    transition: color var(--dur-fast, .15s);
}
.au-pw-btn:hover { color: rgba(255, 255, 255, .9); }
.au-status { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); font-size: .85rem; pointer-events: none; }
.au-hint { margin: .25rem 0 0; color: rgba(255, 255, 255, .7); font-size: .8rem; line-height: 1.35; }
.au-hint--live { min-height: 1.08rem; }
.au-err { margin: .25rem 0 0; color: #fca5a5; font-size: .85rem; display: flex; align-items: flex-start; gap: .3rem; }
.au-err i { margin-top: .15rem; flex-shrink: 0; }
.au-req { color: var(--primary-text); font-weight: 700; }
.au-forgot { display: block; text-align: right; margin: -.4rem 0 .9rem; font-size: .875rem; }
.au-forgot a { color: var(--primary-text); text-decoration: none; font-weight: 600; display: inline-block; padding-block: .35rem; }
.au-forgot a:hover { text-decoration: underline; }
.au-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.au-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; }  /* stays 2 columns on phones (first/last name) */
.au-full { grid-column: 1 / -1; }

/* alerts */
.au-alert {
    display: flex; align-items: flex-start; gap: .6rem;
    background: rgba(220, 38, 38, .1); border: 1px solid rgba(220, 38, 38, .28); border-radius: 10px;
    padding: .65rem .85rem; margin: 0 0 1rem;
    color: #fecaca; font-size: .875rem; line-height: 1.45;
}
.au-alert i { margin-top: .2rem; flex-shrink: 0; }
.au-alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.au-alert[hidden] { display: none; }
.au-alert--info { background: rgba(59, 130, 246, .12); border-color: rgba(96, 165, 250, .45); color: #bfdbfe; }

/* buttons */
.au-btn {
    width: 100%; min-height: 50px; border: 0; border-radius: 10px; padding: .7rem 1.25rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff;
    font-size: 1rem; font-weight: 700; letter-spacing: .02em; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    box-shadow: 0 4px 20px rgba(220, 38, 38, .35);
    transition: transform var(--dur-fast, .15s) var(--ease-out, ease-out), filter var(--dur-fast, .15s);
}
.au-btn:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }
.au-btn:active { transform: none; }
.au-btn:disabled { opacity: .7; cursor: progress; }
.au-btn--ghost {
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); box-shadow: none;
    color: rgba(255, 255, 255, .85); font-weight: 600;
}
.au-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; filter: none; }
.au-btn--soft { background: rgba(220, 38, 38, .32); border: 1px solid rgba(248, 113, 113, .55); color: #fecaca; box-shadow: none; }
.au-btn--soft:hover { background: rgba(220, 38, 38, .4); color: #fff; filter: none; }
.au-nav { display: flex; gap: .75rem; margin-top: .75rem; }
.au-nav .au-btn { width: auto; flex: 1 1 0; }
.au-nav .au-btn--ghost { flex: 0 0 auto; min-width: 96px; }
.au-nav--stack { flex-direction: column; }
.au-div { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .55); font-size: .85rem; margin: 1.25rem 0; }
.au-div::before, .au-div::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .08); }
.au-link { text-align: center; color: rgba(255, 255, 255, .75); font-size: .95rem; margin: 0; }
.au-link a { color: var(--primary-text); font-weight: 700; text-decoration: none; display: inline-block; padding-block: .5rem; }
.au-link a:hover { text-decoration: underline; }

/* register: step bar, review, consent, password meter */
.au-steps { display: flex; gap: .35rem; margin: .6rem 0 1rem; padding: 0; list-style: none; }
.au-step {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .45rem .5rem; border-radius: 50px; background: rgba(255, 255, 255, .04);
    font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .6);
    transition: color var(--dur-fast, .15s), background-color var(--dur-fast, .15s);
}
.au-step-num { width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; font-size: .72rem; }
.au-step.active { background: rgba(220, 38, 38, .22); color: #fecaca; }
.au-step.active .au-step-num { background: rgba(220, 38, 38, .35); }
.au-step.done { color: #4ade80; }
.au-step.done .au-step-num { background: rgba(34, 197, 94, .25); }
.reg-step-panel { display: none; }
.reg-step-panel.active { display: block; }
.au-review { margin: 0 0 1rem; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .08); }
.au-review li { display: flex; align-items: baseline; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.au-review-k { flex: 0 0 5.5rem; font-size: .8rem; font-weight: 600; color: rgba(255, 255, 255, .62); }
.au-review-v { min-width: 0; color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
.au-consent { display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1rem; cursor: pointer; font-size: .9rem; line-height: 1.5; color: rgba(255, 255, 255, .88); }
.au-consent input { width: 24px; height: 24px; flex: 0 0 24px; margin-top: .05rem; accent-color: var(--primary); }
.au-consent small { display: block; margin-top: .3rem; font-size: .8rem; line-height: 1.45; color: rgba(255, 255, 255, .66); }
.au-consent a { color: var(--primary-text); }
.au-meter { height: 4px; margin-top: .55rem; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.au-meter-bar { height: 100%; width: 100%; border-radius: 2px; transform: translateX(-100%); transition: transform .3s var(--ease-out, ease-out), background-color .3s; }
.au-meter-row { display: flex; justify-content: space-between; gap: .75rem; margin-top: .3rem; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.pw-crit { display: flex; align-items: center; gap: .35rem; transition: color .2s; }
.pw-crit.met, .pw-crit.met i { color: #4ade80; }
.lv-ok { color: #4ade80; }
.lv-err { color: #f87171; }
.lv-loading { color: rgba(255, 255, 255, .45); font-size: .75rem; }

/* status pages (invite invalid, reset done) */
.au-note { color: rgba(255, 255, 255, .62); font-size: .88rem; line-height: 1.5; margin: 0 0 1rem; }

/* ── phones: flat, edge-to-edge, no card ─────────── */
@media (max-width: 768px) {
    .au-page { --au-header-h: 53px; display: block; padding: 0; min-height: 0; background: none; }
    main:has(> .au-page) { padding-bottom: 0 !important; }   /* no bottom nav on these pages, nothing to reserve room for */
    .au-page::before, .au-orb { display: none; }
    .au-card { display: block; max-width: none; border: 0; border-radius: 0; box-shadow: none; background: none; overflow: visible; }
    .au-side { display: none; }
    /* a faint brand glow replaces the card's header band; static gradient, no filter */
    .au-main { padding: 1.1rem var(--flow-gutter) 1.75rem; background: radial-gradient(120% 220px at 50% 0, rgba(220, 38, 38, .12), transparent 72%); }
    .au-eyebrow { display: none; }
    .au-title { font-size: 1.4rem; }
    .au-lead { font-size: .92rem; line-height: 1.45; margin-bottom: 1rem; }
    .au-field { margin-bottom: var(--field-gap); }
    .au-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 1rem; }
    .au-div { margin: .9rem 0; }
    .au-grid { grid-template-columns: 1fr; }
    .au-step { padding: .4rem .25rem; font-size: .74rem; gap: .3rem; }
}
@media (min-width: 769px) and (max-width: 991.98px) {
    .au-side { padding: 2.5rem 1.8rem; }
    .au-main { padding: 2.5rem 2rem; }
}
@media (max-width: 575.98px) {
    .au-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .au-orb { animation: none; }
}
