/* SABAH-BMS authentication surfaces: isolated final cascade. */
body.sabah-login-page,
body.sabah-logged-out-page {
    min-width: 320px;
    color: var(--sabah-text);
    font-size: 15px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.sabah-login-shell,
.sabah-logout-shell {
    position: relative;
}

.sabah-auth-theme-switch {
    min-height: 42px;
    padding: 9px 12px;
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--sabah-primary);
    background: color-mix(in srgb, var(--sabah-surface) 88%, transparent);
    border: 1px solid var(--sabah-border-strong);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.sabah-auth-theme-switch:hover {
    color: var(--sabah-primary-hover);
    border-color: color-mix(in srgb, var(--sabah-primary) 45%, var(--sabah-border));
    transform: translateY(-1px);
}

.sabah-auth-theme-switch:focus-visible,
.sabah-login-submit:focus-visible,
.sabah-password-toggle:focus-visible,
.sabah-logout-primary:focus-visible,
.sabah-logout-secondary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--sabah-primary) 55%, transparent);
    outline-offset: 3px;
}

.sabah-login-shell {
    width: min(1040px, 100%) !important;
    min-height: 620px !important;
    border-radius: 30px !important;
}

.sabah-login-brand-panel {
    padding: clamp(38px, 5vw, 60px) !important;
}

.sabah-login-form-panel {
    padding: clamp(38px, 5vw, 58px) !important;
}

.sabah-login-logo {
    width: 132px !important;
    height: 158px !important;
    padding: 0 !important;
    object-fit: contain !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: drop-shadow(0 24px 40px rgba(37, 99, 235, 0.34));
}

.sabah-login-brand-panel h1 {
    font-size: clamp(36px, 4.3vw, 48px) !important;
    letter-spacing: -1.2px !important;
}

.sabah-login-brand-panel p,
.sabah-login-form-heading p {
    font-size: 14px !important;
}

.sabah-login-form-heading h2 {
    font-size: clamp(28px, 3vw, 34px) !important;
}

.sabah-eyebrow,
.sabah-login-field label,
.sabah-login-security strong {
    font-size: 12px !important;
}

.sabah-login-security span,
.sabah-form-alert,
.sabah-field-error,
.sabah-login-footer {
    font-size: 12px !important;
}

.sabah-login-field input {
    min-height: 52px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-radius: 13px !important;
}

.sabah-password-wrapper input {
    padding-right: 78px !important;
}

.sabah-password-toggle {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px !important;
}

.sabah-login-submit {
    min-height: 53px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
}

.sabah-logout-card {
    width: min(600px, 100%) !important;
    padding: clamp(34px, 5vw, 52px) !important;
}

.sabah-logout-card p {
    font-size: 14px !important;
}

.sabah-logout-primary,
.sabah-logout-secondary {
    min-height: 52px !important;
    font-size: 13px !important;
}

.sabah-logout-security-note,
.sabah-logout-eyebrow {
    font-size: 11px !important;
}

@media (max-width: 820px) {
    .sabah-login-shell {
        min-height: auto !important;
    }

    .sabah-login-brand-panel {
        padding-top: 70px !important;
    }

    .sabah-login-logo {
        width: 112px !important;
        height: 112px !important;
    }
}

@media (max-width: 560px) {
    body.sabah-login-page #content,
    body.sabah-logged-out-page #content {
        padding: 14px !important;
    }

    .sabah-auth-theme-switch {
        top: 12px;
        right: 12px;
    }

    .sabah-auth-theme-switch [data-sabah-auth-theme-label] {
        display: none;
    }

    .sabah-login-brand-panel,
    .sabah-login-form-panel {
        padding-right: 25px !important;
        padding-left: 25px !important;
    }

    .sabah-logout-actions {
        grid-template-columns: 1fr !important;
    }
}

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