/* ==========================================================================
   AUTH PAGES — login, register, password reset
   Shared by layouts/auth.blade.php.
   Desktop (>= 1024px): dark showcase on the left, light form on the right.
   Tablet / phone: the showcase becomes the backdrop and the form a card.
   ========================================================================== */

:root {
    --auth-font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --auth-font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

    --auth-brand-50: #ecf8f5;
    --auth-brand-100: #d3efe9;
    --auth-brand-300: #8fe3d2;
    --auth-brand-400: #4cc3ad;
    --auth-brand-500: #2fae97;
    --auth-brand-600: #16907c;
    --auth-brand-700: #127a69;
    --auth-brand-800: #0d5f52;

    --auth-night-950: #040a0b;
    --auth-night-900: #071012;
    --auth-night-800: #0b1719;

    --auth-ink: #0f1d1f;
    --auth-ink-soft: #33454a;
    --auth-ink-muted: #5b6b6e;
    --auth-ink-faint: #8a9799;
    --auth-line: #e1e7e8;
    --auth-line-strong: #cbd5d6;
    --auth-canvas: #f3f6f6;
    --auth-surface: #ffffff;

    --auth-danger: #c2363a;
    --auth-danger-soft: #fdf2f2;
    --auth-danger-line: #f3caca;
    --auth-success: #157a52;
    --auth-success-soft: #eef8f3;
    --auth-success-line: #bfe3cf;
    --auth-warning: #8f5300;
    --auth-warning-soft: #fff4e0;

    --auth-radius-sm: 10px;
    --auth-radius: 12px;
    --auth-radius-lg: 24px;
    --auth-ring: 0 0 0 4px rgba(47, 174, 151, .2);
    --auth-ease: cubic-bezier(.2, .8, .2, 1);
}

/* -------------------------------------------------------------------------
   Page shell
   ------------------------------------------------------------------------- */
html {
    height: auto;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.auth-body {
    margin: 0;
    min-height: 100%;
    font-family: var(--auth-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--auth-ink);
    background: var(--auth-night-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.auth-body [hidden] {
    display: none !important;
}

.auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* -------------------------------------------------------------------------
   Showcase (brand panel / mobile backdrop)
   ------------------------------------------------------------------------- */
.auth-showcase {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1100px 760px at 88% 4%, rgba(47, 174, 151, .26), transparent 62%),
        radial-gradient(900px 700px at 0% 100%, rgba(16, 86, 104, .38), transparent 60%),
        linear-gradient(160deg, var(--auth-night-800) 0%, var(--auth-night-900) 55%, var(--auth-night-950) 100%);
}

.auth-showcase-strands {
    position: absolute;
    inset: -6%;
    background: url('/img/backgrounds/auth-strands.svg?v=1') center / cover no-repeat;
    animation: auth-drift 38s ease-in-out infinite alternate;
    will-change: transform;
}

.auth-showcase-glow {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    right: -25vmax;
    top: -30vmax;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(76, 195, 173, .22), transparent);
    animation: auth-breathe 12s ease-in-out infinite alternate;
    pointer-events: none;
}

/* film grain for a less "digital" gradient */
.auth-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .07;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.auth-showcase-inner {
    display: none;
}

.auth-brand,
.auth-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
}

.auth-brand:hover,
.auth-topbar-brand:hover {
    color: #fff;
}

.auth-brand img,
.auth-topbar-brand img {
    border-radius: 11px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 24px -8px rgba(0, 0, 0, .6);
}

/* Size container: the lens scales to the free space between brand and copy instead of disappearing. */
.auth-showcase-visual {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
    margin: 24px 0;
    container-type: size;
}

.auth-lens {
    width: clamp(220px, 36vh, 380px);
    width: min(380px, 100cqh, 100cqw);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .45));
}

.auth-lens-aperture,
.auth-lens-ticks {
    transform-box: fill-box;
    transform-origin: center;
}

.auth-lens-aperture {
    animation: auth-spin 90s linear infinite;
}

.auth-lens-ticks {
    animation: auth-spin 140s linear infinite reverse;
}

.auth-lens-scan {
    animation: auth-scan 5.5s var(--auth-ease) infinite alternate;
}

.auth-lens-strands {
    animation: auth-float 9s ease-in-out infinite alternate;
}

.auth-showcase-copy {
    max-width: 620px;
}

.auth-showcase-title {
    margin: 0 0 16px;
    font-size: clamp(36px, 3.3vw, 54px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -.035em;
    color: #fff;
    text-wrap: balance;
}

.auth-showcase-title em {
    font-family: var(--auth-font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.12em;
    letter-spacing: -.01em;
    background: linear-gradient(100deg, var(--auth-brand-300), var(--auth-brand-400) 60%, #b9f2e6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: .06em;
}

.auth-showcase-lead {
    margin: 0 0 32px;
    max-width: 500px;
    font-size: 16.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
    text-wrap: pretty;
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 22px 0 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-features li {
    display: grid;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .74);
}

.auth-features .bi {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
    color: var(--auth-brand-300);
    background: rgba(76, 195, 173, .1);
    box-shadow: inset 0 0 0 1px rgba(143, 227, 210, .16);
}

/* -------------------------------------------------------------------------
   Main column
   ------------------------------------------------------------------------- */
.auth-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 20px;
}

.auth-topbar-brand {
    font-size: 17px;
}

.auth-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-panel {
    container-type: inline-size;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 22px;
    background: var(--auth-surface);
    border-radius: var(--auth-radius-lg);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .06),
        0 2px 6px rgba(0, 0, 0, .12),
        0 40px 80px -24px rgba(0, 0, 0, .65);
}

.auth-panel--wide {
    max-width: 680px;
}

.auth-panel > * {
    animation: auth-rise .7s var(--auth-ease) both;
}

.auth-panel > :nth-child(2) { animation-delay: .04s; }
.auth-panel > :nth-child(3) { animation-delay: .08s; }
.auth-panel > :nth-child(4) { animation-delay: .12s; }
.auth-panel > :nth-child(5) { animation-delay: .16s; }
.auth-panel > :nth-child(n + 6) { animation-delay: .2s; }

.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .7);
}

.auth-footer p {
    margin: 0;
}

.auth-footer p + p {
    margin-top: 4px;
}

.auth-footer .bi {
    margin-right: 4px;
}

.auth-footer a {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .35);
    text-underline-offset: 3px;
}

.auth-footer a:hover {
    text-decoration-color: currentColor;
}

.auth-footer-copy {
    font-size: 12.5px;
    opacity: .7;
}

@media (min-width: 600px) {
    .auth-main {
        padding-left: 32px;
        padding-right: 32px;
    }

    .auth-panel {
        padding: 40px;
    }
}

/* -------------------------------------------------------------------------
   Desktop split layout
   ------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1.08fr) minmax(500px, 1fr);
    }

    /* `inset` first: written after `top` it would reset it to auto and break the sticky panel */
    .auth-showcase {
        inset: auto;
        position: sticky;
        top: 0;
        align-self: start;
        height: 100vh;
        height: 100dvh;
    }

    .auth-showcase-inner {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 40px clamp(40px, 4.5vw, 72px) 48px;
    }

    .auth-main {
        padding: 28px clamp(32px, 4vw, 64px) 28px;
        background:
            radial-gradient(600px 400px at 100% 0%, rgba(47, 174, 151, .07), transparent 70%),
            var(--auth-surface);
    }

    .auth-topbar {
        justify-content: flex-end;
        margin-bottom: 8px;
    }

    .auth-topbar-brand {
        display: none;
    }

    .auth-stage {
        padding: 24px 0;
    }

    .auth-panel,
    .auth-panel--wide {
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-panel {
        max-width: 420px;
    }

    .auth-panel--wide {
        max-width: 560px;
    }

    .auth-footer {
        margin-top: 16px;
        color: var(--auth-ink-muted);
    }

    .auth-footer a {
        color: var(--auth-brand-700);
        text-decoration-color: rgba(18, 122, 105, .35);
    }
}

/* Too little room left for a readable lens (very short windows). */
@container (max-height: 110px) {
    .auth-lens {
        display: none;
    }
}

/* Browsers without container queries keep the fixed-size lens: hide it on short windows so it never overlaps the copy. */
@supports not (container-type: size) {
    @media (min-width: 1024px) and (max-height: 720px) {
        .auth-showcase-visual {
            visibility: hidden;
        }
    }
}

/* -------------------------------------------------------------------------
   Panel content
   ------------------------------------------------------------------------- */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -6px 0 22px -10px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-ink-muted);
    text-decoration: none;
    transition: color .2s, background-color .2s;
}

.auth-back:hover {
    color: var(--auth-ink);
    background: var(--auth-canvas);
}

.auth-back .bi {
    transition: transform .2s var(--auth-ease);
}

.auth-back:hover .bi {
    transform: translateX(-3px);
}

.auth-badge {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    border-radius: 18px;
    font-size: 24px;
    color: var(--auth-brand-700);
    background: linear-gradient(140deg, var(--auth-brand-50), var(--auth-brand-100));
    box-shadow: inset 0 0 0 1px rgba(18, 122, 105, .12), 0 10px 24px -14px rgba(18, 122, 105, .6);
}

.auth-header {
    margin-bottom: 28px;
}

.auth-title {
    margin: 0 0 8px;
    font-family: var(--auth-font);
    font-size: clamp(26px, 6cqi, 32px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.03em;
    color: var(--auth-ink);
    text-wrap: balance;
}

.auth-subtitle {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--auth-ink-muted);
    text-wrap: pretty;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: var(--auth-radius);
    font-size: 14.5px;
    line-height: 1.45;
}

.auth-alert .bi {
    flex: none;
    font-size: 18px;
    line-height: 1.15;
}

.auth-alert--success {
    color: #0f5c3d;
    background: var(--auth-success-soft);
    border-color: var(--auth-success-line);
}

.auth-alert--success .bi {
    color: var(--auth-success);
}

.auth-alt {
    margin: 28px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--auth-line);
    text-align: center;
    font-size: 14.5px;
    color: var(--auth-ink-muted);
}

.auth-link {
    color: var(--auth-brand-700);
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
}

.auth-link:hover {
    color: var(--auth-brand-800);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link:focus-visible,
.auth-back:focus-visible {
    outline: 2px solid var(--auth-brand-600);
    outline-offset: 2px;
}

.auth-link .bi {
    display: inline-block;
    margin-left: 2px;
    transition: transform .2s var(--auth-ease);
}

.auth-link:hover .bi {
    transform: translateX(3px);
}

/* -------------------------------------------------------------------------
   Form
   ------------------------------------------------------------------------- */
.auth-form {
    display: grid;
    gap: 20px;
}

.auth-field {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-ink-soft);
}

.auth-label-row .auth-link {
    font-size: 13.5px;
}

.auth-label-optional {
    font-size: 12.5px;
    color: var(--auth-ink-faint);
}

.auth-control {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-control-icon {
    position: absolute;
    left: 15px;
    z-index: 1;
    font-size: 17px;
    line-height: 1;
    color: var(--auth-ink-faint);
    pointer-events: none;
    transition: color .2s;
}

.auth-input {
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 16px;
    font: inherit;
    font-size: 16px;
    color: var(--auth-ink);
    background: var(--auth-surface);
    border: 1px solid var(--auth-line-strong);
    border-radius: var(--auth-radius);
    box-shadow: 0 1px 2px rgba(15, 29, 31, .05);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    -webkit-appearance: none;
    appearance: none;
}

.auth-control--icon .auth-input {
    padding-left: 44px;
}

.auth-control--reveal .auth-input {
    padding-right: 52px;
}

.auth-input::placeholder {
    color: var(--auth-ink-faint);
    opacity: 1;
}

.auth-input:hover {
    border-color: #b2c0c1;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-brand-600);
    box-shadow: var(--auth-ring);
}

.auth-control:focus-within .auth-control-icon {
    color: var(--auth-brand-700);
}

.auth-input.is-invalid {
    border-color: var(--auth-danger);
    background-color: #fffbfb;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(194, 54, 58, .14);
}

.auth-control:has(.is-invalid) .auth-control-icon {
    color: var(--auth-danger);
}

/* keep autofilled fields on-brand instead of the browser's yellow/blue */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-ink);
    caret-color: var(--auth-ink);
    transition: background-color 600000s 0s, color 600000s 0s;
}

.auth-reveal {
    position: absolute;
    right: 5px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    font-size: 18px;
    color: var(--auth-ink-muted);
    background: transparent;
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

.auth-reveal:hover {
    color: var(--auth-ink);
    background: var(--auth-canvas);
}

.auth-reveal:focus-visible {
    outline: 2px solid var(--auth-brand-600);
    outline-offset: -2px;
}

.auth-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--auth-ink-muted);
}

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--auth-danger);
    animation: auth-shake .35s ease-in-out both;
}

.auth-error .bi {
    flex: none;
    margin-top: 1px;
}

.auth-caps {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--auth-warning);
    background: var(--auth-warning-soft);
}

/* remember me */
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0;
    font-size: 14.5px;
    color: var(--auth-ink-soft);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.auth-check input {
    display: grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid var(--auth-line-strong);
    border-radius: 6px;
    background: var(--auth-surface);
    cursor: pointer;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.auth-check input::after {
    content: "";
    width: 10px;
    height: 6px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform .2s var(--auth-ease);
}

.auth-check input:checked {
    border-color: var(--auth-brand-700);
    background: var(--auth-brand-700);
}

.auth-check input:checked::after {
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

.auth-check input:focus-visible {
    outline: none;
    border-color: var(--auth-brand-600);
    box-shadow: var(--auth-ring);
}

/* primary button */
.auth-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin-top: 4px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--auth-radius);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.005em;
    color: #fff;
    background: linear-gradient(180deg, #138571 0%, #0f6e5e 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .2),
        0 0 0 1px rgba(13, 95, 82, .9),
        0 12px 24px -12px rgba(18, 122, 105, .75);
    cursor: pointer;
    transition: transform .2s var(--auth-ease), box-shadow .2s, filter .2s;
}

.auth-button:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .2),
        0 0 0 1px rgba(13, 95, 82, .9),
        0 18px 30px -14px rgba(18, 122, 105, .85);
}

.auth-button:active {
    filter: brightness(.96);
    transform: translateY(0);
}

.auth-button:focus-visible {
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .2),
        0 0 0 1px rgba(13, 95, 82, .9),
        0 0 0 5px rgba(47, 174, 151, .35);
}

.auth-button .bi {
    font-size: 18px;
    transition: transform .2s var(--auth-ease);
}

.auth-button:hover .bi {
    transform: translateX(3px);
}

.auth-button-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.auth-button.is-loading {
    pointer-events: none;
    filter: saturate(.85);
}

.auth-button.is-loading .bi {
    display: none;
}

.auth-button.is-loading .auth-button-spinner {
    display: inline-block;
}

/* register sections */
.auth-section {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.auth-section + .auth-section {
    padding-top: 24px;
    border-top: 1px solid var(--auth-line);
}

.auth-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--auth-font);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--auth-ink-muted);
}

.auth-section-step {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    letter-spacing: 0;
    color: var(--auth-brand-700);
    background: var(--auth-brand-50);
    box-shadow: inset 0 0 0 1px rgba(18, 122, 105, .18);
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

@container (min-width: 460px) {
    .auth-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.auth-code-input {
    font-family: var(--auth-font);
    font-variant-numeric: tabular-nums;
    letter-spacing: .32em;
    font-weight: 500;
}

.auth-code-input::placeholder {
    letter-spacing: .32em;
}

/* password strength */
.auth-strength {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-strength-bars {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.auth-strength-bars span {
    height: 4px;
    border-radius: 99px;
    background: var(--auth-line);
    transition: background-color .3s;
}

.auth-strength-label {
    min-width: 64px;
    font-size: 12.5px;
    font-weight: 600;
    text-align: right;
    color: var(--auth-ink-muted);
}

.auth-strength[data-level="1"] .auth-strength-bars span:nth-child(-n + 1) { background: #d64553; }
.auth-strength[data-level="2"] .auth-strength-bars span:nth-child(-n + 2) { background: #e08a1e; }
.auth-strength[data-level="3"] .auth-strength-bars span:nth-child(-n + 3) { background: var(--auth-brand-500); }
.auth-strength[data-level="4"] .auth-strength-bars span { background: var(--auth-brand-700); }
.auth-strength[data-level="1"] .auth-strength-label { color: #b8323f; }
.auth-strength[data-level="2"] .auth-strength-label { color: #9a5a06; }
.auth-strength[data-level="3"] .auth-strength-label,
.auth-strength[data-level="4"] .auth-strength-label { color: var(--auth-brand-700); }

/* password confirmation */
.auth-match {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.auth-match.is-match {
    color: var(--auth-success);
}

.auth-match.is-mismatch {
    color: var(--auth-danger);
}

/* intl-tel-input inside our control */
.auth-control .iti {
    width: 100%;
}

.auth-control .iti__flag-container {
    padding: 5px;
}

.auth-control .iti--separate-dial-code .iti__selected-flag,
.auth-control .iti--separate-dial-code .iti__selected-flag:hover,
.auth-control .iti--separate-dial-code .iti__flag-container:hover .iti__selected-flag {
    padding: 0 10px 0 12px;
    border-radius: 9px;
    background: var(--auth-canvas);
}

.auth-control .iti__selected-dial-code {
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-ink-soft);
}

.auth-control .iti__country-list {
    margin-top: 8px;
    padding: 6px;
    max-height: 280px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    font-size: 14.5px;
    box-shadow: 0 24px 48px -16px rgba(5, 11, 13, .35);
    white-space: normal;
}

.auth-control .iti__country {
    padding: 8px 10px;
    border-radius: 8px;
}

.auth-control .iti__country.iti__highlight {
    background: var(--auth-brand-50);
}

.auth-control .iti__divider {
    margin: 6px 0;
    border-color: var(--auth-line);
}

/* -------------------------------------------------------------------------
   Language picker
   ------------------------------------------------------------------------- */
.auth-language {
    position: relative;
    margin-left: auto;
}

.auth-language-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px 0 9px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

.auth-language-button:hover {
    background: rgba(255, 255, 255, .14);
}

.auth-language-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 195, 173, .35);
}

.auth-language-flag {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.auth-language-chevron {
    font-size: 12px;
    opacity: .7;
    transition: transform .2s var(--auth-ease);
}

.auth-language-button[aria-expanded="true"] .auth-language-chevron {
    transform: rotate(180deg);
}

.auth-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    min-width: 210px;
    max-height: min(60vh, 420px);
    margin: 0;
    padding: 6px;
    overflow: auto;
    list-style: none;
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    box-shadow: 0 24px 48px -12px rgba(5, 11, 13, .4);
    transform-origin: top right;
    animation: auth-pop .18s var(--auth-ease);
}

.auth-language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 14.5px;
    color: var(--auth-ink);
    text-align: left;
    background: none;
    cursor: pointer;
}

.auth-language-option:hover,
.auth-language-option:focus-visible {
    outline: none;
    background: var(--auth-canvas);
}

.auth-language-option[aria-current="true"] {
    font-weight: 600;
    color: var(--auth-brand-700);
}

.auth-language-check {
    margin-left: auto;
    font-size: 16px;
}

@media (min-width: 1024px) {
    .auth-language-button {
        color: var(--auth-ink-soft);
        background: var(--auth-surface);
        border-color: var(--auth-line);
        box-shadow: 0 1px 2px rgba(15, 29, 31, .06);
    }

    .auth-language-button:hover {
        background: var(--auth-canvas);
    }
}

/* -------------------------------------------------------------------------
   Motion
   ------------------------------------------------------------------------- */
@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes auth-pop {
    from { opacity: 0; transform: translateY(-4px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@keyframes auth-drift {
    from { transform: translate3d(-1.5%, 1%, 0) scale(1.02); }
    to { transform: translate3d(1.5%, -1.5%, 0) scale(1.06); }
}

@keyframes auth-breathe {
    from { opacity: .55; transform: scale(.94); }
    to { opacity: 1; transform: scale(1.04); }
}

@keyframes auth-scan {
    from { transform: translateY(0); }
    to { transform: translateY(230px); }
}

@keyframes auth-float {
    from { transform: translate(-6px, 4px); }
    to { transform: translate(6px, -4px); }
}

@keyframes auth-shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-body *,
    .auth-body *::before,
    .auth-body *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
