:root {
    --login-ink: #101922;
    --login-muted: #697783;
    --login-line: #dce3e8;
    --login-surface: #fff;
    --login-canvas: #eef2f4;
    --login-accent: #e31e36;
    --login-accent-dark: #bd1428;
    --login-focus: rgba(227, 30, 54, .16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.premium-login { min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--login-ink); background: var(--login-canvas); font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: flex; }
.auth-visual { position: relative; width: 48%; min-height: 100vh; overflow: hidden; display: flex; align-items: flex-end; padding: clamp(36px, 5vw, 76px); color: #fff; background: linear-gradient(145deg, rgba(11,19,26,.95), rgba(20,35,46,.86)), repeating-linear-gradient(115deg, transparent 0 42px, rgba(255,255,255,.035) 42px 43px), #101922; }
.auth-visual::before { content: ""; position: absolute; width: 520px; height: 520px; inset: -220px auto auto -180px; border: 90px solid rgba(255,255,255,.035); border-radius: 50%; }
.road-lines { position: absolute; top: 0; right: 7%; width: 38%; height: 100%; opacity: .55; transform: skewX(-13deg); border-right: 1px solid rgba(255,255,255,.08); border-left: 1px solid rgba(255,255,255,.16); background: linear-gradient(90deg, transparent 48%, rgba(227,30,54,.75) 49%, rgba(227,30,54,.75) 51%, transparent 52%); }
.visual-content { position: relative; z-index: 1; max-width: 580px; }
.eyebrow { margin: 0 0 18px; color: #ff6b7c; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.visual-title { margin: 0; font-size: clamp(38px, 4.2vw, 66px); font-weight: 750; letter-spacing: -.045em; line-height: 1.02; }
.visual-copy { max-width: 510px; margin: 24px 0 34px; color: #bac5cc; font-size: 17px; line-height: 1.7; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 24px; color: #e4eaed; font-size: 13px; }
.trust-item { display: flex; align-items: center; gap: 9px; }
.trust-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--login-accent); box-shadow: 0 0 0 4px rgba(227,30,54,.14); }
.auth-panel { width: 52%; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px clamp(24px, 6vw, 96px); background: radial-gradient(circle at 85% 10%, rgba(227,30,54,.08), transparent 27%), linear-gradient(145deg, #e8edf0 0%, #f6f8f9 52%, #e9eef1 100%); }
.auth-card { width: 100%; max-width: 480px; }
.brand-stage { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 10px; border-radius: 18px 18px 0 0; background: linear-gradient(135deg, #192630, #0e171e); box-shadow: 0 18px 42px rgba(14,23,30,.2); }
.brand-stage::before { content: ""; position: absolute; width: 180px; height: 180px; top: -105px; right: -55px; border: 34px solid rgba(255,255,255,.035); border-radius: 50%; }
.brand-stage::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--login-accent), transparent); }
.brand { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 62px; text-decoration: none; }
.brand img { display: block; max-width: 270px; max-height: 86px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 5px 14px rgba(0,0,0,.18)); }
.fallback-brand { color: #fff; font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.fallback-brand b { color: var(--login-accent); }
.login-card { position: relative; z-index: 2; padding: 38px 46px; border: 1px solid rgba(214,222,227,.85); border-radius: 0 0 18px 18px; background: rgba(255,255,255,.97); box-shadow: 0 24px 65px rgba(25,38,48,.15), 0 3px 10px rgba(25,38,48,.05); }
.auth-kicker { margin: 0 0 8px; color: var(--login-accent); font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.auth-title { margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -.035em; line-height: 1.15; }
.auth-subtitle { margin: 12px 0 32px; color: var(--login-muted); font-size: 15px; line-height: 1.6; }
.premium-login .alert { border: 0; border-radius: 10px; padding: 13px 42px 13px 14px; }
.premium-login .alert-danger { color: #8e1424; background: #fff0f2; }
.premium-login .alert-success { color: #16623e; background: #edf9f2; }
.field { margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 8px; color: #34414b; font-size: 13px; font-weight: 650; }
.input-wrap { position: relative; }
.input-wrap > .glyphicon { position: absolute; top: 50%; left: 16px; z-index: 2; color: #87939d; transform: translateY(-50%); pointer-events: none; }
.premium-login .form-control { height: 52px; padding: 12px 48px; color: var(--login-ink); border: 1px solid var(--login-line); border-radius: 9px; background: #fbfcfd; box-shadow: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.premium-login .form-control:focus { border-color: var(--login-accent); background: #fff; box-shadow: 0 0 0 4px var(--login-focus); }
.password-toggle { position: absolute; top: 50%; right: 10px; z-index: 3; width: 36px; height: 36px; padding: 0; color: #66747f; border: 0; background: transparent; transform: translateY(-50%); }
.password-toggle:hover, .password-toggle:focus { color: var(--login-accent); outline: 0; }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 26px; }
.remember { display: flex; align-items: center; margin: 0; color: #52606b; font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.remember input { width: 16px; height: 16px; margin: 0 8px 0 0; accent-color: var(--login-accent); }
.forgot-link { padding: 4px 0; color: var(--login-accent); border: 0; background: none; font-size: 13px; font-weight: 650; text-align: right; text-decoration: none; }
.forgot-link:hover, .forgot-link:focus { color: var(--login-accent-dark); text-decoration: underline; outline: 0; }
.sign-in-btn { width: 100%; min-height: 54px; padding: 12px 18px; color: #fff; border: 0; border-radius: 9px; background: var(--login-accent); font-size: 15px; font-weight: 700; box-shadow: 0 12px 24px rgba(227,30,54,.20); transition: transform .18s, background .18s, box-shadow .18s; }
.sign-in-btn:hover, .sign-in-btn:focus { color: #fff; background: var(--login-accent-dark); transform: translateY(-1px); box-shadow: 0 15px 28px rgba(227,30,54,.25); outline: 0; }
.support-note { margin: 28px 0 0; color: #87939d; font-size: 12px; text-align: center; }
.premium-login .modal-backdrop.in { opacity: .68; }
.premium-login .modal-dialog { max-width: 460px; margin: 10vh auto 30px; }
.premium-login .modal-content { overflow: hidden; border: 0; border-radius: 14px; box-shadow: 0 28px 80px rgba(7,15,21,.3); }
.premium-login .modal-header { position: relative; padding: 28px 30px 10px; border: 0; }
.premium-login .modal-title { font-size: 23px; font-weight: 750; letter-spacing: -.025em; }
.premium-login .modal-header .close { position: absolute; top: 20px; right: 22px; width: 34px; height: 34px; margin: 0; color: #52606b; border-radius: 50%; background: #eef2f4; opacity: 1; }
.premium-login .modal-body { padding: 8px 30px 24px; }
.premium-login .modal-body p { margin: 0 0 20px; color: var(--login-muted); line-height: 1.6; }
.premium-login .modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 30px 28px; border: 0; }
.premium-login .modal-footer::before, .premium-login .modal-footer::after { display: none; }
.premium-login .modal-footer .btn { min-width: 104px; margin: 0; padding: 10px 18px; border-radius: 8px; font-weight: 650; }
.premium-login .modal-footer .btn-default { border-color: var(--login-line); background: #fff; }
.premium-login .modal-footer .btn-primary { border-color: var(--login-accent); background: var(--login-accent); }
[dir="rtl"] .input-wrap > .glyphicon { right: 16px; left: auto; }
[dir="rtl"] .password-toggle { right: auto; left: 10px; }
[dir="rtl"] .remember input { margin: 0 0 0 8px; }
[dir="rtl"] .forgot-link { text-align: left; }

@media (max-width: 900px) {
    body.premium-login { background: #e9eef1; }
    .auth-visual { display: none; }
    .auth-panel { width: 100%; min-height: 100vh; min-height: 100dvh; align-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
    .auth-card { max-width: 430px; }
    .brand-stage { min-height: 104px; margin-bottom: 14px; padding: 18px 24px; border-radius: 16px; box-shadow: 0 12px 30px rgba(14,23,30,.18); }
    .brand img { max-width: min(250px, 78vw); max-height: 74px; }
    .login-card { padding: 34px 34px 30px; border-radius: 16px; box-shadow: 0 18px 45px rgba(25,38,48,.12), 0 2px 7px rgba(25,38,48,.05); }
}

@media (max-width: 480px) {
    .auth-panel { align-items: flex-start; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
    .auth-card { max-width: none; }
    .brand-stage { min-height: 82px; margin-bottom: 10px; padding: 10px 20px; border-radius: 14px; }
    .brand { min-height: 58px; }
    .brand img { max-width: min(220px, 72vw); max-height: 62px; }
    .login-card { padding: 25px 22px 22px; border-radius: 14px; }
    .auth-kicker { margin-bottom: 6px; font-size: 10px; letter-spacing: .13em; }
    .auth-title { font-size: clamp(24px, 7.5vw, 29px); }
    .auth-subtitle { margin: 8px 0 22px; font-size: 14px; line-height: 1.5; }
    .field { margin-bottom: 16px; }
    .field-label { margin-bottom: 6px; }
    .premium-login .form-control { height: 50px; font-size: 16px; }
    .form-options { gap: 12px; margin: 2px 0 20px; }
    .remember, .forgot-link { font-size: 12.5px; }
    .sign-in-btn { min-height: 50px; }
    .support-note { margin-top: 20px; font-size: 11px; line-height: 1.45; }
    .premium-login .modal-dialog { position: absolute; right: 10px; bottom: 10px; left: 10px; width: auto; max-width: none; margin: 0; }
    .premium-login .modal-content { border-radius: 16px; }
    .premium-login .modal-header { padding: 24px 22px 8px; }
    .premium-login .modal-header .close { top: 16px; right: 16px; }
    .premium-login .modal-body { padding: 8px 22px 18px; }
    .premium-login .modal-footer { padding: 12px 22px max(22px, env(safe-area-inset-bottom)); }
    .premium-login .modal-footer .btn { flex: 1; min-width: 0; min-height: 44px; }
}

@media (max-width: 360px), (max-height: 670px) and (max-width: 480px) {
    .auth-panel { padding-top: 8px; padding-bottom: 8px; }
    .brand-stage { min-height: 68px; margin-bottom: 8px; padding: 6px 18px; }
    .brand { min-height: 54px; }
    .brand img { max-height: 54px; }
    .login-card { padding: 20px 18px 18px; }
    .auth-subtitle { margin-bottom: 16px; }
    .field { margin-bottom: 13px; }
    .form-options { flex-wrap: wrap; margin-bottom: 16px; }
    .forgot-link { width: 100%; text-align: left; }
    [dir="rtl"] .forgot-link { text-align: right; }
    .support-note { margin-top: 14px; }
}

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