:root {
    --navy-950: #07111f;
    --navy-900: #0b1729;
    --navy-800: #10233c;
    --ink: #152336;
    --muted: #718096;
    --line: #dce4ec;
    --surface: #f7f9fc;
    --white: #fff;
    --green: #18a77d;
    --green-dark: #0d8966;
    --orange: #ee8b38;
    --danger: #c53f4f;
    --shadow: 0 24px 70px rgba(10, 27, 47, .13);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
.login-shell { height: 100vh; height: 100dvh; display: grid; overflow: hidden; grid-template-columns: minmax(460px, 1.08fr) minmax(430px, .92fr); }

.visual-panel {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    padding: clamp(26px, 3.2vw, 52px);
    color: white;
    background: radial-gradient(circle at 75% 20%, #173b5a 0, transparent 34%), linear-gradient(145deg, #0d2036, var(--navy-950));
}
.visual-panel::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 78%); }
.visual-glow { position: absolute; width: 280px; aspect-ratio: 1; border-radius: 50%; filter: blur(2px); opacity: .12; }
.visual-glow-one { top: -140px; right: -70px; background: #38d9ae; }
.visual-glow-two { bottom: -180px; left: -80px; background: #338fe4; }
.brand, .mobile-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #3ed9ad, #159b75); box-shadow: 0 10px 28px rgba(30, 197, 148, .28); }
.brand-mark svg { width: 25px; fill: none; stroke: white; stroke-width: 1.8; stroke-linejoin: round; }
.brand strong, .mobile-brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small, .mobile-brand small { display: block; margin-top: 3px; color: #9fb2c7; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.visual-copy { position: relative; z-index: 2; margin-top: clamp(28px, 5vh, 58px); }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #9fb8c9; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #3ed9ad; box-shadow: 0 0 0 6px rgba(62,217,173,.12); }
.visual-copy h1 { max-width: 650px; margin: clamp(13px, 2vh, 22px) 0 clamp(10px, 1.6vh, 18px); font-size: clamp(38px, 4.5vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.visual-copy h1 em { color: #45dcb2; font-style: normal; }
.visual-copy p { max-width: 540px; margin: 0; color: #adc0d2; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.75; }
.inventory-scene { position: relative; z-index: 1; display: flex; width: min(100%, 760px); min-height: 0; flex: 1 1 auto; align-items: flex-end; margin: 0 auto -1.5% -2%; }
.inventory-scene svg { display: block; width: 100%; max-height: min(39vh, 410px); overflow: visible; }
.rack { animation: settle 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.dashboard-card { animation: float-card 5s ease-in-out infinite; transform-origin: center; }
.moving-box { animation: box-route 5.5s ease-in-out infinite; }
.scanner { animation: scanner-pulse 3.2s ease-in-out infinite; transform-origin: center bottom; }
.scan-beam { animation: beam 1.6s ease-in-out infinite; transform-origin: center top; }
.live-line { animation: live-line 3s ease-in-out infinite; }
.status-pill { animation: status-pop 5.5s ease-in-out infinite; transform-origin: center; }
.visual-stats { position: relative; z-index: 2; display: flex; flex: 0 0 auto; gap: 28px; padding-top: clamp(10px, 1.8vh, 18px); border-top: 1px solid rgba(255,255,255,.1); color: #7890a6; font-size: 11px; }
.visual-stats strong { color: #c7d5e1; font-weight: 650; }

.form-panel { position: relative; display: flex; height: 100%; min-height: 0; align-items: center; justify-content: center; flex-direction: column; overflow: hidden; padding: clamp(20px, 4vh, 42px) clamp(28px, 6vw, 92px) clamp(16px, 2.5vh, 26px); background: #f8fafc; }
.login-card { width: min(100%, 440px); padding: clamp(32px, 4vw, 50px); border: 1px solid rgba(213,222,232,.8); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.mobile-brand { display: none; margin-bottom: 38px; }
.mobile-brand .brand-mark { width: 40px; height: 40px; }
.mobile-brand small { color: #8797a8; }
.form-kicker { color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.login-card h2 { margin: 11px 0 10px; color: #112137; font-size: clamp(27px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.form-intro { margin: 0 0 31px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.field-group { margin-bottom: 20px; }
.field-group label { display: block; margin-bottom: 9px; color: #314155; font-size: 12px; font-weight: 750; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row span { margin-bottom: 9px; color: #97a3af; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; top: 50%; left: 16px; width: 19px; transform: translateY(-50%); fill: none; stroke: #8493a3; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.input-wrap input { width: 100%; height: 54px; padding: 0 48px 0 48px; color: #1a2b3e; border: 1.5px solid var(--line); border-radius: 13px; outline: none; background: #fbfcfe; font-size: 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap input::placeholder { color: #a4afbb; }
.input-wrap input:hover { border-color: #c4d0db; }
.input-wrap input:focus { border-color: #21a980; background: #fff; box-shadow: 0 0 0 4px rgba(24,167,125,.1); }
.password-toggle { position: absolute; top: 50%; right: 11px; display: grid; width: 36px; height: 36px; padding: 8px; transform: translateY(-50%); place-items: center; border: 0; border-radius: 9px; color: #7b8997; background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--green-dark); background: #eef8f5; outline: none; }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.field-error { display: block; margin: 7px 3px 0; color: var(--danger); font-size: 11px; }
.login-button { display: flex; width: 100%; height: 55px; align-items: center; justify-content: center; gap: 13px; margin-top: 9px; color: white; border: 0; border-radius: 13px; background: linear-gradient(135deg, #17a77c, #0d8966); box-shadow: 0 12px 24px rgba(19,151,112,.22); font-size: 13px; font-weight: 750; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.login-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.login-button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(19,151,112,.28); }
.login-button:hover svg { transform: translateX(3px); }
.login-button:active { transform: translateY(0); }
.secure-note { display: flex; align-items: center; gap: 10px; margin-top: 23px; color: #8693a1; font-size: 10.5px; line-height: 1.45; }
.secure-note svg { width: 19px; flex: 0 0 19px; fill: none; stroke: #1ba57c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert { margin: 0 0 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; line-height: 1.5; }
.alert-danger { color: #9d2d3c; border-color: #f2cbd0; background: #fff1f3; }
.alert-success { color: #116e54; border-color: #bce7da; background: #ebfaf5; }
.alert-warning { color: #8a5c13; border-color: #f1ddae; background: #fff9e9; }
.form-panel footer { position: absolute; right: 20px; bottom: clamp(12px, 2.5vh, 26px); left: 20px; color: #9aa6b2; font-size: 10.5px; text-align: center; }
.form-panel footer span { padding: 0 6px; }

@keyframes settle { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-card { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes box-route { 0%,15%,100% { transform: translate(-28px, 0); } 50%,70% { transform: translate(18px, -7px); } }
@keyframes scanner-pulse { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(1.5deg); } }
@keyframes beam { 0%,100% { opacity: .08; transform: scaleX(.65); } 50% { opacity: .32; transform: scaleX(1); } }
@keyframes live-line { 0%,100% { width: 90px; opacity: .75; } 50% { width: 220px; opacity: 1; } }
@keyframes status-pop { 0%,28%,100% { opacity: 0; transform: translateY(8px) scale(.94); } 42%,88% { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 980px) {
    html, body { min-height: 100%; overflow: auto; }
    .login-shell { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; grid-template-columns: 1fr; }
    .visual-panel { display: none; }
    .form-panel { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; padding: 32px 22px 22px; background: radial-gradient(circle at 100% 0, rgba(29,169,128,.1), transparent 32%), #f4f7fa; }
    .mobile-brand { display: flex; }
    .login-card { margin: auto 0; }
    .form-panel footer { position: static; margin-top: 0; padding-top: 24px; }
}
@media (min-width: 981px) and (max-height: 760px) {
    .visual-panel { padding-top: 24px; padding-bottom: 20px; }
    .brand-mark { width: 39px; height: 39px; border-radius: 11px; }
    .brand-mark svg { width: 22px; }
    .visual-copy { margin-top: 22px; }
    .visual-copy h1 { margin-top: 11px; margin-bottom: 9px; }
    .visual-copy p { max-width: 500px; }
    .inventory-scene svg { max-height: 35vh; }
    .visual-stats { padding-top: 9px; }
    .form-panel { padding-top: 16px; padding-bottom: 12px; }
    .login-card { padding-top: 29px; padding-bottom: 29px; border-radius: 22px; }
    .login-card h2 { margin-top: 8px; margin-bottom: 7px; }
    .form-intro { margin-bottom: 20px; line-height: 1.5; }
    .field-group { margin-bottom: 14px; }
    .field-group label, .label-row span { margin-bottom: 6px; }
    .input-wrap input { height: 48px; }
    .login-button { height: 49px; }
    .secure-note { margin-top: 15px; }
    .form-panel footer { padding-top: 10px; }
}
@media (max-width: 520px) {
    .form-panel { justify-content: flex-start; padding: 18px 14px; }
    .login-card { padding: 29px 23px; border-radius: 21px; box-shadow: 0 18px 50px rgba(10,27,47,.1); }
    .mobile-brand { margin-bottom: 32px; }
    .form-intro { margin-bottom: 27px; }
    .form-panel footer { margin-top: 4px; padding: 20px 5px 4px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
