:root {
    color-scheme: light; --page: #eaf4f8; --surface: #f8fbfc; --ink: #102b3c;
    --muted: #536d7a; --border: #c9d9e1; --accent: #2455cf; --field: #fff; --error: #962f38;
    font-family: 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--page);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { color-scheme: dark; --page: #112d43; --surface: #132a3d; --ink: #edf5fc; --muted: #afc5d4; --border: #3b5466; --accent: #9bbdff; --field: #1b354a; --error: #ffb6bb; }
}
:root[data-theme="dark"] { color-scheme: dark; --page: #112d43; --surface: #132a3d; --ink: #edf5fc; --muted: #afc5d4; --border: #3b5466; --accent: #9bbdff; --field: #1b354a; --error: #ffb6bb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.login-skip { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px; background: var(--surface); }
.login-skip:focus { top: 8px; }
.login-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; padding: 18px 5%; border-bottom: 1px solid var(--border); background: var(--surface); }
.login-brand { display: inline-flex; text-decoration: none; color: var(--ink); }
.login-brand .brand-mark { width: 224px; height: auto; display: block; }
.login-header-actions { display: flex; gap: 24px; align-items: center; }
.home-link { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; text-decoration: none; }
.home-link:hover { color: var(--accent); }
.login-theme { border: 1px solid var(--border); color: var(--ink); width: 44px; height: 44px; font-size: 24px; border-radius: 50%; background: transparent; }
.login-layout { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100svh - 134px); }
.login-visual { position: relative; min-height: 670px; isolation: isolate; overflow: hidden; background: var(--page); }
.login-visual::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 18%; border-top: 3px solid #c4d0d4; background: #394954; z-index: -1; }
.login-scene-ready .login-visual::after { display: none; }
.login-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.login-journey-copy { position: relative; padding: clamp(34px, 5vw, 84px) 10% 0; }
.login-context { font-size: .9rem; font-weight: 600; margin: 0 0 20px; }
.login-journey-copy h2 { font-size: clamp(2.3rem, 3.6vw, 4.1rem); font-weight: 750; line-height: 1.06; letter-spacing: -.05em; margin: 0; }
.login-journey-copy > p:last-child { font-size: 1rem; line-height: 1.7; color: #3e5f72; margin-top: 24px; }
:root[data-theme="dark"] .login-journey-copy > p:last-child { color: #c2d4e1; }
.login-vehicle { position: absolute; left: 7%; bottom: 18%; width: clamp(210px, 63%, 380px); pointer-events: none; }
.login-vehicle > svg { display: block; width: 100%; height: auto; }
.login-vehicle .vehicle-wheel { transform-box: fill-box; transform-origin: center; }
.login-visual-caption { position: absolute; bottom: 5%; left: 10%; margin: 0; color: #e1edf5; font-size: .84rem; }
.login-form-region { display: grid; align-items: center; justify-items: center; padding: 44px 8%; background: var(--surface); }
.login-card { width: 100%; max-width: 432px; animation: login-arrive .35s ease-out both; }
.login-roles { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); gap: 12px; margin-bottom: 34px; }
.login-roles a { position: relative; min-height: 48px; display: grid; place-items: center; padding: 10px 4px 14px; font-size: .9rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.login-roles a[aria-current="page"] { color: var(--ink); }
.login-roles a[aria-current="page"]::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 3px; background: var(--accent); border-radius: 2px; }
.login-roles a:hover { color: var(--accent); }
.login-private-label { color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 32px; font-size: .88rem; }
.login-role-label { margin: 0 0 10px; font-size: .85rem; font-weight: 650; color: var(--accent); }
.login-form-heading h1 { margin: 0; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.1; letter-spacing: -.045em; }
.login-form-heading > p:last-child { color: var(--muted); line-height: 1.6; font-size: .95rem; margin: 16px 0 28px; }
.login-form { display: grid; gap: 22px; }
.login-field { display: grid; gap: 9px; }
.login-field > label { font-size: .9rem; font-weight: 650; }
.login-input-wrap { display: flex; align-items: center; position: relative; min-height: 56px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); transition: border-color .18s, box-shadow .18s; }
.login-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.login-input-wrap > svg { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.login-input-wrap input { border: 0; background: transparent; color: var(--ink); min-height: 54px; width: 100%; min-width: 0; border-radius: inherit; padding: 15px 16px 15px 48px; font-size: 16px; }
.login-input-wrap input:focus-visible { outline: none; }
.login-input-wrap input::placeholder { color: var(--muted); opacity: .85; }
.login-input-wrap input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--error); }
.login-input-wrap--password input { padding-right: 80px; }
.password-toggle { position: absolute; right: 6px; min-width: 64px; min-height: 44px; padding: 9px 8px; color: var(--accent); background: transparent; border: 0; border-radius: 6px; font-size: .8rem; font-weight: 650; }
.password-toggle:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.caps-lock-hint { font-size: .8rem; color: var(--error); margin: 0; }
.login-device-row { margin-top: -1px; }
.login-device { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: .85rem; }
.login-device input { width: 18px; height: 18px; margin: 0; accent-color: #2455cf; flex-shrink: 0; }
.login-device small { color: var(--muted); font-size: .8rem; margin-left: 5px; }
.login-submit { display: flex; justify-content: center; gap: 14px; align-items: center; width: 100%; min-height: 54px; padding: 14px 20px; color: #fff; border: 1px solid #102b3c; border-radius: 10px; background: #102b3c; font-size: .95rem; font-weight: 650; transition: background .18s, transform .18s; }
.login-submit:hover { background: #2455cf; border-color: #2455cf; }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { cursor: progress; opacity: .8; }
:root[data-theme="dark"] .login-submit { background: #dceaff; border-color: #dceaff; color: #102b3c; }
:root[data-theme="dark"] .login-submit:hover { background: white; }
.submit-arrow { font-size: 20px; line-height: 1; }
.submit-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: login-spin .7s linear infinite; }
.login-security-note { display: flex; justify-content: center; align-items: center; gap: 7px; font-size: .74rem; color: var(--muted); margin: -8px 0 0; }
.login-security-note svg { width: 17px; height: 17px; flex-shrink: 0; }
.login-support { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 8px; font-size: .82rem; margin-top: 32px; color: var(--muted); }
.login-support a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; color: var(--ink); text-underline-offset: 4px; }
.login-return { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.login-footer { text-align: center; min-height: 48px; display: grid; place-items: center; padding: 12px 20px; color: var(--muted); font-size: .75rem; background: var(--surface); }
.login-notice { border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 14px 16px; border-radius: 8px; margin-bottom: 22px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.login-notice p { font-size: .85rem; line-height: 1.55; margin: 0; }
.login-notice h2 { font-size: .9rem; font-weight: 650; margin: 0 0 7px; }
.login-notice--error, .login-notice--warning { border-left-color: var(--error); color: var(--error); background: color-mix(in srgb, var(--error) 5%, var(--surface)); }
.login-notice:focus { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes login-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (max-width: 1050px) {
    .login-layout { grid-template-columns: 1fr 1fr; }
    .login-form-region { padding: 40px 7%; }
    .login-journey-copy { padding: 48px 8% 0; }
    .login-journey-copy h2 { font-size: 2.75rem; }
    .login-journey-copy > p:last-child { font-size: .9rem; }
}
@media (max-width: 800px) {
    .login-header { min-height: 76px; padding: 14px 5%; }
    .login-brand .brand-mark { width: 182px; }
    .login-layout { display: flex; flex-direction: column; }
    .login-form-region { order: -1; padding: 32px 24px; }
    .login-card { max-width: 480px; }
    .login-roles { margin-bottom: 26px; }
    .login-visual { min-height: 310px; height: 310px; }
    .login-journey-copy { padding: 25px 7% 0; }
    .login-journey-copy h2 { font-size: 1.8rem; }
    .login-context { display: none; }
    .login-journey-copy > p:last-child { display: none; }
    .login-vehicle { width: 220px; }
    .login-visual-caption { bottom: 5%; }
    .login-footer { background: var(--page); }
}
@media (max-width: 480px) {
    .login-brand .brand-mark { width: 144px; }
    .login-header-actions { gap: 12px; }
    .home-link { font-size: .8rem; gap: 6px; }
    .login-theme { width: 44px; height: 44px; }
    .login-form-heading h1 { font-size: 2rem; }
    .login-roles a { font-size: .85rem; }
    .login-form-region { padding: 24px 22px; }
    .login-form { gap: 18px; }
    .login-support { margin-top: 22px; }
    .login-security-note { font-size: .69rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
