:root {
    color-scheme: dark;
    --text: #f6f7f9;
    --muted: #9ba2ae;
    --accent: #ef233c;
    --accent-light: #ff4d61;
    --border: rgba(255, 255, 255, .09);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(239, 35, 60, .13), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(239, 35, 60, .08), transparent 30%),
        linear-gradient(135deg, #050607, #0a0c0f 60%, #060708);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }
.login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 40px 32px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.login-page::before {
    content: "";
    position: absolute;
    inset: -55px 0;
    z-index: -2;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 55px 55px;
    mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
    animation: grid-move 12s linear infinite;
}
.glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .16;
    background: var(--accent);
    z-index: -1;
    pointer-events: none;
    animation: float-glow 8s ease-in-out infinite alternate;
}
.glow-one { left: -100px; top: -80px; }
.glow-two { right: -120px; bottom: -100px; animation-delay: -3s; }
.login-wrapper {
    width: 100%;
    max-width: 1100px;
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    border: 1px solid var(--border);
    background: rgba(9, 11, 14, .75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 100px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
    animation: reveal .8s cubic-bezier(.16, 1, .3, 1) both;
}
.visual-panel {
    position: relative;
    isolation: isolate;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    overflow: hidden;
    background: radial-gradient(ellipse at 75% 45%, rgba(239,35,60,.1), transparent 65%), linear-gradient(180deg, #0d0e12, #07080a);
}
.visual-panel::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 50%;
    right: -240px;
    top: 95px;
    box-shadow: 0 0 0 60px rgba(255,255,255,.015), 0 0 0 120px rgba(255,255,255,.008);
    z-index: -1;
}
.brand-logos { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
/* Keep the inventory mark from the original login artwork at its original aspect ratio. */
.inventory-logo { display: block; position: relative; width: 140px; height: 36px; overflow: hidden; }
.inventory-logo img { position: absolute; width: 960px; height: 540px; max-width: none; left: -18px; top: -16px; }
.jjas-logo { display: block; width: 110px; height: auto; }
.brand-name { margin: 17px 0 0; font-size: 15px; font-weight: 600; color: #d8dbe1; line-height: 1.5; }
.mini-tag { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: #e3e5e8; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.mini-tag span { width: 26px; height: 2px; flex-shrink: 0; background: var(--accent); }
.hero h1 { margin: 0 0 22px; font-size: clamp(44px, 4.5vw, 62px); line-height: 1.03; letter-spacing: -2.8px; }
.hero h1 span { display: block; color: var(--accent-light); }
.hero-description { margin: 0; max-width: 400px; font-size: 14px; line-height: 1.85; color: var(--muted); }
.features { display: flex; justify-content: space-between; gap: 15px; }
.features strong { display: block; font-size: 17px; margin-bottom: 7px; }
.features span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
.car-outline { position: absolute; z-index: -1; width: 370px; height: 155px; right: -90px; bottom: 105px; opacity: .055; transform: rotate(-5deg); }
.form-panel { padding: 58px 58px 28px; display: flex; align-items: center; justify-content: center; background: rgba(10,12,15,.8); border-left: 1px solid var(--border); }
.form-container { width: 100%; max-width: 390px; min-width: 0; }
.form-header { margin-bottom: 32px; }
.form-header .eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 1.8px; color: #b4bac4; margin: 0 0 16px; }
.form-header h2 { font-size: 33px; line-height: 1.2; letter-spacing: -1px; margin: 0 0 10px; }
.form-header p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 12px; font-weight: 600; color: #b8bec7; margin-bottom: 9px; }
.input-box { position: relative; }
.input-icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #89919e; pointer-events: none; }
.input-box input { width: 100%; min-width: 0; height: 57px; padding: 0 50px 0 48px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.045); color: white; outline: none; font-size: 14px; transition: border-color .2s, background .2s, box-shadow .2s; }
.input-box input::placeholder { color: #89919e; }
.input-box input:focus { border-color: rgba(239,35,60,.8); background: rgba(239,35,60,.035); box-shadow: 0 0 0 4px rgba(239,35,60,.1); }
.input-box:focus-within .input-icon { color: var(--accent-light); }
.input-box input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #191b20 inset; caret-color: #fff; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 0; border-radius: 8px; color: #9ba2ae; cursor: pointer; }
.password-toggle:hover { color: white; }
.eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.login-btn { width: 100%; height: 57px; margin-top: 6px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff3048, #c90024); color: white; font-size: 14px; font-weight: 700; letter-spacing: .3px; cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 13px 28px rgba(239,35,60,.22); transition: transform .2s, box-shadow .2s; }
.button-label { display: flex; justify-content: center; align-items: center; gap: 14px; }
.button-label svg { width: 18px; height: 18px; }
.login-btn::before { content: ""; position: absolute; top: 0; left: -130%; width: 70%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); transform: skewX(-20deg); transition: left .65s; }
.login-btn:hover:not(:disabled)::before { left: 150%; }
.login-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(239,35,60,.3); }
.login-btn:active:not(:disabled) { transform: scale(.985); }
.login-btn:disabled { cursor: wait; }
.login-btn.loading .button-label { opacity: 0; }
.spinner { display: none; position: absolute; top: calc(50% - 11px); left: calc(50% - 11px); width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.login-btn.loading .spinner { display: block; }
.divider { display: flex; align-items: center; gap: 14px; margin: 27px 0 17px; color: var(--muted); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.security { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; }
.security svg { color: #70b681; width: 15px; height: 15px; }
.login-error { padding: 13px 15px; margin-bottom: 22px; border: 1px solid rgba(255,77,97,.35); border-radius: 12px; background: rgba(239,35,60,.09); color: #ffb4be; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.qr-panel { margin-top: 27px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); }
.qr-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; list-style: none; color: #c1c6ce; font-size: 12px; cursor: pointer; border-radius: 12px; }
.qr-panel summary::-webkit-details-marker { display: none; }
.qr-panel summary svg { width: 16px; height: 16px; transition: transform .2s; }
.qr-panel[open] summary svg { transform: rotate(180deg); }
.qr-content { padding: 4px 16px 20px; text-align: center; }
.qr-image { display: inline-block; padding: 10px; max-width: 100%; background: white; border-radius: 12px; }
.qr-image img { display: block; width: 180px; max-width: 100%; height: auto; }
.qr-content p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.shop-qr-panel summary { color: #fff; font-weight: 600; }
.shop-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin-top: 14px; padding: 10px 18px; border: 1px solid var(--accent-light); border-radius: 10px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.shop-link:hover { background: rgba(239,35,60,.15); }
.shop-link:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.login-footer { margin-top: 28px; color: var(--muted); text-align: center; font-size: 9px; line-height: 1.7; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes grid-move { to { transform: translateY(55px); } }
@keyframes float-glow { to { transform: translate3d(35px,25px,0) scale(1.16); } }
@keyframes reveal { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
    .visual-panel { padding: 40px 32px; }
    .form-panel { padding: 48px 36px 28px; }
}
@media (max-width: 800px) {
    .login-page { padding: 24px 20px; }
    .login-wrapper { max-width: 520px; grid-template-columns: 1fr; }
    .visual-panel { padding: 30px 35px; gap: 32px; }
    .brand-logos { gap: 20px; }
    .jjas-logo { width: 88px; }
    .brand-name { font-size: 13px; margin-top: 12px; }
    .hero h1 { font-size: 42px; letter-spacing: -1.8px; margin-bottom: 0; }
    .mini-tag { margin-bottom: 16px; font-size: 10px; }
    .hero-description, .features { display: none; }
    .car-outline { bottom: 0; right: -100px; }
    .form-panel { padding: 36px 35px 26px; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
    .login-page { padding: 0; }
    .login-wrapper { border-radius: 0; border: 0; min-height: 100svh; }
    .visual-panel { padding: 26px 25px; gap: 26px; }
    .hero h1 { font-size: 36px; }
    .form-panel { padding: 32px 25px 24px; }
    .form-header h2 { font-size: 29px; }
    .input-box input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
