:root {
    --navy: #051b43;
    --navy-deep: #031532;
    --blue: #2e63f3;
    --cyan: #18c7d5;
    --text: #102554;
    --muted: #7886aa;
    --border: #dce4f1;
    --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: #d9e7f3;
    font-family: Poppins-Regular, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.login-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 37%) 1fr;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(202,222,238,.05), rgba(217,231,243,.18)), url('../images/bg-login.webp');
    background-position: center;
    background-size: cover;
}

.login-presentation {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: #fff;
    background: transparent;
}

.login-presentation::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.presentation-shape {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.presentation-band--light { fill: #579fd0; }
.presentation-band--middle { fill: #15539a; }
.presentation-panel-path { fill: url('#presentation-panel-gradient'); }
.presentation-dots-path { fill: url('#presentation-dot-pattern'); opacity: .22; }

.login-presentation::after {
    right: -8%;
    bottom: -16%;
    width: 78%;
    height: 65%;
    border: 1px solid rgba(25,198,218,.14);
    border-radius: 50%;
    box-shadow: 20px -10px 0 rgba(25,198,218,.035), 42px -20px 0 rgba(25,198,218,.025);
    transform: rotate(-18deg);
}

.presentation-decoration {
    position: absolute;
    z-index: 1;
    right: 4%;
    bottom: 7%;
    width: 48%;
    height: 56%;
    opacity: .18;
    border-right: 1px solid #20d1dc;
    border-radius: 50%;
    transform: rotate(15deg);
}

.presentation-content {
    position: relative;
    z-index: 2;
    width: 63%;
    margin: auto;
    padding: 40px 0 72px;
}

.client-brand {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.88);
}

.client-brand--panel {
    width: 270px;
    max-width: 100%;
    height: 100px;
    padding: 14px 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 17px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(0, 15, 40, .18);
    backdrop-filter: blur(6px);
}

.client-brand--panel .client-logo {
    filter: none;
}

.client-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.client-logo-fallback {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    color: var(--blue);
    background: #eaf1ff;
    font-size: 24px;
}

.presentation-copy { margin-top: 31px; }
.presentation-eyebrow {
    display: block;
    width: 48px;
    height: 2px;
    margin: 0 0 23px 105px;
    border-radius: 10px;
    background: var(--cyan);
}
.presentation-copy h1 {
    margin: 0;
    color: #fff;
    font: 24px/1.22 Poppins-SemiBold, sans-serif;
    letter-spacing: -.025em;
}
.presentation-copy h1 strong { color: #2ebee8; font-weight: inherit; }
.presentation-copy p { margin: 13px 0 0; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.58; }

.presentation-benefits {
    display: grid;
    gap: 11px;
    margin: 27px 0 0;
    padding: 0;
    list-style: none;
}
.presentation-benefits li { display: flex; align-items: center; gap: 13px; }
.presentation-benefits li > span {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 12px;
    color: #20d1dc;
    background: linear-gradient(135deg,rgba(38,119,219,.35),rgba(11,67,142,.2));
    font-size: 21px;
}
.presentation-benefits strong,
.presentation-benefits small { display: block; }
.presentation-benefits strong { color: #fff; font: 11px/1.35 Poppins-SemiBold,sans-serif; }
.presentation-benefits small { margin-top: 2px; color: rgba(255,255,255,.67); font-size: 9px; line-height: 1.35; }
.presentation-footnote { position: absolute; z-index: 3; bottom: 35px; left: 14%; margin: 0; color: rgba(255,255,255,.68); font-size: 9px; }
.presentation-footnote i { margin-right: 8px; color: #fff; font-size: 12px; }

.login-access {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    padding: 72px 8%;
    place-items: center;
}

.theme-control {
    position: absolute;
    z-index: 4;
    top: 27px;
    right: 31%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 22px;
    outline: 0;
    color: #3972f2;
    background: rgba(255,255,255,.87);
    box-shadow: 0 8px 28px rgba(28,67,121,.14);
    cursor: pointer;
}
.theme-control:focus-visible { box-shadow: 0 0 0 4px rgba(47,102,243,.18), 0 8px 28px rgba(28,67,121,.14); }
.theme-control > span { display: block; width: 34px; height: 18px; padding: 3px; border-radius: 12px; background: #e7ebf5; }
.theme-control > span > span { display: block; width: 12px; height: 12px; margin-left: 16px; border-radius: 50%; background: #3767ed; transition: margin .22s, background-color .22s; }
.login-page.is-night::after { position: fixed; z-index: 0; inset: 0 0 0 37%; content: ""; pointer-events: none; background: rgba(3,14,35,.42); }
.login-page.is-night .login-card {
    color: #eaf0ff;
    background: rgba(7,24,53,.96);
    border-color: rgba(139,163,205,.2);
    box-shadow: 0 28px 72px rgba(0,10,28,.42);
}
.login-page.is-night .login-heading h2,
.login-page.is-night .form-field > label,
.login-page.is-night .remember-option label,
.login-page.is-night .security-note strong { color: #eef4ff; }
.login-page.is-night .login-heading p,
.login-page.is-night .security-note p { color: #aebbd4; }
.login-page.is-night .input-shell,
.login-page.is-night .security-note {
    background: rgba(255,255,255,.075);
    border-color: rgba(155,177,216,.23);
}
.login-page.is-night .input-shell input { color: #fff; }
.login-page.is-night .input-shell input::placeholder { color: #9eabc4; }
.login-page.is-night .input-shell:focus-within { border-color: #6e94ff; background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px rgba(80,120,255,.16); }
.login-page.is-night .input-icon,
.login-page.is-night .password-toggle { color: #7895f8; }
.login-page.is-night .password-toggle:hover { color: #b6c6ff; background: rgba(255,255,255,.08); }
.login-page.is-night .remember-option label::before { border-color: #7586a6; background: #172d50; }
.login-page.is-night .remember-option input:checked + label::before { border-color: #4b79ff; background: #4b79ff; }
.login-page.is-night .security-note-icon { color: #89a4ff; background: #172f62; }
.login-page.is-night .login-alert { color: #ffb4ad; background: rgba(112,25,32,.28); border-color: rgba(255,139,130,.35); }
.login-page.is-night .login-footer { color: rgba(224,233,249,.66); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.login-page.is-night .theme-control { color: #c2d0ff; background: rgba(12,31,65,.92); border-color: rgba(167,187,226,.28); }
.login-page.is-night .theme-control > span { background: #21395f; }
.login-page.is-night .theme-control > span > span { margin-left: 0; background: #91a7d8; }

.mobile-brand { display: none; }

.login-card {
    position: relative;
    z-index: 2;
    width: min(405px,100%);
    padding: 27px 36px 22px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 18px;
    background: rgba(248,250,255,.94);
    box-shadow: 0 25px 65px rgba(24,55,103,.25);
    backdrop-filter: blur(15px);
    transform: none;
    animation: card-entry .38s ease-out both;
}

.login-brands {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 12px;
}

.client-brand--card,
.system-brand {
    border-radius: 13px;
}

.client-brand--card {
    width: 96px;
    height: 66px;
    padding: 2px 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.system-brand {
    width: 90px;
    height: 78px;
    padding: 4px 4px 3px;
}
.client-brand--card .client-logo-fallback { width: 46px; height: 46px; border-radius: 10px; font-size: 20px; }
.system-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.system-logo { display: block; width: 57px; height: 57px; flex: 0 0 57px; object-fit: contain; object-position: center; }
.system-brand-name { display: block; width: 100%; margin-top: 2px; color: #102a56; font: 8.5px/1.1 Poppins-SemiBold,sans-serif; text-align: center; white-space: nowrap; }
.system-logo-fallback { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf1ff; font-size: 20px; }

.login-heading { margin-bottom: 22px; text-align: center; }
.secure-badge { display: none; }
.login-heading h2 { margin: 0; color: var(--text); font: 20px/1.3 Poppins-SemiBold,sans-serif; letter-spacing: -.02em; }
.login-heading h2 strong { color: var(--blue); font-weight: inherit; }
.login-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: -5px 0 14px;
    padding: 10px 11px;
    border: 1px solid #fecdca;
    border-radius: 9px;
    color: var(--danger);
    background: #fff6f5;
    font-size: 9px;
    line-height: 1.4;
}
.login-alert > i { margin-top: 2px; font-size: 13px; }
.login-alert strong, .login-alert span { display: block; }
.login-alert strong { margin-bottom: 1px; font-family: Poppins-SemiBold,sans-serif; }

.form-field { margin-bottom: 12px; }
.form-field > label { display: block; margin: 0 0 7px; color: var(--text); font: 10px/1.3 Poppins-SemiBold,sans-serif; }
.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 2px 6px rgba(27,58,112,.06);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input-shell:focus-within { border-color: #6c93ff; background: #fff; box-shadow: 0 0 0 3px rgba(47,102,243,.11); }
.input-shell.is-invalid { border-color: #f04438; box-shadow: 0 0 0 3px rgba(240,68,56,.08); }
.input-shell input { width: 100%; height: 100%; min-width: 0; padding: 0 43px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.input-shell input::placeholder { color: #7c89ae; opacity: 1; }
.input-icon { position: absolute; left: 14px; color: #6c89f7; font-size: 13px; transition: color .2s; }
.input-shell:focus-within .input-icon { color: var(--blue); }
.password-toggle {
    position: absolute;
    right: 4px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 7px;
    outline: 0;
    color: #8b98bd;
    background: transparent;
    cursor: pointer;
    transition: color .2s, background-color .2s, box-shadow .2s;
}
.password-toggle:hover { color: var(--blue); background: #edf3ff; }
.password-toggle:focus-visible { color: var(--blue); box-shadow: 0 0 0 3px rgba(47,102,243,.16); }
.field-feedback { display: block; min-height: 12px; padding-top: 3px; color: var(--danger); font-size: 8px; line-height: 1.3; }
.field-feedback:empty { min-height: 0; padding-top: 0; }

.login-options { display: flex; align-items: center; min-height: 20px; margin: 0 0 16px; }
.remember-option { display: inline-flex; align-items: center; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.remember-option label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--text); font: 9px/1.4 Poppins-Medium,sans-serif; cursor: pointer; user-select: none; }
.remember-option label::before {
    display: grid;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    place-items: center;
    border: 1px solid #b9c6dc;
    border-radius: 3px;
    content: "";
    color: #fff;
    background: #fff;
    font: 8px/1 FontAwesome;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.remember-option input:checked + label::before { border-color: var(--blue); content: "\f00c"; background: var(--blue); }
.remember-option input:focus-visible + label::before { box-shadow: 0 0 0 3px rgba(47,102,243,.16); }

.login-submit {
    display: grid;
    width: 100%;
    height: 42px;
    padding: 0 18px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    outline: 0;
    color: #fff;
    background: linear-gradient(105deg,#2f63f4,#2d78ed 52%,#12c7d2);
    box-shadow: 0 8px 18px rgba(47,102,243,.22);
    font: 13px/1 Poppins-Medium,sans-serif;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(47,102,243,.28); filter: saturate(1.08); }
.login-submit:focus-visible { box-shadow: 0 0 0 4px rgba(47,102,243,.2), 0 10px 22px rgba(47,102,243,.24); }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { transform: none; cursor: wait; filter: saturate(.65); opacity: .76; }
.button-content, .button-loading { display: inline-flex; align-items: center; gap: 8px; }
.button-loading, .login-submit.is-loading .button-content { display: none; }
.login-submit.is-loading .button-loading { display: inline-flex; }

.security-note {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 22px;
    padding: 10px;
    border: 1px solid #e0e6f1;
    border-radius: 9px;
    background: rgba(255,255,255,.58);
}
.security-note-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 9px; color: var(--blue); background: #e8edff; font-size: 16px; }
.security-note strong { display: block; margin-bottom: 2px; color: var(--text); font: 9px/1.35 Poppins-SemiBold,sans-serif; }
.security-note p { margin: 0; color: #65749a; font-size: 7.5px; line-height: 1.45; }
.login-footer { position: absolute; right: 20px; bottom: 16px; left: 20px; color: rgba(22,45,82,.55); font-size: 8px; text-align: center; text-shadow: 0 1px 2px rgba(255,255,255,.8); }

@keyframes card-entry { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1050px) {
    .login-page { grid-template-columns: minmax(300px,34%) 1fr; }
    .presentation-content { width: 68%; }
    .client-brand--panel { width: 225px; height: 78px; }
    .presentation-copy h1 { font-size: 23px; }
    .presentation-benefits small { display: none; }
    .login-card { transform: none; }
}

@media (max-width: 820px) {
    .login-page { grid-template-columns: 245px 1fr; }
    .presentation-content { width: 76%; }
    .client-brand--panel { width: 186px; height: 70px; padding: 11px 16px; }
    .presentation-copy h1 { font-size: 21px; }
    .presentation-copy p { font-size: 9px; }
    .presentation-benefits { gap: 9px; }
    .presentation-benefits li > span { width: 40px; height: 40px; flex-basis: 40px; font-size: 17px; }
    .presentation-benefits strong { font-size: 9px; }
    .login-access { padding-right: 28px; padding-left: 28px; }
    .login-card { transform: none; }
}

@media (max-width: 680px) {
    body { background: #e8f0f8; }
    .login-page {
        display: block;
        min-height: 100vh;
        min-height: 100svh;
        overflow: visible;
        background-image: linear-gradient(rgba(232,240,248,.91),rgba(244,248,252,.97)), url('../images/bg-login.webp');
        background-position: 62% center;
    }
    .login-presentation { display: none; }
    .login-page.is-night::after { inset: 0; background: rgba(3,14,35,.56); }
    .login-page.is-night .login-access { background: linear-gradient(rgba(5,18,42,.62),rgba(5,18,42,.76)); }
    .theme-control { display: none; }
    .login-access { display: flex; flex-direction: column; justify-content: flex-start; min-height: 100vh; min-height: 100svh; padding: 18px 18px 52px; }
    .login-card { width: 100%; max-width: 420px; margin: auto; padding: 28px 24px 23px; border-radius: 18px; transform: none; box-shadow: 0 20px 55px rgba(24,55,103,.16); }
    .login-brands { margin-bottom: 14px; }
    .login-heading { margin-bottom: 24px; }
    .login-heading h2 { font-size: 22px; }
    .input-shell { height: 52px; border-radius: 11px; }
    .input-shell input { font-size: 12px; }
    .login-submit { height: 52px; border-radius: 11px; }
    .form-field { margin-bottom: 15px; }
    .login-options { margin-bottom: 19px; }
    .security-note { margin-top: 20px; }
    .security-note p { font-size: 8px; }
    .login-footer { position: static; margin-top: 18px; color: #77849c; }
}

@media (max-width: 380px) {
    .login-access { padding-right: 16px; padding-left: 16px; }
    .login-card { padding-right: 20px; padding-left: 20px; }
}

@media (max-height: 740px) and (min-width: 681px) {
    .login-access { padding-top: 32px; padding-bottom: 34px; }
    .login-card { padding-top: 21px; padding-bottom: 18px; }
    .login-brands { margin-bottom: 8px; }
    .client-brand--card { height: 58px; }
    .client-brand--card { width: 88px; }
    .system-brand { width: 76px; height: 66px; }
    .system-logo { width: 46px; height: 46px; flex-basis: 46px; }
    .system-brand-name { font-size: 7px; }
    .login-heading { margin-bottom: 15px; }
    .form-field { margin-bottom: 8px; }
    .login-options { margin-bottom: 11px; }
    .security-note { margin-top: 14px; padding: 8px; }
    .presentation-copy { margin-top: 27px; }
    .presentation-benefits { margin-top: 20px; }
    .presentation-footnote { bottom: 20px; }
}

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