:root {
    --login-navy: #10284c;
    --login-copy: #607595;
    --login-blue: #1672de;
    --login-border: #d6e0ed;
    --login-card: rgba(255, 255, 255, .96);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body.modern-login {
    min-height: 100vh;
    color: var(--login-navy);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #eaf4ff url('../assets/img/login/background.webp') center center / cover no-repeat fixed;
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(560px, 1fr) minmax(600px, 1fr);
    min-height: 100vh;
    overflow: hidden;
}

.login-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(38px, 6.8vh, 76px) clamp(50px, 8vw, 165px) 42px;
}

.login-wordmark { display: block; width: clamp(230px, 17.7vw, 322px); height: auto; }

.login-intro-copy {
    width: min(620px, 100%);
    margin: clamp(50px, 7vh, 82px) 0 40px;
}

.login-intro h1 {
    margin: 0;
    color: #102544;
    font-size: clamp(44px, 3.25vw, 64px);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.03;
}

.login-intro h1 span { color: #2879d8; }

.login-intro-copy > p {
    max-width: 610px;
    margin: 26px 0 34px;
    color: #5e7391;
    font-size: clamp(17px, 1.12vw, 21px);
    line-height: 1.5;
}

.login-benefits { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.login-benefits li { display: flex; align-items: center; gap: 22px; }

.benefit-icon {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    place-items: center;
    color: #1974dc;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(62, 112, 170, .09);
}

.benefit-icon svg { width: 28px; height: 28px; fill: currentColor; }
.benefit-icon .svg-cut { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.login-benefits strong, .login-benefits small { display: block; }
.login-benefits strong { margin-bottom: 3px; color: #12284b; font-size: 18px; font-weight: 650; }
.login-benefits small { color: #6b809e; font-size: 16px; }
.login-copyright { margin: auto 0 0; color: #7990af; font-size: 14px; }
.login-copyright-mobile { display: none; }

.login-access {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 48px 72px 48px 22px;
}

.login-card {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    padding: clamp(38px, 5vh, 58px) clamp(38px, 4.3vw, 62px) 46px;
    background: var(--login-card);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 22px;
    box-shadow: 0 28px 75px rgba(34, 82, 137, .16);
    backdrop-filter: blur(12px);
}

.login-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.login-card-header h2 { margin: 0 0 6px; color: #10284c; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.login-card-header p { margin: 0; color: #647997; font-size: 16px; }
.login-card-header img { width: 52px; height: 52px; object-fit: contain; }

.login-alert { display: flex; gap: 12px; margin: -18px 0 24px; padding: 13px 15px; color: #8b5610; background: #fff7df; border: 1px solid #f4df9c; border-radius: 10px; }
.login-alert > svg { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 2px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.login-alert strong, .login-alert span { display: block; }
.login-alert span { margin-top: 2px; font-size: 13px; }

.login-field { margin-bottom: 22px; }
.login-field > label { display: block; margin: 0 0 9px; color: #203756; font-size: 14px; font-weight: 500; }

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 54px;
    color: #6b82a3;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--login-border);
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(24, 53, 88, .02);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-input-wrap:focus-within { background: #fff; border-color: #5499eb; box-shadow: 0 0 0 4px rgba(36, 125, 225, .11); }
.login-input-wrap > svg { width: 20px; height: 20px; margin: 0 15px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.login-input-wrap input {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 0;
    color: #183252;
    font: inherit;
    background: transparent;
    border: 0;
    outline: 0;
}

.login-input-wrap input::placeholder { color: #8294ae; }

.password-toggle {
    display: grid;
    width: 48px;
    height: 100%;
    flex: 0 0 48px;
    padding: 0;
    place-items: center;
    color: #657d9d;
    font-size: 19px;
    background: transparent;
    border: 0;
    border-radius: 0 11px 11px 0;
    cursor: pointer;
}

.password-toggle:hover { color: var(--login-blue); }
.password-toggle:focus-visible { outline: 2px solid #2880df; outline-offset: -5px; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.login-options { display: flex; align-items: center; min-height: 30px; margin: 4px 0 25px; }

.remember-option { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #243a58; font-size: 14px; font-weight: 500; cursor: pointer; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.remember-option > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: transparent;
    background: #fff;
    border: 1px solid #b9c8da;
    border-radius: 5px;
    transition: .18s ease;
}

.remember-option input:checked + span { color: #fff; background: var(--login-blue); border-color: var(--login-blue); }
.remember-option input:focus-visible + span { box-shadow: 0 0 0 4px rgba(36, 125, 225, .13); }
.remember-option svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }

.login-submit {
    display: flex;
    width: 100%;
    height: 58px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #fff;
    font-size: 18px;
    font-weight: 650;
    background: linear-gradient(105deg, #43a1ee 0%, #0965d9 100%);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 12px 24px rgba(21, 108, 212, .22);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.login-submit:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 15px 28px rgba(21, 108, 212, .29); }
.login-submit:focus-visible { outline: 3px solid rgba(42, 129, 226, .35); outline-offset: 3px; }
.login-submit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.login-separator { display: flex; align-items: center; gap: 18px; margin: 34px 0 24px; color: #7f93ae; font-size: 13px; }
.login-separator::before, .login-separator::after { height: 1px; flex: 1; content: ""; background: #dce4ee; }
.login-ip { margin: 0; color: #70839f; text-align: center; font-size: 14px; }
.login-ip strong { color: #1972dc; font-weight: 500; }

.login-quote {
    position: absolute;
    right: 0;
    bottom: 8%;
    z-index: 1;
    width: 300px;
    padding: 54px 28px 48px 126px;
    color: #fff;
    background: rgba(24, 67, 112, .58);
    border: 1px solid rgba(255, 255, 255, .2);
    border-right: 0;
    border-radius: 48px 0 0 48px;
    box-shadow: 0 20px 55px rgba(15, 51, 89, .2);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    backdrop-filter: blur(14px) saturate(115%);
}

.login-quote p { margin: 0; font-size: 19px; line-height: 1.55; text-shadow: 0 1px 8px rgba(8, 38, 70, .35); }
.login-quote span { display: block; width: 42px; height: 1px; margin-top: 23px; background: rgba(255, 255, 255, .7); }

.grecaptcha-badge {
    right: auto !important;
    left: 14px !important;
    width: 70px !important;
    overflow: hidden !important;
    z-index: 10;
    transition: width .3s ease !important;
}

.grecaptcha-badge:hover,
.grecaptcha-badge:focus-within { width: 256px !important; }

.recaptcha-local-error .grecaptcha-badge:hover,
.recaptcha-local-error .grecaptcha-badge:focus-within { width: 302px !important; }

.recaptcha-local-error .grecaptcha-badge iframe {
    width: 302px !important;
    transform: translateX(-227px);
    transition: transform .3s ease;
}

.recaptcha-local-error .grecaptcha-badge:hover iframe,
.recaptcha-local-error .grecaptcha-badge:focus-within iframe { transform: translateX(0); }

@media (max-width: 1450px) {
    .login-shell { grid-template-columns: minmax(500px, 1fr) minmax(500px, .92fr); }
    .login-intro { padding-left: 7vw; padding-right: 5vw; }
    .login-access { padding-right: 5vw; }
    .login-quote { display: none; }
}

@media (max-width: 1050px) {
    .login-shell { grid-template-columns: 42% 58%; }
    .login-intro { padding: 42px 34px; }
    .login-intro-copy { margin-top: 70px; }
    .login-intro h1 { font-size: 42px; }
    .login-intro-copy > p { font-size: 17px; }
    .login-benefits { display: none; }
    .login-access { justify-content: center; padding: 36px; }
}

@media (max-width: 760px) {
    body.modern-login { background-position: 63% center; }
    .login-shell { display: block; overflow: visible; }
    .login-intro { display: block; min-height: auto; padding: 26px 24px 0; }
    .login-wordmark { width: 210px; }
    .login-intro-copy, .login-copyright { display: none; }
    .login-access { min-height: calc(100vh - 106px); padding: 24px; flex-direction: column; }
    .login-card { padding: 34px 28px 30px; border-radius: 18px; }
    .login-card-header { margin-bottom: 34px; }
    .login-card-header h2 { font-size: 28px; }
    .login-copyright-mobile { display: block; margin: 18px 0 0; color: #6f86a5; text-align: center; font-size: 12px; line-height: 1.4; }
}

@media (max-width: 420px) {
    .login-intro { padding: 22px 18px 0; }
    .login-wordmark { width: 180px; }
    .login-access { min-height: calc(100vh - 86px); padding: 18px; }
    .login-card { padding: 28px 20px 25px; }
    .login-card-header img { width: 44px; height: 44px; }
    .login-field { margin-bottom: 18px; }
    .grecaptcha-badge { left: 8px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
