.auth {
    --auth-bg: #F7F6F2;
    --auth-surface: #FFFFFF;
    --auth-text: #0C0F1E;
    --auth-muted: #5B6178;
    --auth-line: #E3E1DA;
    --auth-focus: rgba(255, 122, 54, .28);
    --auth-error: #DC2626;
    --auth-orange: #FF7A36;
    --auth-cyan: #16E0CB;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
}

html.dark .auth {
    --auth-bg: #0B0E19;
    --auth-surface: #12162A;
    --auth-text: #F6F3EA;
    --auth-muted: #9AA0BC;
    --auth-line: rgba(255, 255, 255, .10);
    --auth-focus: rgba(255, 122, 54, .35);
    --auth-error: #F87171;
}

@media (min-width: 1024px) {
    .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

/* ---------- Brand panel ---------- */
.auth-brand {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 48px 56px;
    background: #080A14;
    color: #F6F3EA;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .auth-brand { display: flex; }
}

.auth-brand .photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% center;
    filter: saturate(.85) contrast(1.05);
}

/* The photo is a bright gym, so shade it heavily to keep the headline and features readable. */
.auth-brand .photo-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 10, 20, .7) 0%, rgba(8, 10, 20, .5) 30%, rgba(8, 10, 20, .88) 62%, rgba(8, 10, 20, .97) 100%),
        linear-gradient(120deg, rgba(255, 122, 54, .22), rgba(22, 224, 203, .14));
    pointer-events: none;
}

.auth-brand .glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .3;
    pointer-events: none;
}

.auth-brand .glow-1 { width: 520px; height: 520px; top: -180px; right: -160px; background: radial-gradient(circle, #FF7A36, transparent 65%); }
.auth-brand .glow-2 { width: 480px; height: 480px; bottom: -200px; left: -160px; background: radial-gradient(circle, #16E0CB, transparent 65%); }

.auth-brand .grid-lines {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    pointer-events: none;
}

.auth-brand > * { position: relative; }

.auth-headline {
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

.auth-headline span {
    background: linear-gradient(110deg, #FF7A36 0%, #FF9C3C 35%, #16E0CB 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-lede { margin-top: 18px; max-width: 42ch; color: #9AA0BC; font-size: 1.05rem; line-height: 1.6; }

.auth-features { margin-top: 36px; display: grid; gap: 14px; list-style: none; padding: 0; }

.auth-features li { display: flex; align-items: center; gap: 12px; color: #D9D6CC; font-weight: 500; }

.auth-features .dot {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    color: #62F4E2;
}

.auth-features .dot svg { width: 16px; height: 16px; }

.auth-brand-foot { color: #6B7191; font-size: .85rem; }

/* ---------- Form panel ---------- */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 96px;
}

.auth-card { width: 100%; max-width: 400px; }

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: inherit;
}

.auth-logo svg { width: 40px; height: 40px; flex: none; }

.auth-logo .accent {
    background: linear-gradient(120deg, #FF7A36, #FFB454);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-main .auth-logo { margin-bottom: 36px; }

@media (min-width: 1024px) {
    .auth-main .auth-logo { display: none; }
}

.auth-title { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.2; }

.auth-subtitle { margin-top: 8px; color: var(--auth-muted); }

.auth-form { margin-top: 32px; display: grid; gap: 20px; }

.auth-label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }

.auth-field { position: relative; }

.auth-field > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--auth-muted);
    pointer-events: none;
}

.auth .auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-surface);
    color: var(--auth-text);
    font: inherit;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}

.auth .auth-input::placeholder { color: var(--auth-muted); opacity: .7; }

.auth .auth-input:focus { outline: none; border-color: var(--auth-orange); box-shadow: 0 0 0 4px var(--auth-focus); }

.auth .auth-input[aria-invalid="true"] { border-color: var(--auth-error); }

.auth .auth-input.has-toggle { padding-right: 48px; }

.auth-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-toggle:hover { color: var(--auth-text); }

.auth-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--auth-focus); }

.auth-toggle svg { width: 18px; height: 18px; }

.auth-toggle .icon-hide, .auth-toggle[aria-pressed="true"] .icon-show { display: none; }

.auth-toggle[aria-pressed="true"] .icon-hide { display: block; }

.auth-error { margin-top: 6px; font-size: .875rem; color: var(--auth-error); }

.auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: .9rem; }

.auth-check { display: inline-flex; align-items: center; gap: 8px; color: var(--auth-muted); cursor: pointer; }

.auth .auth-check input { width: 16px; height: 16px; border-radius: 4px; border-color: var(--auth-line); background-color: var(--auth-surface); color: var(--auth-orange); }

.auth .auth-check input:focus { box-shadow: 0 0 0 3px var(--auth-focus); outline: none; }

.auth-link { color: var(--auth-text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--auth-line); text-underline-offset: 3px; }

.auth-link:hover { text-decoration-color: var(--auth-orange); }

.auth-submit {
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(120deg, #FF7A36, #FF9C3C);
    color: #1A0C02;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 24px -12px rgba(255, 122, 54, .8);
    transition: transform .15s, box-shadow .15s, filter .15s;
}

.auth-submit:hover { filter: brightness(1.05); box-shadow: 0 14px 28px -12px rgba(255, 122, 54, .9); }

.auth-submit:active { transform: translateY(1px); }

.auth-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--auth-focus); }

.auth-status {
    margin-top: 24px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(22, 224, 203, .12);
    border: 1px solid rgba(22, 224, 203, .35);
    font-size: .9rem;
    font-weight: 500;
}

.auth-help { margin-top: 28px; color: var(--auth-muted); font-size: .9rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
    .auth-submit, .auth .auth-input { transition: none; }
}

/* ---------- Shared bits for the other auth pages ---------- */
.auth-text { margin-top: 20px; color: var(--auth-muted); line-height: 1.6; }

.auth-grid-2 { display: grid; gap: 20px; }

@media (min-width: 480px) {
    .auth-grid-2 { grid-template-columns: 1fr 1fr; }
}

.auth-optional { font-weight: 400; color: var(--auth-muted); }

.auth-actions { margin-top: 32px; display: grid; gap: 12px; }

.auth-secondary {
    width: 100%;
    height: 48px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: transparent;
    color: var(--auth-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-secondary:hover { border-color: var(--auth-muted); }

.auth-secondary:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--auth-focus); }

.auth-submit { width: 100%; }

.auth-back { display: inline-flex; align-items: center; gap: 6px; }

.auth-back svg { width: 16px; height: 16px; }
