:root {
    color-scheme: light;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    padding: clamp(20px, 4vh, 48px) 0;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at 14% 20%, rgba(230, 167, 46, 0.14) 0, transparent 28%),
        radial-gradient(circle at 84% 16%, rgba(15, 107, 87, 0.18) 0, transparent 32%),
        linear-gradient(135deg, #071827 0%, #0b2b45 52%, #102f4c 100%);
}

body::before {
    opacity: 0.42;
}

body::after {
    display: none;
}

.login-shell {
    width: min(1040px, calc(100% - 48px));
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: clamp(36px, 6vw, 72px);
}

.login-hero {
    padding: 32px 0;
}

.login-hero h1 {
    max-width: 580px;
    margin-top: 22px;
    font-size: clamp(40px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.login-hero p {
    max-width: 540px;
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.65;
}

.hero-stats {
    display: none;
}

.hero-assurance {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.login-card {
    overflow: hidden;
    isolation: isolate;
    padding: 32px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 64px rgba(2, 12, 27, 0.32);
}

.login-card::before {
    inset: 0 12px auto;
    border-radius: 0 0 999px 999px;
}

.brand {
    margin-bottom: 24px;
}

.login-header h2 {
    font-size: 27px;
}

.alert-error {
    margin-top: 20px;
    margin-bottom: 0;
}

.alert-error:focus {
    outline: 3px solid #991b1b;
    outline-offset: 3px;
}

.login-form {
    margin-top: 24px;
}

.form-control {
    min-height: 48px;
}

.form-control[aria-invalid="true"] {
    border-color: #b42318;
}

.password-control {
    position: relative;
}

.password-control .form-control {
    padding-right: 104px;
}

.password-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 92px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #0b4f6c;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.password-toggle:hover {
    background: #eaf2f6;
}

.password-toggle:focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.btn-login {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-login:disabled {
    cursor: wait;
    opacity: 0.82;
    transform: none;
    box-shadow: 0 10px 24px rgba(26, 59, 92, 0.22);
}

.login-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.46);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.75s linear infinite;
}

.login-form[aria-busy="true"] .login-spinner {
    display: inline-block;
}

.security-note {
    line-height: 1.45;
}

.security-indicator {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 2px solid #0f6b57;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(15, 107, 87, 0.12);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

@media (max-height: 760px) and (min-width: 921px) {
    body {
        padding: 20px 0;
    }

    .login-hero {
        padding: 16px 0;
    }

    .login-hero h1 {
        margin-top: 16px;
        font-size: clamp(38px, 4.4vw, 48px);
    }

    .login-hero p {
        margin-top: 14px;
        line-height: 1.55;
    }

    .hero-assurance {
        margin-top: 16px !important;
    }

    .login-card {
        padding: 26px 30px;
    }

    .brand {
        margin-bottom: 18px;
    }

    .login-form {
        margin-top: 18px;
    }

    .form-group {
        margin-bottom: 14px;
    }
}

@media (max-width: 920px) {
    body {
        align-items: flex-start;
        padding: 28px 0;
    }

    .login-shell {
        width: min(700px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .login-hero {
        padding: 4px 0 0;
        text-align: center;
    }

    .login-hero h1 {
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(36px, 7vw, 46px);
    }

    .hero-assurance {
        justify-content: center;
    }

    .login-container {
        max-width: 460px;
    }
}

@media (max-width: 520px) {
    body {
        padding: 18px 0;
    }

    .login-shell {
        width: min(calc(100% - 24px), 700px);
        gap: 18px;
    }

    .eyebrow {
        padding: 7px 10px;
        font-size: 12px;
    }

    .login-hero h1 {
        margin-top: 16px;
        font-size: clamp(32px, 10vw, 38px);
        line-height: 1.06;
    }

    .login-hero p {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.55;
    }

    .hero-assurance {
        margin-top: 14px !important;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 20px;
    }

    .login-card::before {
        inset-inline: 10px;
    }

    .brand {
        margin-bottom: 20px;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .login-header h2 {
        font-size: 25px;
    }

    .form-control {
        font-size: 16px;
    }
}

@media (prefers-contrast: more) {
    .login-card,
    .form-control,
    .alert-error {
        border-width: 2px;
    }

    .login-header p,
    .security-note {
        color: #334155;
    }
}

@media (forced-colors: active) {
    body,
    .login-card,
    .form-control,
    .password-toggle,
    .btn-login {
        forced-color-adjust: auto;
    }

    .login-card,
    .form-control,
    .password-toggle,
    .btn-login,
    .alert-error {
        border: 1px solid CanvasText;
    }

    .security-indicator {
        border-color: CanvasText;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-spinner {
        animation-duration: 1.5s;
    }
}
