:root{
    --ink:#07111f;
    --ink-2:#0b1c30;
    --ink-3:#123453;
    --paper:#f4f7fb;
    --surface:#fff;
    --muted:#6a7b90;
    --line:#e4eaf1;
    --line-strong:#d5dde8;
    --red:#d51b2c;
    --red-2:#f04455;
    --blue:#2f6edf;
    --cyan:#62d5e8;
    --green:#2db477;
    --amber:#e5a129;
    --danger:#cf3345;
    --radius:24px;
    --shadow:0 30px 90px rgba(7,17,31,.14);
    --font:Inter,"Segoe UI",Tahoma,Arial,sans-serif;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
    margin:0;
    font-family:var(--font);
    color:var(--ink);
    background:#07111f;
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
button{cursor:pointer}
img{display:block;max-width:100%}
.icon{
    width:1em;height:1em;
    fill:none;stroke:currentColor;stroke-width:1.8;
    stroke-linecap:round;stroke-linejoin:round;
}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}

.auth-page{
    position:relative;
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:30px;
    overflow:hidden;
    background:
        radial-gradient(circle at 76% 22%,#173b63 0,#0c2037 24%,#07111f 58%),
        #07111f;
}
.auth-grid{
    position:absolute;inset:0;pointer-events:none;opacity:.17;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
    background-size:52px 52px;
    mask-image:linear-gradient(to bottom,#000 0,transparent 90%);
}
.auth-glow{
    position:absolute;border-radius:50%;filter:blur(100px);
    opacity:.24;pointer-events:none;
}
.auth-glow-red{
    width:440px;height:440px;background:#d51b2c;
    right:-160px;bottom:-210px;
}
.auth-glow-blue{
    width:470px;height:470px;background:#2f6edf;
    left:-180px;top:-200px;
}

.top-back{
    position:fixed;z-index:4;top:18px;left:22px;
    display:flex;align-items:center;gap:7px;
    color:#b8c7d9;font-size:.68rem;font-weight:750;
    padding:8px 11px;border:1px solid rgba(255,255,255,.08);
    border-radius:11px;background:rgba(255,255,255,.045);
    backdrop-filter:blur(10px);
    transition:.18s ease;
}
.top-back:hover{color:#fff;background:rgba(255,255,255,.08)}

.auth-shell{
    position:relative;z-index:2;
    width:min(1080px,100%);
    min-height:650px;
    display:grid;
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);
    border:1px solid rgba(255,255,255,.09);
    border-radius:30px;
    background:#fff;
    box-shadow:0 45px 140px rgba(0,0,0,.34);
    overflow:hidden;
}

.brand-panel{
    position:relative;
    display:flex;flex-direction:column;justify-content:space-between;
    padding:34px 38px;
    overflow:hidden;
    color:#fff;
    background:
        radial-gradient(circle at 72% 70%,rgba(213,27,44,.18),transparent 29%),
        linear-gradient(145deg,#08182a,#0c2948);
}
.brand-panel::before{
    content:"";position:absolute;inset:0;pointer-events:none;opacity:.16;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
    background-size:42px 42px;
    mask-image:linear-gradient(135deg,#000,transparent 72%);
}
.brand-panel::after{
    content:"";position:absolute;width:350px;height:350px;
    border:1px solid rgba(104,211,231,.12);
    border-radius:50%;left:-145px;bottom:-190px;
    box-shadow:
        0 0 0 50px rgba(104,211,231,.025),
        0 0 0 100px rgba(104,211,231,.018);
}
.brand-top,.brand-message,.brand-footer{position:relative;z-index:2}
.brand-top{display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:11px}
.brand-logo{
    width:48px;height:48px;border-radius:15px;overflow:hidden;
    background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.15);
    flex:0 0 auto;
}
.brand-logo img{width:100%;height:100%;object-fit:cover}
.brand-copy{display:flex;flex-direction:column;line-height:1.07}
.brand-copy strong{font-size:.92rem;font-weight:900}
.brand-copy small{font-size:.58rem;color:#9eb0c4;margin-top:5px}
.platform-pill{
    display:flex;align-items:center;gap:7px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:999px;padding:6px 9px;
    color:#aebed0;font-size:.54rem;font-weight:850;letter-spacing:.08em;
    background:rgba(255,255,255,.045);
}
.platform-pill i,.secure-indicator i{
    width:6px;height:6px;border-radius:50%;
    display:inline-block;background:#5fe09a;
    box-shadow:0 0 0 4px rgba(95,224,154,.1);
}

.brand-message{max-width:530px;margin:auto 0}
.eyebrow{
    display:flex;align-items:center;gap:7px;width:max-content;
    color:#9adcf1;font-size:.63rem;font-weight:850;
}
.eyebrow .icon{color:#ff7785}
.brand-message h1{
    margin:17px 0 18px;
    max-width:540px;
    font-size:clamp(2.7rem,4.4vw,4.7rem);
    line-height:.98;letter-spacing:-.055em;font-weight:900;
}
.brand-message h1 span{
    display:block;
    background:linear-gradient(90deg,#ff6878,#f4adb5);
    -webkit-background-clip:text;background-clip:text;color:transparent;
}
.brand-message>p{
    margin:0;max-width:490px;color:#adbdcf;
    font-size:.82rem;line-height:1.95;
}
.brand-points{
    display:flex;flex-wrap:wrap;gap:13px 18px;margin-top:26px;
}
.brand-points span{
    display:flex;align-items:center;gap:6px;
    color:#a8b9cc;font-size:.62rem;font-weight:700;
}
.brand-points .icon{color:#70dfa0}

.brand-footer{
    display:flex;align-items:center;justify-content:space-between;
    color:#71879d;font-size:.54rem;
}
.secure-indicator{display:flex;align-items:center;gap:7px;color:#93a6ba}

.login-panel{
    display:flex;flex-direction:column;justify-content:center;
    padding:46px 45px 34px;
    background:linear-gradient(180deg,#fff,#fbfcfe);
}
.mobile-brand{display:none}
.login-head{margin-bottom:28px}
.login-kicker{
    color:var(--red);font-size:.61rem;font-weight:900;letter-spacing:.04em;
}
.login-head h2{
    margin:5px 0 5px;font-size:2rem;line-height:1.15;
    letter-spacing:-.04em;font-weight:900;
}
.login-head p{margin:0;color:var(--muted);font-size:.73rem}

.alerts-stack{display:grid;gap:8px;margin-bottom:14px}
.status-alert{
    position:relative;display:grid;grid-template-columns:35px 1fr 26px;
    align-items:start;gap:9px;padding:11px 11px;
    border:1px solid;border-radius:14px;font-size:.68rem;
}
.status-alert .status-icon{
    width:32px;height:32px;border-radius:10px;display:grid;place-items:center;
}
.status-alert strong,.status-alert p{display:block;margin:0}
.status-alert strong{font-size:.66rem}
.status-alert p{margin-top:2px;font-size:.6rem;line-height:1.55}
.status-alert.danger{background:#fff4f5;border-color:#f7d8dc;color:#9d2433}
.status-alert.danger .status-icon{background:#ffe5e8}
.status-alert.warning{background:#fff9ee;border-color:#f3e1bb;color:#8a6518}
.status-alert.warning .status-icon{background:#ffefc9}
.status-alert.success{background:#f0fbf5;border-color:#d4eedf;color:#21754e}
.status-alert.success .status-icon{background:#dcf5e7}
.alert-close{
    width:25px;height:25px;border:0;border-radius:8px;background:transparent;
    color:currentColor;display:grid;place-items:center;opacity:.6;
}
.alert-close:hover{opacity:1;background:rgba(0,0,0,.04)}

.login-form{display:grid;gap:16px}
.validation-summary:empty{display:none}
.validation-summary{
    color:#aa2939;background:#fff4f5;border:1px solid #f7d8dc;
    border-radius:12px;padding:8px 10px;font-size:.62rem;
}
.validation-summary ul{margin:0;padding-right:18px}

.field{display:grid;gap:7px}
.field label{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    color:#26384d;font-size:.66rem;font-weight:850;
}
.field label small{
    color:#9aa8b8;font-size:.51rem;font-weight:700;
}
.control{position:relative}
.form-control{
    width:100%;height:49px;
    border:1px solid var(--line-strong);
    border-radius:13px;
    background:#f8fafc;
    color:var(--ink);
    outline:0;
    padding:0 43px 0 42px;
    font-size:.76rem;font-weight:650;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.form-control::placeholder{color:#a5b1c0;font-weight:500}
.form-control:focus{
    background:#fff;border-color:#6c9bed;
    box-shadow:0 0 0 4px rgba(47,110,223,.08);
}
.form-control.input-validation-error{
    border-color:#e27a87;
    box-shadow:0 0 0 4px rgba(207,51,69,.06);
}
.control-icon{
    position:absolute;z-index:2;right:14px;top:50%;transform:translateY(-50%);
    color:#8191a4;font-size:.95rem;pointer-events:none;
}
.control:focus-within .control-icon{color:var(--blue)}
.password-toggle{
    position:absolute;z-index:3;left:8px;top:50%;transform:translateY(-50%);
    width:34px;height:34px;border:0;border-radius:9px;
    display:grid;place-items:center;background:transparent;color:#8191a4;
}
.password-toggle:hover{color:var(--ink);background:#eef2f7}
.password-toggle .eye-closed{display:none}
.password-toggle.showing .eye-open{display:none}
.password-toggle.showing .eye-closed{display:block}

.field-error{
    min-height:0;color:#c63c4d;font-size:.57rem;line-height:1.45;
}
.field-error:empty{display:none}

.form-options{
    display:flex;align-items:center;justify-content:space-between;
    gap:10px;margin:0 0 1px;
}
.remember-option{
    display:flex;align-items:center;gap:8px;
    color:#53657a;font-size:.62rem;font-weight:700;cursor:pointer;
}
.remember-option input{
    position:absolute;opacity:0;pointer-events:none;
}
.check-ui{
    width:18px;height:18px;border:1px solid #cad4e0;border-radius:6px;
    display:grid;place-items:center;background:#fff;color:#fff;
    transition:.15s ease;
}
.check-ui .icon{width:.7rem;opacity:0}
.remember-option input:checked + .check-ui{
    border-color:var(--blue);background:var(--blue);
}
.remember-option input:checked + .check-ui .icon{opacity:1}
.remember-option input:focus-visible + .check-ui{
    box-shadow:0 0 0 4px rgba(47,110,223,.1)
}
.security-note{
    display:flex;align-items:center;gap:5px;
    color:#4a8067;font-size:.56rem;font-weight:800;
}
.security-note .icon{color:var(--green)}

.login-button{
    position:relative;width:100%;height:51px;border:0;border-radius:14px;
    display:grid;place-items:center;
    color:#fff;background:linear-gradient(135deg,#d51b2c,#ec3f50);
    box-shadow:0 15px 34px rgba(213,27,44,.22);
    overflow:hidden;
    transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}
.login-button::before{
    content:"";position:absolute;inset:0;
    background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.12) 45%,transparent 70%);
    transform:translateX(110%);
    transition:transform .5s ease;
}
.login-button:hover:not(:disabled){
    transform:translateY(-2px);box-shadow:0 20px 42px rgba(213,27,44,.28)
}
.login-button:hover::before{transform:translateX(-110%)}
.login-button:disabled{cursor:wait;opacity:.88}
.login-button-content,.button-loading{
    position:relative;z-index:2;display:flex;align-items:center;gap:8px;
    font-size:.75rem;font-weight:900;
}
.arrow-icon{transform:rotate(180deg)}
.button-loading{display:none}
.login-button.is-loading .login-button-content{display:none}
.login-button.is-loading .button-loading{display:flex}
.mini-spinner{
    width:16px;height:16px;border:2px solid rgba(255,255,255,.35);
    border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;
}

.login-help{
    display:flex;align-items:flex-start;gap:7px;
    padding:9px 10px;border-radius:11px;background:#f6f8fb;
    color:#7a899b;font-size:.56rem;line-height:1.6;
}
.login-help .icon{flex:0 0 auto;color:#6481a2;margin-top:2px}
.home-link{
    width:max-content;margin:0 auto;
    display:flex;align-items:center;gap:6px;
    color:#6d7d90;font-size:.59rem;font-weight:750;
}
.home-link:hover{color:var(--red)}
.login-footer{
    margin-top:auto;padding-top:24px;
    display:flex;align-items:center;justify-content:center;gap:8px;
    color:#a2afbd;font-size:.52rem;
}
.login-footer i{width:3px;height:3px;border-radius:50%;background:#d3dbe4}

/* Processing overlay */
.login-processing{
    position:fixed;z-index:5000;inset:0;
    display:grid;place-items:center;padding:20px;
    visibility:hidden;opacity:0;pointer-events:none;
    transition:opacity .18s ease,visibility .18s ease;
}
.login-processing.open{
    visibility:visible;opacity:1;pointer-events:all;
}
.processing-backdrop{
    position:absolute;inset:0;
    background:rgba(4,11,20,.78);
    backdrop-filter:blur(12px);
}
.processing-card{
    position:relative;z-index:2;
    width:min(410px,100%);
    padding:22px 24px 23px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:24px;
    background:linear-gradient(155deg,#0b1a2c,#102b49);
    color:#fff;
    box-shadow:0 40px 120px rgba(0,0,0,.38);
    transform:translateY(10px) scale(.985);
    transition:transform .2s ease;
}
.login-processing.open .processing-card{transform:none}
.processing-brand{
    display:flex;align-items:center;justify-content:space-between;gap:15px;
}
.processing-logo{width:38px;height:38px;border-radius:12px}
.processing-security{
    display:flex;align-items:center;gap:5px;
    color:#91a7bd;font-size:.52rem;font-weight:800;
}
.processing-security .icon{color:#71d99b}
.processing-animation{
    position:relative;width:106px;height:106px;margin:25px auto 18px;
    display:grid;place-items:center;
}
.processing-core{
    position:relative;z-index:3;width:48px;height:48px;border-radius:16px;
    display:grid;place-items:center;
    background:linear-gradient(145deg,#d51b2c,#ef4657);
    color:#fff;box-shadow:0 12px 30px rgba(213,27,44,.28);
}
.processing-core .icon{font-size:1.15rem}
.orbit{
    position:absolute;border-radius:50%;
    border:1px solid rgba(116,204,235,.22);
}
.orbit-one{inset:8px;animation:orbitPulse 1.8s ease-in-out infinite}
.orbit-two{inset:-5px;border-color:rgba(239,70,87,.15);animation:orbitPulse 1.8s .35s ease-in-out infinite}
.processing-copy{text-align:center}
.processing-kicker{
    color:#79cfe9;font-size:.52rem;font-weight:900;letter-spacing:.11em;
}
.processing-copy h3{
    margin:5px 0 6px;font-size:1.14rem;letter-spacing:-.02em;
}
.processing-copy p{
    min-height:42px;margin:0 auto;max-width:330px;
    color:#a8b9cb;font-size:.65rem;line-height:1.75;
}
.processing-line{
    position:relative;height:3px;margin:19px 0 15px;
    overflow:hidden;border-radius:99px;background:rgba(255,255,255,.07);
}
.processing-line span{
    position:absolute;top:0;bottom:0;width:42%;
    border-radius:99px;
    background:linear-gradient(90deg,transparent,#68d0ea,#ef5666,transparent);
    animation:loadingLine 1.35s ease-in-out infinite;
}
.processing-foot{
    display:flex;align-items:center;justify-content:center;gap:8px;
    color:#71879d;text-align:center;
}
.processing-foot small{font-size:.52rem}
.processing-dots{display:flex;gap:3px}
.processing-dots i{
    width:4px;height:4px;border-radius:50%;background:#7591ad;
    animation:dotPulse 1.1s infinite;
}
.processing-dots i:nth-child(2){animation-delay:.15s}
.processing-dots i:nth-child(3){animation-delay:.3s}

@keyframes spin{to{transform:rotate(360deg)}}
@keyframes orbitPulse{
    0%,100%{transform:scale(.92);opacity:.35}
    50%{transform:scale(1.05);opacity:1}
}
@keyframes loadingLine{
    0%{right:-45%}
    100%{right:105%}
}
@keyframes dotPulse{
    0%,100%{opacity:.35;transform:translateY(0)}
    50%{opacity:1;transform:translateY(-2px)}
}

@media(max-width:850px){
    .auth-page{padding:18px}
    .top-back{display:none}
    .auth-shell{
        width:min(480px,100%);
        min-height:auto;
        grid-template-columns:1fr;
        border-radius:25px;
    }
    .brand-panel{display:none}
    .login-panel{min-height:650px;padding:30px 28px 24px}
    .mobile-brand{
        display:flex;align-items:center;gap:10px;margin-bottom:30px;
    }
    .mobile-brand .compact{width:42px;height:42px;border-radius:13px}
    .mobile-brand strong,.mobile-brand small{display:block}
    .mobile-brand strong{font-size:.76rem}
    .mobile-brand small{color:#97a5b5;font-size:.54rem;margin-top:2px}
}
@media(max-width:520px){
    .auth-page{padding:0;background:#fff}
    .auth-grid,.auth-glow{display:none}
    .auth-shell{
        width:100%;min-height:100vh;border:0;border-radius:0;box-shadow:none;
    }
    .login-panel{
        min-height:100vh;padding:24px 20px 20px;justify-content:center;
    }
    .login-head h2{font-size:1.75rem}
    .form-options{align-items:flex-start;flex-direction:column}
    .login-footer{margin-top:24px}
    .processing-card{padding:20px;border-radius:20px}
}
@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
    }
}
