:root {
    color-scheme: light;
    --auth-text: #15242f;
    --auth-muted: #60717e;
    --auth-line: #dce4e9;
    --auth-white: #fff;
}

* { box-sizing: border-box; }

body.auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page-command {
    background:
        radial-gradient(circle at 12% 18%, rgba(45, 212, 191, .2), transparent 30%),
        linear-gradient(135deg, #073b4c 0%, #0b6670 52%, #e6f6f4 52%, #f4faf9 100%);
}

.auth-page-admin {
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
        linear-gradient(135deg, #17191e 0%, #2c1c24 52%, #f5eeee 52%, #fffafa 100%);
}

.auth-shell {
    width: min(980px, calc(100% - 32px));
    min-height: 580px;
    margin: clamp(24px, 7vh, 72px) auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 28px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 80px rgba(8, 25, 35, .28);
}

.auth-identity {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(36px, 7vw, 72px);
    color: #fff;
    isolation: isolate;
}

.auth-page-command .auth-identity {
    background: linear-gradient(145deg, #064e5a, #0f847f);
}

.auth-page-admin .auth-identity {
    background: linear-gradient(145deg, #17191e, #571f2a 70%, #8f2938);
}

.auth-identity::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .16;
    background-image: linear-gradient(135deg, transparent 45%, #fff 45% 48%, transparent 48%);
    background-size: 54px 54px;
}

.auth-role-badge {
    align-self: flex-start;
    margin-bottom: 26px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.auth-mark {
    display: grid;
    width: 78px;
    height: 78px;
    margin-bottom: 28px;
    place-items: center;
    border: 2px solid rgba(255,255,255,.65);
    border-radius: 22px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 0 0 7px rgba(255,255,255,.06);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: .05em;
}

.auth-page-admin .auth-mark {
    border-radius: 50%;
    background: #fff;
    color: #7f1d2d;
}

.auth-identity h1 {
    max-width: 480px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -.035em;
}

.auth-identity p {
    max-width: 500px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.6;
}

.auth-role-note {
    margin-top: 34px;
    padding: 15px 17px;
    border-left: 4px solid rgba(255,255,255,.75);
    background: rgba(0,0,0,.13);
    font-size: 14px;
    line-height: 1.45;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 58px);
    background: var(--auth-white);
}

.auth-card-eyebrow {
    margin-bottom: 9px;
    color: #08776f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-page-admin .auth-card-eyebrow { color: #9f2336; }

.auth-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -.025em;
}

.auth-card-copy {
    margin: 8px 0 28px;
    color: var(--auth-muted);
    line-height: 1.5;
}

.auth-form label {
    margin-bottom: 7px;
    color: #31434f;
    font-size: 13px;
    font-weight: 800;
}

.auth-form .form-control {
    min-height: 50px;
    border: 2px solid var(--auth-line);
    border-radius: 12px;
    background: #fbfdfe;
}

.auth-page-command .auth-form .form-control:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
}

.auth-page-admin .auth-form .form-control:focus {
    border-color: #a52a3c;
    box-shadow: 0 0 0 4px rgba(165, 42, 60, .14);
}

.auth-button {
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    letter-spacing: .01em;
    transition: transform .16s ease, box-shadow .16s ease;
}

.auth-button:hover { color: #fff; transform: translateY(-1px); }
.auth-page-command .auth-button { background: #087b75; box-shadow: 0 12px 25px rgba(8,123,117,.24); }
.auth-page-admin .auth-button { background: #8e2435; box-shadow: 0 12px 25px rgba(142,36,53,.24); }

.auth-switch {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 14px;
    text-align: center;
}

.auth-switch strong { display: block; margin-bottom: 6px; color: var(--auth-text); }
.auth-switch a { font-weight: 800; }
.auth-page-command .auth-switch a { color: #08776f; }
.auth-page-admin .auth-switch a { color: #9f2336; }

.auth-alert { border-radius: 12px; font-size: 14px; }

@media (max-width: 760px) {
    .auth-page-command,
    .auth-page-admin { background-position: center; }

    .auth-shell {
        width: min(100% - 20px, 520px);
        min-height: 0;
        margin: 10px auto;
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .auth-identity { padding: 28px 24px; }
    .auth-role-badge { margin-bottom: 18px; }
    .auth-mark { width: 58px; height: 58px; margin-bottom: 17px; border-radius: 16px; font-size: 19px; }
    .auth-identity h1 { font-size: 31px; }
    .auth-identity p { font-size: 15px; }
    .auth-role-note { margin-top: 20px; padding: 11px 13px; }
    .auth-card { padding: 27px 23px 30px; }
    .auth-card-copy { margin-bottom: 22px; }
}

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