/* 车序 Carflow · 简洁操作台
   面向不熟悉电脑的租车行老板与店员：大按钮、大字、少选项、每步一句话说明 */
:root {
  /* --brand 用作白字底色（主按钮/选中导航），对比度必须 >=4.5:1，不能再浅 */
  --brand: #076b5b;
  --brand-dark: #054a3f;
  --brand-soft: #e6f4f1;
  --ink: #17252b;
  --ink-2: #4a5b63;
  --ink-3: #5c6b72;
  --muted: #5c6b72;
  --line: #e3e9ec;
  --bg: #f5f7f8;
  --card: #ffffff;
  /* 字色都按 WCAG AA（>=4.5:1）挑过：浅底上的小字不能糊 */
  --ok: #0d6b4d; --ok-soft: #e3f5ec;
  --warn: #7a5312; --warn-soft: #fdf3e2;
  --danger: #c0392b; --danger-soft: #fdeceb;
  --info: #1d4ed8; --info-soft: #e8effd;
  /* 全站一套语义色：一个意思永远一个颜色（全部压到白字 AA 4.5:1 以上，排期条/标签直接可用） */
  --c-free: #15803d;   /* 空闲 / 可租 / 好 */
  --c-book: #1d4ed8;   /* 未来承诺：已预订、待签 */
  --c-rent: #0e7490;   /* 正在占用：在租中 */
  --c-late: #dc2626;   /* 异常：逾期、欠款 */
  --c-stop: #6b7280;   /* 停滞：维修、取消 */
  --c-peer: #c2410c;   /* 同行相关 */
  --c-aff: #7c3aed;    /* 挂靠 */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,40,50,.06), 0 6px 18px rgba(20,40,50,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #eaf4f2 0%, #f5f7f8 60%); }
.login-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 36px 32px; }
.login-card .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-card .logo .mark { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.login-card .logo b { font-size: 20px; display: block; }
.login-card .logo span { font-size: 13px; color: var(--ink-3); }
.login-title { font-size: 22px; margin-bottom: 6px; }
.login-sub { color: var(--ink-3); font-size: 14px; margin-bottom: 24px; }
.login-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.login-role button { padding: 14px 10px; border: 2px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.login-role button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.login-hint { margin-top: 18px; font-size: 13px; color: var(--ink-3); background: #f7f9fa; border-radius: 10px; padding: 12px 14px; line-height: 1.8; }
.login-hint b { color: var(--ink); }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #123039; color: #cfe3e0; display: flex; flex-direction: column; flex: 0 0 210px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; }
.sidebar .brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; font-weight: 800; }
.sidebar .brand b { font-size: 16px; }
.sidebar .brand small { display: block; font-size: 11px; color: #7fa39c; font-weight: 400; }
.nav { padding: 8px 10px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 11px; color: #b9d2ce; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: var(--brand); color: #fff; }
.nav a .ico { width: 20px; text-align: center; font-size: 17px; }
.nav .badge-n { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; }
.sidebar .foot { padding: 14px; font-size: 12px; color: #7fa39c; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .foot .me { color: #fff; font-weight: 600; font-size: 14px; }
.sidebar .foot button { margin-top: 10px; width: 100%; background: rgba(255,255,255,.08); border: 0; color: #b9d2ce; padding: 9px; border-radius: 9px; cursor: pointer; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 26px; display: flex; align-items: center; gap: 14px; }
.topbar h1 { font-size: 19px; }
.topbar .sub { font-size: 13px; color: var(--ink-3); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 24px 26px 60px; flex: 1; }

/* ---------- 通用块 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card > h3 { font-size: 16px; margin-bottom: 4px; }
.card .desc { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* 大按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; font-size: 15px; }
.btn:hover { background: #f3f6f7; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.big { padding: 18px 26px; font-size: 17px; border-radius: 14px; width: 100%; }
.btn.danger { color: var(--danger); border-color: #f2c9c5; background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

/* 首页待办大卡片 */
.todo { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 1100px) { .todo { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .todo { grid-template-columns: 1fr; } }
.todo .item { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; cursor: pointer; border: 2px solid transparent; transition: .15s; }
.todo .item:hover { border-color: var(--brand); transform: translateY(-2px); }
.todo .item .n { font-size: 34px; font-weight: 800; line-height: 1.1; }
.todo .item .t { font-size: 15px; font-weight: 600; margin-top: 4px; }
.todo .item .h { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.todo .item.red .n { color: var(--danger); }
.todo .item.amber .n { color: var(--warn); }
.todo .item.green .n { color: var(--ok); }

/* 快捷入口 */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 720px) { .quick { grid-template-columns: 1fr; } }
.quick a { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 12px; padding: 16px 18px; font-weight: 700; font-size: 16px; }
.quick a span { font-size: 22px; }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .l { font-size: 13px; color: var(--ink-3); }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 2px; }
.stat .f { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat.good .v { color: var(--ok); }
.stat.warn .v { color: var(--warn); }
.stat.bad .v { color: var(--danger); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #f0f4f5; vertical-align: middle; }
tbody tr:hover { background: #fafcfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* 标签 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: #eef2f4; color: var(--ink-2); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.blue { background: var(--info-soft); color: var(--info); }
.tag.gray { background: #eef2f4; color: var(--ink-3); }
.tag.cyan { background: #e0f4f8; color: #076d80; }
.tag.orange { background: #fff1e7; color: #9a4a08; }
.tag.purple { background: #f3ecfe; color: #6d28d9; }
/* 合同状态色（与车辆状态共用同一套语义） */
.tag.state-pending { background: var(--info-soft); color: var(--info); }
.tag.state-signed { background: #fff1e7; color: #b4530a; }
.tag.state-active { background: #e0f4f8; color: #076d80; }
.tag.state-returned { background: var(--warn-soft); color: var(--warn); }
.tag.state-settled { background: var(--ok-soft); color: var(--ok); }
.tag.state-cancelled, .tag.state-overdue { background: #eef2f4; color: var(--ink-3); }

/* 骨架屏：让老板知道在加载，而不是卡住了 */
.skel { background: linear-gradient(90deg, #eef2f4 25%, #f7f9fa 37%, #eef2f4 63%); background-size: 400% 100%; animation: skelmove 1.3s ease infinite; border-radius: 8px; }
@keyframes skelmove { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-row { height: 44px; margin-bottom: 8px; }
.skel-card { height: 96px; margin-bottom: 14px; }

/* 车辆来源：实色小标签，扫一眼就分得清 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.badge-own { background: #15803d; }
.badge-aff { background: #6d28d9; }
.badge-peer { background: #1d4ed8; }
.badge-month { background: #c2410c; }
.badge-out { background: #475569; }

/* 表单 */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .tip { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 130px; padding: 9px 12px; font-size: 14px; }

/* 选择卡片（用于模板、成本模型这类"选一个"的场景） */
.pick { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 860px) { .pick { grid-template-columns: 1fr; } }
.pick .opt { border: 2px solid var(--line); border-radius: 13px; padding: 18px; cursor: pointer; background: #fff; text-align: left; transition: .15s; }
.pick .opt:hover { border-color: #b9cfcb; }
.pick .opt.on { border-color: var(--brand); background: var(--brand-soft); }
.pick .opt .t { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pick .opt .d { font-size: 13px; color: var(--ink-2); margin-top: 7px; line-height: 1.6; }
.pick .opt .x { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(15,30,35,.5); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 880px; }
.modal .head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .head h3 { font-size: 18px; }
.modal .head .x { margin-left: auto; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.modal .body { padding: 22px 24px; }
.modal .foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* 分步向导 */
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps .s { flex: 1; text-align: center; font-size: 13px; color: var(--ink-3); padding: 9px 4px; border-radius: 9px; background: #f1f4f5; font-weight: 600; }
.steps .s.on { background: var(--brand); color: #fff; }
.steps .s.done { background: var(--brand-soft); color: var(--brand-dark); }

/* 摄像头 */
.cam { width: 100%; aspect-ratio: 4/3; background: #101a1e; border-radius: 13px; overflow: hidden; position: relative; display: grid; place-items: center; }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; }
.cam .ph { color: #7b9298; font-size: 14px; text-align: center; padding: 20px; }
.cam .ring { position: absolute; width: 62%; aspect-ratio: 1; border: 3px dashed rgba(255,255,255,.55); border-radius: 50%; pointer-events: none; }
.cam-btns { display: flex; gap: 10px; margin-top: 12px; }

/* 结果面板 */
.result { text-align: center; padding: 22px 10px; }
.result .icon { font-size: 52px; line-height: 1; }
.result .big { font-size: 20px; font-weight: 800; margin-top: 10px; }
.result .small { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.seal-box { background: #f7faf9; border: 1px dashed #b9cfcb; border-radius: 12px; padding: 16px; margin-top: 16px; text-align: left; font-size: 13px; }
.seal-box .k { color: var(--ink-3); }
.seal-box .v { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--ink-3); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv .k { font-size: 12.5px; } }

/* 提示 */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 34px; background: #17252b; color: #fff; padding: 13px 22px; border-radius: 11px; z-index: 99; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
.note { background: var(--info-soft); color: #24406e; border-radius: 11px; padding: 12px 15px; font-size: 13.5px; line-height: 1.7; }
.note.warn { background: var(--warn-soft); color: #7a5312; }
.note.ok { background: var(--ok-soft); color: #0d5c42; }
.muted { color: var(--ink-3); font-size: 13px; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money.in { color: var(--ok); }
.money.out { color: var(--danger); }
.sep { height: 1px; background: var(--line); margin: 18px 0; }
.hide { display: none !important; }
.center { text-align: center; }
.right { text-align: right; }
.loader { text-align: center; padding: 60px; color: var(--ink-3); }

/* 明细行 */
.line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.line:last-child { border-bottom: 0; }
.line b { font-variant-numeric: tabular-nums; }
.line.total { border-top: 2px solid var(--ink); border-bottom: 0; font-size: 16px; padding-top: 12px; }

/* 成本分组 */
.type-chip { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.type-chip.owned { background: #e8effd; color: #2a4f9e; }
.type-chip.leased { background: #fdf3e2; color: #8a5a12; }
.type-chip.affiliated { background: #f3e8fd; color: #6b3fa0; }
.type-chip.unset { background: #eef2f4; color: var(--ink-3); }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar .brand { padding: 12px; }
  .sidebar .brand small { display: none; }
  .nav { display: flex; padding: 8px; flex: 1; }
  .nav a { padding: 9px 12px; margin: 0 4px 0 0; white-space: nowrap; font-size: 14px; }
  .sidebar .foot { display: none; }
  /* 顶栏不能横着溢出：公司名太长就省略，日期只留一行 */
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar .right { min-width: 0; }
  .topbar .right * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
  .content { padding: 16px 14px 50px; }
  /* 小屏触控目标：手指粗的店员单手点，不能小到 30px 出头 */
  .btn { min-height: 44px; padding: 10px 18px; }
  .btn.small { min-height: 38px; padding: 8px 14px; }
  .tabbar button { min-height: 44px; }
  /* iOS 上 <16px 的输入框聚焦会强制整页放大，小屏锁 16px 防住 */
  .filter-bar input, .filter-bar select, .field input, .field select, .field textarea { font-size: 16px; }
  /* 照片删除钮放大 + 留点间距，车上颠簸不会误删证据照 */
  .pp-th button { width: 30px; height: 30px; line-height: 28px; font-size: 16px; }
}

/* 页内标签 */
.tabbar { display: flex; gap: 8px; margin: 4px 0 16px; flex-wrap: wrap; }
.tabbar button { padding: 9px 18px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tabbar button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 岗位卡片 */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.role-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.role-card .rc-t { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.role-card .rc-d { font-size: 13px; color: var(--ink-3); line-height: 1.6; min-height: 34px; }
.role-card .rc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13px; }

/* 权限勾选 */
.perm-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 4px; }
.pg { padding: 10px 12px; border-bottom: 1px dashed var(--line); }
.pg:last-child { border-bottom: 0; }
.pg-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pg-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.perm { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.perm:hover { background: var(--bg-2, #f6f8f9); }
.perm input { margin-top: 3px; width: 16px; height: 16px; }
.perm b { display: block; font-size: 14px; }
.perm em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.mini { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* 门店多选 */
.chip-wrap { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 14px; cursor: pointer; background: #fff; }
.chip input { width: 15px; height: 15px; }

/* 全网通 · 同行车源卡片 */
.peer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.peer-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 7px; }
.peer-card .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.peer-card .pc-car { font-size: 18px; font-weight: 700; }
.peer-card .pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---- 车辆排期表 ---- */
.sch-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-bottom: 12px; }
.sch-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.sch-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sch-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.sch { border-collapse: collapse; width: max-content; min-width: 100%; }
table.sch th, table.sch td { border: 1px solid var(--line); padding: 0; }
table.sch thead th { min-width: 56px; padding: 6px 2px; font-size: 12px; font-weight: 600; color: var(--muted); background: #f8fafc; text-align: center; line-height: 1.4; }
table.sch thead th span { font-size: 11px; font-weight: 400; }
table.sch thead th.sch-today { background: #1d4ed8; color: #fff; }
table.sch thead th.sch-today span { color: #fff; }
table.sch thead th.sch-car, table.sch td.sch-car { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 170px; max-width: 170px; padding: 8px 12px; text-align: left; }
table.sch td.sch-car .muted { font-size: 12px; margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.sch td.sch-track { position: relative; height: 60px; background: repeating-linear-gradient(to right, transparent 0, transparent 55px, var(--line) 55px, var(--line) 56px); }
.sch-bar { position: absolute; top: 6px; height: 48px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.25; padding: 4px 6px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); white-space: nowrap; text-overflow: ellipsis; }
.sch-bar.conflict { border: 2px solid #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,.25); }

.sch-bar .sch-due { font-size: 11px; font-weight: 500; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-wrap { cursor: grab; }
.sch-wrap.dragging { cursor: grabbing; user-select: none; }

.sch-remind { margin-top: 4px; font-size: 11px; font-weight: 600; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 2px 6px; display: inline-block; white-space: nowrap; }

.sch-bar.manual { border: 2px dashed rgba(255,255,255,.8); }

.sch-bar.shadow { color: #b91c1c; background-image: repeating-linear-gradient(45deg, rgba(239,68,68,.32) 0 7px, rgba(239,68,68,.08) 7px 14px); border: 1px dashed #dc2626; box-shadow: none; }
.sch-bar.shadow .sch-due { color: #b91c1c; }
.sch-alert { margin-top: 4px; font-size: 11px; font-weight: 600; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: 2px 6px; display: inline-block; white-space: nowrap; }

/* ---- 排期表：周末底纹 / 今天竖线 / 色块分级 ---- */
table.sch td.sch-track .sch-we { position: absolute; top: 0; bottom: 0; background: #f1f5f7; z-index: 0; }
table.sch thead th.we { background: #eef2f4; }
table.sch td.sch-track .sch-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--info); box-shadow: 0 0 0 3px rgba(37,99,235,.14); z-index: 2; }
.sch-bar { display: flex; flex-direction: column; justify-content: center; gap: 1px; z-index: 3; }
.sch-bar .sch-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-bar .sch-tel { font-size: 11.5px; font-weight: 600; opacity: .95; letter-spacing: .3px; white-space: nowrap; overflow: hidden; }
table.sch tbody tr { height: 62px; }
table.sch td.sch-car { min-width: 196px; max-width: 196px; }
table.sch td.sch-car > * { display: block; max-width: 100%; }

/* ---- 首页：今天 ---- */
.hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hero .hi { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; border-left: 5px solid var(--brand); }
.hero .hi .n { font-size: 38px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.hero .hi .t { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.hero .hi .h { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.hero .hi.red { border-left-color: var(--danger); } .hero .hi.red .n { color: var(--danger); }
.hero .hi.amber { border-left-color: var(--warn); } .hero .hi.amber .n { color: var(--warn); }
.hero .hi.ok { border-left-color: var(--ok); } .hero .hi.ok .n { color: var(--ok); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

/* 待办卡片流 */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink-3); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.todo-row.p0 { border-left-color: var(--danger); }
.todo-row.p1 { border-left-color: var(--warn); }
.todo-row.p2 { border-left-color: var(--info); }
.todo-row.p3 { border-left-color: #c9d2d6; }
.todo-row .tr-ico { font-size: 20px; width: 26px; text-align: center; flex: none; }
.todo-row .tr-main { flex: 1; min-width: 0; }
.todo-row .tr-t { font-size: 15.5px; font-weight: 700; }
.todo-row .tr-s { font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.todo-row .tr-time { font-size: 13px; font-weight: 700; color: var(--ink-2); flex: none; white-space: nowrap; }
.todo-row .tr-act { flex: none; display: flex; gap: 8px; align-items: center; }
.tel { color: var(--info); font-weight: 700; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.sec-h h3 { font-size: 17px; }
.sec-h .cnt { font-size: 13px; color: var(--ink-3); }
.ok-note { background: var(--ok-soft); border: 1px solid #bfe5d4; color: #0d6b4d; border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; }
tbody tr.row-late { background: var(--danger-soft); }
tbody tr.row-soon { background: var(--warn-soft); }
.alarm { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-right: 4px; }
.alarm.red { background: var(--danger-soft); color: var(--danger); }
.alarm.amber { background: var(--warn-soft); color: #7a5312; }
.alarm.gray { background: #eef2f4; color: var(--ink-3); }
/* 危险按钮全站统一为「淡红底 + 深红字」；早期这里重复定义了一版实心红，已删除避免覆盖 */
.stat-line { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.stat-line .sl { font-size: 13px; color: var(--ink-3); }
.stat-line .sv { font-size: 20px; font-weight: 800; margin-left: 6px; }
/* 现场拍照：验车照片缩略图 */
.pp-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pp-th { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f1f5f7; }
.pp-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-th button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 18px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; cursor: pointer; padding: 0; }
.pp-th button:hover { background: var(--danger); }
