/* ==========================================================================
   Premium sign-in — full-screen split layout
   Left: animated navy showcase with glass dashboard mockup · Right: refined form
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.auth-body { min-height: 100vh; min-height: 100dvh; background: #fff; color: var(--text-body); font-family: var(--bs-body-font-family); }
body.auth-body h1, body.auth-body h2, body.auth-body p { margin-top: 0; }
body.auth-body input, body.auth-body button { font-family: inherit; }

.auth-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

/* ---------- Showcase ---------- */
.showcase {
    position: relative; isolation: isolate; overflow: hidden;
    flex: 1 1 56%; display: flex; flex-direction: column;
    padding: clamp(1.75rem, 3.6vh, 3rem) clamp(2rem, 4.2vw, 4.25rem);
    background: #070d1f; color: #cbd5e1;
}
.aurora { position: absolute; inset: -25%; z-index: -2; filter: blur(70px); }
.aurora span { position: absolute; border-radius: 50%; }
.aurora .a1 { width: 60%; height: 60%; left: -5%; top: -8%; background: radial-gradient(circle, rgba(37, 99, 235, 0.6), transparent 65%); animation: drift1 18s ease-in-out infinite alternate; }
.aurora .a2 { width: 55%; height: 55%; right: -8%; top: 22%; background: radial-gradient(circle, rgba(99, 102, 241, 0.48), transparent 65%); animation: drift2 22s ease-in-out infinite alternate; }
.aurora .a3 { width: 48%; height: 48%; left: 28%; bottom: -12%; background: radial-gradient(circle, rgba(245, 158, 11, 0.26), transparent 65%); animation: drift3 20s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12%, 10%) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-14%, -6%) scale(1.15); } }
@keyframes drift3 { to { transform: translate(8%, -12%) scale(1.05); } }
.grid-bg {
    position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse at 55% 45%, #000 15%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 55% 45%, #000 15%, transparent 72%);
}

.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.8rem; }
.logo-mark {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 10px 24px -6px rgba(245, 158, 11, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-mark.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 8px 16px -6px rgba(245, 158, 11, 0.55); }
.logo-mark.sm svg { width: 18px; height: 18px; }
.logo-text { line-height: 1.15; }
.logo-text strong { display: block; color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.logo-text strong span { color: #93c5fd; font-weight: 600; }
.logo-text small { font-size: 0.76rem; color: #94a3b8; font-weight: 500; }
.status-pill {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.42rem 0.85rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.74rem; font-weight: 600; color: #e2e8f0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.sc-hero { margin-top: clamp(1.75rem, 6vh, 4rem); max-width: 540px; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #fbbf24; }
.sc-hero h1 { color: #fff; font-size: clamp(2.1rem, 3.3vw, 3.15rem); line-height: 1.07; font-weight: 800; letter-spacing: -0.035em; margin: 0.85rem 0 1rem; }
.sc-hero h1 .grad { background: linear-gradient(90deg, #60a5fa 0%, #a5b4fc 45%, #fbbf24 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-hero p { font-size: 1rem; line-height: 1.65; color: #94a3b8; max-width: 460px; margin: 0; }

/* Glass dashboard mockup */
.mockup { position: relative; margin: clamp(1.75rem, 5vh, 3rem) 1.75rem 0 0.5rem; max-width: 560px; }
.mock-main {
    position: relative; border-radius: 22px; padding: 1.15rem 1.25rem 0.9rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 34px 70px -28px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mock-title { color: #fff; font-weight: 700; font-size: 0.92rem; }
.mock-sub { font-size: 0.72rem; color: #94a3b8; margin-top: 0.1rem; }
.chip { font-size: 0.68rem; font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 999px; background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.28); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; margin: 0.95rem 0 0.35rem; }
.kpi { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 0.6rem 0.75rem; }
.kpi .k-label { font-size: 0.64rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .k-value { color: #fff; font-weight: 800; font-size: 1.05rem; margin-top: 0.15rem; letter-spacing: -0.02em; }
.kpi .k-trend { font-size: 0.66rem; font-weight: 700; color: #4ade80; }
.kpi .k-trend.down { color: #fb7185; }
.mock-chart { position: relative; }
.mock-chart svg { width: 100%; height: 108px; display: block; }
.chart-legend { display: flex; justify-content: flex-end; gap: 1rem; font-size: 0.68rem; color: #94a3b8; margin-top: 0.3rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-legend .lg { width: 14px; height: 3px; border-radius: 3px; display: inline-block; }
.chart-legend .lg.blue { background: #60a5fa; }
.chart-legend .lg.gold { background: #fbbf24; }

.float-card {
    position: absolute; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-radius: 16px;
    background: rgba(11, 19, 41, 0.78); border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.8);
    animation: floaty 6s ease-in-out infinite;
}
.float-card .fc-icon { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.float-card .fc-title { color: #fff; font-size: 0.8rem; font-weight: 700; }
.float-card .fc-sub { font-size: 0.68rem; color: #94a3b8; white-space: nowrap; }
.fc-approve { top: -26px; right: -26px; }
.fc-transit { bottom: -30px; left: -22px; animation-delay: -3s; min-width: 210px; }
.fc-transit .fc-icon { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.fc-bar { height: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.1); margin-top: 0.4rem; overflow: hidden; }
.fc-bar span { display: block; width: 62%; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #f59e0b, #fbbf24); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.sc-foot { margin-top: auto; padding-top: clamp(2.5rem, 6vh, 3.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.trust { display: flex; align-items: center; gap: 0.85rem; font-size: 0.78rem; color: #94a3b8; line-height: 1.35; }
.trust strong { color: #fff; font-size: 0.82rem; }
.avatars { display: flex; }
.avatars span { width: 36px; height: 36px; border-radius: 50%; margin-left: -9px; border: 2px solid #0b1329; display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.avatars span:first-child { margin-left: 0; }
.avatars .av1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1f1300; }
.avatars .av2 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.avatars .av3 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.avatars .av4 { background: rgba(255, 255, 255, 0.12); color: #e2e8f0; }
.mini-features { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.mini-features span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: #cbd5e1; padding: 0.38rem 0.65rem; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.mini-features i { color: #fbbf24; font-size: 0.85rem; }

/* ---------- Sign-in panel ---------- */
.auth-panel {
    position: relative; flex: 1 1 44%; display: flex; align-items: center; justify-content: center;
    padding: clamp(1.75rem, 4vh, 3rem) clamp(1.5rem, 4vw, 3.5rem);
    background:
        radial-gradient(circle at 100% 0%, rgba(219, 234, 254, 0.75) 0, transparent 38%),
        radial-gradient(circle at 0% 100%, rgba(224, 231, 255, 0.55) 0, transparent 35%),
        #fff;
}
.auth-card { width: 100%; max-width: 410px; animation: fadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) both; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.75rem, 5vh, 3rem); }
.mini-logo { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text-title); font-size: 0.95rem; }
.mini-logo b { color: var(--primary); }
.help-link { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--border); background: #fff; color: var(--text-body); font-size: 0.8rem; font-weight: 600; padding: 0.45rem 0.8rem; border-radius: 999px; cursor: pointer; transition: all 0.2s ease; }
.help-link:hover { border-color: var(--primary-200); color: var(--primary-700); background: var(--primary-50); }

.auth-heading .hello { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; color: var(--primary-700); background: var(--primary-50); border: 1px solid var(--primary-100); padding: 0.35rem 0.75rem; border-radius: 999px; }
.auth-heading h2 { font-size: clamp(1.75rem, 2.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.035em; color: var(--text-title); line-height: 1.15; margin: 1rem 0 0.5rem; }
.auth-heading p { color: var(--text-body); margin: 0 0 1.9rem; font-size: 0.95rem; }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: 0.84rem; font-weight: 700; color: var(--text-title); margin-bottom: 0.5rem; }
.input-box {
    display: flex; align-items: center; gap: 0.7rem; height: 54px; padding: 0 0.45rem 0 1rem;
    border: 1.5px solid #e2e8f0; border-radius: 14px; background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input-box > i { font-size: 1.2rem; color: var(--text-muted); transition: color 0.2s ease; }
.input-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 0.96rem; color: var(--text-title); }
.input-box input::placeholder { color: #9aa8bb; }
.input-box:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 20px -12px rgba(37, 99, 235, 0.35); }
.input-box:focus-within > i { color: var(--primary); }
.input-box.invalid { border-color: var(--danger); background: #fffafa; }
.input-box.invalid:focus-within { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.input-box input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #f8fafc inset; -webkit-text-fill-color: var(--text-title); }
.eye-btn { width: 40px; height: 40px; border: 0; background: transparent; color: var(--text-muted); border-radius: 10px; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.eye-btn:hover { color: var(--primary); background: var(--primary-50); }
.caps-hint { margin-top: 0.4rem; font-size: 0.75rem; font-weight: 600; color: #b45309; display: flex; align-items: center; gap: 0.3rem; }
.caps-hint[hidden] { display: none; }

.form-options { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.35rem 0 1.6rem; }
.remember { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.88rem; color: var(--text-body); cursor: pointer; user-select: none; position: relative; }
.remember input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.remember .tick { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #cbd5e1; background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.remember .tick::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity 0.15s ease; }
.remember input:checked + .tick { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 10px -4px var(--primary-glow); }
.remember input:checked + .tick::after { opacity: 1; }
.remember input:focus-visible + .tick { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.forgot-btn { border: 0; background: none; padding: 0; font-size: 0.88rem; font-weight: 700; color: var(--primary-600); cursor: pointer; }
.forgot-btn:hover { color: var(--primary-700); text-decoration: underline; }

.btn-login {
    position: relative; overflow: hidden; width: 100%; height: 54px; border: 0; border-radius: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 0.01em;
    background: var(--primary-gradient);
    box-shadow: 0 14px 30px -10px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-login::after { content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); transition: left 0.7s ease; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(37, 99, 235, 0.6); }
.btn-login:hover::after { left: 125%; }
.btn-login:active { transform: translateY(0); }
.btn-login i { font-size: 1.2rem; transition: transform 0.25s ease; }
.btn-login:hover i { transform: translateX(4px); }
.btn-login.loading { pointer-events: none; opacity: 0.92; }
.btn-login.loading .bl-text, .btn-login.loading i { display: none; }
.btn-login .bl-spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn-login.loading .bl-spin { display: block; }

.secure-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 1.6rem; }
.secure-row span { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.69rem; font-weight: 600; color: var(--text-body); background: var(--surface-2); border: 1px solid var(--border); padding: 0.34rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.secure-row i { color: var(--success); font-size: 0.85rem; }
.auth-credit { margin-top: 1.75rem; padding-top: 1.1rem; border-top: 1px dashed var(--border); font-size: 0.76rem; color: var(--text-muted); text-align: center; }
.auth-credit strong { color: var(--primary-700); }
.auth-credit .dev-link { color: inherit; text-decoration: none; }
.auth-credit .dev-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.auth-alert { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.45; margin-bottom: 1.2rem; background: var(--danger-50); border: 1px solid #fca5a5; color: #b91c1c; animation: fadeUp 0.3s ease both; }
.auth-alert.success { background: var(--success-50); border-color: #86efac; color: #166534; }
.auth-alert.info { background: var(--primary-50); border-color: var(--primary-200); color: var(--primary-700); }
.auth-alert[hidden] { display: none; }
.auth-alert i { font-size: 1.1rem; line-height: 1.25; }

/* Short laptop screens: keep everything above the fold */
@media (min-width: 992px) and (max-height: 820px) {
    .sc-hero p { font-size: 0.93rem; }
    .mock-chart svg { height: 84px; }
    .kpis { margin-top: 0.75rem; }
    .sc-foot { padding-top: 2.25rem; }
}
@media (min-width: 992px) and (max-height: 700px) {
    .mockup { display: none; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .mini-features { display: none; }
    .fc-approve { right: -10px; }
}

/* ---------- Tablet & phone: app-style ---------- */
@media (max-width: 991.98px) {
    .auth-shell { flex-direction: column; }
    .showcase { flex: none; padding: 1.4rem 1.35rem 5.25rem; border-radius: 0 0 30px 30px; }
    .sc-hero { margin-top: 1.5rem; }
    .sc-hero h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin: 0.6rem 0 0.6rem; }
    .sc-hero p { font-size: 0.88rem; }
    .mockup, .sc-foot { display: none; }
    .auth-panel { background: transparent; padding: 0 1rem 2rem; margin-top: -3.75rem; align-items: flex-start; }
    .auth-card { max-width: 520px; background: #fff; border-radius: 24px; padding: 1.6rem 1.4rem 1.4rem; box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8); margin: 0 auto; }
    .auth-card { position: relative; }
    .mini-logo { display: none; }
    .auth-top { position: absolute; top: 1.55rem; right: 1.25rem; margin: 0; }
    .help-link { padding: 0.32rem 0.7rem; font-size: 0.75rem; }
    body.auth-body { background: #f0f4f9; }
}
@media (max-width: 575.98px) {
    .status-pill { display: none; }
    .logo-text strong { font-size: 1.15rem; }
    .logo-mark { width: 42px; height: 42px; }
    .sc-hero p { display: none; }
    .eyebrow { font-size: 0.66rem; }
    .auth-heading h2 { font-size: 1.55rem; }
    .auth-heading p { font-size: 0.88rem; margin-bottom: 1.4rem; }
    .secure-row span:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .aurora span, .float-card, .status-pill .dot { animation: none; }
}
