:root {
    --auth-blue: #0b5ed7;
    --auth-blue-dark: #084298;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-bg: #f4f7fb;
    --auth-card: #ffffff;
    --auth-border: #dbe3ee;
    --auth-green: #0f766e;
    --auth-red: #b91c1c;
    --auth-amber: #b45309;
    --auth-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.auth-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px;
}

.auth-shell {
    display: grid;
    gap: 16px;
}

.auth-panel,
.auth-card,
.auth-stat,
.auth-note {
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: var(--auth-card);
    box-shadow: var(--auth-shadow);
}

.auth-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(232, 240, 255, 0.96), rgba(255, 255, 255, 0.98) 58%),
        #fff;
}

.auth-eyebrow {
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--auth-blue);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-panel h1,
.auth-card h1,
.auth-card h2 {
    margin: 0;
    color: var(--auth-ink);
    line-height: 1.15;
}

.auth-panel h1 {
    font-size: clamp(2rem, 8vw, 3.4rem);
}

.auth-card h1,
.auth-card h2 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
}

.auth-panel p,
.auth-card p,
.auth-note {
    margin: 0;
    color: var(--auth-muted);
}

.auth-stats {
    display: grid;
    gap: 10px;
}

.auth-stat {
    display: grid;
    gap: 4px;
    padding: 14px;
    box-shadow: none;
}

.auth-stat span {
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-stat strong {
    color: var(--auth-blue-dark);
    font-size: 1.25rem;
}

.auth-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field {
    display: grid;
    gap: 8px;
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 800;
}

.auth-field input,
.auth-field select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 16px;
}

.auth-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--auth-muted) 50%), linear-gradient(135deg, var(--auth-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--auth-blue);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.16);
}

.auth-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 700;
}

.auth-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-blue);
}

.auth-actions {
    display: grid;
    gap: 10px;
}

.auth-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    text-decoration: none;
}

.auth-message {
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
}

.auth-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--auth-red);
}

.auth-message.warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: var(--auth-amber);
}

.auth-message.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--auth-green);
}

.auth-card .hidden {
    display: none !important;
}

.auth-switch {
    color: var(--auth-muted);
    text-align: center;
}

.auth-switch a {
    color: var(--auth-blue);
    font-weight: 900;
    text-decoration: none;
}

.auth-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
}

.profile-grid {
    display: grid;
    gap: 10px;
}

.profile-detail {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.profile-detail span {
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-detail strong {
    color: var(--auth-ink);
    overflow-wrap: anywhere;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: auth-spin 0.75s linear infinite;
}

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

@media (min-width: 720px) {
    .auth-page {
        padding: 28px 20px;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
        align-items: stretch;
    }

    .auth-panel,
    .auth-card {
        padding: 28px;
    }

    .auth-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }
}
