/* Cumbre Alta Design System: acceso ERP */

:root {
    --login-accent: #ffe700;
    --login-night-950: #07111f;
    --login-night-900: #0a1321;
    --login-panel: rgba(10, 19, 33, 0.84);
    --login-line: rgba(255, 255, 255, 0.16);
    --login-text: #ffffff;
    --login-muted: #b5bfce;
    --login-soft: #8793a6;
    --login-danger: #ff9da8;
    --login-font: 'Manrope', sans-serif;
    --login-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100dvh;
    overflow-x: hidden;
    font-family: var(--login-font);
    color: var(--login-text);
    background: var(--login-night-950);
}

body.login-page {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 1.25rem;
}

body button,
body input { font-family: var(--login-font); }
body .hidden { display: none !important; }

body .login-card {
    position: relative;
    width: min(100%, 480px);
    max-width: 480px;
    margin: 0;
    padding: 1.2rem 2rem 1.35rem;
    overflow: hidden;
    border: 1px solid var(--login-line);
    border-radius: 1.45rem;
    background: linear-gradient(145deg, rgba(10, 19, 33, 0.94), var(--login-panel));
    box-shadow: 0 2rem 4.5rem rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    transform: translateY(2rem);
    z-index: 1;
}

body .login-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 18%;
    right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 231, 0, 0.7), transparent);
    box-shadow: 0 0 1.25rem rgba(255, 231, 0, 0.52);
}

body .login-card::after {
    content: "";
    position: absolute;
    right: -10rem;
    bottom: -12rem;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: rgba(255, 231, 0, 0.035);
    filter: blur(35px);
    pointer-events: none;
}

body #pageBg,
body #pagePattern,
body #coldOrb1,
body #coldOrb2 {
    position: fixed;
    inset: 0;
    pointer-events: none;
    transition: opacity 300ms ease, background 300ms ease, filter 300ms ease;
}

body #pageBg {
    z-index: -5;
    background:
        radial-gradient(circle at 9% 44%, rgba(255, 231, 0, 0.17), transparent 22rem),
        radial-gradient(circle at 88% 82%, rgba(255, 204, 0, 0.13), transparent 20rem),
        radial-gradient(circle at 50% -10%, rgba(37, 53, 78, 0.32), transparent 36rem),
        linear-gradient(135deg, #151b28 0%, #0c111b 48%, #080c14 100%);
}

body #pagePattern {
    z-index: -4;
    opacity: 0.58;
    background-image: radial-gradient(rgba(211, 221, 236, 0.22) 0.7px, transparent 0.8px);
    background-size: 27px 27px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 80%);
}

body #pagePattern::before,
body #pagePattern::after {
    content: "";
    position: absolute;
    width: 54rem;
    height: 29rem;
    border: 1px solid rgba(255, 231, 0, 0.14);
    border-radius: 50%;
    transform: rotate(-28deg);
}

body #pagePattern::before { top: -10rem; left: -19rem; }
body #pagePattern::after { right: -18rem; bottom: -9rem; transform: rotate(28deg); }

body #coldOrb1 {
    z-index: -3;
    inset: auto auto 43% -16rem;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: rgba(255, 231, 0, 0.1);
    filter: blur(90px);
}

body #coldOrb2 {
    z-index: -3;
    inset: auto -15rem -12rem auto;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    background: rgba(255, 213, 61, 0.08);
    filter: blur(100px);
}

body .login-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.5rem;
}

body .language-switch,
body .theme-toggle {
    position: static;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--login-line);
    border-radius: 0.8rem;
    background: rgba(7, 17, 31, 0.56);
    color: var(--login-muted);
}

body .language-switch {
    gap: 0.15rem;
    padding: 0.2rem;
    overflow: hidden;
}

body .language-switch button {
    min-width: 2.65rem;
    min-height: 1.85rem;
    padding: 0.3rem 0.55rem;
    border: 0;
    border-radius: 0.55rem;
    color: var(--login-muted);
    background: transparent;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    appearance: none;
    transition: background 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

body .language-switch button:hover:not(.is-active) { color: var(--login-text); background: rgba(148, 163, 184, 0.1); }
body .language-switch button:active { transform: translateY(1px); }
body .language-switch button.is-active {
    color: #202733;
    background: var(--login-accent);
    box-shadow: 0 0.3rem 0.8rem rgba(255, 231, 0, 0.16);
}

body .theme-toggle {
    gap: 0.5rem;
    padding: 0.58rem 0.88rem;
    color: var(--login-text);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

body .theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 231, 0, 0.55);
}

body .language-switch button:focus-visible,
body .theme-toggle:focus-visible,
body .password-toggle:focus-visible,
body .forgot-link:focus-visible {
    outline: 2px solid rgba(255, 231, 0, 0.84);
    outline-offset: 3px;
}

body .theme-toggle svg { width: 1rem; height: 1rem; stroke-width: 1.8; }

body .login-heading {
    position: relative;
    z-index: 1;
    margin: 1rem 0 1.2rem;
    text-align: center;
}

body .logo-halo {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 4.85rem;
    height: 4.85rem;
    margin-bottom: 0.65rem;
    border-radius: 50%;
    background: rgba(255, 231, 0, 0.09);
    box-shadow: 0 0 2rem rgba(255, 231, 0, 0.09);
}

body .logo-halo::before {
    content: "";
    position: absolute;
    inset: -0.35rem;
    border: 1px solid rgba(255, 231, 0, 0.18);
    border-radius: 50%;
}

body #loginLogo {
    position: relative;
    width: 4.6rem;
    height: 4.6rem;
    object-fit: contain;
    filter: drop-shadow(0 0.8rem 1rem rgba(0, 0, 0, 0.28));
}

body .login-title {
    margin: 0;
    color: var(--login-text);
    font-family: var(--login-font);
    font-size: clamp(1.9rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.055em;
}

body .status-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: min(100%, 22rem);
    margin: 0.8rem auto 0;
    padding: 0.48rem 0.8rem;
    border: 1px solid rgba(255, 231, 0, 0.42);
    border-radius: 999px;
    color: #111827;
    background: var(--login-accent);
    box-shadow: 0 0.65rem 1.8rem rgba(255, 231, 0, 0.1);
    font-family: var(--login-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

body .status-chip svg { width: 0.92rem; height: 0.92rem; stroke-width: 2.2; }

body #formLogin {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.82rem;
}

body #formLogin > .group {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 4.2rem;
    padding: 0.7rem 1.05rem;
    border: 1px solid rgba(181, 191, 206, 0.46);
    border-radius: 0.95rem;
    background: rgba(7, 17, 31, 0.56);
    transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

body #formLogin > .group:focus-within {
    border-color: rgba(255, 231, 0, 0.8);
    background: rgba(7, 17, 31, 0.82);
    box-shadow: 0 0 0 3px rgba(255, 231, 0, 0.16);
}

body #formLogin > .group > div:first-child {
    position: static;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    padding: 0;
    pointer-events: none;
}

body #formLogin > .group > div:first-child svg {
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.95rem;
    color: var(--login-accent);
    stroke-width: 2;
}

body .field-content { min-width: 0; flex: 1; }
body .field-content label {
    display: block;
    margin-bottom: 0.12rem;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

body #formLogin input[type="text"],
body #formLogin input[type="password"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--login-text);
    background: transparent;
    box-shadow: none;
    font-size: 1rem;
    font-weight: 600;
}

body #formLogin input[type="text"]::placeholder,
body #formLogin input[type="password"]::placeholder { color: #7c879a; font-weight: 500; }

body .password-toggle {
    position: static;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin-left: 0.55rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: #8591a5;
    background: transparent;
    cursor: pointer;
    appearance: none;
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

body .password-toggle:hover { color: var(--login-accent); border-color: rgba(255, 231, 0, 0.26); background: rgba(255, 231, 0, 0.08); }
body .password-toggle:active { transform: translateY(1px); }
body .password-toggle svg { width: 1.3rem; height: 1.3rem; stroke-width: 2; }

body .remember-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.9rem;
    padding: 0.78rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.95rem;
    color: var(--login-text);
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

body .remember-option:hover { border-color: rgba(255, 231, 0, 0.5); background: rgba(255, 255, 255, 0.1); }
body .remember-copy { min-width: 0; }
body .remember-title {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    color: var(--login-text);
    font-size: 0.86rem;
    font-weight: 800;
}

body .remember-title svg { width: 1.25rem; height: 1.25rem; color: var(--login-accent); stroke-width: 2; }
body .remember-subtitle {
    display: block;
    margin-top: 0.16rem;
    color: var(--login-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

body .remember-checkbox { position: absolute; width: 1px; height: 1px; opacity: 0; }
body .remember-control { position: relative; display: inline-flex; flex: 0 0 auto; }
body .remember-switch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 2.85rem;
    height: 1.6rem;
    border: 1px solid rgba(181, 191, 206, 0.46);
    border-radius: 999px;
    background: rgba(181, 191, 206, 0.18);
    transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

body .remember-switch::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 50%;
    background: #eef2f7;
    box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.32);
    transition: transform 200ms ease;
}

body .remember-checkbox:checked + .remember-switch { 
    border-color: var(--login-accent);
    background: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(255, 231, 0, 0.12);
}

body .remember-checkbox:checked + .remember-switch::after { transform: translateX(1.2rem); }
body .remember-checkbox:focus-visible + .remember-switch { outline: 2px solid rgba(255, 231, 0, 0.82); outline-offset: 3px; }

body #adminDeviceSessionOption,
body #adminDeviceSessionOptionWrap { display: none; }

body .login-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.05rem;
}

body .forgot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    justify-self: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.65rem;
    color: #a8bdd8;
    background: rgba(20, 27, 40, 0.42);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

body .forgot-link:hover {
    color: var(--login-accent);
    border-color: rgba(255, 231, 0, 0.42);
    background: rgba(255, 231, 0, 0.07);
    transform: translateY(-1px);
}
body .forgot-link:active { transform: translateY(0); }
body .forgot-link svg { width: 1rem; height: 1rem; stroke-width: 2; }

body .password-recovery-dialog {
    width: min(92vw, 430px);
    max-width: 430px;
    padding: 0;
    border: 1px solid var(--login-line);
    border-radius: 1.1rem;
    color: var(--login-text);
    background: rgba(10, 19, 33, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

body .password-recovery-dialog::backdrop { background: rgba(8, 13, 22, 0.72); backdrop-filter: blur(5px); }
body .password-recovery-form { position: relative; display: grid; gap: 0.75rem; padding: 2rem; }
body .password-recovery-close {
    position: absolute; top: 0.65rem; right: 0.8rem; width: 2rem; height: 2rem;
    border: 0; border-radius: 50%; color: inherit; background: transparent; font-size: 1.7rem; cursor: pointer;
}
body .password-recovery-eyebrow { color: #ffe700; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
body .password-recovery-form h2 { margin: 0; font-size: 1.35rem; line-height: 1.25; font-weight: 800; }
body .password-recovery-form p { margin: 0 0 0.35rem; color: var(--login-muted); font-size: 0.88rem; line-height: 1.55; }
body .password-recovery-form label { color: var(--login-text); font-size: 0.78rem; font-weight: 700; }
body .password-recovery-form input {
    width: 100%; min-height: 2.9rem; padding: 0.7rem 0.85rem; border: 1px solid rgba(181, 191, 206, 0.46);
    border-radius: 0.65rem; outline: none; color: var(--login-text); background: rgba(7, 17, 31, 0.56);
}
body .password-recovery-form input:focus { border-color: #ffe700; box-shadow: 0 0 0 2px rgba(255, 231, 0, 0.2); }
body .password-recovery-feedback { min-height: 1.2rem; font-size: 0.78rem; line-height: 1.5; }
body .password-recovery-feedback.is-success { color: #83e9b0; }
body .password-recovery-feedback.is-error { color: #ff9da8; }
body .password-recovery-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.2rem; }
body .password-recovery-actions button { min-height: 2.55rem; padding: 0.6rem 0.9rem; border-radius: 0.65rem; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
body .password-recovery-cancel { border: 1px solid rgba(148, 163, 184, 0.32); color: #d8dee8; background: transparent; }
body .password-recovery-submit { border: 1px solid #ffe700; color: #111827; background: #ffe700; }
body .password-recovery-submit:disabled { opacity: 0.65; cursor: wait; }

body.theme-light .password-recovery-dialog { color: #172033; background: #fff; border-color: #dbe3ef; }
body.theme-light .password-recovery-form p { color: #64748b; }
body.theme-light .password-recovery-form label { color: #334155; }
body.theme-light .password-recovery-form input { color: #0f172a; background: #fff; border-color: #cbd5e1; }
body.theme-light .password-recovery-feedback.is-success { color: #047857; }
body.theme-light .password-recovery-feedback.is-error { color: #b91c1c; }
body.theme-light .password-recovery-cancel { color: #334155; border-color: #cbd5e1; }

body .portal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.85rem;
    color: #e3e9f2;
    background: rgba(20, 27, 40, 0.44);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 200ms ease;
}

body .portal-link:hover { color: var(--login-accent); border-color: rgba(255, 231, 0, 0.46); background: rgba(255, 231, 0, 0.045); transform: translateY(-1px); }
body .portal-link svg { width: 1.2rem; height: 1.2rem; stroke-width: 1.8; }

body .btn-login {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.58rem;
    min-height: 3.65rem;
    margin-top: 0.05rem;
    overflow: hidden;
    border-radius: 0.85rem;
    color: #111827;
    background: var(--login-accent) !important;
    box-shadow: 0 0.9rem 1.7rem rgba(255, 231, 0, 0.15);
    font-size: 0.93rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}

body .btn-login:hover { transform: translateY(-2px); box-shadow: 0 1.1rem 2rem rgba(255, 231, 0, 0.28); }
body .btn-login span, body .btn-login svg { position: relative; z-index: 1; }
body .btn-login svg { width: 1.18rem; height: 1.18rem; stroke-width: 2.2; }
body .is-spinning { animation: login-spin 900ms linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }

body #mensajeError {
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 0.7rem;
    color: var(--login-danger);
    background: rgba(127, 29, 29, 0.2);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

body #mensajeError svg { display: inline-block; width: 0.95rem; height: 0.95rem; margin-right: 0.25rem; vertical-align: -0.15rem; }

body .login-footer {
    margin-top: 1.2rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    color: #66758b;
    font-family: var(--login-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    line-height: 1.8;
    text-align: center;
    text-transform: uppercase;
}

body .login-footer a { color: inherit; text-decoration: none; transition: color 200ms ease; }
body .login-footer a:hover { color: var(--login-accent); }

body.theme-light {
    color: #172033;
    background: #eef2f7;
}

body.theme-light #pageBg {
    background:
        radial-gradient(circle at 8% 42%, rgba(255, 231, 0, 0.2), transparent 22rem),
        radial-gradient(circle at 90% 80%, rgba(148, 163, 184, 0.24), transparent 22rem),
        linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

body.theme-light #pagePattern { opacity: 0.3; background-image: radial-gradient(rgba(71, 85, 105, 0.2) 0.7px, transparent 0.8px); }
body.theme-light #pagePattern::before,
body.theme-light #pagePattern::after { border-color: rgba(146, 112, 0, 0.17); }

body.theme-light .login-card {
    border-color: rgba(100, 116, 139, 0.28);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2rem 4rem rgba(51, 65, 85, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.theme-light .language-switch,
body.theme-light .theme-toggle,
body.theme-light #formLogin > .group,
body.theme-light .remember-option,
body.theme-light .portal-link { background: rgba(248, 250, 252, 0.9); }

body.theme-light .language-switch,
body.theme-light .theme-toggle { border-color: rgba(100, 116, 139, 0.35); color: #475569; }
body.theme-light .language-switch button.is-active { color: #172033; background: var(--login-accent); }
body.theme-light .login-title,
body.theme-light .remember-title,
body.theme-light .portal-link { color: #172033; }
body.theme-light #formLogin > .group { border-color: rgba(100, 116, 139, 0.28); }
body.theme-light #formLogin > .group:focus-within { background: #fff; }
body.theme-light .field-content label { color: #475569; }
body.theme-light #formLogin input[type="text"],
body.theme-light #formLogin input[type="password"] { color: #172033; }
body.theme-light #formLogin input[type="text"]::placeholder,
body.theme-light #formLogin input[type="password"]::placeholder { color: #94a3b8; }
body.theme-light .remember-subtitle { color: #64748b; }
body.theme-light .remember-option:hover { background: #fff; }
body.theme-light .forgot-link { color: #52739a; background: rgba(248, 250, 252, 0.92); border-color: rgba(100, 116, 139, 0.24); }
body.theme-light .forgot-link:hover { color: #172033; border-color: rgba(146, 112, 0, 0.48); background: rgba(255, 231, 0, 0.18); }
body.theme-light .portal-link { border-color: rgba(100, 116, 139, 0.25); }
body.theme-light .login-footer { border-color: rgba(100, 116, 139, 0.2); color: #64748b; }

body.theme-dark input:-webkit-autofill,
body.theme-dark input:-webkit-autofill:hover,
body.theme-dark input:-webkit-autofill:focus,
body.theme-dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #141b29 inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
}

body.theme-light input:-webkit-autofill,
body.theme-light input:-webkit-autofill:hover,
body.theme-light input:-webkit-autofill:focus,
body.theme-light input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: #172033 !important;
    transition: background-color 5000s ease-in-out 0s;
}

@media (max-width: 640px) {
    body.login-page { padding: 0.75rem; }
    body .login-card { width: min(100%, 480px); padding: 1rem 1.1rem 1.2rem; border-radius: 1.2rem; }
    body .login-heading { margin-top: 1rem; margin-bottom: 1.15rem; }
    body .logo-halo { width: 4.8rem; height: 4.8rem; }
    body #loginLogo { width: 4.55rem; height: 4.55rem; }
    body .login-title { font-size: 2rem; }
    body .status-chip { font-size: 0.63rem; }
    body #formLogin > .group { min-height: 4.25rem; }
    body .login-footer { margin-top: 1.15rem; }
}

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

/* Acceso administrativo · composición alineada con Portal Familias */
body.login-page {
    position: relative;
    display: block;
    min-height: 100dvh;
    padding: 0;
    isolation: isolate;
    background: #07111f;
}

body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, .2) 0%, rgba(7, 17, 31, .18) 42%, rgba(7, 17, 31, .5) 70%, rgba(7, 17, 31, .28) 100%),
        linear-gradient(0deg, rgba(7, 17, 31, .4), transparent 36%, rgba(7, 17, 31, .14)),
        url("../img/login-admin-bg.png") center / cover no-repeat;
}

body .admin-login-layout {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 1720px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 68px);
}

body .login-brand {
    display: flex;
    position: absolute;
    top: clamp(28px, 7vh, 72px);
    bottom: clamp(28px, 7vh, 72px);
    left: clamp(18px, 5vw, 84px);
    min-width: 0;
    width: min(500px, calc(50vw - 250px - clamp(18px, 5vw, 84px) - 16px));
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(8px, 2vw, 30px);
    color: #ffffff;
}

body .login-brand-main { width: 100%; }

body .login-brand-mark {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 22px;
    background: rgba(10, 19, 33, .62);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body .login-brand-mark img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 .65rem .9rem rgba(0, 0, 0, .3));
}

body .login-brand-eyebrow {
    margin: 0 0 13px;
    color: var(--login-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .2em;
    text-transform: uppercase;
}

body .login-brand h1 {
    max-width: 720px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(46px, 5.1vw, 78px);
    font-weight: 800;
    line-height: .96;
    letter-spacing: -.06em;
    text-wrap: balance;
}

body .login-brand h1 em {
    color: var(--login-accent);
    font-style: normal;
}

body .login-brand-copy {
    max-width: 510px;
    margin: 20px 0 0;
    color: rgba(235, 241, 250, .86);
    font-size: clamp(15px, 1.35vw, 18px);
    line-height: 1.58;
}

body .login-brand-points {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

body .login-brand-points > span {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 13px;
    color: rgba(255, 255, 255, .94);
    background: rgba(10, 19, 33, .58);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 800;
}

body .login-brand-points svg {
    width: 15px;
    height: 15px;
    color: var(--login-accent);
    stroke-width: 2.2;
}

body .login-brand-footer {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    color: rgba(235, 241, 250, .78);
    font-size: 11px;
}

body .login-brand-footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .96);
}

body .login-brand-footer svg {
    width: 15px;
    height: 15px;
    color: var(--login-accent);
}

body .login-card {
    position: relative;
    z-index: 2;
    width: min(100%, 500px);
    max-width: 500px;
    max-height: calc(100dvh - 36px);
    align-self: center;
    overflow-y: auto;
    margin: 0 auto;
    padding: clamp(24px, 2.7vw, 38px);
    border-radius: 28px;
    scrollbar-color: rgba(255, 255, 255, .26) transparent;
}

body .login-topbar { min-height: 34px; }
body .login-heading { margin: 20px 0 22px; }
body .login-title { font-size: clamp(30px, 3vw, 38px); }
body .status-chip { min-height: 34px; }
body .login-footer { margin-top: 18px; }

body.theme-light.login-page::before {
    background:
        linear-gradient(90deg, rgba(7, 17, 31, .12) 0%, rgba(7, 17, 31, .16) 42%, rgba(7, 17, 31, .42) 70%, rgba(7, 17, 31, .24) 100%),
        linear-gradient(0deg, rgba(7, 17, 31, .3), transparent 36%, rgba(7, 17, 31, .1)),
        url("../img/login-admin-bg.png") center / cover no-repeat;
}

@media (max-width: 1200px) {
    body .admin-login-layout {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 28px clamp(18px, 6vw, 56px);
    }

    body .login-brand {
        position: relative;
        inset: auto;
        transform: none;
        min-height: 0;
        width: min(100%, 600px);
        align-items: center;
        padding: 10px 12px 4px;
        text-align: center;
    }

    body .login-brand-mark { width: 64px; height: 64px; margin-bottom: 16px; border-radius: 18px; }
    body .login-brand-mark img { width: 48px; height: 48px; }
    body .login-brand-eyebrow { margin-bottom: 9px; font-size: 10px; }
    body .login-brand h1 { max-width: 560px; font-size: clamp(38px, 7vw, 58px); }
    body .login-brand-copy { max-width: 470px; margin-top: 12px; font-size: 14px; }
    body .login-brand-points { justify-content: center; margin-top: 14px; }
    body .login-brand-points > span { min-height: 36px; padding: 0 10px; border-radius: 11px; font-size: 10px; }
    body .login-brand-footer { display: none; }

    body .login-card {
        width: min(100%, 520px);
        max-height: none;
        align-self: center;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    body .admin-login-layout {
        min-height: 100dvh;
        gap: 12px;
        padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    }

    body.login-page::before {
        background-position: 67% center;
    }

    body .login-brand {
        padding: 6px 8px 0;
    }

    body .login-brand-mark { width: 54px; height: 54px; margin-bottom: 10px; border-radius: 15px; }
    body .login-brand-mark img { width: 42px; height: 42px; }
    body .login-brand-eyebrow { margin-bottom: 6px; font-size: 9px; letter-spacing: .16em; }
    body .login-brand h1 { font-size: clamp(32px, 8vw, 44px); line-height: .98; }
    body .login-brand-copy { display: none; }
    body .login-brand-points { gap: 6px; margin-top: 10px; }
    body .login-brand-points > span { min-height: 32px; gap: 6px; padding: 0 8px; font-size: 9px; }
    body .login-brand-points svg { width: 13px; height: 13px; }

    body .login-card {
        width: min(100%, 480px);
        padding: 18px 18px 20px;
        border-radius: 20px;
    }

    body .login-heading { margin: 15px 0 17px; }
    body .login-title { font-size: clamp(27px, 7vw, 32px); }
    body .status-chip { margin-top: 9px; font-size: 9px; letter-spacing: .08em; }
    body #formLogin { gap: 10px; }
    body .login-footer { margin-top: 14px; padding-top: 10px; }
}

@media (max-width: 390px) {
    body .login-brand-points > span:last-child { display: none; }
    body .login-topbar { align-items: flex-start; }
    body .theme-toggle { padding: .5rem .65rem; }
}

@media (prefers-reduced-motion: reduce) {
    body.login-page::before { transition: none; }
    body .login-brand > *,
    body .login-card { animation: none; }
}
