:root {
    --primary: #6658f5;
    --primary-dark: #4f46d9;
    --secondary: #249df0;
    --ink: #111633;
    --muted: #69708a;
    --border: #e3e6f0;
    --surface: #ffffff;
    --soft: #f6f7fb;
    --success: #33d09a;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.04fr) minmax(520px, .96fr); }

.brand-panel {
    position: relative;
    min-height: 100vh;
    padding: clamp(42px, 5vw, 82px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 12% 8%, rgba(54, 178, 255, .28), transparent 34%),
        linear-gradient(145deg, #111735 0%, #202160 45%, #5836d3 100%);
}

.brand-grid {
    position: absolute;
    inset: 0;
    opacity: .08;
    background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom right, #000, transparent 78%);
}

.brand-glow { position: absolute; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.brand-glow-one { width: 380px; height: 380px; right: -150px; top: 17%; background: rgba(40, 185, 255, .18); }
.brand-glow-two { width: 440px; height: 440px; left: -210px; bottom: -190px; background: rgba(138, 77, 255, .24); }

.brand-content { position: relative; z-index: 1; width: min(100%, 680px); min-height: calc(100vh - clamp(84px, 10vw, 164px)); display: flex; flex-direction: column; }
.brand-logo { width: 225px; height: auto; object-fit: contain; filter: brightness(0) invert(1); }
.brand-copy { margin: auto 0 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 100px; background: rgba(255,255,255,.08); color: #dbe9ff; font-size: .78rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; backdrop-filter: blur(10px); }
.brand-copy h1 { max-width: 650px; margin: 25px 0 20px; font-size: clamp(2.5rem, 4.3vw, 4.45rem); font-weight: 800; line-height: 1.04; letter-spacing: -.055em; }
.brand-copy h1 span { color: #7bd3ff; }
.brand-copy p { max-width: 600px; margin: 0; color: rgba(240,244,255,.76); font-size: clamp(1rem, 1.25vw, 1.18rem); line-height: 1.8; }
.feature-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-card { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.07); backdrop-filter: blur(14px); }
.feature-icon { flex: 0 0 43px; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.12); color: #8edaff; font-size: 1.15rem; }
.feature-card strong, .feature-card small { display: block; }
.feature-card strong { font-size: .88rem; margin-bottom: 3px; }
.feature-card small { color: rgba(255,255,255,.6); font-size: .72rem; }
.trust-note { display: flex; align-items: center; gap: 9px; margin-top: 25px; color: rgba(255,255,255,.63); font-size: .75rem; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(51,208,154,.12); }

.form-panel { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(48px, 7vw, 120px); background: linear-gradient(180deg, #fff 0%, #fbfbfe 100%); }
.login-shell { width: min(100%, 460px); margin: auto; }
.login-heading { margin-bottom: 35px; }
.welcome-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 22px; color: var(--primary); background: #efedff; border-radius: 15px; font-size: 1.25rem; }
.login-heading h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.04em; }
.login-heading p { margin: 0; color: var(--muted); font-size: .94rem; }
.form-label { margin-bottom: 9px; color: #30364f; font-size: .8rem; font-weight: 700; }
.input-shell { position: relative; }
.input-icon { position: absolute; z-index: 2; top: 50%; left: 17px; color: #9aa0b6; transform: translateY(-50%); pointer-events: none; }
.form-control { min-height: 56px; padding: 13px 48px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: #fff; font-size: .9rem; font-weight: 500; box-shadow: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.form-control::placeholder { color: #a9aec0; }
.form-control:focus { border-color: rgba(102,88,245,.65); box-shadow: 0 0 0 4px rgba(102,88,245,.1); }
.form-control.is-invalid { background-image: none; }
.password-toggle { position: absolute; z-index: 3; top: 50%; right: 12px; width: 37px; height: 37px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #8d93aa; background: transparent; transform: translateY(-50%); transition: color .2s, background .2s; }
.password-toggle:hover { color: var(--primary); background: #f1efff; }
.invalid-feedback { padding-left: 4px; font-size: .72rem; }
.forgot-link { margin-bottom: 9px; color: var(--primary); font-size: .75rem; font-weight: 700; text-decoration: none; }
.forgot-link:hover { color: var(--primary-dark); }
.form-check-input { width: 1.12em; height: 1.12em; border-color: #c9cddd; }
.form-check-input:checked { border-color: var(--primary); background-color: var(--primary); }
.form-check-label { color: #666d84; font-size: .76rem; font-weight: 600; }
.secure-label { display: inline-flex; align-items: center; gap: 5px; color: #8c92a6; font-size: .7rem; font-weight: 600; }
.secure-label i { color: #25b884; }
.btn-login { min-height: 57px; position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(120deg, var(--primary), #7358f5 55%, var(--secondary)); font-size: .88rem; font-weight: 800; letter-spacing: .01em; box-shadow: 0 14px 30px rgba(95,78,225,.24); transition: transform .2s, box-shadow .2s, filter .2s; overflow: hidden; }
.btn-login::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent); transform: translateX(-110%); transition: transform .6s; }
.btn-login:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px rgba(95,78,225,.31); filter: saturate(1.08); }
.btn-login:hover::before { transform: translateX(110%); }
.btn-login:disabled { opacity: .78; transform: none; }
.button-arrow { position: absolute; right: 20px; }
.support-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin-top: 30px; padding: 15px 17px; border: 1px solid #e7e9f2; border-radius: 16px; background: var(--soft); }
.support-box > i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--primary); background: #e9e6ff; }
.support-box p { margin: 0; line-height: 1.35; }
.support-box strong, .support-box span { display: block; }
.support-box strong { font-size: .75rem; }
.support-box span { color: var(--muted); font-size: .67rem; }
.support-box a { color: #9399ad; }
.login-footer { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; margin-top: 46px; color: #9ba0b2; font-size: .67rem; font-weight: 600; }
.login-footer a { color: inherit; text-decoration: none; }
.login-footer a:hover { color: var(--primary); }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #c1c5d1; }
.mobile-brand { position: absolute; top: 30px; left: 30px; }
.mobile-brand img { width: 180px; height: auto; }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 35px; color: #6f758b; font-size: .77rem; font-weight: 700; text-decoration: none; transition: color .2s, transform .2s; }
.back-link:hover { color: var(--primary); transform: translateX(-3px); }
.recovery-heading { margin-bottom: 31px; }
.recovery-copy { margin-bottom: 42px; }
.security-steps { display: grid; gap: 12px; }
.security-step { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(255,255,255,.07); backdrop-filter: blur(14px); }
.security-step > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #8edaff; background: rgba(255,255,255,.09); font-size: .82rem; font-weight: 800; }
.security-step strong, .security-step small { display: block; }
.security-step strong { margin-bottom: 3px; font-size: .83rem; }
.security-step small { color: rgba(255,255,255,.59); font-size: .7rem; line-height: 1.45; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 13px 15px; border-radius: 13px; color: #747b91; background: #f7f7fb; font-size: .68rem; font-weight: 600; line-height: 1.6; }
.privacy-note i { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }
.privacy-note p { margin: 0; }

.swal2-popup { border-radius: 22px !important; font-family: "Manrope", sans-serif !important; }
.swal2-confirm { min-width: 130px; border-radius: 11px !important; background: var(--primary) !important; box-shadow: none !important; }

@media (max-width: 1199.98px) {
    .login-page { grid-template-columns: minmax(430px, .92fr) minmax(480px, 1.08fr); }
    .brand-panel { padding: 46px; }
    .feature-row { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
    .login-page { display: block; }
    .form-panel { min-height: 100svh; padding: 120px 28px 30px; }
    .login-shell { width: min(100%, 470px); }
}

@media (max-width: 575.98px) {
    html { font-size: 17px; }
    .form-panel { padding-inline: 20px; }
    .mobile-brand { left: 20px; }
    .mobile-brand img { width: 165px; }
    .login-heading { margin-bottom: 28px; }
    .welcome-icon { display: none; }
    .back-link { margin-bottom: 28px; }
    .login-footer { flex-wrap: wrap; margin-top: 35px; }
    .secure-label { display: none; }
}

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