/* ============ 车辆管理系统 · 样式（离线自包含，无外部依赖） ============ */
:root {
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --blue-l: #eff4ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e8edf5;
  --bg: #f4f7fb;
  --card: #ffffff;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #7c3aed;
  --cyan: #06b6d4;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
svg.ico { width: 20px; height: 20px; flex: none; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: 244px;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #0b1324 0%, #101c36 55%, #0d1730 100%);
  color: #e2e8f0;
  display: flex; flex-direction: column;
  z-index: 40;
}

.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .45);
}
.brand__mark .ico { width: 22px; height: 22px; }
.brand__name { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand__sub { font-size: 11px; color: #94a3b8; letter-spacing: .5px; }

.sidebar__nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: #cbd5e1; font-size: 13.5px;
  transition: background .16s, color .16s, transform .16s;
}
.nav__item .ico { width: 18px; height: 18px; opacity: .85; }
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item.is-active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}
.nav__item.is-active .ico { opacity: 1; }
.nav__badge {
  margin-left: auto; font-style: normal; font-size: 11px;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 9px; background: #ef4444; color: #fff;
  display: grid; place-items: center;
}

.sidebar__foot { padding-top: 14px; }
.sidebar__tip {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px; padding: 10px 12px;
}
.sidebar__tip .ico { width: 22px; height: 22px; color: #38bdf8; }
.sidebar__tip strong { display: block; font-size: 12.5px; color: #e2e8f0; }
.sidebar__tip span { font-size: 11px; color: #94a3b8; }

/* ---------------- 布局 ---------------- */
.shell { margin-left: 244px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 72px; padding: 0 26px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
}
.topbar__title { flex: 1; min-width: 0; }
.topbar__title h1 { margin: 0; font-size: 19px; letter-spacing: .3px; }
.topbar__title p { margin: 0; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }

.topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar__search {
  display: flex; align-items: center;
  background: #f3f6fb; border: 1px solid var(--line);
  border-radius: 22px; padding: 0 6px 0 14px; height: 38px;
}
.topbar__search input {
  border: 0; background: transparent; outline: none;
  width: 190px; font-size: 13px; color: var(--ink);
}
.topbar__search button {
  border: 0; background: transparent; color: var(--muted);
  width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
}
.topbar__search .ico { width: 17px; height: 17px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--ink-2);
  cursor: pointer; transition: .16s;
}
.icon-btn:hover { border-color: #c9d7f2; color: var(--blue); background: var(--blue-l); }
.icon-btn .ico { width: 18px; height: 18px; }

.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #93c5fd, #2563eb);
  color: #fff; font-weight: 700; display: grid; place-items: center;
}
.user-chip__meta strong { display: block; font-size: 13px; line-height: 1.2; }
.user-chip__meta span { font-size: 11px; color: var(--muted); }
.user-chip__out { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.user-chip__out:hover { color: var(--red); background: #fef2f2; }
.user-chip__out .ico { width: 17px; height: 17px; }

.menu-btn { display: none; }

.main { flex: 1; padding: 24px 26px 8px; }
.footer {
  padding: 16px 26px 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  color: #94a3b8; font-size: 11.5px;
}

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.card__head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card__head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

.section-gap { margin-bottom: 18px; }

.flash {
  margin-bottom: 16px; padding: 12px 16px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; border: 1px solid;
}
.flash--ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.flash--err { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.flash--warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.flash__close { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: inherit; opacity: .6; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: .16s; white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn--primary { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, .28); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: #c9d7f2; color: var(--blue); background: var(--blue-l); }
.btn--danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.btn--danger:hover { background: #fee2e2; }
.btn--success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  height: 38px; padding: 0 12px;
  border: 1px solid #dbe4f3; border-radius: 10px;
  background: #fbfdff; font-size: 13.5px; color: var(--ink);
  font-family: inherit; outline: none; transition: .16s;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #93b4f7; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.field input[type=checkbox], .field input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); }
.field .check-line { display: flex; align-items: center; gap: 8px; height: 38px; font-size: 13px; color: var(--ink-2); }
.req { color: var(--red); }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: #f8fafd; padding: 11px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 14px; border-bottom: 1px solid #f1f5fb; vertical-align: middle; }
table.data tr:hover td { background: #f9fbff; }
table.data td.actions { white-space: nowrap; }
table.data .muted { color: var(--muted); font-size: 12px; }
.empty { padding: 42px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--green { color: #047857; background: #ecfdf5; }
.badge--blue { color: #1d4ed8; background: #eff6ff; }
.badge--orange { color: #b45309; background: #fffbeb; }
.badge--red { color: #b91c1c; background: #fef2f2; }
.badge--gray { color: #5b6779; background: #f1f5f9; }
.badge--indigo { color: #4338ca; background: #eef2ff; }
.badge--amber { color: #a16207; background: #fef9c3; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f1f5f9; color: var(--muted); font-size: 11.5px; }

/* 统计卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .07), transparent 70%);
}
.kpi__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; color: #fff; flex: none;
}
.kpi__icon .ico { width: 22px; height: 22px; }
.kpi__icon--blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.kpi__icon--green { background: linear-gradient(135deg, #34d399, #059669); }
.kpi__icon--amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.kpi__icon--violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.kpi__meta { min-width: 0; }
.kpi__label { font-size: 12.5px; color: var(--muted); }
.kpi__value { font-size: 26px; font-weight: 700; line-height: 1.25; letter-spacing: -.5px; }
.kpi__value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi__foot { font-size: 11.5px; color: #94a3b8; }

/* 两栏布局 */
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.cols--wide { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }

/* 环形图（纯 CSS 圆锥渐变） */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut {
  width: 148px; height: 148px; border-radius: 50%;
  position: relative; flex: none;
  display: grid; place-items: center;
}
.donut__hole {
  width: 96px; height: 96px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; text-align: center;
  box-shadow: inset 0 0 0 1px #f1f5f9;
}
.donut__hole strong { font-size: 22px; display: block; line-height: 1.1; }
.donut__hole span { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 9px; min-width: 120px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend__dot { width: 9px; height: 9px; border-radius: 50%; }
.legend__item span { color: var(--ink-2); }
.legend__item b { margin-left: auto; font-weight: 700; }

/* 柱状图 */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 168px; padding: 6px 2px 0; }
.bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars__bar {
  width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  min-height: 6px; position: relative; transition: .2s;
}
.bars__bar:hover { filter: brightness(1.08); }
.bars__bar span {
  position: absolute; top: -19px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--ink-2); font-weight: 600;
}
.bars__label { font-size: 11.5px; color: var(--muted); }

/* 车辆卡片 */
.vehicle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.vehicle-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s;
  display: flex; flex-direction: column;
}
.vehicle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d7e3f7; }
.vehicle-card__media { position: relative; background: #f1f6ff; }
.vehicle-card__media .car-svg { display: block; width: 100%; height: auto; }
.vehicle-card__plate {
  position: absolute; left: 12px; top: 10px;
  background: rgba(15, 23, 42, .82); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 9px; border-radius: 7px;
}
.vehicle-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.vehicle-card__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vehicle-card__title strong { font-size: 14px; }
.vehicle-card__title em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.vehicle-card__meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.vehicle-card__meta b { color: var(--ink-2); font-weight: 600; }
.fuel-bar { height: 6px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.fuel-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #34d399, #10b981); }
.fuel-bar.low i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.fuel-bar.min i { background: linear-gradient(90deg, #f87171, #ef4444); }

/* 方向：清单 */
.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f1f5fb; }
.feed__item:last-child { border-bottom: 0; }
.feed__time { width: 62px; flex: none; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.feed__time b { display: block; font-size: 13px; color: var(--ink-2); }
.feed__main { flex: 1; min-width: 0; }
.feed__title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.feed__sub { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.feed__side { flex: none; align-self: center; }

/* 流程时间线 */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl__item { display: flex; gap: 14px; }
.tl__rail { width: 26px; flex: none; display: flex; flex-direction: column; align-items: center; }
.tl__dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: #eef2f8; color: var(--muted); flex: none;
}
.tl__dot--ok { background: #ecfdf5; color: #059669; box-shadow: inset 0 0 0 1px #a7f3d0; }
.tl__dot--no { background: #fef2f2; color: #dc2626; box-shadow: inset 0 0 0 1px #fecaca; }
.tl__dot--cur { background: #eff6ff; color: #1d4ed8; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.tl__line { width: 2px; flex: 1; background: #eef2f8; margin: 4px 0; min-height: 18px; }
.tl__content { padding-bottom: 18px; flex: 1; }
.tl__title { font-size: 13.5px; font-weight: 600; }
.tl__meta { font-size: 12px; color: var(--muted); }
.tl__comment { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); background: #f8fafd; border-radius: 9px; padding: 8px 11px; }

/* 详情两列 */
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
.detail-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail { display: flex; flex-direction: column; gap: 2px; }
.detail__label { font-size: 11.5px; color: var(--muted); }
.detail__value { font-size: 13.5px; font-weight: 600; word-break: break-word; }

/* 标签栏 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; border-radius: 9px; font-size: 12.5px;
  background: #f3f6fb; color: var(--ink-2); border: 1px solid transparent;
}
.tab:hover { background: #eaf1ff; color: var(--blue); }
.tab.is-active { background: #fff; color: var(--blue); border-color: #c7dafc; font-weight: 600; box-shadow: var(--shadow-sm); }
.tab em { font-style: normal; margin-left: 4px; color: var(--muted); font-size: 11px; }

/* 筛选栏 */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; padding: 0 11px; font-size: 12.5px; color: var(--ink); outline: none;
  font-family: inherit;
}
.filters input:focus, .filters select:focus { border-color: #a9c4f6; }
.filters .spacer { flex: 1; }

/* 时间选择 */
.quick-time { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.quick-time button {
  border: 1px solid var(--line); background: #f8fafd; border-radius: 8px;
  padding: 4px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.quick-time button:hover { border-color: #c7dafc; color: var(--blue); background: #eff6ff; }

/* 进度条（车辆使用率） */
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter__head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.meter__head b { font-weight: 700; }
.meter__track { height: 8px; background: #eef2f8; border-radius: 8px; overflow: hidden; }
.meter__bar { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #60a5fa, #2563eb); }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; align-items: center; }
.pager__btn {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  display: grid; place-items: center; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.pager__btn.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pager__dot { color: var(--muted); padding: 0 2px; }

/* 登录页 */
.login-body {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  background: #0b1324;
}
.login-visual {
  position: relative; padding: 54px 60px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, .25), transparent 50%),
    linear-gradient(160deg, #0b1324, #101c36 60%, #0a1120);
  color: #e2e8f0; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.login-visual::after {
  content: ''; position: absolute; right: -80px; bottom: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  border: 1px solid rgba(148, 197, 255, .25);
  box-shadow: 0 0 0 40px rgba(148, 197, 255, .06), 0 0 0 90px rgba(148, 197, 255, .03);
}
.login-visual h2 { font-size: 40px; margin: 0 0 12px; letter-spacing: 2px; line-height: 1.25; }
.login-visual .slogan { color: #93b4dc; letter-spacing: 3px; font-size: 13px; }
.login-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 34px; max-width: 520px; }
.login-feature { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 13px; padding: 13px 15px; }
.login-feature strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.login-feature span { font-size: 11.5px; color: #9fb3cc; }
.login-panel { background: #fff; display: grid; place-items: center; padding: 40px 32px; }
.login-card { width: 100%; max-width: 362px; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-card p.sub { color: var(--muted); font-size: 12.5px; margin: 0 0 26px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { height: 44px; font-size: 14px; margin-top: 8px; }
.demo-accounts { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; font-size: 11.5px; color: var(--muted); }
.demo-accounts b { color: var(--ink-2); }
.demo-accounts code { background: #f3f6fb; border-radius: 5px; padding: 1px 5px; color: #334155; }

/* 响应式 */
@media (max-width: 1400px) {
  .vehicle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols--wide { grid-template-columns: minmax(0, 1fr); }
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sidebar.is-open { transform: none; }
  .shell { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar__search { display: none; }
  .topbar__title p { display: none; }
  .main { padding: 16px 14px 6px; }
  .form-grid, .form-grid--3, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .login-body { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .vehicle-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi__value { font-size: 22px; }
  .user-chip__meta { display: none; }
  .footer { padding: 14px; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .bars { gap: 8px; }
  table.data { font-size: 12.5px; }
  table.data th, table.data td { padding: 9px 10px; }
}

.drawer-mask {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 35;
}
.drawer-mask.is-open { display: block; }

/* ============ 补充组件（列表/图表/时间线等） ============ */
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.text-danger { color: var(--red); font-weight: 600; }
.text-warn { color: var(--amber); font-weight: 600; }
.text-strong { color: var(--ink); font-weight: 700; }
.kpi__icon--red { background: #fef2f2; color: var(--red); }

.card__foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfdff; border-radius: 0 0 var(--radius) var(--radius); }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input, .filter-bar .btn { height: 34px; }
.filter-bar input[type="month"], .input-search {
  border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff; font-size: 13px;
  color: var(--ink-2); outline: none; font-family: inherit;
}
.input-search { min-width: 220px; }
.filter-bar select { border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font-size: 13px; color: var(--ink-2); outline: none; font-family: inherit; }

.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row__label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.bar-row__label em { display: block; font-style: normal; color: var(--muted); font-weight: 400; font-size: 11px; }
.bar-row__track { height: 10px; border-radius: 999px; background: #eef2f9; overflow: hidden; }
.bar-row__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #60a5fa, var(--blue)); transition: width .3s ease; }
.bar-row__value { text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink); }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list__no { width: 20px; height: 20px; border-radius: 6px; background: #f1f5f9; color: var(--muted); font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.rank-list li:nth-child(1) .rank-list__no { background: #eff4ff; color: var(--blue); }
.rank-list__name { flex: 1; color: var(--ink); font-weight: 600; }
.rank-list__val { color: var(--muted); font-size: 12.5px; }

.inline-finish { display: inline-flex; align-items: center; gap: 6px; }
.inline-finish input { width: 96px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 12.5px; outline: none; font-family: inherit; }
.inline-finish input:focus { border-color: #bfd3fb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }

@media (max-width: 620px) {
  .bar-row { grid-template-columns: 76px minmax(0, 1fr) 76px; gap: 8px; }
  .filter-bar { width: 100%; }
  .input-search { min-width: 0; flex: 1; }
}

/* ============ 报表图表补充 ============ */
.chart-legend { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bars--tall { height: 208px; }
.bars__pair { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: calc(100% - 20px); width: 100%; }
.bars__bar--light { background: linear-gradient(180deg, #dbeafe, #c7dbfd); }
.legend__name { color: var(--ink-2); }
.legend__val { margin-left: auto; font-weight: 700; color: var(--ink); font-size: 12px; }
.data--compact th, .data--compact td { padding: 7px 8px; font-size: 12px; white-space: nowrap; }

/* ============ 流程预览 / 开关 ============ */
.flow-preview { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; background: #f8fbff; border: 1px dashed #cfdcf2; border-radius: 12px; }
.flow-preview__node { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.flow-preview__node.is-off { opacity: .55; text-decoration: line-through; }
.flow-preview__node--end { background: #ecfdf5; border-color: #bbe9d3; color: #047857; font-weight: 600; }
.flow-preview__arrow { color: #a9bcd8; font-size: 13px; }
.switch-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); height: 36px; cursor: pointer; }
.switch-inline input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

/* 零值柱状：不显示占位短条 */
.bars__bar.is-zero { min-height: 0; height: 0 !important; background: transparent; }

/* 移动端兜底：避免极窄屏横向溢出 */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
.main, .card, .kpi { min-width: 0; }
@media (max-width: 480px) {
  .kpi { padding: 12px 14px; gap: 10px; }
  .kpi__icon { width: 38px; height: 38px; }
  .kpi__value { font-size: 20px; }
  .card__head { padding: 12px 14px; }
}

.kpi-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .kpi-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .kpi-grid--3 { grid-template-columns: minmax(0, 1fr); } }
