/* ==========================================================================
   Auth shell — same design language as the landing page.
   Load order is app.css → tokens.css → auth.css, so the token palette wins
   over the older one while app.css keeps supplying form component rules.
   ========================================================================== */

.auth-body {
    min-height: 100svh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100svh;
}

/* --- Narrative side ------------------------------------------------------
   The panel that sells; kept visually continuous with the landing hero. */
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-6);
    padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem);
    background: linear-gradient(155deg, var(--bg-elevated), var(--bg-secondary) 60%, var(--bg-primary));
    border-inline-end: 1px solid var(--border-soft);
    overflow: hidden;
}
.auth-aside::before {
    content: "";
    position: absolute; inset: -20% -30% auto -20%;
    height: 70%;
    background: radial-gradient(circle at 30% 30%, var(--glow-accent), transparent 62%);
    filter: blur(70px);
    pointer-events: none;
}
.auth-aside::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000, transparent 75%);
    pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }

.auth-aside .brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.auth-aside .brand img { width: 36px; height: 36px; }
.auth-aside .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.auth-aside .brand-text strong { font-size: 1rem; }
.auth-aside .brand-text small { font-size: 0.68rem; color: var(--text-muted); }

.auth-aside-body h2 {
    font-size: var(--fs-h2);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    margin: 0 0 var(--space-4);
}
.auth-aside-body .muted { color: var(--text-secondary); font-size: var(--fs-lead); line-height: var(--lh-body); }

.auth-points { display: grid; gap: 0.7rem; margin-top: var(--space-6); padding: 0; list-style: none; }
.auth-points li {
    display: flex; align-items: center; gap: 0.65rem;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}
.auth-points .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }

.auth-legal { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.7; }

/* --- Form side ---------------------------------------------------------- */
.auth-main {
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 0.75rem + 1.5vw, 2rem);
    background: var(--bg-primary);
}
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}
.auth-card h1 {
    font-size: var(--fs-h2);
    letter-spacing: var(--ls-tight);
    margin: 0 0 0.5rem;
}
.auth-card > .muted { color: var(--text-secondary); margin-bottom: var(--space-6); }

/* Form controls restyled to the token palette. */
.auth-card .field { margin-bottom: var(--space-4); }
.auth-card label { display: block; font-size: var(--fs-sm); margin-bottom: 0.4rem; color: var(--text-secondary); }
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"],
.auth-card select,
.auth-card textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: var(--surface-1);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--fs-body);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-wash);
}
.auth-card .form-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.auth-card .form-row > .field { flex: 1; min-width: 160px; }

.auth-card .input-affix { position: relative; display: flex; }
.auth-card .input-affix input { padding-inline-end: 2.9rem; }
.auth-card .affix-btn {
    position: absolute; inset-inline-end: 0.35rem; top: 50%;
    transform: translateY(-50%);
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}
.auth-card .affix-btn:hover { color: var(--text-primary); background: var(--surface-2); }

.auth-card .check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: var(--space-4); }
.auth-card .check input { margin-top: 0.25rem; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.auth-card .check a { color: var(--accent); }

.auth-card .form-inline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: var(--space-5); font-size: var(--fs-sm); }
.auth-card .form-inline a { color: var(--accent); }
.auth-card .form-foot { text-align: center; margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--text-muted); }
.auth-card .form-foot a { color: var(--accent); font-weight: 600; }

.auth-card .field-error { display: block; margin-top: 0.35rem; font-size: var(--fs-xs); color: var(--danger); }

/* Buttons: reuse the landing vocabulary while keeping legacy class names. */
.auth-card .btn, .auth-topbar .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    min-height: 46px;
    padding: 0.8rem 1.5rem;
    border: 1px solid transparent;
    transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.auth-card .btn:active, .auth-topbar .btn:active { transform: scale(0.97); }
.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    color: var(--accent-ink);
    box-shadow: 0 10px 30px -12px var(--glow-accent);
}
.auth-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -12px rgba(18,214,160,0.42); }
.auth-card .btn-block { display: flex; width: 100%; }
.auth-topbar .btn-ghost, .auth-card .btn-ghost {
    background: var(--surface-2);
    border-color: var(--border-medium);
    color: var(--text-primary);
    min-height: 38px; padding: 0.5rem 1rem; font-size: var(--fs-sm);
}
.auth-topbar .btn-ghost:hover { background: var(--surface-3); }

.auth-card .link-btn { background: none; border: 0; color: var(--text-muted); font-size: var(--fs-xs); text-decoration: underline; }
.auth-card .link-btn:hover { color: var(--accent); }
.resend-form { text-align: center; margin-top: var(--space-4); }

.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* --- Responsive ----------------------------------------------------------
   Below 900px the narrative panel becomes a compact header rather than
   disappearing entirely: the visitor still sees what they are signing up for. */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside {
        border-inline-end: 0;
        border-bottom: 1px solid var(--border-soft);
        padding-block: var(--space-5);
        gap: var(--space-4);
    }
    .auth-aside-body h2 { font-size: var(--fs-h3); }
    .auth-aside-body .muted, .auth-points, .auth-legal { display: none; }
    .auth-card { padding-inline: 0; }
}
