* { box-sizing: border-box; }
:root { color-scheme: light; --ink:#17243b; --muted:#5e6d84; --line:#dce4ef; --blue:#2058ad; --soft:#f2f6fc; --white:#fff; --orange:#a34b19; }
body { margin:0; background:#f5f7fb; color:var(--ink); font:14px/1.55 "Microsoft YaHei", system-ui, sans-serif; }
[hidden] { display:none !important; }
h1, h2, p { margin:0; }
h1 { font-size:28px; letter-spacing:.02em; }
h2 { font-size:17px; margin-bottom:12px; }
.top { height:66px; display:flex; justify-content:space-between; align-items:center; padding:0 max(24px,calc((100vw - 1260px)/2)); background:#142944; color:white; }
.brand { display:flex; align-items:center; gap:11px; font-size:17px; font-weight:700; white-space:nowrap; }
.brand-mark { display:grid; place-items:center; width:35px; height:35px; border:1px solid #5f83b3; border-radius:9px; background:#203e66; }
.account { display:flex; gap:12px; align-items:center; }
.account .quiet { color:#eff6ff; }
main { max-width:1308px; margin:auto; padding:26px 24px 48px; }
.page-head, .section-head, .dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.section-head h2, .dialog-head h2 { margin:0; }
.head-controls, #filters, .pager { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.detail-actions { margin-bottom:10px; }
.sync-panel { margin-bottom:14px; }
.sync-panel ul { margin:8px 0 0; padding-left:20px; max-height:120px; overflow:auto; }
.action-link { display:inline-flex; align-items:center; min-height:37px; padding:8px 11px; background:white; border:1px solid var(--line); border-radius:7px; color:var(--blue); text-decoration:none; }
.action-link:hover { background:var(--soft); }
.muted { color:var(--muted); }
.error { color:#9a2630; }
.error:not(:empty) { margin:8px 0 14px; }
.panel, .card { background:white; border:1px solid var(--line); border-radius:12px; padding:18px; }
.login { margin:5vh auto; width:min(440px,100%); padding:25px; }
.login h1 { margin-bottom:18px; }
.login form, #importForm, #accountForm, #unitCheckForm, #libraryImportForm, #vehicleEditForm, #settingsForm { display:grid; gap:12px; }
#settingsMessage:not(:empty) { margin-top:12px; }
.login button { margin-top:6px; }
label { display:grid; gap:4px; }
label.compact, label.check { display:inline-flex; align-items:center; gap:8px; }
.filter-field { display:inline-flex; align-items:center; gap:8px; }
.multi-select { position:relative; }
.multi-toggle { min-width:150px; text-align:left; background:white; border-color:#bfcede; color:var(--ink); }
.multi-toggle::after { content:"▾"; float:right; margin-left:16px; color:var(--muted); }
.multi-toggle[aria-expanded="true"]::after { content:"▴"; }
.multi-menu { position:absolute; z-index:20; top:calc(100% + 4px); left:0; min-width:170px; padding:6px; background:white; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px #14294433; }
.multi-menu label.check { display:flex; width:100%; padding:7px 9px; border-radius:5px; cursor:pointer; white-space:nowrap; }
.multi-menu label.check:hover { background:var(--soft); }
th.sortable { cursor:pointer; user-select:none; }
th.sortable:hover { background:#e8eff9; }
th.sortable.sort-disabled { cursor:default; opacity:.55; }
th.sortable.sort-disabled:hover { background:var(--soft); }
.sort-mark { margin-left:5px; color:var(--muted); font-size:11px; }
th.sorted-asc .sort-mark, th.sorted-desc .sort-mark { color:var(--blue); }
input,select,button,textarea { font:inherit; border:1px solid #bfcede; border-radius:7px; padding:8px 11px; min-height:37px; }
textarea { width:100%; max-width:100%; box-sizing:border-box; resize:vertical; }
input,select { background:white; color:var(--ink); max-width:100%; }
input[type=checkbox] { min-height:unset; width:16px; height:16px; }
button { background:var(--blue); color:white; cursor:pointer; border-color:transparent; white-space:nowrap; }
button.secondary { background:white; border-color:var(--line); color:var(--blue); }
button.quiet { background:transparent; color:var(--blue); }
button:disabled { opacity:.5; cursor:default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline:2px solid #2865be; outline-offset:2px; }
.cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.library-actions { margin-bottom:14px; }
.card strong { display:block; font-size:30px; line-height:1.35; font-variant-numeric:tabular-nums; }
.card span { color:var(--muted); }
.card .caption { display:block; font-size:12px; margin-top:4px; }
.card-action { color:var(--ink); text-align:left; white-space:normal; min-width:0; }
.card-action:hover, .trend-day:hover { background:var(--soft); border-color:#bfcede; }
.trend-day { color:var(--ink); background:transparent; padding:2px 0; min-width:0; }
#dayRecords td:nth-last-child(-n+4) { white-space:nowrap; }
.history-coverage { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; margin-bottom:14px; padding:10px 18px; }
.history-coverage strong { font-variant-numeric:tabular-nums; }
.coverage-time { margin-left:auto; color:var(--muted); font-size:12px; line-height:1.6; text-align:right; }
.overview-grid { display:grid; grid-template-columns:1fr 1.4fr; gap:14px; margin-bottom:14px; }
.bars { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; margin-top:24px; text-align:center; }
.bar { display:grid; grid-template-rows:20px auto 20px; gap:5px; justify-items:center; }
.bar meter { width:80%; accent-color:var(--blue); }
.bar time { font-size:12px; color:var(--muted); }
.collection-progress { padding:12px 16px; margin:12px 0; border:1px solid var(--line); border-radius:10px; background:var(--soft); }
.collection-progress progress { width:100%; height:16px; accent-color:var(--blue); }
.collection-toolbar { justify-content:space-between; margin-top:14px; }
.collection-mode, .collection-logs .action-link { white-space:nowrap; }
.manual-collection { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.manual-collection summary { cursor:pointer; }
.parallel-panel { margin-top:10px; border-top:1px dashed var(--line); padding-top:10px; }
.parallel-panel summary { cursor:pointer; font-weight:600; margin-bottom:8px; }
.parallel-panel td { vertical-align:top; }
.parallel-panel td button { margin:0 4px 4px 0; }
.manual-collection[open] summary, .manual-collection .head-controls { margin-bottom:8px; }
.sync-panel #syncStatus:not(:empty) { margin-top:6px; }
.table-scroll { overflow:auto; }
table { width:100%; border-collapse:collapse; text-align:left; }
th,td { padding:10px 8px; border-bottom:1px solid #e6edf6; vertical-align:top; }
th { background:var(--soft); white-space:nowrap; font-weight:600; }
td:nth-child(1) { font-weight:600; }
td .quiet { padding:0 6px; min-height:24px; }
td.warn { color:var(--orange); font-weight:700; }
.stack { margin-top:14px; }
.collapse summary { cursor:pointer; }
tr.row-pending td { background:#fdeceb; }
tr.row-unpaid td { background:#fff4e2; }
tr.row-closed td { background:#eaf6ee; }
tr.row-unknown td { background:#f6f7f9; }
.legend { display:inline-block; padding:1px 8px; border-radius:6px; }
.legend-pending { background:#fdeceb; }
.legend-unpaid { background:#fff4e2; }
.legend-closed { background:#eaf6ee; }
.change-up { color:#9a2630; }
.change-down { color:#18704b; }
.change-flat { color:var(--muted); }
td.complete { color:#18704b; white-space:nowrap; }
#vehicles td:first-child { white-space:nowrap; }
.pager { justify-content:flex-end; margin-top:14px; }
dialog { border:1px solid var(--line); border-radius:12px; width:min(540px,95vw); max-height:85vh; padding:20px; color:var(--ink); }
dialog.wide { width:min(1060px,95vw); }
dialog::backdrop { background:#0d1c3277; }
dialog #detailStatus { margin-bottom:12px; }
@media (max-width:850px) { .cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .overview-grid { grid-template-columns:1fr; } main { padding:16px 12px; } }

:root {
  --ink:#192740;
  --muted:#52647b;
  --line:#dbe4ef;
  --blue:#21469d;
  --soft:#edf3fc;
  --teal:#087f73;
  --gold:#ad6114;
  --shadow:0 2px 5px #142d4a08, 0 10px 26px #142d4a07;
}
html { scroll-behavior:smooth; scroll-padding-top:84px; }
body { background:#f3f6fb; font-family:Inter,"Segoe UI","Microsoft YaHei",system-ui,sans-serif; }
.top {
  position:sticky; top:0; z-index:24; min-height:68px; height:auto; padding:10px max(24px,calc((100vw - 1680px)/2));
  background:#102343; box-shadow:0 4px 22px #10234324;
}
.top::after { content:""; position:absolute; bottom:0; left:0; right:0; height:2px; background:linear-gradient(90deg,#2a57b5 0%,#168c7c 52%,#ec9d34 88%,#d45b39); }
.brand { color:inherit; text-decoration:none; gap:12px; line-height:1.16; letter-spacing:.025em; }
.brand-mark { display:block; width:40px; height:40px; object-fit:contain; border:0; background:white; border-radius:9px; }
.brand small { display:block; margin-top:5px; color:#afc1df; font-size:11px; font-weight:500; letter-spacing:.09em; }
.account { justify-content:flex-end; flex-wrap:wrap; gap:5px 8px; }
.account #accountName { padding:0 8px; color:#dbe6f8; }
.account .action-link { color:#f1f5ff; border-color:#ffffff38; background:#ffffff10; }
.account .quiet:hover, .account .action-link:hover { background:#ffffff19; }
main { max-width:1728px; padding:24px 26px 54px; }
.dashboard-main, main.workspace { max-width:none; margin:0; padding:0; }
body:not(.auth-active) .top { padding-inline:24px; }
.workspace { display:grid; grid-template-columns:228px minmax(0,1fr); align-items:start; }
.workspace-content { min-width:0; width:100%; max-width:1600px; justify-self:center; padding:24px clamp(16px,2vw,32px) 48px; }
.workspace-nav {
  position:sticky; top:68px; min-height:calc(100svh - 68px); max-height:calc(100svh - 68px);
  overflow:auto; display:grid; align-content:start; gap:22px; padding:25px 0;
  border-right:1px solid var(--line); background:#fff; box-shadow:2px 0 12px #142d4a07;
}
.workspace-nav-group { display:grid; gap:4px; }
.workspace-nav-caption { padding:0 24px 5px; color:#697b92; font-size:12px; font-weight:650; letter-spacing:.06em; }
.workspace-nav a {
  display:flex; align-items:center; gap:12px; min-height:49px; margin:0 12px 0 0; padding:10px 13px 10px 21px;
  border-left:3px solid transparent; border-radius:0 8px 8px 0; color:#344964;
  font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap;
}
.workspace-nav a svg { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.workspace-nav a:hover { color:var(--blue); background:#f1f6fd; }
.workspace-nav a[aria-current] { color:#1b51ad; background:#e8f1ff; border-left-color:#3170ce; }
.workspace-nav a:focus-visible { outline-offset:-4px; }
.panel,.card { border-radius:14px; box-shadow:var(--shadow); }
.workspace-content > .page-head {
  margin-bottom:16px; padding:22px 23px; border-radius:15px; color:#fff;
  background:radial-gradient(ellipse at 95% 160%,#0e827d90,transparent 64%),linear-gradient(108deg,#142952,#1e4082);
}
.workspace-content > .page-head .muted { color:#d3def2; margin-top:4px; }
.workspace-content > .page-head .secondary { color:#f1f5ff; border-color:#ffffff55; background:#ffffff17; }
.workspace-content > .page-head label { color:#fff; }
#openLibrary { background:#fff; color:var(--blue); }
.login { padding:27px 29px; border-top:4px solid var(--blue); border-radius:16px; box-shadow:0 18px 58px #16345816; }
.cards { gap:11px; }
.card { text-align:left; position:relative; min-width:0; padding:15px 16px 14px; border-top:3px solid #3457a8; }
.card:nth-child(3n+2) { border-top-color:#0e8979; }
.card:nth-child(3n+3) { border-top-color:#d38c31; }
.card strong { letter-spacing:-.02em; overflow-wrap:anywhere; }
.card-action:hover { transform:translateY(-2px); box-shadow:0 9px 22px #23486816; }
.overview-grid { grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:12px; }
.overview-grid > .panel { min-width:0; }
.collection-progress { background:#edf3fc; }
.collection-progress progress { height:8px; display:block; margin:9px 0; }
.bars { margin-top:14px; }
.vehicle-panel { position:relative; }
.vehicle-panel[aria-busy="true"]::before {
  content:""; position:absolute; top:0; left:13px; right:13px; height:2px; pointer-events:none; opacity:0;
  background:linear-gradient(90deg,transparent,#3159b0,#178876,transparent);
  animation:filter-wait 1s .15s ease-in-out infinite alternate;
}
@keyframes filter-wait { from { opacity:.3; } to { opacity:1; } }
.vehicle-panel .section-head { align-items:stretch; flex-direction:column; gap:13px; }
#filters {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr)); align-items:end;
  gap:10px 12px; width:100%; padding:13px; border:1px solid var(--line); border-radius:10px; background:#f5f8fd;
}
#filters > .compact { display:grid; gap:5px; font-size:12px; color:var(--muted); font-weight:600; min-width:0; }
#filters input,#filters select,#filters .multi-toggle { width:100%; min-width:0; font-size:14px; font-weight:400; }
#filters .multi-menu input { width:16px; }
.filter-actions { display:flex; flex-wrap:wrap; gap:6px; grid-column:1/-1; justify-content:flex-end; }
.table-scroll { border:1px solid var(--line); border-radius:9px; }
.table-scroll th { color:#304568; background:#edf3fc; }
.table-scroll td { border-bottom-color:#e4ebf4; }
.table-scroll tr:last-child td { border-bottom:0; }
.table-scroll tbody tr:hover td { box-shadow:inset 0 0 0 99px #2256a506; }
.vehicle-panel table { min-width:900px; }
.vehicle-panel th,.vehicle-panel td { padding:10px 9px; }
.vehicle-panel td:nth-child(-n+2) { color:#244267; }
.action-link, button, input, select, .workspace-nav a, .card-action { transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s; }
button:not(:disabled):hover { filter:brightness(1.08); }
button:not(:disabled):active, .action-link:active { transform:translateY(1px); }
a:focus-visible, summary:focus-visible, textarea:focus-visible { outline:2px solid #3676d8; outline-offset:3px; }
.multi-menu:not([hidden]), details[open] > :not(summary) { animation:fleet-appear .16s ease-out; }
dialog {
  opacity:0; transform:translateY(8px) scale(.99);
  transition:opacity .18s,transform .18s,display .18s allow-discrete,overlay .18s allow-discrete;
  padding:23px; box-shadow:0 20px 70px #142d4a38;
}
dialog[open] { opacity:1; transform:none; }
dialog::backdrop { background:#10234372; }
@starting-style { dialog[open] { opacity:0; transform:translateY(8px) scale(.99); } }
@keyframes fleet-appear { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:none; } }
.workspace-content, .workspace-view:not([hidden]), .login:not([hidden]) { animation:fleet-appear .2s ease-out; }
.export-options { display:grid; gap:9px; }
.export-options .action-link { display:grid; gap:3px; padding:11px 12px; font-weight:600; }
.export-options .action-link span { font-size:12px; color:var(--muted); font-weight:400; }
.export-scope { padding:0 0 12px; color:var(--muted); overflow-wrap:anywhere; }
.download-notice {
  position:fixed; z-index:30; bottom:16px; right:16px; max-width:min(520px,calc(100vw - 32px));
  background:white; color:var(--ink); padding:11px 14px; border:1px solid var(--line);
  border-left:3px solid var(--blue); border-radius:9px; box-shadow:0 8px 30px #10234330;
  overflow-wrap:anywhere; animation:fleet-appear .16s ease-out;
}
dialog .download-notice { position:static; max-width:none; margin-top:12px; box-shadow:none; }
.download-notice.success { border-left-color:var(--teal); }
.download-notice.failure { border-left-color:#c74747; color:#972536; }
.download-notice.working::before { content:""; display:inline-block; width:.75em; height:.75em; margin-right:7px; border:2px solid #cbd9f0; border-top-color:var(--blue); border-radius:50%; animation:fleet-spin .7s linear infinite; }
.action-link[aria-busy] { opacity:.6; cursor:progress; }
@keyframes fleet-spin { to { transform:rotate(360deg); } }
@media (max-width:800px) {
  .workspace { grid-template-columns:minmax(0,1fr); }
  .workspace-nav {
    position:static; min-height:0; max-height:none; display:flex; flex-wrap:wrap; gap:5px;
    padding:7px 10px; border-right:0; border-bottom:1px solid var(--line);
  }
  .workspace-nav-group { display:contents; }
  .workspace-nav-caption { display:none; }
  .workspace-nav a { min-height:38px; margin:0; padding:6px 8px; border:0; border-radius:7px; gap:5px; }
  .workspace-nav a svg { width:15px; height:15px; }
  .workspace-content { padding:15px 14px 42px; }
  body:not(.auth-active) .top { padding-inline:14px; }
}
@media (max-width:850px) { .overview-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:550px) {
  html { scroll-padding-top:105px; }
  .top { gap:8px; }
  .brand { font-size:15px; }
  .brand-mark { width:34px; height:34px; }
  .account #accountName { padding-inline:5px; font-size:12px; }
  .account :is(.action-link,.quiet) { min-height:30px; padding:4px 6px; font-size:12px; }
  .workspace-nav a { min-height:34px; padding:5px 7px; font-size:12px; }
  .workspace-content > .page-head { padding:15px; }
  h1 { font-size:23px; }
  .panel,.card { padding:12px; }
  .card strong { font-size:24px; }
  .bars { gap:2px; }
  .bar time { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

.auth-active .top { display:none; }
.auth-active main { max-width:none; margin:0; padding:0; }
.auth-shell {
  --auth-navy:#080f23;
  --auth-cyan:#82eadb;
  --auth-text:#172640;
  display:grid; grid-template-columns:minmax(0,1.52fr) minmax(420px,1fr);
  min-height:100svh; background:#eef4fd;
}
.auth-hero {
  min-height:660px; isolation:isolate; position:relative; overflow:hidden;
  display:flex; flex-direction:column; align-items:flex-start;
  padding:clamp(30px,4.1vw,72px); color:#f3f8ff;
  background:
    radial-gradient(ellipse at 75% 70%,#103b63 0%,transparent 60%),
    radial-gradient(ellipse at 100% 25%,#153060 0%,transparent 54%),
    linear-gradient(140deg,#090f21,#0b1736 61%,#071428);
}
.auth-hero::before {
  content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; opacity:.42;
  background:repeating-linear-gradient(0deg,transparent 0 47px,#96baff17 48px 49px),
    repeating-linear-gradient(90deg,transparent 0 47px,#96baff17 48px 49px);
  mask-image:linear-gradient(105deg,#0007,transparent 42%,#000);
}
.auth-hero::after {
  content:""; position:absolute; pointer-events:none; z-index:-1; inset:0;
  background:linear-gradient(165deg,#0a132b55,transparent 37%,transparent 73%,#07102280);
}
.auth-brand {
  display:inline-flex; align-items:center; gap:13px; font-size:19px;
  font-weight:700; letter-spacing:.09em; flex-shrink:0;
}
.auth-brand img { display:block; width:45px; height:45px; object-fit:contain; border-radius:11px; background:#fff; box-shadow:0 0 0 5px #879dcb1a; }
.auth-intro { margin-top:clamp(54px,10vh,116px); position:relative; z-index:1; }
.auth-title {
  font-size:clamp(43px,5vw,79px); font-weight:750; line-height:1.13;
  letter-spacing:.035em; text-shadow:0 5px 30px #0a1534a0;
}
.auth-title span { display:block; color:#b6d5ff; }
.auth-intro p { margin-top:17px; color:#b2c7e3; font-size:clamp(14px,1.22vw,18px); letter-spacing:.045em; }
.auth-capabilities {
  position:relative; z-index:1; display:flex; flex-wrap:wrap; align-items:center; gap:8px 17px;
  margin-top:auto; color:#cadbf2; font-size:12px; letter-spacing:.07em; padding-top:28px;
}
.auth-capabilities span { display:inline-flex; align-items:center; gap:8px; }
.auth-capabilities span::before { content:""; width:5px; height:5px; background:#70ccc4; border-radius:1px; transform:rotate(45deg); }
.auth-scene {
  position:absolute; z-index:-1; pointer-events:none; overflow:hidden;
  left:1%; right:-9%; top:15%; bottom:-10%;
  mask-image:linear-gradient(180deg,transparent,#000 14% 79%,transparent);
}
.auth-scene canvas { width:100%; height:100%; display:block; }
.auth-entry {
  display:grid; place-items:center; min-width:0; isolation:isolate; position:relative; overflow:hidden;
  padding:clamp(26px,4.3vw,70px);
  background:radial-gradient(ellipse at 23% 22%,#d5e8ff,transparent 60%),
    radial-gradient(ellipse at 91% 92%,#d8f0ec,transparent 48%),#f4f7ff;
}
.auth-entry::before {
  content:""; pointer-events:none; position:absolute; z-index:-1; inset:16px;
  border:1px solid #9baecb52; border-radius:18px;
}
.auth-entry::after {
  content:""; position:absolute; z-index:-1; width:260px; height:260px;
  bottom:-112px; right:-70px; border-radius:50%;
  border:1px solid #4279a83f; box-shadow:0 0 0 22px #7cadbc1d,0 0 0 45px #7cadbc14,0 0 0 68px #7cadbc0b;
}
.auth-card.login {
  position:relative; width:min(430px,100%); margin:0; padding:clamp(25px,3vw,45px);
  border:1px solid #fff; border-radius:20px; background:#ffffffea;
  box-shadow:0 22px 65px #21476c18,0 3px 8px #21476c10; color:var(--auth-text);
}
.auth-card::before {
  content:""; display:block; position:absolute; width:52px; height:3px; left:clamp(25px,3vw,45px); top:0;
  border-radius:0 0 3px 3px; background:linear-gradient(90deg,#3962d4,#168c83 66%,#e69843);
}
.auth-form-header { margin-bottom:28px; }
.auth-form-header h1 { margin:0 0 7px; font-size:clamp(29px,3vw,38px); line-height:1.17; letter-spacing:.025em; }
.auth-form-header p { color:#526b88; font-size:14px; }
.auth-card form { gap:16px; }
.auth-card label { color:#2c4260; font-weight:650; gap:6px; }
.auth-control { display:grid; gap:6px; }
.auth-field {
  min-width:0; display:flex; align-items:center; gap:9px; height:51px; padding:0 11px 0 13px;
  border:1px solid #d2deec; border-radius:10px; background:#f6f9fe;
  transition:background-color .17s,border-color .17s,box-shadow .17s;
}
.auth-field:focus-within { border-color:#4278d4; background:#fff; box-shadow:0 0 0 3px #4280dd23; }
.auth-field input,.auth-field input:focus-visible {
  outline:0; box-shadow:none; border:0; background:transparent;
  min-width:0; flex:1; padding:0 1px; height:100%; font-weight:400;
}
.auth-field input::placeholder { color:#62758d; }
.auth-field-icon { flex:none; position:relative; width:17px; height:19px; color:#466995; }
.auth-person::before,.auth-person::after,.auth-lock::before,.auth-lock::after { position:absolute; content:""; border:1.45px solid currentColor; }
.auth-person::before { width:6px; height:6px; top:0; left:5px; border-radius:50%; }
.auth-person::after { width:13px; height:6px; top:10px; left:1.5px; border-radius:8px 8px 4px 4px; }
.auth-lock::before { left:4px; top:0; width:8px; height:9px; border-radius:7px 7px 0 0; }
.auth-lock::after { left:1.5px; top:7px; width:14px; height:10px; border-radius:3px; background:#f6f9fe; }
.auth-password-toggle { display:grid; place-items:center; width:34px; min-height:34px; margin:0; padding:0; border:0; color:#466995; background:transparent; }
.auth-password-toggle:hover { background:#e7f0fc; }
.auth-password-toggle span { width:15px; height:10px; position:relative; border:1.5px solid currentColor; border-radius:80% / 100%; }
.auth-password-toggle span::before { content:""; position:absolute; left:4px; top:2px; width:4px; height:4px; border-radius:50%; background:currentColor; }
.auth-password-toggle[aria-pressed="true"] span::after { content:""; position:absolute; width:18px; height:1.5px; top:3px; left:-3px; background:currentColor; transform:rotate(-37deg); }
.auth-modes { min-width:0; border:0; padding:0; margin:0; }
.auth-modes legend { padding:0; margin:0 0 7px; color:#2c4260; font-size:13px; font-weight:650; }
.auth-mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.auth-mode-grid label {
  position:relative; display:flex; align-items:center; padding:9px 10px; min-height:58px;
  cursor:pointer; border-radius:10px; border:1px solid #d2deec; background:#f7faff;
}
.auth-mode-grid label:hover { border-color:#7698d0; }
.auth-mode-grid label:has(input:checked) { color:#21469d; border-color:#416fcb; background:#eaf2ff; }
.auth-mode-grid label:focus-within { outline:2px solid #4278d4; outline-offset:2px; }
.auth-mode-grid input { width:14px; height:14px; margin:0 2px 0 0; accent-color:#3159ae; flex:none; }
.auth-mode-grid strong, .auth-mode-grid small { display:block; }
.auth-mode-grid strong { line-height:1.3; font-size:13px; }
.auth-mode-grid small { color:#526b88; margin-top:3px; font-size:11px; line-height:1.35; font-weight:400; }
.auth-card .auth-continue { min-height:40px; text-align:center; }
.auth-card #loginMessage { margin:0; }
.auth-card #loginMessage:empty { display:none; }
.auth-card #loginMessage:not(:empty) { padding:8px 10px; border:1px solid #edccd0; border-radius:7px; background:#fff4f6; }
.auth-card .auth-submit {
  display:flex; align-items:center; justify-content:space-between; min-height:52px; margin-top:6px;
  padding:0 18px; border-radius:10px; color:#fff; font-weight:650; letter-spacing:.14em;
  background:linear-gradient(104deg,#2446a3,#2562be); box-shadow:0 8px 17px #264cb33a;
}
.auth-submit-feedback { width:13px; height:13px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:rotate(45deg) scale(.7); }
.auth-submit:hover .auth-submit-feedback { translate:3px 0; transition:translate .16s; }
.auth-card form[aria-busy="true"] .auth-submit { opacity:.82; cursor:wait; }
.auth-card form[aria-busy="true"] .auth-submit-feedback { transform:none; border:2px solid #ffffff53; border-top-color:#fff; border-radius:50%; animation:fleet-spin .7s linear infinite; }
.auth-startup { color:#375673; font-weight:600; }
.auth-startup::before { content:""; display:inline-block; margin-right:9px; width:12px; height:12px; vertical-align:-1px; border-radius:50%; border:2px solid #c8dbee; border-top-color:#1d519d; animation:fleet-spin .8s linear infinite; }
@media (max-width:900px) {
  .auth-shell { grid-template-columns:minmax(0,1.14fr) minmax(345px,1fr); }
  .auth-hero { padding:30px; min-height:580px; }
  .auth-intro { margin-top:68px; }
  .auth-scene { left:-16%; right:-15%; top:21%; }
  .auth-entry { padding:28px; }
}
@media (max-width:670px) {
  .auth-shell { grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr; }
  .auth-hero { min-height:253px; padding:22px 24px; }
  .auth-brand { font-size:15px; gap:10px; }
  .auth-brand img { width:34px; height:34px; border-radius:8px; }
  .auth-intro { margin-top:27px; }
  .auth-title { font-size:36px; }
  .auth-title span { display:inline; }
  .auth-intro p { margin-top:10px; font-size:13px; }
  .auth-capabilities { padding-top:17px; font-size:11px; }
  .auth-scene { left:17%; right:-28%; top:0; bottom:-30%; opacity:.82; }
  .auth-entry { align-items:start; padding:clamp(24px,5vh,48px) 20px 36px; }
  .auth-entry::before { inset:9px; }
  .auth-form-header { margin-bottom:19px; }
}
@media (max-width:350px) {
  .auth-hero { padding-inline:16px; }
  .auth-title { font-size:30px; }
  .auth-entry { padding-inline:14px; }
  .auth-card.login { padding-inline:20px; }
}

.analysis-filters {
  display:grid; align-items:end; gap:12px;
  grid-template-columns:minmax(108px,.8fr) minmax(135px,1fr) repeat(2,minmax(140px,.85fr)) minmax(135px,1.25fr) auto;
}
.analysis-filters label { min-width:0; color:#344964; font-weight:650; }
.analysis-filters :is(input,select) { width:100%; min-width:0; font-weight:400; }
.analysis-filters button { white-space:nowrap; }
:is(.analysis-filters,.analysis-trend) button { transition:none; }
:is(.analysis-filters,.analysis-trend) button:not(:disabled):is(:hover,:active) { filter:none; transform:none; }
.analysis-range-field { position:relative; min-width:0; }
.analysis-range-field > label { margin-bottom:4px; }
.analysis-range-trigger {
  display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%;
  color:var(--ink); background:#fff; border-color:#bfcede; text-align:left;
}
.analysis-range-trigger::after {
  content:""; width:6px; height:6px; flex:none; margin-right:2px;
  border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:translateY(-2px) rotate(45deg);
}
.analysis-range-trigger[aria-expanded=true] { border-color:var(--blue); }
.analysis-range-trigger:not(:disabled):hover { background:#f3f7ff; border-color:#adc5ec; }
.analysis-range-trigger[aria-expanded=true]::after { transform:translateY(2px) rotate(225deg); }
.analysis-period-menu {
  --analysis-hover:#dbeaff;
  --analysis-hover-edge:#8fb6ee;
  position:absolute; z-index:20; top:calc(100% + 6px); left:0; min-width:100%;
  padding:5px; background:white; border:1px solid var(--line);
  border-radius:12px; box-shadow:0 10px 30px #142d4a26;
}
.analysis-period-menu.calendar-open { display:grid; grid-template-columns:104px minmax(0,1fr); width:min(435px,calc(100vw - 54px)); }
.analysis-period-options { display:grid; align-content:start; }
.analysis-period-options button {
  min-height:32px; padding:4px 8px; color:var(--ink); background:transparent; text-align:left;
}
.analysis-period-options button[aria-pressed=true] { background:var(--soft); color:var(--blue); font-weight:650; }
.analysis-calendar { min-width:0; padding:6px 8px; border-left:1px solid var(--line); }
.analysis-calendar-nav { display:flex; align-items:center; gap:3px; margin-bottom:8px; }
.analysis-calendar-nav strong { flex:1; text-align:center; font-variant-numeric:tabular-nums; }
.analysis-calendar-nav button { min-width:29px; min-height:30px; padding:0 5px; font-size:17px; line-height:1; }
.analysis-week-list,.analysis-month-list { display:grid; }
.analysis-week-list .analysis-week-row {
  display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:1px; width:100%;
  align-items:center; min-height:34px; padding:3px 1px; text-align:center; color:var(--ink);
  background:transparent; font-variant-numeric:tabular-nums;
}
.analysis-week-row span { pointer-events:none; }
.analysis-calendar button,.analysis-period-options button { user-select:none; -webkit-tap-highlight-color:transparent; }
.analysis-week-list .analysis-week-labels { color:var(--muted); font-size:12px; }
.analysis-calendar-muted { color:#697b92; }
.analysis-month-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
.analysis-month-list button { min-height:41px; padding:4px; background:transparent; color:var(--ink); }
.analysis-period-menu button:focus-visible { outline-offset:-2px; }
.analysis-period-menu button:not(:disabled,[aria-pressed=true]):is(:hover,:focus-visible) {
  color:#183c84; background:var(--analysis-hover); box-shadow:inset 0 0 0 1px var(--analysis-hover-edge);
}
.analysis-week-row:not(:disabled):is(:hover,:focus-visible) .analysis-calendar-muted { color:#40629c; }
.analysis-period-menu :is(.analysis-week-row,.analysis-month-option)[aria-pressed=true] {
  color:white; background:var(--blue); box-shadow:none;
}
.analysis-period-menu .analysis-week-row[aria-pressed=true] .analysis-calendar-muted { color:#e2edff; }
.analysis-status { margin:12px 0; color:var(--muted); font-size:13px; }
.analysis-status:empty { display:none; }
#analysisResults { display:grid; gap:16px; }
.analysis-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.analysis-metric { min-width:0; border-top:3px solid #315fb9; }
.analysis-metric:nth-child(2) { border-top-color:#b5691d; }
.analysis-metric:nth-child(3) { border-top-color:var(--teal); }
.analysis-metric:nth-child(4) { border-top-color:#7552ac; }
.analysis-metric:nth-child(5) { border-top-color:#2478a9; }
.analysis-metric strong { display:block; margin-top:4px; font-size:clamp(22px,2.45vw,34px); overflow-wrap:anywhere; }
.analysis-metric strong small { margin-left:5px; color:var(--muted); font-size:12px; }
.analysis-metric-note { color:var(--muted); font-size:12px; }
.analysis-trend { min-width:0; }
.analysis-trend .section-head { margin-bottom:6px; }
.analysis-grain { display:flex; flex-wrap:wrap; gap:2px; padding:3px; border:1px solid var(--line); border-radius:9px; background:#f1f5fb; }
.analysis-grain button {
  min-height:30px; padding:4px 12px; border-radius:6px; border-color:transparent;
  color:var(--muted); background:transparent;
}
.analysis-grain button:not(:disabled,[aria-pressed=true]):hover,
.analysis-trend-pager button:not(:disabled):hover { background:#e6effe; color:var(--blue); border-color:#bfd3f3; }
.analysis-grain button[aria-pressed=true] { background:#fff; color:var(--blue); box-shadow:0 1px 4px #1737621a; }
.analysis-period {
  min-height:27px; display:flex; align-items:center; gap:4px 14px;
  color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; white-space:nowrap;
}
.analysis-period > :is(strong,.muted) { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.analysis-period strong { color:var(--ink); }
.analysis-change {
  padding:2px 8px; border-radius:6px; color:#344964; background:#edf2f8;
  font-size:12px; font-weight:650; flex:none;
}
.analysis-change.is-up { color:#8b3a12; background:#fff0e4; }
.analysis-change.is-down { color:#086757; background:#e6f5ed; }
.analysis-trend-pager { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:8px; font-size:12px; }
.analysis-plot { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:start; }
.analysis-axis {
  display:grid; grid-template-rows:repeat(5,42px); text-align:right; min-width:20px;
  color:var(--muted); font-size:11px; line-height:12px; font-variant-numeric:tabular-nums;
}
.analysis-trend-scroll { overflow:auto; padding:6px 2px 4px; }
.analysis-bars {
  display:grid; grid-template-columns:repeat(var(--columns,1),minmax(0,1fr)); gap:5px;
  min-width:calc(var(--columns,1) * var(--column-min,29px));
  background:repeating-linear-gradient(to top,#e5edf6 0 1px,transparent 1px 42px) 0 0/100% 169px no-repeat;
}
.analysis-bar-column, .analysis-bar-column:hover {
  display:block; padding:0; min-width:0; text-align:center;
  border:0; background:transparent; color:var(--muted);
}
.analysis-bar-column:focus-visible { outline-offset:-2px; }
.analysis-bar-track { position:relative; display:block; width:100%; height:169px; }
.analysis-bar-fill {
  position:absolute; bottom:0; left:50%; transform:translateX(-50%);
  height:var(--height,0%); width:65%; max-width:36px; min-height:2px; border-radius:4px 4px 0 0;
  background:linear-gradient(0deg,#78a8e8,#315fb9);
}
.analysis-bar-fill.is-zero { background:#d6e0ed; }
.analysis-bar-column:is(:hover,:focus-visible,.is-selected) .analysis-bar-fill { background:linear-gradient(0deg,#75bfb3,#087f73); }
.analysis-bar-label {
  display:block; height:24px; margin-top:4px; overflow:visible; white-space:nowrap;
  font-size:11px; font-variant-numeric:tabular-nums;
}
.analysis-distributions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.analysis-distributions > section { min-width:0; }
.analysis-distribution { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:18px; min-height:153px; }
.analysis-donut {
  --diameter:116px;
  display:grid; align-content:center; justify-items:center; position:relative; isolation:isolate;
  width:var(--diameter); height:var(--diameter); border-radius:50%; color:var(--ink);
  background:var(--donut,#e9eff7); font-variant-numeric:tabular-nums;
}
.analysis-donut::before { content:""; position:absolute; inset:12px; background:#fff; border-radius:50%; z-index:-1; }
.analysis-donut strong { font-size:23px; line-height:1.2; }
.analysis-donut span { font-size:11px; color:var(--muted); }
.analysis-donut.small { --diameter:88px; margin:0 auto 12px; }
.analysis-donut.small::before { inset:8px; }
.analysis-donut.small strong { font-size:18px; }
.analysis-legend-scroll { max-height:184px; overflow:auto; }
.analysis-legend { list-style:none; padding:0; margin:0; }
.analysis-legend li {
  display:grid; grid-template-columns:8px minmax(0,1fr) auto minmax(36px,auto); gap:7px; align-items:center;
  padding:5px 0; font-size:12px; font-variant-numeric:tabular-nums; border-bottom:1px solid #edf1f6;
}
.analysis-legend li:last-child { border-bottom:0; }
.analysis-legend li span:nth-last-child(-n+2) { text-align:right; white-space:nowrap; }
.analysis-legend-label { overflow-wrap:anywhere; }
.analysis-swatch { width:8px; height:8px; border-radius:50%; }
.analysis-empty { display:grid; place-items:center; min-height:153px; color:var(--muted); background:#f7f9fc; border-radius:9px; }
#analysisProgress { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.analysis-progress-card { min-width:0; border:1px solid var(--line); border-radius:10px; padding:11px; }
.analysis-progress-card h3 { margin:0 0 9px; font-size:14px; }
.analysis-progress > p { margin-top:13px; font-size:12px; }
@media (max-width:1200px) {
  .analysis-distribution { grid-template-columns:1fr; justify-items:center; gap:10px; }
  .analysis-legend-scroll { justify-self:stretch; }
  #analysisProgress { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:1120px) {
  .analysis-filters,.analysis-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:840px) {
  .analysis-period {
    display:grid; grid-template-rows:20px 20px 22px; grid-template-columns:minmax(0,1fr);
    justify-items:start; gap:2px;
  }
  .analysis-period > :is(strong,.muted) { max-width:100%; }
}
@media (max-width:600px) {
  .analysis-filters,.analysis-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .analysis-period-menu.calendar-open { grid-template-columns:minmax(0,1fr); }
  .analysis-period-menu.calendar-open .analysis-period-options { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .analysis-period-menu.calendar-open .analysis-period-options button { text-align:center; padding:3px; font-size:12px; }
  .analysis-calendar { border-left:0; border-top:1px solid var(--line); }
  .analysis-distributions { grid-template-columns:minmax(0,1fr); }
  .analysis-distribution { grid-template-columns:auto minmax(0,1fr); }
  .analysis-donut { --diameter:92px; }
  .analysis-donut::before { inset:9px; }
}
@media (max-width:400px) {
  .analysis-distribution { grid-template-columns:1fr; }
  .analysis-progress-card { padding:8px; }
  .analysis-progress-card .analysis-legend li { gap:4px; }
}


body[data-viewer] :is(#exportFleet,#exportFromTable,#exportMonth,#exportDay,#exportVehicle) { display:none !important; }
