:root {
  --bg: #f1f5fa;
  --surface: #ffffff;
  --ink: #132a43;
  --muted: #5d7189;
  --soft: #667a91;
  --line: #e2e9f3;
  --line-strong: #cfdae8;
  --brand: #1b57c9;
  --brand-2: #2d7cf6;
  --brand-soft: #eaf2ff;
  --navy: #0d2036;
  --navy-2: #0a1726;
  --teal: #0d8873;
  --amber: #b26a00;
  --red: #b3262e;
  --green: #12805c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 36, 60, .08);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; width: 100%; height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid #6ba4ff; outline-offset: 2px; }
[hidden] { display: none !important; }

/* 侧栏 */
.sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, #0e2238 0%, #0a1726 100%);
  color: #d8e4f2;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #2d7cf6, #1b57c9);
  color: #fff;
  padding: 8px;
  box-shadow: 0 6px 18px rgba(45, 124, 246, .3);
}
.brand strong { display: block; color: #fff; font-size: 16px; letter-spacing: .04em; }
.brand small { display: block; color: #8fa6bd; font-size: 11px; letter-spacing: .08em; margin-top: 2px; }
.nav-label {
  margin: 0 0 8px; padding: 0 10px;
  font-size: 10.5px; letter-spacing: .16em; color: #7f94ab; font-weight: 700;
}
.nav-label.nav-inside { margin: 10px 0 4px; padding: 0 10px; font-size: 10px; }
#navigation { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: #b9c9da;
  text-align: left;
  font-size: 13.5px;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item[aria-current="page"] {
  background: rgba(70, 132, 240, .18);
  color: #fff;
  box-shadow: inset 3px 0 0 #6ba4ff;
}
.nav-icon { width: 20px; height: 20px; opacity: .9; }
.nav-count {
  min-width: 20px; padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #c7d7e8;
  font-size: 10.5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sidebar-foot {
  margin-top: auto; padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: flex; gap: 9px; align-items: flex-start;
}
.live-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #45d6a1; box-shadow: 0 0 0 3px rgba(69, 214, 161, .14); flex: none; }
.sidebar-foot strong { display: block; color: #dbe7f4; font-size: 12px; font-weight: 600; }
.sidebar-foot small { display: block; color: #8296ab; font-size: 10.5px; line-height: 1.5; }

/* 顶栏 */
main { grid-column: 2; grid-row: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 6;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(18px, 3vw, 40px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-left { min-width: 0; font-size: 12.5px; color: var(--muted); }
#management-path b { color: var(--ink); font-weight: 650; }
.crumb-sep { margin: 0 6px; color: #aab8c8; }
#driver-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); }
#driver-brand small { color: var(--soft); font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.driver-logo { color: var(--brand); font-size: 15px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar-notice {
  position: relative; display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid #d7e4f7; border-radius: 9px;
  background: #f4f8ff; color: #1b57c9;
}
.topbar-notice:hover { background: #eaf2ff; }
.topbar-notice[hidden] { display: none; }
.topbar-notice svg { width: 18px; height: 18px; }
.notice-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: #d94747; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(180, 36, 36, .22);
}
.notice-badge[hidden] { display: none; }
.dispatch-alert { margin-bottom: 12px; }
.dispatch-alert[hidden] { display: none; }
.dispatch-alert-main {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center;
  gap: 12px; width: 100%; padding: 12px 14px;
  border: 1px solid #17495a; border-radius: 14px;
  background: linear-gradient(125deg, #0d2c39, #124252);
  color: #fff; text-align: left;
  box-shadow: 0 8px 22px rgba(9, 35, 49, .16);
}
.dispatch-alert-main:hover { background: linear-gradient(125deg, #0f3442, #174e60); }
.dispatch-alert-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: #f59e42; color: #102d36;
}
.dispatch-alert-icon svg { width: 22px; height: 22px; }
.dispatch-alert-copy { min-width: 0; }
.dispatch-alert-copy strong { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: .01em; }
.dispatch-alert-copy small { display: block; margin-top: 3px; color: #aed4de; font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; }
.dispatch-alert-cta { color: #ffc078; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
#today { font-size: 11.5px; color: var(--soft); white-space: nowrap; }
.mode-link {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 6px 10px;
  border: 1px solid #d7e4f7;
  border-radius: 8px;
  background: #f4f8ff;
  color: var(--brand);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.mode-link:hover { background: #eaf2ff; }
.positions-link {
  border-color: #eedfc8;
  background: #fff9ef;
  color: #8d5a08;
}
.positions-link:hover { background: #fff2d9; }
.ghost {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 9px; border-radius: 8px; font-size: 12.5px;
}
.ghost:hover { background: #f1f5fa; color: var(--ink); }

.content {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 40px) 36px;
}

/* 主视觉 */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(24px, 3.2vw, 36px);
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(102, 173, 255, .5), transparent 42%),
    linear-gradient(118deg, #0e2c58 0%, #1b57c9 62%, #2b7af0 100%);
  box-shadow: 0 18px 42px rgba(21, 62, 133, .18);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .5;
  pointer-events: none;
}
.hero.hero-dashboard {
  min-height: 300px;
  padding: 76px clamp(26px, 3.2vw, 38px) 28px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: #eef4f8;
  box-shadow: 0 20px 48px rgba(8, 25, 44, .14);
  isolation: isolate;
  align-items: start;
  color: #0d2a41;
}
.hero-dashboard .hero-actions { align-self: end; }
.hero-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 22%; }
.hero.hero-dashboard::before { display: none; }
.hero.hero-dashboard::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 251, 255, .74) 0%, rgba(245, 251, 255, .5) 22%, rgba(245, 251, 255, .16) 34%, rgba(245, 251, 255, .03) 46%, rgba(245, 251, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 55%);
}
body:not(.driver-mode) .hero.hero-dashboard h1 { color: #0d2a41; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
body:not(.driver-mode) .hero.hero-dashboard .eyebrow { color: #147662; }
body:not(.driver-mode) .hero.hero-dashboard p { color: #173a52; font-weight: 600; max-width: 480px; text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 0 10px rgba(255, 255, 255, .55); }
body:not(.driver-mode) .hero-dashboard .hero-unit { color: #2b4f65; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
body:not(.driver-mode) .hero-dashboard .chip { background: rgba(255, 255, 255, .9); border-color: rgba(16, 45, 70, .14); color: #173a52; box-shadow: 0 2px 8px rgba(18, 45, 70, .06); }
body:not(.driver-mode) .hero.hero-dashboard .primary { background: #0f6b5a; color: #fff; box-shadow: 0 6px 16px rgba(10, 70, 58, .2); }
body:not(.driver-mode) .hero.hero-dashboard .primary:hover { background: #0b5a4c; }
body:not(.driver-mode) .hero.hero-dashboard .secondary { background: rgba(255, 255, 255, .86); border-color: rgba(15, 55, 80, .18); color: #173a52; box-shadow: 0 4px 14px rgba(18, 45, 70, .08); }
body:not(.driver-mode) .hero.hero-dashboard .secondary:hover { background: #fff; }
body.driver-mode .hero.hero-dashboard { color: #fff; }
.hero-brandline {
  position: absolute; z-index: 2; top: 25px; left: clamp(26px, 3.2vw, 38px); right: clamp(26px, 3.2vw, 38px);
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 38px;
}
.hero-brandline::after { display: none; }
.hero-unit {
  display: inline-flex; align-items: center; gap: 9px;
  color: #a9c1d6; font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
}
.hero-unit::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #63d4b5; box-shadow: 0 0 0 3px rgba(99, 212, 181, .12); }
.hero.hero-dashboard h1 { font-size: clamp(33px, 3.4vw, 44px); letter-spacing: .015em; }
.hero.hero-dashboard .eyebrow { color: #8fd7c2; letter-spacing: .2em; }
.hero.hero-dashboard p { color: #c7d5e2; max-width: 690px; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.eyebrow {
  display: block;
  margin: 0 0 7px;
  font-size: 10.5px; letter-spacing: .18em; font-weight: 700;
  text-transform: uppercase;
  color: #a9c6f5;
}
.hero h1 { margin: 0; font-size: clamp(28px, 3vw, 37px); line-height: 1.16; letter-spacing: .01em; font-weight: 750; }
.hero p { margin: 9px 0 0; max-width: 650px; color: #d5e4fb; font-size: 13.5px; line-height: 1.68; }
.signed-plate { color: #cfe0fb !important; font-size: 12.5px !important; font-weight: 600; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #eaf3ff;
  font-size: 11.5px;
  backdrop-filter: blur(4px);
}
.chip.warn { background: rgba(255, 190, 80, .18); border-color: rgba(255, 206, 128, .45); color: #ffe0a3; }
.hero-actions {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
  max-width: 400px;
}
.hero .primary, .hero .secondary { padding: 8px 11px; font-size: 12.5px; }
.hero .primary { background: #fff; color: #1648a5; }
.hero .primary:hover { background: #eaf2ff; }
.hero .secondary { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .38); color: #fff; }
.hero .secondary:hover { background: rgba(255, 255, 255, .22); }

/* 按钮 */
.primary, .secondary {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(27, 87, 201, .18); }
.primary:hover { background: #1649ab; }
.secondary { background: #fff; border-color: var(--line-strong); color: #33465e; }
.secondary:hover { border-color: #b4c9e2; background: #f8fbff; }
.ghost { cursor: pointer; }
.danger {
  min-height: 38px; padding: 8px 14px;
  border: 1px solid #e9b6ba; border-radius: 9px;
  background: #fff5f5; color: var(--red);
  font-size: 13px; font-weight: 600;
}
.danger:hover { background: #ffecec; }
.primary:disabled, .secondary:disabled, .danger:disabled { opacity: .55; cursor: wait; transform: none; }

/* 出车面板 */
.trip-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 16px; padding: 18px 22px;
  border-radius: 15px;
  background: linear-gradient(105deg, #0d6559, #0c8c78 70%, #12a48a);
  color: #fff;
  box-shadow: 0 14px 30px rgba(12, 107, 92, .2);
}
.trip-status { font-size: 10.5px; letter-spacing: .14em; font-weight: 700; color: #bff0e5; text-transform: uppercase; }
.trip-panel h2 { margin: 5px 0 0; font-size: 20px; font-weight: 700; }
.trip-panel p { margin: 5px 0 0; font-size: 12.5px; color: #d9f5ef; line-height: 1.6; }
.trip-side { display: flex; align-items: center; gap: 10px; flex: none; }
.trip-duration { padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .16); font-size: 11.5px; white-space: nowrap; }
.trip-panel .primary { background: #fff; color: #0a6b5b; box-shadow: none; white-space: nowrap; }

/* 指标 */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.metric {
  padding: 13px 16px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid #c5d3e6;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 36, 60, .035);
}
.metric.tone-brand { border-top-color: #2d7cf6; }
.metric.tone-teal { border-top-color: #12a086; }
.metric.tone-amber { border-top-color: #e09a22; }
.metric.tone-red { border-top-color: #d04a52; }
.metric.tone-slate { border-top-color: #a9b8cc; }
.metric-label { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.metric-value { display: flex; align-items: baseline; gap: 3px; margin: 5px 0 3px; }
.metric-value strong { font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.metric.tone-brand .metric-value strong { color: #1b57c9; }
.metric.tone-teal .metric-value strong { color: #0b7f6b; }
.metric.tone-amber .metric-value strong { color: #a86200; }
.metric.tone-red .metric-value strong { color: var(--red); }
.metric.tone-slate .metric-value strong { color: #33465e; }
.metric-unit { font-size: 11px; color: var(--soft); font-weight: 500; }
.metric-hint { display: block; font-size: 10.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 分类卡 */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: #c9d9ee; box-shadow: var(--shadow); }
.card[aria-pressed="true"] { border-color: #9fc0f2; background: #f5f9ff; box-shadow: 0 0 0 3px #dfebff; }
.icon-tile {
  width: 44px; height: 44px; padding: 11px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--brand);
  background: #eaf2ff;
}
.icon-tile.work { background: #e8f0ff; color: #215ab6; }
.icon-tile.training { background: #efe9ff; color: #6741ad; }
.icon-tile.maintenance { background: #fff1df; color: #975d05; }
.icon-tile.trip { background: #ddf5ee; color: #126b55; }
.icon-tile.fuel { background: #e2f2ff; color: #0b5f8f; }
.icon-tile.reimbursement { background: #ffe8f0; color: #9a2f57; }
.card-body { min-width: 0; }
.card-label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.card-sub { display: block; margin-top: 2px; font-size: 10.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-count { display: flex; align-items: baseline; gap: 2px; color: var(--muted); }
.card-count .count { font-size: 23px; font-weight: 800; color: #22384f; font-variant-numeric: tabular-nums; }
.card-count small { font-size: 10px; color: var(--soft); }

/* 面板与提醒 */
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 36, 60, .04);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 20px 14px; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.panel-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--soft); }

/* 司机管理 */
body.drivers-view .hero-actions,
body.drivers-view .trip-panel,
body.drivers-view .metrics,
body.drivers-view .cards,
body.drivers-view .reminders,
body.drivers-view .account-toolbar,
body.drivers-view .ledger,
body.drivers-view footer { display: none !important; }

.drivers-board { display: grid; gap: 16px; margin-top: 18px; }
.driver-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.driver-stat {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 36, 60, .04);
}
.driver-stat span { display: block; font-size: 11px; color: var(--soft); letter-spacing: .04em; }
.driver-stat strong { display: block; margin-top: 4px; font-size: 24px; line-height: 1.2; color: var(--ink); }
.driver-stat small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.driver-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.driver-directory { margin: 0; }
.driver-directory-head { align-items: flex-end; }
.driver-search { display: grid; gap: 5px; min-width: 210px; font-size: 10.5px; color: var(--soft); }
.driver-search input {
  width: 100%; height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  outline: none;
}
.driver-search input:focus { border-color: #8eb6f3; box-shadow: 0 0 0 3px rgba(45, 124, 246, .12); }
.driver-list { display: grid; gap: 10px; padding: 0 20px 20px; }
.driver-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}
.driver-card:hover { border-color: #c7d8ee; background: #f7faff; }
.driver-avatar {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: #e8f1ff; color: var(--brand);
  font-size: 17px; font-weight: 750;
}
.driver-copy { min-width: 0; }
.driver-name { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.driver-name strong { font-size: 15px; color: #162c46; }
.driver-name .pill { padding: 2px 8px; font-size: 10.5px; }
.driver-meta { display: block; margin-top: 2px; color: var(--soft); font-size: 11.5px; }
.driver-meta code { font-family: inherit; color: #47627f; }
.driver-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.driver-badges span {
  padding: 3px 8px; border-radius: 7px;
  background: #eef4fb; color: #4b6480; font-size: 10.5px;
}
.driver-badges .is-open { background: #fff3dc; color: #9a5d00; }
.driver-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 260px; }
.driver-actions button {
  padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; color: #496481; font-size: 10.5px;
}
.driver-actions button:hover { color: var(--brand); border-color: #9dbced; background: #f4f8ff; }
.driver-empty {
  grid-column: 1 / -1; padding: 36px 20px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted);
}
.driver-empty strong { display: block; margin-bottom: 4px; color: #31485f; }
.driver-create { margin: 0; position: sticky; top: 16px; }
.driver-create-form { display: grid; gap: 11px; padding: 0 20px 20px; }
.driver-create-form label { display: grid; gap: 5px; font-size: 11.5px; color: var(--soft); }
.driver-create-form input {
  width: 100%; height: 37px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  outline: none;
}
.driver-create-form input:focus { border-color: #8eb6f3; box-shadow: 0 0 0 3px rgba(45, 124, 246, .12); }
.form-hint { margin: 0; color: var(--soft); font-size: 10.5px; line-height: 1.5; }
.driver-edit-account {
  display: grid; gap: 2px; margin-bottom: 16px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #f7faff;
}
.driver-edit-account span { color: var(--soft); font-size: 11px; }
.driver-edit-account strong { font-size: 14px; color: #27425f; }
.driver-edit-account small { color: var(--muted); font-size: 10.5px; }

@media (max-width: 980px) {
  .driver-layout { grid-template-columns: minmax(0, 1fr); }
  .driver-create { position: static; }
  .driver-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .driver-card { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .driver-avatar { width: 40px; height: 40px; }
  .driver-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; padding-left: 53px; }
  .driver-directory-head { align-items: stretch; flex-direction: column; }
  .driver-search { min-width: 0; }
}

.pill { padding: 4px 10px; border-radius: 999px; background: #eef4ff; color: var(--brand); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pill.ok { background: #e7f7f0; color: #0d7656; }
.reminder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 20px 18px; }
.reminder {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.reminder:hover { background: #f6faff; border-color: #bdd2ed; }
.reminder-dot { width: 8px; height: 8px; border-radius: 50%; background: #a9b8cc; }
.reminder.tone-bad { background: #fff8f8; border-color: #f0cdd0; }
.reminder.tone-bad .reminder-dot { background: #d33a44; }
.reminder.tone-warn { background: #fffaf2; border-color: #efdbb8; }
.reminder.tone-warn .reminder-dot { background: #dd8f0b; }
.reminder.tone-info .reminder-dot { background: #2d7cf6; }
.reminder-copy { min-width: 0; }
.reminder-copy strong { display: block; font-size: 12.8px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-copy small { display: block; margin-top: 1px; font-size: 10.8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-action { font-size: 11px; color: var(--brand); white-space: nowrap; }
.reminder-empty { grid-column: 1 / -1; padding: 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 10px; }
.reminder-empty strong { display: block; font-size: 13px; color: #33465e; }
.reminder-empty p { margin: 3px 0 0; font-size: 11.5px; color: var(--soft); }

.account-toolbar { display: flex; gap: 8px; margin: 0 0 18px; }

/* 台账 */
.ledger {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 36, 60, .05);
  overflow: hidden;
}
.ledger-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 18px 20px 13px; }
.ledger-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ledger-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--soft); }
.ledger-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ledger-summary { font-size: 11px; color: var(--soft); white-space: nowrap; }
.scope-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px; }
.scope-tabs button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--muted); font-size: 12px; font-weight: 600;
}
.scope-tabs button:hover { border-color: #b7cce4; color: var(--ink); }
.scope-tabs button.is-active { background: var(--brand-soft); border-color: #a9c6f2; color: var(--brand); }
.scope-count {
  min-width: 19px; padding: 1px 6px;
  border-radius: 999px; background: #eef2f8; color: #63758c;
  font-size: 10.5px; font-variant-numeric: tabular-nums;
}
.scope-tabs button.is-active .scope-count { background: #dceaff; color: var(--brand); }
.ledger-actions .compact { min-height: 34px; padding: 6px 12px; font-size: 12px; box-shadow: none; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 0 20px 14px; }
.search-field { flex: 1 1 260px; min-width: 190px; }
.search-field input { width: 100%; }
.date-range { display: flex; align-items: flex-end; gap: 7px; }
.date-range label { width: 144px; }
.range-sep { padding-bottom: 11px; font-size: 11px; color: var(--soft); }
.quick-ranges { display: flex; align-items: center; gap: 6px; padding-bottom: 1px; flex-wrap: wrap; }
.quick-ranges button {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--muted);
  font-size: 11.5px;
}
.quick-ranges button:hover { border-color: #b7cce4; color: var(--ink); }
.quick-ranges button.is-active { background: #eaf2ff; border-color: #a9c6f2; color: var(--brand); font-weight: 650; }
.quick-ranges .text-button { border: 0; background: transparent; color: var(--brand); }
.filters label, .form-intro label, .field-grid label, .account-form label, .login-card label {
  display: grid; gap: 5px;
  font-size: 11.5px; font-weight: 650; color: #44576e;
}
input, select, textarea {
  width: 100%; min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 87, 201, .12); }
input:read-only { background: #f4f7fb; color: #52657c; }
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
select { padding-right: 8px; }
.error { margin: 0; padding: 0 20px 12px; color: var(--red); font-size: 12px; }
.dialog-body .error { padding: 0; }

.table-wrap { overflow-x: auto; overflow-y: visible; max-height: none; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
thead { position: sticky; top: 0; z-index: 2; }
th {
  padding: 9px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  color: #3c5068;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}
td { padding: 11px 16px; border-bottom: 1px solid #edf2f8; font-size: 12.8px; color: #24394f; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f8fbff; }
.cell-date { white-space: nowrap; color: #51647b; font-variant-numeric: tabular-nums; }
.cell-title { font-weight: 600; color: #1b3149; }
.cell-sub { display: block; margin-top: 1px; max-width: 320px; font-size: 10.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.due-cell { display: grid; gap: 2px; justify-items: start; white-space: nowrap; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.badge.work { background: #e8f0ff; color: #215ab6; }
.badge.training { background: #efe9ff; color: #6741ad; }
.badge.maintenance { background: #fff1df; color: #8b5608; }
.badge.maintenance.cold { background: #e7f0ff; color: #21508f; }
.badge.trip { background: #ddf5ee; color: #126b55; }
.badge.fuel { background: #edf8dd; color: #4d700f; }
.badge.reimbursement { background: #fdebf0; color: #a13856; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 650; white-space: nowrap; background: #f0f3f8; color: #63758c; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.status.tone-ok { background: #e6f6ef; color: #0d7656; }
.status.tone-info { background: #e9f1ff; color: #1b57c9; }
.status.tone-warn { background: #fff4e2; color: #9a5b00; }
.status.tone-bad { background: #ffecec; color: #b3262e; }
.status.tone-muted { background: #f0f3f8; color: #63758c; }
.inline-pill { margin-left: 6px; }
.text-button { padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--brand); font-size: 11.5px; font-weight: 600; }
.text-button:hover { background: var(--brand-soft); }
.empty { padding: 44px 18px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: #eef4ff; color: #6d9ad8; font-size: 21px; }
.empty strong { display: block; font-size: 15px; color: #33465e; }
.empty p { margin: 4px auto 0; max-width: 340px; font-size: 12px; color: var(--soft); line-height: 1.65; }
.ledger-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); background: #fbfcfe; font-size: 11px; color: var(--soft); }
.ledger-foot .secondary { min-height: 30px; padding: 4px 10px; font-size: 11.5px; }
.ledger-pager { display: flex; align-items: center; gap: 8px; }
.ledger-pager span { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
footer { padding: 18px 4px 0; color: var(--soft); font-size: 11px; line-height: 1.7; }

/* 对话框 */
dialog {
  padding: 0;
  border: 0;
  border-radius: 18px;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(8, 20, 38, .38);
  overflow: hidden;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(7, 17, 30, .55); backdrop-filter: blur(3px); }
#record-form, #review-form { display: flex; flex-direction: column; min-height: 0; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 24px 15px; border-bottom: 1px solid var(--line); flex: none; }
.dialog-kicker { margin: 0 0 4px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); font-weight: 700; }
.dialog-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.close { width: 34px; height: 34px; flex: none; border: 0; border-radius: 9px; background: #eef2f8; color: #44576e; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.close:hover { background: #e3e9f2; }
.dialog-body { padding: 17px 24px 20px; overflow: auto; display: grid; gap: 14px; min-height: 0; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; padding: 13px 24px; border-top: 1px solid var(--line); background: #fbfcfe; flex: none; }
.dialog-actions .danger { margin-right: auto; }
.form-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-field { align-self: end; }
.section-label { margin-top: 2px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid .wide { grid-column: 1 / -1; }
.field-caption { display: inline; }
.req { margin-left: 3px; color: var(--red); }
.field-grid.departure-fields label:has([name="arrival"]),
.field-grid.departure-fields label:has([name="endKm"]) { display: none; }
.field-grid.arrival-fields label:not(:has([name="arrival"])):not(:has([name="endKm"])):not(:has([name="incident"])):not(:has([name="notes"])) { display: none; }
.maintenance-files { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfe; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-head strong { font-size: 12.5px; }
.section-head small { font-size: 10.5px; color: var(--soft); line-height: 1.5; }
.file-drop { padding: 10px 12px; border: 1.5px dashed #c4d6ee; border-radius: 10px; background: #fff; font-size: 11.5px; color: #44576e; cursor: pointer; }
.file-drop input { margin-top: 6px; border: 0; padding: 0; min-height: 0; background: transparent; font-size: 11.5px; }
.attachment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attachment-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11.5px; }
.attachment-list a { color: var(--brand); text-decoration: none; word-break: break-all; }
.attachment-list a:hover { text-decoration: underline; }
.attachment-list small { color: var(--soft); font-size: 10.5px; }
.attachment-thumb { width: 44px; height: 36px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #f3f6fa; overflow: hidden; cursor: zoom-in; }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment-thumb:hover { border-color: var(--brand); }
.image-preview-dialog { width: min(980px, calc(100% - 32px)); }
.image-preview-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px; background: #f3f6fa; overflow: auto; }
.image-preview-body img { max-width: 100%; max-height: calc(100vh - 210px); object-fit: contain; border-radius: 8px; background: #fff; }
.detail-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border: 1px solid #e2ecfb; border-radius: 10px; background: #f7faff; font-size: 12px; color: #44576e; }
.detail-date { font-variant-numeric: tabular-nums; }
.detail-people { color: var(--muted); }
.detail-meta { color: var(--soft); }
.detail-economy { padding: 2px 9px; border-radius: 999px; background: #e2f6ef; color: #0b7f6b; font-weight: 600; }
dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 2px 0 0; }
dl .wide { grid-column: 1 / -1; }
dt { margin: 0 0 2px; font-size: 10.5px; color: var(--soft); }
dd { margin: 0; font-size: 12.8px; color: #24394f; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.detail-history { padding-top: 12px; border-top: 1px dashed var(--line); }
.detail-history h3 { margin: 0; font-size: 12.5px; font-weight: 650; color: #33465e; }
.history-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.history-list li { position: relative; padding-left: 12px; font-size: 11px; color: var(--muted); }
.history-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: #a9c0dd; }
.history-empty { margin: 6px 0 0; font-size: 11.5px; color: var(--soft); }
.accounts-list { display: grid; gap: 7px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; font-size: 12px; }
.account-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row .text-button { flex: none; }
.account-form { display: grid; gap: 10px; padding-top: 13px; border-top: 1px dashed var(--line); }
.account-form h3 { margin: 0; font-size: 14px; }
.profile-help { margin: 8px 0 0; font-size: 11px; color: var(--soft); line-height: 1.6; }

/* 登录 */
body:has(#login-shell:not([hidden])), body.login-active { display: block; background: #edf1f4; }
.login-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 84% -10%, rgba(39, 95, 126, .14), transparent 65%),
    linear-gradient(rgba(13, 32, 54, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 32, 54, .028) 1px, transparent 1px),
    #eef2f4;
  background-size: auto, 44px 44px, 44px 44px, auto;
}
.login-wrap {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  width: min(1080px, 100%);
  min-height: min(700px, calc(100vh - 48px));
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 34px 90px rgba(13, 32, 54, .16);
}
.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 4.6vw, 56px);
  color: #fff;
  background: linear-gradient(145deg, #091b29 0%, #0d2b40 55%, #123f5b 100%);
  overflow: hidden;
}
.login-aside::before {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  right: -260px; bottom: -310px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 150px rgba(255, 255, 255, .018);
}
.login-aside::after {
  content: "";
  position: absolute;
  top: 0; left: clamp(34px, 4.6vw, 56px);
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .12) 22%, rgba(255, 255, 255, .12) 78%, transparent);
  opacity: .55;
}
.login-brand, .login-copy, .login-capabilities { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand .brand-mark.large {
  width: 52px; height: 52px;
  margin: 0; padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: none;
}
.login-brand strong { display: block; color: #fff; font-size: 19px; letter-spacing: .12em; }
.login-brand small { display: block; margin-top: 4px; color: #89a6b8; font-size: 9.5px; letter-spacing: .22em; }
.login-copy { margin: auto 0; padding: 42px 0 38px; }
.login-copy .eyebrow { margin-bottom: 16px; color: #88a8ba; font-size: 9.5px; letter-spacing: .24em; }
.login-copy h2 {
  margin: 0 0 20px;
  max-width: 9em;
  color: #fff;
  font-size: clamp(38px, 4.8vw, 60px);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: .01em;
}
.login-copy > p:last-child { margin: 0; max-width: 430px; color: #a5b9c6; font-size: 13.5px; line-height: 1.9; }
.login-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
.login-capabilities strong { display: block; color: #e6eef3; font-size: 12px; letter-spacing: .05em; }
.login-capabilities span { display: block; margin-top: 7px; color: #7f9aab; font-size: 10px; line-height: 1.55; }
.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: clamp(38px, 4.8vw, 62px) clamp(30px, 4.6vw, 56px);
  background: #fff;
}
.login-mobile-brand { display: none; }
.login-card-head { margin-bottom: 34px; }
.login-card .eyebrow { margin: 0; color: #7b8d9b; font-size: 9.5px; font-weight: 700; letter-spacing: .2em; }
.login-card h1 { margin: 13px 0 9px; color: #10283a; font-size: clamp(25px, 2.5vw, 30px); line-height: 1.25; font-weight: 650; letter-spacing: .01em; }
.login-card-head p:last-child { margin: 0; color: #728492; font-size: 12.5px; line-height: 1.7; }
.login-field { display: grid; gap: 8px; margin: 0 0 18px; color: #435665; font-size: 12px; font-weight: 650; }
.login-card input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  background: #f9fafb;
  color: #142b3d;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.login-card input::placeholder { color: #9aa8b3; }
.login-card input:focus { border-color: #16415c; background: #fff; box-shadow: 0 0 0 4px rgba(22, 65, 92, .08); }
.login-card .error { margin: -4px 0 14px; padding: 0; color: #b3262e; font-size: 11.5px; }
.login-card .primary.block {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 52px;
  margin: 4px 0 0; padding: 0 18px;
  border-radius: 10px;
  background: #0e2a3d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(14, 42, 61, .2);
}
.login-card .primary.block:hover { background: #163e57; }
.login-card .primary.block svg { width: 19px; height: 19px; flex: none; }
.login-security { display: flex; align-items: flex-start; gap: 9px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf1f4; color: #7c8d9a; font-size: 10.5px; line-height: 1.65; }
.login-security svg { width: 15px; height: 15px; margin-top: 1px; flex: none; color: #8ea0ad; }
.login-foot { margin: 24px 0 0; color: #a1adb7; font-size: 9.5px; letter-spacing: .08em; text-align: center; }

/* 提示 */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  max-width: min(420px, calc(100% - 32px));
  margin: 0; padding: 11px 15px;
  border-radius: 10px;
  background: #0d2036;
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 14px 38px rgba(8, 20, 38, .3);
}

/* 司机端 */
body.driver-mode { display: block; }
body.driver-mode .sidebar {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  height: auto; padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 24px rgba(15, 35, 60, .08);
  backdrop-filter: blur(14px);
}
body.driver-mode .brand,
body.driver-mode .nav-label,
body.driver-mode .sidebar-foot { display: none; }
body.driver-mode #navigation { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 720px; margin: 0 auto; }
body.driver-mode .nav-item { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 3px; min-width: 0; padding: 8px 2px 5px; min-height: 64px; color: #566b82; font-size: 10.5px; border-radius: 8px; }
body.driver-mode .nav-item[aria-current="page"] { background: #eef4ff; color: var(--brand); box-shadow: none; }
body.driver-mode .nav-icon { width: 28px; height: 28px; }
body.driver-mode .nav-text { font-size: 10.5px; white-space: nowrap; }
body.driver-mode .nav-count { display: none; }
body.driver-mode .content { width: min(100%, 900px); margin: 0 auto; padding: 15px 16px 96px; }
body.driver-mode .topbar { padding: 0 16px; height: 56px; }
body.driver-mode #today { display: none; }
body.driver-mode .hero { padding: 21px; border-radius: 17px; grid-template-columns: 1fr; gap: 16px; background: radial-gradient(circle at 90% 0%, rgba(61, 214, 184, .35), transparent 42%), linear-gradient(125deg, #0c2b3f, #0d6b60 65%, #0f8f78); }
body.driver-mode .hero.hero-dashboard { min-height: 0; border-color: transparent; padding: 21px; }
body.driver-mode .hero-dashboard .hero-brandline { display: none; }
body.driver-mode .hero-dashboard .hero-backdrop,
body.driver-mode .hero.hero-dashboard::after { display: none; }
body.driver-mode .hero h1 { font-size: 25px; }
body.driver-mode .hero p { font-size: 12.5px; }
body.driver-mode .hero-actions { justify-content: flex-start; max-width: none; }
body.driver-mode .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0; }
body.driver-mode .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
body.driver-mode .card { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 11px; gap: 9px; }
body.driver-mode .icon-tile { width: 38px; height: 38px; padding: 9px; border-radius: 10px; }
body.driver-mode .card-count .count { font-size: 19px; }
body.driver-mode .trip-panel { margin-top: 13px; padding: 16px 17px; }
body.driver-mode .reminder-grid { grid-template-columns: 1fr; }
body.driver-mode .ledger { margin-top: 13px; }
body.driver-mode .toast { bottom: 92px; }
body.driver-mode .table-wrap { max-height: none; border-top: 0; overflow: visible; }
body.driver-mode table { display: block; min-width: 0; }
body.driver-mode thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.driver-mode tbody { display: grid; gap: 9px; padding: 0 12px 8px; }
body.driver-mode tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(16, 36, 60, .035); }
body.driver-mode td { padding: 0; border: 0; font-size: 12px; }
body.driver-mode td:nth-child(2) { grid-column: 1; grid-row: 1; align-self: center; }
body.driver-mode td:nth-child(3) { grid-column: 2; grid-row: 1; min-width: 0; }
body.driver-mode td:nth-child(3) .cell-title { display: block; font-size: 13px; }
body.driver-mode td:nth-child(3) .cell-sub { max-width: none; }
body.driver-mode td:nth-child(5) { grid-column: 3; grid-row: 1 / 3; align-self: center; }
body.driver-mode td:nth-child(1) { grid-column: 1; grid-row: 2; color: var(--soft); font-size: 10.5px; }
body.driver-mode td:nth-child(4) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 10.5px; }
body.driver-mode tbody tr:hover td { background: transparent; }
body.driver-mode .ledger { background: transparent; border: 0; box-shadow: none; overflow: visible; }
body.driver-mode .ledger-head { padding: 13px 2px 8px; }
body.driver-mode .filters { padding: 0 2px 11px; }
body.driver-mode .ledger-foot { padding: 8px 2px 0; border: 0; background: transparent; }
body.driver-mode .empty { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 12px 8px; }

/* 响应式：管理端窄屏 */
@media (max-width: 1500px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .metrics, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body:not(.driver-mode) { display: block; }
  body:not(.driver-mode) .sidebar {
    position: static; height: auto; padding: 10px 12px;
    background: linear-gradient(90deg, #0d2036, #12325c);
  }
  body:not(.driver-mode) .brand { padding: 0; margin-right: 14px; float: left; }
  body:not(.driver-mode) .brand small, body:not(.driver-mode) .nav-label, body:not(.driver-mode) .sidebar-foot { display: none; }
  body:not(.driver-mode) #navigation { flex-direction: row; overflow-x: auto; gap: 2px; padding: 2px 0; }
  body:not(.driver-mode) .nav-item { display: inline-flex; align-items: center; width: auto; flex: none; min-height: 42px; padding: 7px; font-size: 11.5px; white-space: nowrap; }
  body:not(.driver-mode) .nav-icon { display: none; }
  body:not(.driver-mode) .nav-item[aria-current="page"] { box-shadow: inset 0 -2px 0 #6ba4ff; }
  body:not(.driver-mode) .nav-count { display: none; }
  body:not(.driver-mode) .topbar { height: 56px; }
  body:not(.driver-mode) #today { display: none; }
  body:not(.driver-mode) .content { padding: 16px; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .hero.hero-dashboard { min-height: 252px; padding: 68px 22px 22px; }
  .hero.hero-dashboard::after { background: linear-gradient(90deg, rgba(248, 252, 255, .9) 0%, rgba(248, 252, 255, .8) 30%, rgba(248, 252, 255, .5) 46%, rgba(248, 252, 255, .14) 58%, rgba(248, 252, 255, .02) 70%, rgba(248, 252, 255, 0) 82%); }
  .hero-brandline { display: none; }
  .hero-dashboard .hero-copy { max-width: 100%; }
  .hero-backdrop img { object-position: 30% 22%; }
  .hero-actions { justify-content: flex-start; max-width: none; }
  .ledger-head { flex-direction: column; align-items: flex-start; }
  .ledger-actions { justify-content: flex-start; }
  .filters { padding: 0 16px 12px; }
  .search-field { flex: 1 1 100%; }
  .date-range { flex: 1 1 100%; }
  .date-range label { flex: 1; width: auto; }
  .quick-ranges { padding-bottom: 0; }
  dialog { width: calc(100% - 20px); max-height: calc(100% - 20px); }
  .dialog-head, .dialog-body, .dialog-actions { padding-left: 18px; padding-right: 18px; }
  .field-grid, .form-intro, dl { grid-template-columns: 1fr; }
  .login-shell { padding: 16px; }
  .login-wrap { grid-template-columns: 1fr; width: min(480px, 100%); min-height: 0; border-radius: 20px; }
  .login-aside { display: none; }
  .login-card { padding: 34px 26px 30px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
  .login-mobile-brand .brand-mark { width: 42px; height: 42px; padding: 9px; border-radius: 11px; background: #0e2a3d; box-shadow: none; }
  .login-mobile-brand strong { display: block; color: #10283a; font-size: 16px; letter-spacing: .08em; }
  .login-mobile-brand small { display: block; margin-top: 2px; color: #8d9ba6; font-size: 9px; letter-spacing: .16em; }
  .login-card-head { margin-bottom: 26px; }
  .login-card h1 { font-size: 24px; }
  .login-foot { display: none; }
}
@media (max-width: 560px) {
  .topbar-actions .mode-link { display: none; }
  .topbar-actions .positions-link { display: inline-flex; padding: 5px 8px; font-size: 11px; }
  .topbar-actions #today { display: none; }
  body.driver-mode .topbar { padding: 0 10px; gap: 8px; }
  body.driver-mode .topbar-actions { gap: 6px; }
  body.driver-mode #driver-brand small { display: none; }
  body.driver-mode .topbar-notice { width: 32px; height: 32px; }
  body.driver-mode .dispatch-alert-main { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 11px 12px; }
  body.driver-mode .dispatch-alert-icon { width: 38px; height: 38px; }
  body.driver-mode .dispatch-alert-cta { display: none; }
  .hero h1 { font-size: 24px; }
  .hero.hero-dashboard { min-height: 220px; padding: 44px 20px 20px; }
  .hero.hero-dashboard h1 { font-size: 30px; }
  .hero-brandline { display: none; }
  .hero-backdrop img { object-position: 30% 22%; }
  body.driver-mode .trip-panel { flex-direction: column; align-items: flex-start; gap: 13px; }
  body.driver-mode .trip-side { width: 100%; justify-content: space-between; }
  body.driver-mode .trip-panel h2 { font-size: 19px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  body.driver-mode .hero-actions .primary:last-child { grid-column: 1 / -1; }
  .metrics { gap: 8px; }
  .metric { padding: 11px 12px; }
  .metric-value strong { font-size: 22px; }
  .metric-hint { white-space: normal; }
  .cards { gap: 8px; }
  .card { grid-template-columns: 36px minmax(0, 1fr); padding: 10px; }
  .card-count { display: none; }
  .ledger-summary { display: none; }
  .date-range { flex-wrap: wrap; }
  .range-sep { display: none; }
  .date-range label { flex: 1 1 46%; }
  .quick-ranges { width: 100%; }
  .ledger-foot { flex-wrap: wrap; }
  .ledger-pager { width: 100%; justify-content: flex-end; }
  .detail-summary { font-size: 11px; }
  .dialog-actions .primary, .dialog-actions .secondary { flex: 1; }
  .dialog-actions .danger { width: 100%; margin-right: 0; }
}
@media print {
  .sidebar, .topbar, .hero-actions, .filters, .ledger-foot, .trip-panel, .metrics, .cards, .reminders, footer { display: none !important; }
  .hero-backdrop { display: none !important; }
  body { display: block; background: #fff; }
  .content { max-width: none; padding: 0; }
  .hero { color: #000; background: #fff; box-shadow: none; }
  .hero p, .hero h1 { color: #000; }
  .ledger { border: 0; box-shadow: none; }
  .table-wrap { max-height: none; overflow: visible; }
}
