:root {
    --auth-surface: rgba(255, 255, 255, 0.96);
    --auth-border: rgba(208, 219, 232, 0.95);
    --auth-text: #152234;
    --auth-muted: #5f7086;
    --auth-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at top right, rgba(15, 92, 192, 0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(11, 126, 146, 0.14), transparent 32%),
        linear-gradient(180deg, #edf3f9 0%, #f7fafd 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    --auth-accent: #0f5cc0;
    --auth-accent-strong: #1f75d7;
    --auth-accent-soft: rgba(15, 92, 192, 0.12);
    width: min(100%, 470px);
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(18px);
}

.auth-card--recovery {
    --auth-accent: #0b7e92;
    --auth-accent-strong: #1494ac;
    --auth-accent-soft: rgba(11, 126, 146, 0.12);
}

.auth-card--reset {
    --auth-accent: #a63e34;
    --auth-accent-strong: #c25748;
    --auth-accent-soft: rgba(166, 62, 52, 0.12);
}

.auth-card--verify {
    --auth-accent: #2563eb;
    --auth-accent-strong: #1d4ed8;
    --auth-accent-soft: rgba(37, 99, 235, 0.12);
}

.auth-card-hero {
    padding: 2rem 2rem 1.2rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 243, 249, 0.92));
    border-bottom: 1px solid rgba(208, 219, 232, 0.82);
}

.auth-brand-mark {
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(208, 219, 232, 0.95);
    box-shadow: none;
}

.auth-flag {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 17px;
    display: inline-block;
    background: #e30a17;
}

.auth-flag::before,
.auth-flag::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.auth-flag::before {
    width: 24px;
    height: 24px;
    left: 12px;
    top: 17px;
    background: #ffffff;
}

.auth-flag::after {
    width: 19px;
    height: 19px;
    left: 17px;
    top: 19.5px;
    background: #e30a17;
}

.auth-flag-star {
    position: absolute;
    left: 35px;
    top: 16px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--auth-accent);
}

.auth-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--auth-text);
}

.auth-subtitle {
    margin: 0.75rem auto 0;
    max-width: 32rem;
    color: var(--auth-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.auth-card-body {
    padding: 1.6rem 2rem 2rem;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-label {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--auth-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input::placeholder {
    color: #97a6b8;
}

.auth-input:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-accent-soft);
}

.auth-input-password {
    padding-right: 3.5rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--auth-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    color: var(--auth-accent);
    background: rgba(15, 23, 42, 0.04);
}

.auth-code-input {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.6rem;
    letter-spacing: 0.35em;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-strong));
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.2);
}

.auth-actions {
    display: grid;
    gap: 0.85rem;
}

.auth-inline-link,
.auth-secondary-link {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-inline-link:hover,
.auth-secondary-link:hover {
    color: var(--auth-accent-strong);
    text-decoration: underline;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.auth-center {
    text-align: center;
}

.auth-footer {
    margin-top: 1rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(208, 219, 232, 0.82);
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.auth-alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 14px;
    font-size: 0.88rem;
}

.auth-alert.alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-left-color: #dc2626;
}

.auth-alert.alert-success {
    color: #166534;
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.auth-alert.alert-warning {
    color: #92400e;
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.auth-alert.alert-info {
    color: #1e40af;
    background: #eff6ff;
    border-left-color: #2563eb;
}

.auth-error-list {
    margin-top: 0.45rem;
    color: #991b1b;
    font-size: 0.82rem;
}

.auth-error-list div + div {
    margin-top: 0.2rem;
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 0;
    }

    .auth-card {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        border: 0;
    }

    .auth-card-hero,
    .auth-card-body {
        padding-inline: 1.35rem;
    }

    .auth-card-hero {
        padding-top: 2.2rem;
    }

    .auth-title {
        font-size: 1.38rem;
    }
}

/* Hallmark · macrostructure: split-screen · tone: institutional · anchor hue: slate */
.auth-page-login {
    --login-ink: #172b42;
    --login-muted: #617085;
    --login-paper: #f8fafc;
    --login-line: #dce3ec;
    --login-navy: #14273e;
    --login-light: #c6d3e2;
    --login-accent: #b9d9d0;
    background: var(--login-paper);
}

.login-layout { display: grid; grid-template-columns: 55% 45%; min-height: 100svh; }
.login-showcase {
    display: flex; flex-direction: column; justify-content: space-between;
    padding: clamp(2rem, 4.5vw, 5rem); gap: 3rem;
    background: var(--login-navy); color: #fff; min-width: 0;
    border-top: 4px solid var(--login-accent);
}
.login-wordmark { display: flex; align-items: center; gap: 1rem; font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; }
.login-wordmark span { padding-left: 1rem; border-left: 1px solid #536174; color: var(--login-light); font-size: .65rem; letter-spacing: .16em; font-weight: 500; }
.login-showcase-content { max-width: 660px; margin-block: auto; }
.login-showcase h1 { margin: 0 0 1.5rem; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 3.35vw, 3.6rem); font-weight: 400; line-height: 1.12; letter-spacing: -.035em; }
.login-showcase h1 span { display: block; color: var(--login-accent); margin-bottom: .5rem; }
.login-intro { color: var(--login-light); font-size: .96rem; line-height: 1.8; max-width: 560px; margin-bottom: 2rem; }
.login-features { display: grid; gap: .75rem; }
.login-feature { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border: 1px solid #36485f; border-radius: 8px; background: #1b3049; scroll-margin: 1rem; }
.login-feature > i { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex-shrink: 0; color: var(--login-accent); background: #263e56; border-radius: 6px; }
.login-feature h2 { font-size: .94rem; font-weight: 600; margin: 0 0 .35rem; line-height: 1.4; }
.login-feature p { color: var(--login-light); font-size: .83rem; line-height: 1.6; margin: 0; }
.login-showcase-footer { color: var(--login-light); font-size: .72rem; line-height: 1.8; }
.login-showcase-footer span { padding-inline: .4rem; }
.login-showcase-footer a { color: inherit; text-underline-offset: 3px; }
.login-access { display: flex; flex-direction: column; min-width: 0; padding: 2rem clamp(1.5rem, 4vw, 4rem); background: var(--login-paper); }
.login-nav { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 1.75rem; min-height: 44px; }
.login-nav a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--login-muted); font-size: .8rem; text-decoration: none; }
.login-nav a:hover { color: var(--login-ink); text-decoration: underline; text-underline-offset: 5px; }
.login-nav i { font-size: .65rem; }
.login-mobile-brand { display: none; }
.login-form-region { display: flex; align-items: center; justify-content: center; flex: 1; padding-block: 3rem; }
.auth-page-login .auth-card { width: 100%; max-width: 410px; min-height: auto; background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; --auth-accent: var(--login-ink); --auth-accent-strong: #294766; }
.auth-page-login .auth-card-hero { text-align: left; padding: 0 0 2rem; background: none; border: 0; }
.auth-page-login .auth-brand-mark { width: 64px; height: 64px; margin-bottom: 1.5rem; border-radius: 50%; background: white; border-color: var(--login-line); }
.auth-page-login .auth-flag { transform: scale(.78); border-radius: 50%; }
.auth-page-login .auth-kicker { display: block; font-size: .68rem; color: var(--login-muted); letter-spacing: .12em; margin-bottom: .65rem; }
.auth-page-login .auth-title { font-size: clamp(1.45rem, 2.25vw, 2rem); letter-spacing: -.04em; line-height: 1.25; font-weight: 650; }
.auth-page-login .auth-subtitle { margin: .75rem 0 0; font-size: .9rem; }
.auth-page-login .auth-card-body { padding: 0; }
.auth-page-login .auth-form { gap: 1.25rem; }
.auth-page-login .auth-input { border: 1px solid var(--login-line); border-radius: 8px; min-height: 54px; transition: none; }
.auth-page-login .auth-input::placeholder { color: #748194; }
.auth-page-login .auth-submit { border-radius: 8px; background: var(--login-ink); box-shadow: none; transition: transform 160ms cubic-bezier(.16, 1, .3, 1); }
.auth-page-login .auth-submit:hover { background: #294766; color: white; box-shadow: none; transform: translateY(-1px); }
.auth-page-login .auth-submit:active { transform: translateY(0); }
.auth-page-login .auth-inline-link { font-size: .85rem; }
.auth-page-login .auth-footer { font-size: .73rem; padding-top: 1.25rem; margin-top: .25rem; border-color: var(--login-line); }
.login-access-note { margin: 0 auto; max-width: 410px; text-align: center; color: var(--login-muted); font-size: .72rem; line-height: 1.7; }
.login-access-note i { margin-right: .3rem; }
.auth-page-login a:focus-visible, .auth-page-login button:focus-visible { outline: 3px solid #3c7aa6; outline-offset: 4px; }
.login-showcase a:focus-visible { outline-color: var(--login-accent); }
.login-skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 10; padding: .75rem 1rem; color: var(--login-ink); background: white; transform: translateY(-200%); }
.login-skip-link:focus { transform: translateY(0); }

@media (max-width: 767.98px) {
    .login-layout { grid-template-columns: minmax(0, 1fr); }
    .login-showcase, .login-desktop-link { display: none !important; }
    .login-access { padding: 1rem 1.5rem 1.5rem; }
    .login-nav { justify-content: space-between; }
    .login-mobile-brand { display: block; color: var(--login-ink); font-size: 1.25rem; letter-spacing: .05em; font-weight: 800; }
    .login-form-region { padding-block: 2rem; }
    .auth-page-login .auth-title { font-size: 1.75rem; }
    .auth-page-login .auth-card-hero { padding-bottom: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page-login .auth-submit { transition: none; transform: none; }
}
