/* Auth UI — Spruha-aligned tokens (UI upgrade Phase 1) */
:root {
    --grey-50: #F7F8FC;
    --grey-100: #EAECF8;
    --grey-200: #E7E8F1;
    --grey-300: #D5D8E8;
    --grey-500: #9297B8;
    --grey-700: #20243A;
    --grey-800: #20243A;
    --grey-900: #100F23;

    --primary-500: #6558D3;
    --primary-600: #5548C4;
    --primary-700: #4739B0;

    --danger-100: #FDECEF;
    --danger-700: #F15B69;

    --radius: 12px;
    --shadow-2: 0 4px 16px rgba(16, 15, 35, 0.08);
    --shadow-3: 0 12px 32px rgba(16, 15, 35, 0.12);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--grey-800);
    background:
        radial-gradient(1000px 420px at 12% -8%, rgba(101, 88, 211, 0.18), transparent 55%),
        radial-gradient(800px 360px at 90% 10%, rgba(32, 184, 117, 0.08), transparent 50%),
        linear-gradient(165deg, #EAECF8, #F7F8FC 48%, #E7E8F1);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-3);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-brand-mark {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-500);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.auth-brand-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--grey-500);
}

.auth-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--grey-700);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--grey-900);
    letter-spacing: -0.02em;
}

.auth-lead {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--grey-500);
    max-width: 32em;
}

.auth-alert {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--danger-100);
    color: var(--danger-700);
    font-size: 14px;
    font-weight: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-700);
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--grey-300);
    border-radius: 10px;
    background: #fff;
    color: var(--grey-900);
    font: inherit;
    font-size: 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(101, 88, 211, 0.22);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 16px;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 80ms ease;
}

.btn-primary {
    border: 1px solid transparent;
    background: var(--primary-500);
    color: #fff;
    box-shadow: var(--shadow-2);
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-primary:active {
    background: var(--primary-700);
    transform: translateY(1px);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--primary-700);
    outline-offset: 2px;
}

.btn-secondary {
    border: 1px solid var(--grey-300);
    background: #fff;
    color: var(--grey-700);
}

.btn-secondary:hover {
    background: var(--grey-100);
}

.auth-footer {
    margin: 24px 0 0;
    font-size: 14px;
    color: var(--grey-500);
}

.auth-footer a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-meta {
    margin: 0 0 24px;
    display: grid;
    gap: 12px;
}

.auth-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--grey-200);
}

.auth-meta dt {
    font-size: 14px;
    color: var(--grey-500);
    font-weight: 500;
}

.auth-meta dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-800);
}
