/* Arch E · 视觉系统 v3：深色指挥台 / 浅色两套主题，全部用变量 */
:root, [data-theme="dark"] {
  --bg: #0A0E14; --bg2: #0E1520; --panel: #111823; --panel2: #161F2C; --panel3: #1C2737;
  --line: #1B2533; --line2: #263346; --line3: #2A3A52;
  --text: #E6EDF5; --text2: #C9D4E3; --muted: #9AA9BF; --faint: #7D8CA3;
  --cyan: #36D6CF; --cyan-ink: #0A0E14; --cyan-soft: rgba(54,214,207,0.10);
  --amber: #FFB347; --red: #FF6B6B; --violet: #A78BFA; --blue: #4DA3FF; --orange: #FF9F43; --yellow: #FFD166; --green: #3DDC84; --teal2: #7FD3E6;
  --red-soft: rgba(255,107,107,0.10); --amber-soft: rgba(255,179,71,0.10); --violet-soft: rgba(167,139,250,0.10); --green-soft: rgba(61,220,132,0.10);
  --ai-panel: #151226; --ai-line: #2A2350; --ai-text: #C9B8FF;
  --map-sea: #0B2134; --map-coast: #24476A; --map-road: #1F2C3D; --map-road2: #18222F; --map-label: #5F7391;
  --on-fill: #0A0E14; --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --st-planned: #FFD166; --st-dispatched: #FF9F43; --st-atpickup: #F78FB3; --st-transit: #A78BFA; --st-atdelivery: #4DA3FF; --st-delivered: #6EC1FF; --st-invoiced: #7FD3E6; --st-paid: #3DDC84; --st-cancelled: #3A4658; --st-done: #2A3546;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F5F4EF; --bg2: #ECEAE2; --panel: #FFFFFF; --panel2: #F4F3EE; --panel3: #EAE8E0;
  --line: #E3E1D8; --line2: #D5D2C6; --line3: #C9C5B8;
  --text: #15181D; --text2: #2B313A; --muted: #5C6470; --faint: #6E7682;
  --cyan: #0B6E69; --cyan-ink: #FFFFFF; --cyan-soft: rgba(11,110,105,0.08);
  --amber: #A45500; --red: #B42318; --violet: #5B3FD0; --blue: #175CD3; --orange: #B54708; --yellow: #8A6A00; --green: #157A3A; --teal2: #0E7490;
  --red-soft: rgba(180,35,24,0.07); --amber-soft: rgba(164,85,0,0.08); --violet-soft: rgba(91,63,208,0.07); --green-soft: rgba(21,122,58,0.08);
  --ai-panel: #F3F0FF; --ai-line: #DCD3FB; --ai-text: #4B32B8;
  --map-sea: #D6E4EA; --map-coast: #AFC6D1; --map-road: #FFFFFF; --map-road2: #E2DFD5; --map-label: #6E7682;
  --on-fill: #15181D; --shadow: 0 10px 30px rgba(20,24,30,0.10);
  --st-planned: #FBE7A1; --st-dispatched: #FFD3A8; --st-atpickup: #FAD1E3; --st-transit: #DED3FF; --st-atdelivery: #CFE2FF; --st-delivered: #D4ECFF; --st-invoiced: #CDEFF5; --st-paid: #C9EFD6; --st-cancelled: #E6E8EB; --st-done: #E4E2DA;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.55 "Noto Sans SC", "Space Grotesk", -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--cyan); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
h4 { font-size: 12px; margin: 14px 0 6px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; }
.mono, code, kbd { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
.mono { font-size: 0.95em; letter-spacing: 0.01em; }
.mono.big { font-size: 17px; font-weight: 600; color: var(--text); }
.num-big { font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.good { color: var(--green); } .bad { color: var(--red); font-weight: 600; } .warn-text { color: var(--amber); font-weight: 600; } .danger-text { color: var(--red); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.json { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); max-width: 320px; word-break: break-all; }
.eyebrow { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; font-weight: 600; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
::selection { background: var(--cyan); color: var(--cyan-ink); }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand small { font-family: "Noto Sans SC", sans-serif; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.mainnav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.mainnav > a, .mainnav summary { padding: 8px 13px; border-radius: 999px; color: var(--muted); font-weight: 500; cursor: pointer; list-style: none; white-space: nowrap; display: inline-block; }
.mainnav summary::-webkit-details-marker { display: none; }
.mainnav summary::after { content: ' ▾'; font-size: 10px; opacity: 0.7; }
.mainnav > a:hover, .mainnav summary:hover { color: var(--text); text-decoration: none; background: var(--panel2); }
.mainnav > a.active, .mainnav details.active > summary { background: var(--panel3); color: var(--text); }
.mainnav details { position: relative; }
.mainnav details[open] > summary { background: var(--panel3); color: var(--text); }
.mainnav .menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); z-index: 60; display: flex; flex-direction: column; }
.mainnav .menu a { padding: 9px 12px; border-radius: 9px; color: var(--text2); display: flex; justify-content: space-between; align-items: center; gap: 10px; white-space: nowrap; }
.mainnav .menu a:hover, .mainnav .menu a.active { background: var(--panel2); color: var(--text); text-decoration: none; }
.mainnav .menu .sk { font-size: 10px; color: var(--faint); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; }
.askbar { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 0 12px; min-height: 42px; margin: 0; }
.askbar:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.askbar svg { width: 18px; height: 18px; color: var(--violet); flex: none; }
.askbar input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-size: 14px; min-height: 40px; padding: 0; width: auto; box-shadow: none; }
.askbar input:focus { box-shadow: none; }
.askbar kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.iconbtn { min-width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-weight: 700; font-size: 12px; padding: 0 10px; font-family: inherit; }
.iconbtn:hover { border-color: var(--cyan); text-decoration: none; }
.iconbtn svg { width: 18px; height: 18px; }
[data-theme="dark"] .ic-sun, [data-theme="light"] .ic-moon { display: none; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--amber); flex: none; }
.who .meta { display: flex; flex-direction: column; line-height: 1.25; }
.who .meta small { color: var(--muted); font-size: 11px; }
.who form { margin: 0; }
.online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

main { flex: 1; width: 100%; margin: 0 auto; padding: 20px 24px 40px; }
main.wide { max-width: 1680px; } main.narrow { max-width: 880px; }
.foot { text-align: center; color: var(--faint); font-size: 12px; padding: 14px; border-top: 1px solid var(--line); }

/* ---------- 卡片与网格 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.card.ai { background: var(--ai-panel); border-color: var(--ai-line); }
.card.flat { background: var(--panel2); border: 0; }
.stack > .card, .cockpit .card { margin-bottom: 0; }
.table-card { padding: 0; overflow: auto; }
.table-card > h2, .table-card > .pad { padding: 16px 18px 4px; margin: 0; }
.grid2 { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.4fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row > .grow { flex: 999 1 560px; min-width: 0; }
.row > .side { flex: 1 1 300px; min-width: 0; max-width: 440px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin-bottom: 2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scroll { overflow: auto; }
.section { margin: 22px 0 10px; }
.note { background: var(--amber-soft); border-left: 3px solid var(--amber); padding: 7px 11px; border-radius: 6px; margin-top: 6px; font-size: 13px; }
.backlink { font-size: 13px; color: var(--muted); }
.pad { padding: 14px 16px 6px; margin: 0; }

/* ---------- 提示条 ---------- */
.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; border: 1px solid; font-weight: 500; }
.flash.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.flash.err { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); }
.flash.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 40%, transparent); color: var(--amber); }

/* ---------- 表格 ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
table.data th { font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0.03em; }
table.data th a { color: var(--muted); }
table.data tbody tr:hover { background: var(--panel2); }
table.data tr.urgent td:first-child, table.data tr.risky td:first-child { box-shadow: inset 3px 0 0 var(--red); }
table.data tr.disabled { opacity: 0.5; }
table.data.small th, table.data.small td { padding: 7px 9px; font-size: 12px; }
table.data td.small, table.data td.wrap { white-space: normal; max-width: 320px; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; }

/* ---------- 状态 ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; color: var(--on-fill); }
.l-planned { background: var(--st-planned); } .l-dispatched { background: var(--st-dispatched); } .l-atpickup { background: var(--st-atpickup); }
.l-transit { background: var(--st-transit); } .l-atdelivery { background: var(--st-atdelivery); } .l-delivered { background: var(--st-delivered); }
.l-invoiced { background: var(--st-invoiced); } .l-paid { background: var(--st-paid); } .l-cancelled { background: var(--st-cancelled); color: var(--muted); text-decoration: line-through; }
/* 柜子状态颜色：照宋经理旧系统的颜色（2026-11-03 截图取色）。--sc = 底色，--sc-ink = 字色；药丸、首页色块、进度条圆点都用这一套 */
.c-forecast { --sc: #E6BDE5; --sc-ink: #15181D; } .c-arrived { --sc: #2C8E85; --sc-ink: #15181D; } .c-released, .c-booked { --sc: #CEF4B3; --sc-ink: #15181D; }
.c-picked { --sc: #888BD6; --sc-ink: #15181D; } .c-delivered { --sc: #40AE5F; --sc-ink: #15181D; } .c-emptied { --sc: #6BAFF2; --sc-ink: #15181D; }
.c-emptybooked { --sc: #7ADDDD; --sc-ink: #15181D; } .c-returned { --sc: #5CAFD2; --sc-ink: #15181D; } .c-closed { --sc: #7A7A7A; --sc-ink: #FFFFFF; } .c-cancelled { --sc: #E6E8EB; --sc-ink: #5C6470; }
.pill.c-forecast, .pill.c-arrived, .pill.c-released, .pill.c-booked, .pill.c-picked, .pill.c-delivered, .pill.c-emptied, .pill.c-emptybooked, .pill.c-returned, .pill.c-closed, .pill.c-cancelled, .tile.c-forecast, .tile.c-arrived, .tile.c-released, .tile.c-booked, .tile.c-picked, .tile.c-delivered, .tile.c-emptied, .tile.c-emptybooked, .tile.c-returned, .tile.c-closed, .tile.c-cancelled { background: var(--sc); color: var(--sc-ink); }
.flag-exam { background: #63195E; color: #fff; } .flag-hold { background: #DB4C4C; color: #15181D; }
.flag-trouble { background: #E8E3E3; color: #15181D; } .flag-storage { background: #D5834E; color: #15181D; }
.tag.svc-customs-only { background: #827895; color: #fff; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--panel3); color: var(--text2); font-weight: 600; white-space: nowrap; }
.tag.hot { background: var(--amber-soft); color: var(--amber); } .tag.bad { background: var(--red-soft); color: var(--red); } .tag.good { background: var(--green-soft); color: var(--green); } .tag.ai { background: var(--violet-soft); color: var(--violet); }
.risk { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 700; background: var(--red-soft); color: var(--red); white-space: nowrap; }
.risk-late, .risk-lfd, .risk-unassigned { background: var(--amber-soft); color: var(--amber); }
.risk-pod_missing { background: var(--panel3); color: var(--text2); }
.risk-customs { background: var(--violet-soft); color: var(--violet); }
.appt-pending { color: var(--red); font-weight: 600; } .appt-ok { color: var(--green); font-weight: 600; }

/* ---------- 指标 ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; color: inherit; display: flex; flex-direction: column; }
a.kpi:hover { text-decoration: none; border-color: var(--cyan); }
.kpi b { font-family: "Space Grotesk", sans-serif; font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.warn b { color: var(--amber); } .kpi.bad b { color: var(--red); } .kpi.good b { color: var(--cyan); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; color: var(--on-fill); }
.tile:hover { text-decoration: none; filter: brightness(1.06); }
.tile b { font-family: "Space Grotesk", sans-serif; font-size: 22px; line-height: 1.1; } .tile span { font-size: 12px; font-weight: 700; }
.fin-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.fin { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; min-width: 160px; display: flex; flex-direction: column; }
.fin span { font-size: 12px; color: var(--muted); } .fin b { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; } .fin small { color: var(--muted); font-size: 11px; }
.fin-row.small .fin b { font-size: 18px; }
.todo { list-style: none; padding: 0; margin: 0; } .todo li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .todo li:last-child { border: 0; }

/* ---------- 表单 ---------- */
input, select, textarea, button { font: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); color: var(--text); min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 72px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text2); font-weight: 500; }
label.chk { flex-direction: row; align-items: center; gap: 7px; white-space: nowrap; }
input[type=checkbox], input[type=radio] { accent-color: var(--cyan); width: 16px; height: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; margin: 0 0 12px; }
legend { font-weight: 700; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.form-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[name=search] { min-width: 260px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; margin-top: 10px; }
.inline-form.wrap { flex-wrap: wrap; } .inline-form input, .inline-form select { width: auto; min-width: 120px; }
form.inline { display: inline; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line3); background: var(--panel); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; font-family: inherit; }
.btn:hover { border-color: var(--cyan); text-decoration: none; }
.btn.primary { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); } .btn.primary:hover { filter: brightness(1.08); }
.btn.ai { background: var(--violet); border-color: var(--violet); color: var(--bg); } [data-theme="light"] .btn.ai { color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: transparent; }
.btn.big { min-height: 48px; font-size: 15px; padding: 0 20px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: var(--cyan); cursor: pointer; font-size: inherit; font-weight: 600; font-family: inherit; } button.link:hover { text-decoration: underline; }
button.link.danger { color: var(--red); }
.advance { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel2); margin-bottom: 10px; }

/* ---------- 字段 ---------- */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.kv { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv span { font-size: 12px; color: var(--muted); } .kv b { font-weight: 500; word-break: break-word; }

/* ---------- 鱼骨图（柜子进度） ---------- */
.fishbone ol { list-style: none; display: flex; padding: 0; margin: 0; }
.fishbone .node { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; min-width: 0; padding: 0 4px; }
.fishbone .node::before { content: ''; position: absolute; top: 14px; left: 50%; width: 100%; height: 3px; background: var(--line2); z-index: 0; }
.fishbone .node:last-child::before { display: none; }
.fishbone .node.done::before { background: var(--cyan); }
.fishbone .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--panel); border: 3px solid var(--line2); color: var(--muted); }
.fishbone .done .dot { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); }
.fishbone .current .dot { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
/* 每一步的圆点用这一步的状态颜色（和柜子列表里的颜色一样）：做完的实心，当前的实心 + 外圈，没到的只描边 */
.fishbone .node.c-forecast .dot, .fishbone .node.c-arrived .dot, .fishbone .node.c-released .dot, .fishbone .node.c-booked .dot, .fishbone .node.c-picked .dot, .fishbone .node.c-delivered .dot, .fishbone .node.c-emptied .dot, .fishbone .node.c-emptybooked .dot, .fishbone .node.c-returned .dot, .fishbone .node.c-closed .dot, .fishbone .node.c-cancelled .dot { border-color: var(--sc); }
.fishbone .node.done.c-forecast .dot, .fishbone .node.done.c-arrived .dot, .fishbone .node.done.c-released .dot, .fishbone .node.done.c-booked .dot, .fishbone .node.done.c-picked .dot, .fishbone .node.done.c-delivered .dot, .fishbone .node.done.c-emptied .dot, .fishbone .node.done.c-emptybooked .dot, .fishbone .node.done.c-returned .dot, .fishbone .node.done.c-closed .dot, .fishbone .node.done.c-cancelled .dot, .fishbone .node.current.c-forecast .dot, .fishbone .node.current.c-arrived .dot, .fishbone .node.current.c-released .dot, .fishbone .node.current.c-booked .dot, .fishbone .node.current.c-picked .dot, .fishbone .node.current.c-delivered .dot, .fishbone .node.current.c-emptied .dot, .fishbone .node.current.c-emptybooked .dot, .fishbone .node.current.c-returned .dot, .fishbone .node.current.c-closed .dot, .fishbone .node.current.c-cancelled .dot { background: var(--sc); color: var(--sc-ink); border-color: var(--sc); }
.fishbone .node.current.c-forecast .dot, .fishbone .node.current.c-arrived .dot, .fishbone .node.current.c-released .dot, .fishbone .node.current.c-booked .dot, .fishbone .node.current.c-picked .dot, .fishbone .node.current.c-delivered .dot, .fishbone .node.current.c-emptied .dot, .fishbone .node.current.c-emptybooked .dot, .fishbone .node.current.c-returned .dot, .fishbone .node.current.c-closed .dot, .fishbone .node.current.c-cancelled .dot { box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--sc); }
.fishbone .node.todo.c-forecast .dot, .fishbone .node.todo.c-arrived .dot, .fishbone .node.todo.c-released .dot, .fishbone .node.todo.c-booked .dot, .fishbone .node.todo.c-picked .dot, .fishbone .node.todo.c-delivered .dot, .fishbone .node.todo.c-emptied .dot, .fishbone .node.todo.c-emptybooked .dot, .fishbone .node.todo.c-returned .dot, .fishbone .node.todo.c-closed .dot, .fishbone .node.todo.c-cancelled .dot { color: var(--muted); }
.fishbone .lbl { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.fishbone .current .lbl { color: var(--amber); }
.fishbone .todo .lbl { color: var(--faint); font-weight: 500; }
.fishbone .time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fishbone .docs { font-size: 11px; }
.fish-flag { margin-top: 10px; } .fish-say { margin: 10px 0 0; font-weight: 600; color: var(--text); }
@media (max-width: 900px) {
  .fishbone ol { flex-direction: column; gap: 6px; }
  .fishbone .node { flex-direction: row; text-align: left; align-items: center; gap: 10px; padding: 4px 0; }
  .fishbone .node::before { top: 0; left: 14px; width: 3px; height: 100%; }
  .fishbone .lbl { margin: 0; min-width: 64px; }
}

/* ---------- 文件 ---------- */
.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; padding: 12px; border: 1px dashed var(--line3); border-radius: 12px; }
.upload input, .upload select { width: auto; }
input[type=file] { color: var(--muted); font-size: 13px; }
input[type=file]::file-selector-button { font: inherit; border: 1px solid var(--line3); background: var(--panel2); color: var(--text); border-radius: 9px; padding: 7px 12px; margin-right: 10px; cursor: pointer; }
.zip-bar { display: flex; gap: 12px; align-items: center; margin: 6px 0 10px; flex-wrap: wrap; }
.doc { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.doc:last-child { border: 0; }
.doc .thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); flex: none; }
.doc a.thumb.file { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); font-size: 12px; }
.doc-meta { flex: 1; min-width: 0; } .doc-meta .muted { font-size: 12px; }
.doc-actions { display: flex; gap: 12px; font-size: 12px; margin-top: 2px; flex-wrap: wrap; }
.doc .pick { align-self: center; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 20px; }

/* ---------- 时间线 ---------- */
.timeline { list-style: none; padding: 0; margin: 10px 0 0 6px; }
.timeline li { padding: 7px 0 7px 18px; border-left: 2px solid var(--line2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel3); border: 2px solid var(--panel); }
.timeline li.auto::before { background: var(--green); } .timeline li.warn::before { background: var(--amber); } .timeline li.ai::before { background: var(--violet); } .timeline li.status::before { background: var(--cyan); }
.timeline .when { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); min-width: 110px; }

/* ---------- 登录 ---------- */
.login-wrap { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 28px; margin-top: 16px; align-items: start; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } }
.login-hero h1 { font-size: 32px; line-height: 1.25; }
.login-hero p { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.acct { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-family: inherit; width: 100%; font-size: 13px; }
.acct:hover { border-color: var(--cyan); }
.acct .r { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct b { font-size: 15px; } .acct .mono { font-size: 12px; color: var(--muted); }
.acct p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.acct-group { margin: 18px 0 8px; }
.error-card { text-align: center; margin-top: 60px; } .error-card h1 { font-size: 56px; color: var(--muted); }

/* ---------- 客户门户 ---------- */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ccard { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: inherit; }
.ccard:hover { text-decoration: none; border-color: var(--cyan); }
.ccard-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ccard-say { margin-top: 8px; font-weight: 700; font-size: 15px; }
.ccard-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ccard-lines { font-size: 13px; margin-top: 8px; color: var(--text2); }
.zip-all { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .zip-all p { width: 100%; margin: 0; }

/* ---------- 子导航 / 筛选片 / 分段 / 标签页 ---------- */
.subnav { display: flex; gap: 4px; margin: -4px 0 16px; overflow-x: auto; }
.subnav a { padding: 7px 13px; color: var(--muted); font-weight: 600; border-radius: 999px; white-space: nowrap; font-size: 13px; }
.subnav a.active, .subnav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line2); color: var(--text2); font-size: 12px; font-weight: 600; background: transparent; cursor: pointer; font-family: inherit; display: inline-block; }
.chip:hover { text-decoration: none; border-color: var(--cyan); color: var(--text); } .chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.ai.on { background: var(--violet); border-color: var(--violet); color: var(--bg); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 11px; overflow: hidden; }
.seg a { padding: 0 13px; min-height: 38px; display: inline-flex; align-items: center; color: var(--muted); font-weight: 600; font-size: 13px; border-left: 1px solid var(--line2); }
.seg a:first-child { border-left: 0; } .seg a:hover { text-decoration: none; color: var(--text); } .seg a.on { background: var(--panel3); color: var(--text); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; border: 1px solid var(--line); }
.tabs a.on { background: var(--panel3); color: var(--text); border-color: var(--line2); } .tabs a:hover { text-decoration: none; color: var(--text); }
.alert-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); margin-bottom: 14px; font-size: 13px; }
.alert-bar a { color: var(--text); }

/* ---------- 周排班 ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(160px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-height: 260px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.day-head { padding: 2px 4px 4px; font-size: 13px; color: var(--text2); }
.empty-day { color: var(--faint); text-align: center; padding: 20px 0; }
.dcard { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 9px; color: inherit; font-size: 12px; line-height: 1.45; }
.dcard:hover { text-decoration: none; border-color: var(--cyan); }
.dcard.has-risk { border-color: color-mix(in srgb, var(--red) 50%, transparent); box-shadow: inset 3px 0 0 var(--red); }
.dcard-top { display: flex; justify-content: space-between; gap: 4px; align-items: center; margin-bottom: 2px; }
.dcard-top b { font-family: "JetBrains Mono", monospace; font-size: 11px; white-space: nowrap; } .dcard .pill { font-size: 10px; padding: 0 7px; }
.dcard-svc { color: var(--text2); font-weight: 600; } .dcard-route { color: var(--text); } .dcard-time, .dcard-res { color: var(--muted); }

/* ---------- 按司机时间轴（看板 & 驾驶舱共用） ---------- */
.timeline-board { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 14px; overflow-x: auto; }
.tb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tb-head h2 { margin: 0; }
.tb-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.tb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.tb-date { font-weight: 700; margin-bottom: 6px; }
.lane { display: flex; align-items: stretch; min-width: 760px; border-top: 1px solid var(--line); }
.lane-name { width: 112px; flex: none; padding: 7px 8px 7px 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.lane-name b { font-size: 13px; } .lane-name small { color: var(--muted); font-size: 11px; }
.lane-name small.warn { color: var(--amber); } .lane-name small.bad { color: var(--red); }
.lane-track { flex: 1; position: relative; min-height: 42px; }
.lane.hours { border-top: 0; } .lane.hours .lane-track { min-height: 20px; }
.lane.off { opacity: 0.55; } .lane.unassigned { background: var(--amber-soft); } .lane.outsourced { background: var(--panel2); }
.hline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.hlabel { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; color: var(--faint); font-family: "JetBrains Mono", monospace; }
.nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--cyan); opacity: 0.75; z-index: 2; pointer-events: none; }
.bar { position: absolute; top: 7px; height: 28px; border-radius: 8px; padding: 0 8px; font-size: 11px; line-height: 26px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--on-fill); font-weight: 600; border: 1px solid transparent; z-index: 1; }
.bar:hover { text-decoration: none; z-index: 3; filter: brightness(1.08); }
.bar b { font-family: "JetBrains Mono", monospace; margin-right: 4px; }
.bar.risky { border: 2px solid var(--red); line-height: 24px; }
.bar.conflict { border: 2px solid var(--red); background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--red) 45%, transparent) 0 5px, transparent 5px 10px); line-height: 24px; }
.bar.sel { outline: 2px solid var(--text); outline-offset: 1px; z-index: 3; }
.bar.l-done { background: var(--st-done); color: var(--muted); }

/* ---------- 运单详情组件 ---------- */
.steps { list-style: none; display: flex; padding: 0; margin: 0 0 14px; gap: 4px; flex-wrap: wrap; }
.steps li { flex: 1; min-width: 88px; background: var(--panel2); color: var(--muted); padding: 8px 10px; font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; border-radius: 10px; }
.steps li span { width: 18px; height: 18px; border-radius: 50%; background: var(--panel3); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.steps li.done { background: var(--cyan-soft); color: var(--cyan); } .steps li.done span { background: var(--cyan); color: var(--cyan-ink); }
.steps li.current { background: var(--amber-soft); color: var(--amber); }
.stop { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; border-left: 4px solid var(--line3); background: var(--panel2); }
.stop.pickup { border-left-color: var(--orange); } .stop.delivery { border-left-color: var(--blue); } .stop.return { border-left-color: var(--green); }
.stop-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.stop-times { font-size: 13px; margin-top: 2px; }
.assign .own-fields, .assign .outs-fields { margin-top: 10px; }
.assign.outs .own-fields { display: none; } .assign:not(.outs) .outs-fields { display: none; }
.customs-box { border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; border: 1px solid; }
.customs-box.hold { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 35%, transparent); } .customs-box.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }

/* ---------- 日历 ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cal-h { background: var(--panel2); padding: 7px 9px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-d { background: var(--panel); min-height: 116px; padding: 5px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-d.other { background: var(--bg2); } .cal-d.other .cal-n { color: var(--faint); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--cyan); }
.cal-n { font-weight: 700; font-size: 12px; color: var(--text2); align-self: flex-start; }
.cal-ev { display: block; font-size: 11px; line-height: 1.4; padding: 1px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--on-fill); background: var(--panel3); }
.legend .cal-ev { display: inline-block; }
.cal-ev:hover { text-decoration: none; filter: brightness(1.06); }
.cal-ev.pickup { background: var(--st-dispatched); } .cal-ev.delivery { background: var(--st-atdelivery); } .cal-ev.return { background: var(--st-paid); }
.cal-ev.maint { background: var(--panel3); color: var(--text2); } .cal-ev.exp { background: var(--red-soft); color: var(--red); }
.cal-more { font-size: 11px; color: var(--muted); }

/* ---------- 骨架板块 ---------- */
.planned { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.planned > div { border: 1px dashed var(--line3); border-radius: 14px; padding: 14px 16px; background: var(--panel); }
.planned h3 { margin-bottom: 4px; } .planned p { margin: 0; color: var(--muted); font-size: 13px; }
.how { color: var(--muted); font-size: 13px; }

/* =================== 驾驶舱 =================== */
.cockpit { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cockpit > .left { flex: 1 1 290px; max-width: 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cockpit > .center { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cockpit > .right { flex: 1 1 300px; max-width: 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .cockpit > .left, .cockpit > .right { max-width: none; } }
.brief .lead { margin: 10px 0 14px; font-size: 16px; line-height: 1.55; font-weight: 500; }
.brief .lead em { font-style: normal; color: var(--amber); }
.brief-item { display: block; text-align: left; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: inherit; margin-bottom: 8px; }
.brief-item:hover { border-color: var(--cyan); text-decoration: none; }
.brief-item.on { border-color: var(--cyan); background: var(--cyan-soft); }
.brief-item .t { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; }
.brief-item .x { display: block; margin-top: 3px; color: var(--text); font-size: 13px; line-height: 1.5; }
.mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-kpis .kpi b { font-size: 26px; }

.map { position: relative; height: 440px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.map svg.base { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .layers { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 5; max-width: calc(100% - 24px); }
.map .layers span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line2); }
.map .layers span.warn { color: var(--amber); }
.map .place { position: absolute; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--map-label); transform: translate(-4px, -4px); white-space: nowrap; pointer-events: none; }
.map .place i { width: 7px; height: 7px; border-radius: 2px; background: var(--map-label); opacity: 0.7; }
.map .place.port { color: var(--text2); } .map .place.port i { background: var(--cyan); opacity: 1; }
.map .area { position: absolute; font-size: 11px; letter-spacing: 0.12em; color: var(--map-label); pointer-events: none; }
.map .pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 7px; min-height: 38px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); z-index: 4; transition: transform .15s; }
.map .pin:hover { transform: translate(-50%, -50%) scale(1.06); text-decoration: none; z-index: 7; }
.map .pin.sel { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); z-index: 7; }
.map .pin .d { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.map .pin .n { display: flex; flex-direction: column; line-height: 1.2; }
.map .pin .n b { font-size: 12px; } .map .pin .n span { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); }
.map .offmap { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 11px; color: var(--muted); z-index: 5; }
.map .offmap a { background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; color: var(--text2); }
.map .note-gps { position: absolute; left: 12px; bottom: 10px; font-size: 11px; color: var(--faint); z-index: 5; max-width: 50%; }

.copilot .plan-item { background: var(--panel); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); }
[data-theme="dark"] .copilot .plan-item { background: var(--panel2); border-color: transparent; }
.copilot .plan-item .h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.copilot .plan-item .h a { font-family: "JetBrains Mono", monospace; }
.copilot .plan-item .mv { margin-top: 4px; font-size: 13px; }
.copilot .plan-item .mv s { color: var(--muted); }
.copilot .plan-item .why { margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.copilot .lead { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.copilot .lead b { color: var(--text); }
.copilot .done-list div { display: flex; gap: 8px; margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.copilot .done-list .ok { color: var(--green); }
.ai-title { display: flex; align-items: center; gap: 8px; }
.ai-title svg { width: 18px; height: 18px; color: var(--violet); flex: none; }
.ai-title h2 { margin: 0; }
.sel-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sel-card .head a { font-family: "JetBrains Mono", monospace; font-size: 15px; font-weight: 600; color: var(--text); }
.sel-card .route { margin-top: 10px; font-size: 15px; font-weight: 500; }
.sel-card .eta { margin-top: 4px; font-size: 13px; color: var(--cyan); }
.sel-card .riskbox { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 13px; line-height: 1.5; }
.sel-card .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sel-card .links a, .sel-card .links span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--text2); }
.sel-card .links a:hover { border-color: var(--cyan); text-decoration: none; }
.answer { margin-top: 12px; font-size: 13px; line-height: 1.65; }
.answer ul { margin: 6px 0 0; padding-left: 18px; }
.answer .q { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

/* =================== 运单全景 =================== */
.graph { position: relative; margin-top: 14px; }
.graph > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph .g { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gnode { background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px; padding: 13px 14px; color: inherit; min-height: 118px; display: block; }
a.gnode:hover { border-color: var(--cyan); text-decoration: none; }
.gnode .k { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; font-weight: 600; }
.gnode .v { margin-top: 4px; font-size: 15px; font-weight: 700; word-break: break-word; }
.gnode .v.mono { font-size: 14px; }
.gnode .s { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.gnode.center { background: var(--cyan-soft); border: 2px solid var(--cyan); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gnode.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.gnode.warn .k { color: var(--amber); }
.gnode.bad { border-color: color-mix(in srgb, var(--red) 55%, transparent); }
.gnode.bad .k { color: var(--red); }
.progress-dots { display: flex; gap: 4px; margin-top: 8px; }
.progress-dots i { width: 16px; height: 6px; border-radius: 3px; background: var(--line3); }
.progress-dots i.on { background: var(--cyan); }
@media (max-width: 760px) { .graph .g { grid-template-columns: repeat(2, minmax(0, 1fr)); } .graph > svg { display: none; } }
.moneybar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 14px; background: var(--panel3); }
.moneybar span { display: block; height: 100%; }
.insights { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.6; }
.insights li { padding-left: 14px; position: relative; }
.insights li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.track-link { display: flex; gap: 6px; align-items: center; }
.track-link input { font-family: "JetBrains Mono", monospace; font-size: 12px; }
details.more { margin-top: 10px; }
details.more > summary { cursor: pointer; color: var(--cyan); font-weight: 600; font-size: 13px; }

/* =================== 收单台 =================== */
.intake-src { text-align: left; width: 100%; min-height: 44px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: inherit; display: block; margin-bottom: 8px; }
.intake-src:hover, .intake-src.on { border-color: var(--cyan); text-decoration: none; }
.intake-src.on { background: var(--cyan-soft); }
.intake-src .k { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; }
.field-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--panel2); margin-bottom: 6px; }
.field-row .fl { width: 72px; flex: none; font-size: 12px; color: var(--muted); padding-top: 2px; }
.field-row .fv { flex: 1; min-width: 0; }
.field-row .fv b { display: block; font-weight: 600; font-size: 13px; }
.field-row .fv small { display: block; font-size: 11px; margin-top: 2px; line-height: 1.5; color: var(--muted); }
.field-row .fv small.ok { color: var(--green); } .field-row .fv small.warn { color: var(--amber); }
.hl { background: color-mix(in srgb, var(--yellow) 35%, transparent); border-radius: 3px; padding: 0 2px; color: var(--text); }
.paste-preview { white-space: pre-wrap; font-size: 14px; line-height: 1.8; background: var(--panel2); border-radius: 12px; padding: 14px; min-height: 140px; }

/* =================== 司机端 =================== */
body.driver main { max-width: 560px; padding: 14px 14px 40px; }
body.driver .topbar { padding: 8px 14px; gap: 8px; }
body.driver .who .meta, body.driver .online { display: none; }
.driver-home h1 { font-size: 24px; margin-bottom: 0; }
.trip-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 15px; margin: 12px 0; color: inherit; border-left: 5px solid var(--st-planned); }
.trip-card:hover { text-decoration: none; }
.trip-card.DISPATCHED { border-left-color: var(--st-dispatched); }
.trip-card.AT_PICKUP, .trip-card.IN_TRANSIT, .trip-card.AT_DELIVERY { border-left-color: var(--st-transit); }
.trip-top, .trip-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.trip-top b { font-family: "JetBrains Mono", monospace; font-size: 16px; } .trip-head h1 { margin: 0; font-family: "JetBrains Mono", monospace; font-size: 22px; }
.trip-svc { color: var(--muted); margin: 2px 0 8px; }
.trip-stop { padding: 7px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.trip-mini { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; color: inherit; font-size: 13px; }
.trip-mini:hover { text-decoration: none; border-color: var(--cyan); }
.trip-stop-big { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 15px; margin: 12px 0; font-size: 15px; }
.trip-stop-big.done { opacity: 0.6; } .trip-stop-big h2 { font-size: 19px; margin: 6px 0 2px; } .trip-stop-big .appt { margin-top: 6px; }
.trip-stop-big.next { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.trip-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .trip-actions .btn { flex: 1; min-height: 48px; font-size: 15px; }
.drv-banner { border-radius: 18px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); margin: 12px 0; }
.drv-banner.live { background: var(--cyan-soft); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); }
.drv-banner.notice { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.drv-banner b { font-size: 17px; display: block; line-height: 1.4; }
.drv-banner span { display: block; margin-top: 4px; color: var(--text2); font-size: 14px; line-height: 1.55; }
.big-action { position: sticky; bottom: 0; z-index: 5; margin: 16px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: stretch; background: linear-gradient(to top, var(--bg) 80%, transparent); }
.big-action form { flex: 1; display: flex; margin: 0; }
.big-btn { flex: 1; padding: 20px; font-size: 19px; font-weight: 800; border-radius: 18px; border: 0; background: var(--cyan); color: var(--cyan-ink); cursor: pointer; box-shadow: var(--shadow); font-family: inherit; }
.big-btn:active { transform: translateY(1px); }
.mic { width: 66px; min-height: 66px; flex: none; border-radius: 18px; border: 1px solid var(--line3); background: var(--panel); color: var(--cyan); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mic svg { width: 26px; height: 26px; }
.mic.rec { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 50%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.big-blocked { padding: 18px; border-radius: 18px; background: var(--violet-soft); border: 2px solid var(--violet); color: var(--violet); font-weight: 700; font-size: 16px; text-align: center; margin: 16px 0; }
.driver-upload { display: flex; flex-direction: column; gap: 10px; } .driver-upload .btn { min-height: 48px; font-size: 15px; }
.doc-type-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-type-pick label { flex-direction: row; align-items: center; gap: 5px; border: 1px solid var(--line2); border-radius: 999px; padding: 8px 13px; font-size: 14px; }
.doc-type-pick label:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--bg); }
.driver-docs { font-size: 13px; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.voice-note { display: none; gap: 8px; margin-top: 8px; }
.voice-note.show { display: flex; }
.mini-map { position: relative; height: 190px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; margin: 12px 0; }
.mini-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-map .me { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); border: 3px solid var(--bg); box-shadow: 0 0 0 6px var(--cyan-soft); transform: translate(-50%, -50%); }
.mini-map .lbl { position: absolute; font-size: 12px; font-weight: 700; transform: translate(-50%, 10px); white-space: nowrap; }
.mini-map .eta { position: absolute; right: 10px; top: 10px; padding: 5px 10px; border-radius: 10px; background: var(--panel); font-size: 12px; border: 1px solid var(--line); }

/* =================== 客户追踪 =================== */
.track { max-width: 560px; margin: 0 auto; }
.track h1 { font-size: 30px; line-height: 1.25; margin: 6px 0; }
.track .eta { color: var(--cyan); font-weight: 700; font-size: 15px; }
.track .steps-v { list-style: none; margin: 18px 0 0; padding: 0; }
.track .steps-v li { display: flex; gap: 12px; padding-bottom: 14px; align-items: flex-start; }
.track .steps-v i { width: 13px; height: 13px; margin-top: 5px; border-radius: 50%; flex: none; border: 2px solid var(--line3); }
.track .steps-v li.done i { background: var(--cyan); border-color: var(--cyan); }
.track .steps-v li.now i { border: 3px solid var(--amber); }
.track .steps-v li.now .s { font-weight: 700; }
.track .steps-v .s { flex: 1; font-size: 15px; }
.track .steps-v time { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }
.track .driver-row { margin-top: 16px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; gap: 12px; }

/* =================== 标注反馈工具 =================== */
.fb-launch { position: fixed; right: 18px; bottom: 18px; z-index: 9000; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: #E5484D; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: var(--shadow); font-family: inherit; }
.fb-launch:hover { filter: brightness(1.08); }
body.driver .fb-launch { font-size: 0; width: 46px; height: 46px; min-height: 46px; padding: 0; bottom: 110px; right: 12px; opacity: 0.85; }
body.driver .fb-launch::before { content: '✎'; font-size: 20px; }
.fb-bar { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 4px; background: #111823; color: #fff; padding: 6px 8px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); flex-wrap: wrap; max-width: calc(100vw - 20px); border: 1px solid #263346; }
.fb-bar b { padding: 0 8px; font-size: 13px; }
.fb-bar button { background: rgba(255,255,255,0.08); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; }
.fb-bar button:hover { background: rgba(255,255,255,0.18); } .fb-bar button.on { background: #fff; color: #111823; }
.fb-bar .fb-color { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.fb-bar .fb-color.on { border-color: #fff; box-shadow: 0 0 0 2px #111823 inset; }
.fb-bar .fb-primary, .fb-form .fb-primary { background: #E5484D; color: #fff; }
.fb-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.25); margin: 0 4px; }
.fb-text-input { position: absolute; z-index: 10000; width: 240px !important; border: 2px solid; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.fb-form { position: fixed; z-index: 10001; right: 20px; top: 120px; width: min(380px, calc(100vw - 40px)); background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.fb-form h3 { margin: 0; font-size: 16px; } .fb-hint { margin: 0; color: var(--muted); font-size: 13px; }
.fb-actions { display: flex; gap: 8px; justify-content: flex-end; }
.fb-actions button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line3); background: var(--panel); color: var(--text); cursor: pointer; font-weight: 600; font-family: inherit; }
.fb-actions .fb-primary { border-color: #E5484D; }
.fb-toast { position: fixed; z-index: 10002; left: 50%; bottom: 30px; transform: translateX(-50%); background: #157A3A; color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; transition: opacity .5s; box-shadow: var(--shadow); }
.fb-toast.bad { background: #B42318; }
.fb-replay { position: fixed; z-index: 9999; left: 50%; top: 70px; transform: translateX(-50%); background: var(--panel); color: var(--text); border: 2px solid #E5484D; border-radius: 12px; padding: 10px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 30px); box-shadow: var(--shadow); }
.fb-replay small { color: var(--muted); width: 100%; }
.fb-replay button { margin-left: auto; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line3); background: var(--panel); color: var(--text); cursor: pointer; }
@media print { .fb-launch, .topbar { display: none; } }
@media (max-width: 760px) {
  main { padding: 14px 14px 32px; }
  .topbar { padding: 8px 14px; }
  .askbar { order: 10; flex-basis: 100%; }
  .who .meta, .online { display: none; }
}

/* ===================== v4 · 本地派送 ===================== */
.d-review { background: var(--red); color: #fff; } .d-quoted { background: var(--st-planned); } .d-booked { background: var(--st-dispatched); }
.d-scheduled { background: var(--st-transit); } .d-out { background: var(--st-atdelivery); } .d-delivered { background: var(--st-paid); }
.run-draft { background: var(--panel3); color: var(--text); } .run-dispatched { background: var(--st-dispatched); } .run-in_progress { background: var(--st-atdelivery); }
.run-done { background: var(--st-paid); } .run-cancelled { background: var(--st-cancelled); color: var(--muted); }
.zone { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--z) 55%, transparent); color: var(--text); white-space: nowrap; background: color-mix(in srgb, var(--z) 14%, transparent); }
.zone i { width: 8px; height: 8px; border-radius: 50%; background: var(--z); display: inline-block; }
.zone.none { --z: var(--faint); color: var(--muted); }
.tag.dept { background: var(--violet-soft); color: var(--violet); }
.tag.kind-amazon, .tag.kind-walmart, .tag.kind-tiktok { background: var(--amber-soft); color: var(--amber); }
.tag.kind-cn_3pl { background: var(--cyan-soft); color: var(--cyan); } .tag.kind-residential { background: var(--red-soft); color: var(--red); }
.appt-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.appt-chip.todo { background: var(--red); color: #fff; } .appt-chip.wait { background: var(--amber-soft); color: var(--amber); border: 1px dashed var(--amber); }
.appt-chip.ok { background: var(--green); color: var(--on-fill); } .appt-chip.none { color: var(--faint); padding-left: 0; }
.issue-review, .issue-exception, .issue-vehicle { background: var(--red-soft); color: var(--red); }
.issue-mismatch { background: var(--amber-soft); color: var(--amber); } .issue-appt_todo, .issue-appt_noreply { background: var(--amber-soft); color: var(--amber); }
.issue-no_pod { background: var(--panel3); color: var(--text2); }
sup { font-size: 9px; color: var(--amber); margin-left: 1px; }
.price { font-family: "Space Grotesk", sans-serif; font-size: 22px; color: var(--cyan); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.seg-inline { display: inline-flex; gap: 6px; align-items: center; } .seg-inline select { width: auto; min-width: 220px; }
ul.plain { list-style: none; padding: 0; margin: 6px 0 0; } ul.plain li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.tags-line { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* 收货方卡片 */
.cons-card .cons-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.cons-card .addr { font-size: 14px; margin: 4px 0 8px; }
.cons-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text2); }
.cons-contacts { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; }
.contacts li.bad-contact { opacity: 0.55; text-decoration: line-through; }
/* 进度条 */
.dsteps { display: flex; list-style: none; padding: 0; margin: 4px 0 16px; gap: 4px; flex-wrap: wrap; }
.dsteps li { flex: 1 1 100px; text-align: center; font-size: 12px; font-weight: 600; padding: 7px 6px; border-radius: 8px; background: var(--panel2); color: var(--muted); position: relative; }
.dsteps li.done { background: var(--cyan-soft); color: var(--cyan); } .dsteps li.done::before { content: '✓ '; }
.dsteps li.current { background: var(--cyan); color: var(--cyan-ink); }
/* 表单：地址选择 + 实时报价 */
.dform .card h2 { margin-bottom: 12px; }
.picker { position: relative; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.picker-list { position: absolute; top: 66px; left: 0; right: 0; z-index: 30; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; padding: 4px; }
.picker-list button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.picker-list button:hover { background: var(--panel2); }
.picker-chosen { background: var(--cyan-soft); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); border-radius: 12px; padding: 10px 12px; }
.picker [data-picker-new] { align-self: flex-start; }
fieldset.new-addr { border: 1px dashed var(--line3); border-radius: 12px; padding: 12px 14px; margin: 12px 0 0; }
fieldset.new-addr legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.quote-live { margin-top: 4px; }
.quote-live .ql { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.quote-lines td { padding: 4px 8px !important; }
.chk-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.form-grid .span4 { grid-column: span 4; }
/* 排车 */
.plan { display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.plan-left { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 4px; }
.zone-group { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.zg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.zg-head label.chk { margin-left: auto; }
label.porder { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; cursor: pointer; font-weight: 400; }
label.porder:hover { background: var(--panel2); }
label.porder.has-issue { box-shadow: inset 3px 0 0 var(--amber); }
.po-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-add { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; display: flex; gap: 8px; }
.plan-add select { flex: 1; }
.plan-sum { margin-bottom: 8px; }
.runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.run-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--line3); }
.run-card.dispatched { border-top-color: var(--st-dispatched); } .run-card.in_progress { border-top-color: var(--st-atdelivery); } .run-card.done { border-top-color: var(--st-paid); opacity: 0.85; }
.run-card.over { border-color: var(--red); }
.run-card header { display: flex; flex-direction: column; gap: 4px; }
.run-card header > div:first-child { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.run-assign { display: flex; flex-wrap: wrap; gap: 6px; }
.run-assign select, .run-assign input { width: auto; min-width: 0; flex: 1 1 120px; min-height: 36px; padding: 6px 8px; font-size: 13px; }
.run-assign input[type=time] { flex: 0 0 100px; }
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.capbar { position: relative; height: 22px; background: var(--panel2); border-radius: 7px; overflow: hidden; font-size: 11px; }
.capbar i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--cyan) 45%, transparent); }
.capbar.full i { background: color-mix(in srgb, var(--amber) 55%, transparent); } .capbar.over i { background: color-mix(in srgb, var(--red) 60%, transparent); }
.capbar span { position: relative; padding: 0 8px; line-height: 22px; font-weight: 600; }
.run-warn { margin: 0; padding: 8px 10px 8px 26px; background: var(--amber-soft); border-radius: 10px; color: var(--amber); font-size: 12.5px; }
.stops { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.stops li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 10px; }
.stops li:hover { background: var(--panel2); }
.stops li.done { opacity: 0.6; }
.stops .seq { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--panel3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.stops li.done .seq { background: var(--green); color: var(--on-fill); }
.stop-main { flex: 1; min-width: 0; }
.stop-act { display: flex; gap: 2px; }
.iconbtn.sm { min-width: 28px; height: 28px; border-radius: 8px; padding: 0 6px; font-size: 13px; }
.empty-stop { color: var(--muted); justify-content: center; border: 1px dashed var(--line2); }
.run-card footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.run-card footer .btn { min-height: 34px; font-size: 13px; padding: 0 12px; }
.run-who { font-size: 13px; color: var(--text2); }
.new-run { margin-top: 14px; }
/* 预约消息 */
.msg-card.skip { opacity: 0.7; }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.msg-card textarea { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
.zone-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.zone-row input { width: auto; min-width: 0; }
.zone-row input[type=color] { width: 40px; padding: 2px; min-height: 36px; }
/* 文件 */
.pod-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pod-thumb { display: flex; flex-direction: column; gap: 4px; width: 130px; font-size: 12px; color: var(--text2); }
.pod-thumb img, .pod-thumb .file { width: 130px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); display: flex; align-items: center; justify-content: center; font-weight: 700; }
/* 今日 */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.iq { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.iq-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.iq-head a { margin-left: auto; }
.iq-row { display: grid; grid-template-columns: 116px auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 9px; color: var(--text); font-size: 13px; }
.iq-row:hover { background: var(--panel2); text-decoration: none; }
.truns { display: flex; flex-direction: column; gap: 10px; }
.trun { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--text); }
.trun:hover { text-decoration: none; border-color: var(--cyan); }
.trun-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.prog { height: 6px; background: var(--panel3); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.prog i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.imp-card { display: block; color: var(--text); border-style: dashed; }
.imp-card:hover { text-decoration: none; border-color: var(--violet); }
/* 司机端 */
.trip-card.run { border-left-color: var(--cyan); }
.deliver-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.deliver-form .big-btn[disabled] { opacity: 0.45; }
.btn.block { width: 100%; margin-top: 10px; }
details > summary { cursor: pointer; }
@media (max-width: 1100px) { .plan, .today-grid { grid-template-columns: 1fr; } .plan-left { position: static; max-height: none; } .iq-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .form-grid .span4 { grid-column: span 2; } .caps { grid-template-columns: 1fr; } .runs { grid-template-columns: 1fr; } }
.po-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.po-main > .small { display: block; }

/* ---------- v5：帮助抽屉、下一步、沟通、保存视图、按柜看、我的待办 ---------- */
.help-btn { font-size: 16px; min-width: 36px; padding: 0; }
.help-drawer { position: fixed; top: 64px; right: 14px; bottom: 72px; width: min(400px, calc(100vw - 28px)); background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); z-index: 60; display: flex; flex-direction: column; overflow: hidden; }
.help-drawer[hidden] { display: none; }
.hd-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.hd-head .iconbtn { min-width: 32px; height: 32px; font-size: 18px; }
.hd-body { padding: 14px 16px; overflow: auto; flex: 1; font-size: 13.5px; }
.hd-body h2 { font-size: 16px; } .hd-body ol { padding-left: 20px; margin: 8px 0; } .hd-body li { margin: 3px 0; }
.hd-miss { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--amber-soft); }
.help-state { background: var(--cyan-soft); border-left: 3px solid var(--cyan); padding: 8px 11px; border-radius: 6px; margin: 8px 0; }
.help-targets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.help-targets .chip { cursor: pointer; font-family: inherit; }
.help-new { margin: 10px 0; padding: 8px 10px; border: 1px dashed var(--line3); border-radius: 10px; }
.help-new summary { cursor: pointer; font-weight: 600; color: var(--violet); }
@keyframes helpflash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 20%, 70% { box-shadow: 0 0 0 4px var(--cyan); } }
.help-flash { animation: helpflash 2.4s ease; border-radius: 10px; }

.next-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin: 0 0 12px; border-radius: 12px; background: var(--cyan-soft); border: 1px solid var(--line2); }
.next-step .ns-label { font-size: 11px; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.next-step b { font-size: 15px; }
.next-step .ns-owner { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line2); }
.next-step .ns-why { font-size: 12.5px; color: var(--muted); }
.next-step.done { background: var(--green-soft); }

.thread { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.msg { padding: 8px 11px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); max-width: 92%; }
.msg.from-cust { align-self: flex-start; border-left: 3px solid var(--blue); }
.msg.from-us { align-self: flex-end; border-left: 3px solid var(--cyan); }
.msg.internal { background: var(--amber-soft); border-style: dashed; }
.msg-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.talk-form textarea { width: 100%; resize: vertical; }
.talk-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vis-pick { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.reqs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.req { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line2); }
.req.open { border-color: var(--amber); background: var(--amber-soft); }
.pill.req-open { background: var(--amber-soft); color: var(--amber); } .pill.req-accepted { background: var(--green-soft); color: var(--green); } .pill.req-rejected { background: var(--red-soft); color: var(--red); }
.req-form { margin-top: 10px; } .req-form summary { cursor: pointer; }
.confirm-hist { margin: 8px 0; } .confirm-hist ul { margin: 4px 0 0; }

.summary-box { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.summary-box textarea { width: 100%; font-size: 12.5px; font-family: inherit; background: var(--panel2); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px; resize: vertical; }
.summary-box .btn { align-self: flex-start; }
.seg-tabs { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.seg-tabs button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; cursor: pointer; font: inherit; font-size: 12.5px; }
.seg-tabs button.on { background: var(--cyan-soft); color: var(--cyan); font-weight: 700; }

.saved-views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }
.saved-views .sv { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 12.5px; }
.saved-views .sv.on { border-color: var(--cyan); background: var(--cyan-soft); }
.saved-views .sv i { font-style: normal; font-size: 10.5px; color: var(--violet); }
.saved-views .x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; }
.saved-views .x:hover { color: var(--red); }
.sv-save summary { font-size: 12.5px; } .sv-save .inline-form { margin-top: 6px; }

.my-queue { margin: 12px 0 14px; border-color: var(--cyan); }
.mq-list { display: flex; flex-direction: column; }
.mq-row { display: grid; grid-template-columns: 170px 110px minmax(140px, 1.2fr) minmax(90px, .7fr) minmax(120px, 1.4fr); gap: 10px; align-items: baseline; padding: 7px 4px; border-top: 1px solid var(--line); color: inherit; }
.mq-row:hover { background: var(--panel2); text-decoration: none; }
@media (max-width: 760px) { .mq-row { grid-template-columns: 1fr 1fr; } }

.cgroup { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.cg-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 6px; }
.cg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 8px; }
.cg-actions details { flex: 1 1 320px; }
.cgroup .prog { margin: 4px 0 8px; }
.needs { border-color: var(--amber); }
.needs li { margin: 5px 0; }
.tag.warn { background: var(--amber-soft); color: var(--amber); }
.why { font-size: 11.5px; color: var(--violet); white-space: nowrap; }
.draft-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.busy { opacity: .6; cursor: progress; }
.chk-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- v5.1 货物追踪（货到哪了） ---------- */
.j-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;padding:12px 16px;border-radius:12px;background:var(--cyan-soft);border:1px solid var(--line2);margin:6px 0 12px}
.j-head b{font-size:17px}
.j-head .j-now{font-size:11px;font-weight:800;letter-spacing:.1em;color:var(--muted)}
.j-head.good{background:var(--green-soft)}
.j-head.late{background:var(--red-soft);border-color:var(--red)}
.j-late{flex-basis:100%;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline}
.j-late-tag{color:var(--red);font-weight:800;font-size:13.5px}
.j-why{font-size:13.5px}
.j-stripe{list-style:none;margin:6px 0 4px;padding:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;position:relative}
.j-stripe li{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;padding:0 2px}
.j-stripe li::before{content:"";position:absolute;top:17px;left:-50%;width:100%;height:4px;background:var(--line2);z-index:0}
.j-stripe li:first-child::before{display:none}
.j-stripe li.done::before,.j-stripe li.current::before{background:var(--green)}
.j-stripe .j-dot{position:relative;z-index:1;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--panel3);border:2px solid var(--line3);font-size:16px}
.j-stripe li.done .j-dot{background:var(--green);border-color:var(--green);color:#fff;font-weight:900}
.j-stripe li.current .j-dot{background:var(--panel);border:3px solid var(--cyan);box-shadow:0 0 0 5px var(--cyan-soft)}
.j-stripe li.is-late .j-dot{border-color:var(--red);box-shadow:0 0 0 5px var(--red-soft)}
.j-stripe .j-lbl{font-size:12.5px;font-weight:700}
.j-stripe li.todo .j-lbl{color:var(--muted)}
.j-stripe .j-t{font-size:11.5px;color:var(--muted)}
.j-stripe li.current .j-t{color:var(--cyan);font-weight:700}
.j-stripe li.is-late .j-t{color:var(--red)}
.j-sum{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.j-sum .chip.bad{color:var(--red);border-color:var(--red)}
.jcards{display:flex;flex-direction:column;gap:14px}
.jcard{display:block;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px 18px;color:inherit}
.jcard:hover{border-color:var(--cyan);text-decoration:none}
.jcard.late{border-left:5px solid var(--red)}
.jc-top{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline}
.jc-top .mono.big{font-size:19px;font-weight:700}
.jc-go{margin-left:auto;color:var(--cyan);font-size:13px;font-weight:700}
.jc-upd{margin-top:6px}
.j-tl{list-style:none;margin:14px 0 0;padding:0}
.j-tl>li{display:grid;grid-template-columns:44px 1fr;gap:12px;position:relative;padding-bottom:16px}
.j-tl>li::before{content:"";position:absolute;left:21px;top:40px;bottom:0;width:3px;background:var(--line2)}
.j-tl>li:last-child::before{display:none}
.j-tl>li.done::before{background:var(--green)}
.j-tl .j-dot{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--panel3);border:2px solid var(--line3);font-size:19px}
.j-tl li.done .j-dot{background:var(--green);border-color:var(--green);color:#fff;font-weight:900}
.j-tl li.current .j-dot{border:3px solid var(--cyan);box-shadow:0 0 0 6px var(--cyan-soft);background:var(--panel)}
.j-tl li.is-late .j-dot{border-color:var(--red);box-shadow:0 0 0 6px var(--red-soft)}
.j-row{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline;padding-top:9px}
.j-name{font-size:16px}
.j-state{font-size:12.5px;color:var(--muted)}
.j-tl li.current .j-state{color:var(--cyan);font-weight:700}
.j-tl li.is-late .j-state{color:var(--red)}
.j-tl li.todo .j-name{color:var(--muted)}
.j-times{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:13.5px;margin-top:3px}
.j-eta{font-weight:700}
.j-act{color:var(--green);font-weight:600}
.j-slip{color:var(--red);font-weight:700}
.j-note{margin-top:8px;padding:8px 12px;border-radius:10px;background:var(--amber-soft);border-left:4px solid var(--amber);font-size:13.5px;max-width:760px}
.j-note b{color:var(--amber)}
.j-note.internal{background:var(--panel2);border-left-color:var(--line3)}
.j-orders{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.j-order{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;padding:6px 10px;border:1px solid var(--line);border-radius:10px;color:inherit;font-size:13.5px}
.j-order:hover{border-color:var(--cyan);text-decoration:none}
.j-split{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:22px;align-items:start}
@media (max-width:900px){.j-split{grid-template-columns:1fr}.j-stripe .j-lbl{font-size:11px}.j-stripe .j-t{display:none}}
.j-form{background:var(--panel2);border:1px solid var(--line2);border-radius:14px;padding:14px 16px}
.j-form h3{margin-top:0}
.j-link{margin:-4px 0 12px}

/* ---------- v5.2 显示设置：字体大小 / 界面松紧（每个人自己选，默认标准） ---------- */
html[data-fs="sm"] { zoom: 0.92; }
html[data-fs="lg"] { zoom: 1.12; }
html[data-fs="xl"] { zoom: 1.25; }
html[data-density="compact"] .card { padding: 13px; margin-bottom: 12px; }
html[data-density="compact"] table.data th, html[data-density="compact"] table.data td { padding: 6px 9px; }
html[data-density="compact"] .btn { min-height: 34px; padding: 0 12px; }
html[data-density="compact"] .form-grid { gap: 8px 10px; }
html[data-density="roomy"] body { line-height: 1.7; }
html[data-density="roomy"] .card { padding: 22px; margin-bottom: 20px; }
html[data-density="roomy"] table.data th, html[data-density="roomy"] table.data td { padding: 14px 14px; }
html[data-density="roomy"] .btn { min-height: 48px; padding: 0 20px; font-size: 14px; }
html[data-density="roomy"] input[type=text], html[data-density="roomy"] input[type=number], html[data-density="roomy"] input[type=date], html[data-density="roomy"] input[type=datetime-local], html[data-density="roomy"] input[type=search], html[data-density="roomy"] input:not([type]), html[data-density="roomy"] select, html[data-density="roomy"] textarea { min-height: 48px; }
html[data-density="roomy"] input[type=checkbox], html[data-density="roomy"] input[type=radio] { width: 20px; height: 20px; }
html[data-density="roomy"] .form-grid { gap: 16px 18px; }
.display-wrap { position: relative; }
.iconbtn .aa { font-family: "Space Grotesk", sans-serif; font-size: 14px; letter-spacing: -0.02em; }
.display-pop { position: absolute; right: 0; top: 48px; width: 300px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; z-index: 70; }
.display-pop[hidden] { display: none; }
.display-pop p { margin: 2px 0 10px; }
.dp-group { margin-bottom: 12px; } .dp-group > span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.dp-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-opt { flex-direction: row; gap: 0; }
.dp-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dp-opt span { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line2); cursor: pointer; font-size: 13px; color: var(--text2); }
.dp-opt input:checked + span { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); font-weight: 700; }
.dp-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--cyan-soft); }

/* ---------- v5.2 操作指引框 ---------- */
.guide { background: var(--cyan-soft); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); border-radius: 14px; padding: 0; margin: 0 0 16px; }
.guide > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-weight: 700; }
.guide > summary::-webkit-details-marker { display: none; }
.guide-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--cyan); color: var(--cyan-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.guide-toggle { margin-left: auto; font-weight: 500; }
.guide:not([open]) .guide-toggle::after { content: ''; }
.guide-steps { list-style: none; margin: 0; padding: 0 16px 12px; display: grid; gap: 8px; }
.guide-steps li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.gs-no { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--cyan); color: var(--cyan); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.guide-tip { margin: 0; padding: 0 16px 12px 48px; color: var(--muted); font-size: 13px; }
.fno { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--panel3); color: var(--text); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-right: 2px; }

/* ---------- v5.2 异常登记 ---------- */
.exc-choices { display: grid; gap: 10px; margin-bottom: 8px; }
.exc-kind { border: 1px solid var(--line2); border-radius: 14px; background: var(--panel2); }
.exc-kind > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.exc-kind > summary::-webkit-details-marker { display: none; }
.exc-kind > summary:hover { background: var(--panel3); border-radius: 14px; }
.exc-kind[open] > summary { border-bottom: 1px solid var(--line2); border-radius: 14px 14px 0 0; }
.exc-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; font-weight: 700; }
.exc-t { display: flex; flex-direction: column; gap: 2px; } .exc-t small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.exc-form { padding: 14px; }
.exc-form fieldset.tell, fieldset.rcv { border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.exc-form fieldset.tell legend, fieldset.rcv legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.wait-calc { background: var(--amber-soft); border-radius: 10px; padding: 9px 12px; font-weight: 600; }
.exc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.exc-list li { border-left: 3px solid var(--amber); padding: 6px 10px; background: var(--panel2); border-radius: 0 10px 10px 0; display: grid; gap: 3px; }
.pill.exc-ct { background: var(--amber); } .pill.exc-dl { background: var(--orange); }
.pill.c-cancelled { text-decoration: line-through; }
.cancel-bar { background: var(--panel2); border-color: var(--line3); }
.fishbone .node .legacy { font-size: 10.5px; color: var(--faint); font-family: "JetBrains Mono", monospace; line-height: 1.3; margin-top: 1px; }
.fishbone .node.cancelled-node .dot { background: var(--red); color: #fff; border-color: var(--red); }
.danger-zone { margin-top: 14px; border: 1px dashed color-mix(in srgb, var(--red) 40%, transparent); border-radius: 12px; padding: 10px 12px; }
.danger-zone > summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 13px; }
.danger-zone[open] > summary { margin-bottom: 10px; }
.card.danger-zone { padding: 12px 16px; }
.legacy-map > summary { cursor: pointer; } .legacy-map[open] > summary { margin-bottom: 10px; }

/* ---------- v5.2 仓库 / 散货 / 合并派送 ---------- */
.seg-tabs a { white-space: nowrap; padding: 6px 13px; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-block; }
.seg-tabs a:hover { text-decoration: none; color: var(--text); } .seg-tabs a.on { background: var(--cyan-soft); color: var(--cyan); }
.seg-tabs + .filters, .seg-tabs + .card { margin-top: 12px; }
.pad .seg-tabs { margin-top: 4px; }
.merge-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 0; padding-bottom: 12px; }
.card .merge-bar:not(.pad) { padding: 4px 0 12px; }
table.data tr.dim td { opacity: 0.62; }
table.data tr.total-row td { background: var(--panel2); }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.next-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); margin-bottom: 16px; }
.next-bar.ok-bar { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.next-bar.bad-bar { background: var(--red-soft); }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.choice { flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--panel2); }
.choice span { display: flex; flex-direction: column; gap: 2px; } .choice small { color: var(--muted); font-weight: 400; }
.choice:has(input:checked) { border-color: var(--cyan); background: var(--cyan-soft); }
.deliver-box { display: none; }
.deliver-card:has(input[name=then_deliver][value="1"]:checked) .deliver-box { display: block; }
.go-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.go-bar .grow { flex: 1 1 280px; }
.pill.w-pending { background: var(--st-planned); } .pill.w-arrived { background: var(--st-atpickup); } .pill.w-received { background: var(--st-paid); }
.j-general { margin-top: 12px; }
td.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 700px) { .display-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

@media (max-width: 700px) { .seg-tabs { display: flex; flex-wrap: wrap; } .guide-toggle { display: none; } }

/* ---------- 颜色说明（按流程顺序） ---------- */
.flow-legend { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 0 0 14px; }
.flow-legend .fl-step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px 6px 8px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); min-width: 0; }
.flow-legend .fl-step:hover { border-color: var(--cyan); text-decoration: none; }
.flow-legend .fl-step.on { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-soft); }
.flow-legend .fl-top { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.flow-legend .fl-n { font-size: 10.5px; color: var(--faint); font-weight: 700; min-width: 12px; }
.flow-legend .fl-sw { width: 16px; height: 16px; border-radius: 4px; flex: none; background: var(--sc); border: 1px solid rgba(0,0,0,0.15); }
.flow-legend .fl-old { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.flow-legend .fl-old b { color: var(--muted); }
.flow-legend .fl-arrow { align-self: center; color: var(--faint); }
.flow-legend .fl-sep { flex-basis: 100%; height: 0; }
.flow-legend .fl-label { align-self: center; font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.swatch { display: inline-block; width: 18px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0,0,0,0.15); margin-right: 6px; }
@media (max-width: 700px) { .flow-legend .fl-arrow { display: none; } }

/* =====================================================================
   v6 卡车调度 / 卡车账单（借鉴 Astrolion WMS：卡片 + 五步运输条 + 两种轮盘 + 快速确认）
   颜色全部用变量，深浅色两套主题都对；状态不只靠颜色：有文字、节点形状、图标和时间。
   ===================================================================== */
:root, [data-theme="dark"] { --jr: #5AA9E6; --jr-soft: rgba(90,169,230,0.14); --jr-line: #2B3E55; --jr-cur-ink: #CFE6FA; }
[data-theme="light"] { --jr: #207FA5; --jr-soft: #EFF9FF; --jr-line: #D7E4EB; --jr-cur-ink: #135775; }
svg.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }

.tk-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tk-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text2); }
.tk-stat b { font: 700 22px/1.1 "Space Grotesk", sans-serif; color: var(--text); font-variant-numeric: tabular-nums; }
.tk-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tk-stat:hover { text-decoration: none; border-color: var(--cyan); }
.tk-stat.warn b { color: var(--amber); } .tk-stat.bad b { color: var(--red); }
.tk-filters .tk-more { display: contents; }
.tk-filters .tk-more > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 6px; list-style: none; }
.tk-filters .tk-more > summary::after { content: ' ▾'; font-size: 10px; }
.tk-filters .tk-more[open] > summary::after { content: ' ▴'; }
.tk-filters .tk-more label { flex-direction: row; align-items: center; gap: 6px; }
.tk-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.tk-toolbar b { color: var(--text); }
.tk-density button[aria-pressed="true"], .tk-density button.on { background: var(--cyan-soft); color: var(--cyan); font-weight: 700; }
.tk-batch { display: flex; gap: 10px; align-items: center; margin: 0; }

.tk-list { display: flex; flex-direction: column; gap: 10px; }
.tk-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .2s; }
.tk-card:hover { border-color: var(--line2); }
.tk-card.is-cancelled { opacity: 0.72; }
.tk-card.flash-hit { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.tk-row1 { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; }
.tk-id { min-width: 0; }
.tk-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 3px; }
.tk-tags .pill { font-size: 11px; padding: 0 8px; }
.tag.svc { background: var(--panel3); } .tag.outs { background: var(--violet-soft); color: var(--violet); } .tag.own { background: var(--cyan-soft); color: var(--cyan); } .tag.ship { background: var(--amber-soft); color: var(--amber); }
.tk-no { font-size: 15px; font-weight: 700; color: var(--text); }
.tk-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk-summary, .tk-detail { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; font-size: 13px; padding-top: 10px; margin-top: 10px; border-top: 1px dashed var(--line2); }
.tk-summary .k, .tk-detail .k { color: var(--muted); font-size: 12px; margin-right: 6px; }
.tk-detail .span2 { grid-column: span 2; }
.tk-list[data-density="summary"] .tk-summary, .tk-list[data-density="detail"] .tk-summary, .tk-list[data-density="detail"] .tk-detail, .tk-card.open .tk-summary, .tk-card.open .tk-detail { display: grid; }
.tk-list[data-density="compact"] .tk-card { padding: 8px 12px; }
.tk-list[data-density="compact"] .tk-sub { -webkit-line-clamp: 1; }
.tk-flag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-right: 4px; background: var(--amber-soft); color: var(--amber); }
.tk-flag.f-no_pod { background: var(--red-soft); color: var(--red); } .tk-flag.f-charge_pending { background: var(--violet-soft); color: var(--violet); }

/* 五步运输条：当前 = 大圆 + 卡车；走过 = 实心点 + 勾；没到 = 空心点；中间节点 = 小方块 */
.journey { display: flex; overflow-x: auto; padding: 4px 2px 6px; min-width: 0; scrollbar-width: thin; }
.journey .jn { position: relative; flex: 1 0 74px; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: var(--faint); font: inherit; font-size: 11px; cursor: pointer; padding: 3px 2px; }
.journey span.jn { cursor: default; }
.journey .jn[data-minor="true"] { flex: 0.75 0 58px; min-width: 58px; font-size: 10.5px; }
.journey .jn::after { content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--jr-line); z-index: 0; }
.journey .jn:last-child::after { display: none; }
.journey .jn[data-reached="true"]:not([data-current="true"])::after { background: linear-gradient(90deg, var(--jr), color-mix(in srgb, var(--jr) 70%, var(--text))); }
.journey .jn > i { width: 12px; height: 12px; margin-top: 9px; border-radius: 50%; background: var(--panel); border: 1.5px solid var(--line3); z-index: 1; display: grid; place-items: center; font-style: normal; color: #fff; font-size: 8px; }
.journey .jn[data-minor="true"] > i { width: 9px; height: 9px; margin: 10.5px 0 1.5px; border-radius: 2px; }
.journey .jn[data-reached="true"] { color: var(--jr); }
.journey .jn[data-reached="true"] > i { background: var(--jr); border-color: var(--jr); }
.journey .jn[data-reached="true"]:not([data-current="true"]) > i svg { width: 9px; height: 9px; stroke-width: 3; }
.journey .jn[data-current="true"] { color: var(--jr-cur-ink); font-weight: 700; }
.journey .jn[data-current="true"] > i { width: 30px; height: 30px; margin: 0 0 -9px; border-radius: 50%; background: var(--jr-soft); border: 1.5px solid var(--jr); color: var(--jr); box-shadow: 0 2px 10px color-mix(in srgb, var(--jr) 30%, transparent); font-size: 16px; }
.journey .jn[data-current="true"]::after { top: 15px; }
.journey .jn-l { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey [data-stage-time] { display: block; margin-top: -4px; max-width: 150px; white-space: normal; text-align: center; font-size: 10.5px; line-height: 1.35; font-weight: 600; color: var(--text2); }
.journey[data-exception="true"] .jn[data-current="true"] > i { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.journey[data-exception="true"] .jn[data-reached="true"]::after { background: color-mix(in srgb, var(--red) 45%, var(--jr-line)); }
.journey[data-cancelled="true"] .jn { color: var(--faint); }
.journey[data-cancelled="true"] .jn > i { background: var(--panel3); border-color: var(--line3); }
.journey .jn:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: 8px; }
.journey .jn:hover .jn-l { text-decoration: underline; }

/* 金额区：普通车和外包车同一个组件 */
.tk-money { display: flex; flex-direction: column; gap: 4px; min-width: 132px; }
.tk-money .amt { border: 1px solid var(--line2); background: var(--panel2); border-radius: 10px; padding: 4px 10px; display: flex; flex-direction: column; }
.tk-money .amt-k { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.tk-money .amt b { font: 700 15px/1.25 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.tk-money .amt b.pending { color: var(--faint); font-size: 13px; }
.tk-money .amt.cost b { color: var(--violet); }
.tk-money.none { min-width: 90px; }
.amt-adj summary { font-size: 11px; color: var(--cyan); cursor: pointer; white-space: nowrap; }
.amt-adj ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 11.5px; }
.amt-adj li { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.tk-pick { padding: 6px; }
.aw-root { position: relative; }
.aw-trigger { display: inline-flex; align-items: center; gap: 6px; height: 34px; border: 1px solid var(--line3); border-radius: 18px; padding: 0 12px; background: var(--panel2); color: var(--text2); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; position: relative; }
.aw-trigger:hover { border-color: var(--cyan); color: var(--text); }
.aw-trigger[aria-expanded="true"] { background: var(--cyan); color: var(--cyan-ink); border-color: var(--cyan); }
.aw-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--violet); color: #fff; font: 700 10px/18px "Space Grotesk", sans-serif; text-align: center; font-style: normal; padding: 0 4px; }

/* 浮层：放到页面顶层（popover），不会被卡片裁掉 */
.sw-surface, .aw-surface { position: fixed; inset: auto; margin: 0; padding: 0; border: 1px solid var(--line3); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: auto; z-index: 900; font-family: inherit; max-width: calc(var(--vw, 100vw) - 16px); max-height: calc(var(--vh, 100dvh) - 16px); }
.sw-surface { width: 340px; }
.aw-surface { width: 352px; max-width: calc(var(--vw, 100vw) - 24px); max-height: calc(var(--vh, 100dvh) - 24px); }
@media (prefers-reduced-motion: no-preference) { .sw-surface:popover-open, .aw-surface:popover-open { animation: tk-appear .13s ease-out; } @keyframes tk-appear { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } } }
.sw header, .aw-surface header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 0; font-size: 12px; }
.sw header strong, .aw-surface header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-close, .aw-close { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel3); color: var(--muted); cursor: pointer; flex: none; }
.sw-updates { padding: 10px 15px 0; font-size: 12px; line-height: 1.55; }
.sw-updates > strong { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.sw-updates > strong small { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.sw-updates > p { color: var(--muted); margin: 10px 0; }
.sw-updates ol { list-style: none; padding: 0; margin: 8px 0 0; max-height: min(250px, 34dvh); overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.sw-updates li { padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sw-updates li > span { color: var(--jr); font-size: 11px; font-weight: 700; }
.sw-updates li p { margin: 3px 0 5px; white-space: pre-wrap; color: var(--text); font-size: 12.5px; }
.sw-updates li small { display: block; font-size: 10.5px; color: var(--muted); }
.sw-updates button { font: inherit; border: 1px solid var(--line3); background: var(--panel2); border-radius: 6px; padding: 2px 8px; color: var(--text); cursor: pointer; }
.sw-dial { position: relative; height: 220px; width: 252px; max-width: 100%; margin: 0 auto; background: radial-gradient(circle at center, transparent 77px, var(--line2) 78px, transparent 79px); }
.sw-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 86px; height: 86px; border: 1.5px solid var(--jr); border-radius: 50%; background: var(--jr-soft); color: var(--jr-cur-ink); cursor: pointer; font: inherit; }
.sw-center span { font-size: 9.5px; color: var(--muted); }
.sw-center svg { width: 20px; height: 20px; color: var(--jr); }
.sw-center strong { font-size: 10.5px; line-height: 1.25; max-width: 76px; text-align: center; overflow-wrap: anywhere; }
.sw-center:hover { filter: brightness(1.1); }
.sw-action, .aw-item { position: absolute; left: calc(50% + var(--x, 0) * var(--r, 78px)); top: calc(50% + var(--y, 0) * var(--r, 78px)); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; padding: 0; border: 0; background: transparent; color: var(--text2); font: inherit; cursor: pointer; text-decoration: none; }
.sw-action i { width: 32px; height: 32px; border: 1px solid var(--line3); border-radius: 50%; display: grid; place-items: center; background: var(--panel2); font-style: normal; font-size: 15px; }
.sw-action span, .aw-l { font-size: 10.5px; text-align: center; line-height: 1.3; max-width: 72px; overflow-wrap: anywhere; }
.sw-action:hover i, .aw-item:hover .aw-ic { border-color: var(--cyan); color: var(--cyan); }
.sw-surface button:focus-visible, .aw-surface a:focus-visible, .aw-surface button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }
.aw-dial { position: relative; height: 302px; background: radial-gradient(circle at center, var(--panel2) 0 45px, transparent 46px), radial-gradient(circle at center, transparent 114px, var(--line2) 115px, transparent 116px); }
.aw-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; pointer-events: none; color: var(--muted); font-size: 10.5px; }
.aw-center b { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--text2); }
.aw-item { width: 76px; }
.aw-ic { position: relative; width: 38px; height: 38px; border: 1px solid var(--line3); border-radius: 50%; display: grid; place-items: center; background: var(--panel2); font-size: 17px; }
.aw-ic > span { position: absolute; top: -5px; right: -6px; border-radius: 9px; background: var(--violet-soft); color: var(--violet); padding: 0 5px; font-size: 9.5px; font-weight: 700; line-height: 16px; border: 1px solid var(--panel); }
.aw-ic > span:empty { display: none; }
.aw-item[data-act="next"] .aw-ic { background: var(--jr-soft); border-color: var(--jr); color: var(--jr); }
.aw-item[data-act="cancel"] .aw-ic { color: var(--red); }
.aw-actions { display: none !important; }
@media (max-width: 360px) { .aw-dial { height: 280px; } .aw-item { width: 66px; } .aw-l { font-size: 9.5px; } .aw-ic { width: 32px; height: 32px; } }
@media (max-height: 420px) { .aw-dial { height: 270px; } }
@media print { .sw-surface, .aw-surface, .aw-root { display: none; } }

/* 弹窗：快速确认 / 资料 / 费用 */
.tk-dialog { padding: 0; border: 1px solid var(--line3); border-radius: 20px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); background: var(--panel); color: var(--text); box-shadow: 0 24px 90px rgba(0,0,0,0.4); margin: auto; }
.tk-dialog::backdrop { background: rgba(10,14,20,0.45); backdrop-filter: blur(3px); }
.tkd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 20px; background: var(--panel2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.tkd-head small { font-size: 11.5px; color: var(--muted); }
.tkd-head h2 { font-size: 19px; margin: 3px 0 0; }
.tkd-x { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.tkd-x:hover { background: var(--panel3); color: var(--text); }
.tkd-content { padding: 16px 20px 18px; }
.tkd-content h4:first-child { margin-top: 0; }
.tk-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.tk-form textarea { resize: vertical; }
.tkd-cmd { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.tkd-cmd .btn svg { width: 17px; height: 17px; }
em.req { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.tk-plan { background: var(--jr-soft); border: 1px solid color-mix(in srgb, var(--jr) 35%, transparent); border-radius: 12px; padding: 10px 13px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tk-plan .flash { margin: 6px 0 0; }
.tk-mode { border: 1px solid var(--line2); border-radius: 12px; padding: 8px 12px; display: flex; gap: 18px; flex-wrap: wrap; margin: 0; }
.tk-mode legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.tk-fold summary { cursor: pointer; }
.tk-history { list-style: none; padding: 0; margin: 0 0 0 5px; border-left: 2px solid var(--line2); }
.tk-history li { position: relative; padding: 8px 0 12px 16px; font-size: 12.5px; }
.tk-history li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--jr); }
.tk-history strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-history time { font-size: 11px; color: var(--muted); display: block; }
.tk-history p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.tk-files { list-style: none; padding: 0; margin: 0 0 8px; }
.tk-files li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; font-size: 13px; }
.tk-files small { color: var(--muted); font-size: 11px; }
.tk-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tk-side { border: 1px solid var(--line2); background: var(--panel2); border-radius: 12px; padding: 8px 12px; }
.tk-side-k { font-size: 11px; color: var(--muted); font-weight: 600; }
.tk-side-v { font: 700 20px/1.3 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.tk-preview { font-size: 13px; background: var(--panel2); border-radius: 10px; padding: 8px 11px; min-height: 20px; }
.tk-preview:empty { display: none; }
.tk-exc { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tk-reqs { list-style: none; padding: 0; margin: 0; }
.tk-reqs li { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.tk-reqs li.rq-pending { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.tk-review { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tk-review input[name=review_reason] { flex: 1 1 200px; }
.tk-panel-page { max-width: 640px; }

@media (max-width: 1100px) {
  .tk-row1 { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "id money ops" "jr jr jr"; }
  .tk-row1 > .tk-id { grid-area: id; } .tk-row1 > .journey { grid-area: jr; } .tk-row1 > .tk-money { grid-area: money; } .tk-row1 > .tk-pick { display: none; } .tk-row1 > .aw-root { grid-area: ops; }
}
@media (max-width: 640px) {
  .tk-row1 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id ops" "money money" "jr jr"; }
  .tk-money { flex-direction: row; flex-wrap: wrap; }
  .tk-summary, .tk-detail { grid-template-columns: 1fr; } .tk-detail .span2 { grid-column: auto; }
  .tk-stats { grid-template-columns: repeat(2, 1fr); }
  .journey .jn { flex-basis: 62px; min-width: 62px; } .journey .jn[data-minor="true"] { flex-basis: 48px; min-width: 48px; }
  .tk-dialog { width: calc(100vw - 16px); border-radius: 16px; }
  .tkd-content .form-grid.compact { grid-template-columns: 1fr; } .tkd-content .form-grid .span2 { grid-column: auto; }
}

/* 卡车账单 */
.pill.cb-pending { background: var(--amber-soft); color: var(--amber); } .pill.cb-approved { background: var(--cyan-soft); color: var(--cyan); } .pill.cb-disputed { background: var(--red-soft); color: var(--red); }
.pill.cb-paid { background: var(--green-soft); color: var(--green); } .pill.cb-void { background: var(--panel3); color: var(--muted); text-decoration: line-through; }
.pill.rs-ok { background: var(--green-soft); color: var(--green); } .pill.rs-diff { background: var(--red-soft); color: var(--red); } .pill.rs-review { background: var(--violet-soft); color: var(--violet); }
.pill.lg-unbilled { background: var(--panel3); color: var(--text2); } .pill.lg-missing { background: var(--amber-soft); color: var(--amber); } .pill.lg-ok { background: var(--green-soft); color: var(--green); }
.pill.lg-diff { background: var(--red-soft); color: var(--red); } .pill.lg-review { background: var(--violet-soft); color: var(--violet); } .pill.lg-changed { background: var(--amber-soft); color: var(--orange); }
table.data tr.is-void td { opacity: 0.55; }
.fin small { font-size: 11.5px; margin-top: 2px; }
.pager { display: flex; gap: 14px; justify-content: center; align-items: center; padding: 12px; font-size: 13px; color: var(--muted); }
.bl-trips { margin: 6px 0 12px; } .bl-trips > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.bl-trips input[type=search] { max-width: 320px; margin-bottom: 8px; }
.bl-lines td { white-space: normal; vertical-align: top; }
.bl-lines select, .bl-lines input { min-width: 0; width: 100%; }
.bl-lines td:nth-child(1) { min-width: 240px; } .bl-lines td:nth-child(3) { width: 120px; } .bl-lines td:nth-child(6) { min-width: 180px; }
.bl-lines tr.bad-row td { background: var(--red-soft); }
.bl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.bl-sum { font-size: 14px; } .bl-sum b { font-variant-numeric: tabular-nums; }

label > .lbl { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.tk-dialog [hidden], .tk-form [hidden] { display: none !important; }
table.data td.wrap { min-width: 110px; }
.tk-strip-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.tk-strip-head h2 { margin: 0; } .tk-strip-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-strip .journey { margin: 6px 0 2px; }
/* v6：顶栏多了「卡车调度」，搜索框起始宽度收一点，1440 宽也排一行 */
.askbar { flex-basis: 200px; }
@media (max-width: 1560px) { .askbar kbd { display: none; } }
.tk-form[data-mode="OWN"] .req-outs { display: none; }
/* 和 Astrolion 一样的金额小牌：浅绿底 + $ 圆标 */
.tk-money .amt { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.tk-money .amt.cost { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.tk-money .amt-v { display: flex; align-items: center; gap: 6px; }
.tk-money .amt-v > i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font: 700 9.5px/1 "Space Grotesk", sans-serif; font-style: normal; color: var(--green); flex: none; }
.tk-money .amt.cost .amt-v > i { color: var(--violet); }
.tk-money .amt b { font-size: 14px; }
.journey [data-stage-time] { color: var(--muted); }
.journey .jn[data-reached="true"] [data-stage-time], .journey .jn[data-node="PICKED"] [data-stage-time] { color: var(--text2); }
.aw-center svg { color: var(--text2); }

/* ===== v7 左侧侧边栏（借鉴 Astrolion）===== */
body.has-side { display: block; }
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.side { width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; z-index: 70; scrollbar-width: thin; }
body.has-side:has(.viewas-bar) .side { height: calc(100vh - 44px); top: 44px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 10px; }
.side-x { display: none; }
.side-tools { display: flex; gap: 10px; padding: 0 10px 6px; }
.side-tools .link { color: var(--faint); font-size: 11.5px; }
.sidenav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidenav a, .sn-group > summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text2); font-weight: 500; cursor: pointer; list-style: none; min-height: 38px; }
.sn-group > summary::-webkit-details-marker { display: none; }
.sidenav a:hover, .sn-group > summary:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.sn-ic { width: 18px; height: 18px; flex: none; color: var(--muted); }
.sn-top.active, .sn-top.active .sn-ic { background: var(--cyan-soft); color: var(--cyan); }
.sn-group.active > summary { color: var(--text); }
.sn-group.active > summary .sn-ic { color: var(--cyan); }
.sn-n { margin-left: auto; font-size: 11px; color: var(--faint); font-family: "JetBrains Mono", monospace; }
.sn-chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; flex: none; }
.sn-group[open] > summary .sn-chev { transform: rotate(90deg); }
.sn-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--line2); }
.sn-items a { padding: 6px 10px; min-height: 32px; font-size: 13px; color: var(--muted); font-weight: 400; justify-content: space-between; }
.sn-items a.active { background: var(--cyan-soft); color: var(--cyan); font-weight: 600; box-shadow: inset 2px 0 0 var(--cyan); }
.sn-items a.sn-dev { color: var(--violet); }
.sn-items .sk { font-size: 10px; color: var(--faint); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; }
.side-foot { border-top: 1px solid var(--line); margin-top: 10px; padding: 10px 6px 2px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .who { justify-content: space-between; }
.side-foot .who .meta { flex: 1; min-width: 0; }
.side-foot .who .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main > main { flex: 1; }
body.has-side .topbar { flex-wrap: nowrap; padding: 10px 24px; }
body.has-side:has(.viewas-bar) .topbar { top: 44px; }
.side-burger { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; min-width: 0; overflow: hidden; }
.crumb .here { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumb i { font-style: normal; color: var(--faint); }
body.has-side .askbar { flex: 0 1 460px; margin-left: auto; }
body.has-side .tools { margin-left: 0; }
.side-scrim { display: none; }
@media (max-width: 1100px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); width: 272px; }
  body.has-side:has(.viewas-bar) .side { top: 0; height: 100vh; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 65; }
  .side-burger, .side-x { display: inline-flex; }
  body.has-side .askbar { flex: 1 1 auto; }
}
@media (max-width: 760px) {
  body.has-side .topbar { flex-wrap: wrap; padding: 8px 14px; }
  body.has-side .askbar { order: 10; flex-basis: 100%; }
  .crumb span:not(.here), .crumb i { display: none; }
}
@media print { .side, .side-scrim { display: none; } }
@media (prefers-reduced-motion: reduce) { .side, .sn-chev { transition: none; } }

/* 开发者视角提示条 */
.viewas-bar { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 12px; padding: 6px 24px; min-height: 44px; background: var(--violet-soft); border-bottom: 1px solid var(--violet); color: var(--text); font-size: 13px; backdrop-filter: blur(6px); }
[data-theme="dark"] .viewas-bar { background: #1d1736; }
[data-theme="light"] .viewas-bar { background: #efeafd; }
.viewas-bar span { flex: 1; }
.viewas-bar .va-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.viewas-bar form { margin: 0; }

/* ===== v7 系统管理 ===== */
.sys-head { margin: 4px 0 14px; }
.sys-head h1 { margin: 2px 0 4px; }
.sys-eyebrow { color: var(--cyan); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.sys-rule { border: 1px solid var(--line2); border-left: 3px solid var(--cyan); background: var(--panel); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; color: var(--text2); }
.sys-card { margin-bottom: 16px; }
.sys-card h2 { margin: 2px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sys-card h3 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); }
.sys-roster-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pill-count { border: 1px solid var(--line2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--text2); white-space: nowrap; }
.sys-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .sys-two { grid-template-columns: 1fr; } }
.sys-pane { border: 1px solid var(--line2); border-radius: 14px; padding: 12px; background: var(--bg2); }
.sys-pane header { display: flex; justify-content: space-between; font-weight: 700; }
.sys-pane.on header span { color: var(--green); }
.acc-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.acc-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; }
.acc-row.is-off { opacity: .6; }
.acc-row .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line3); margin-top: 7px; }
.acc-row .dot.on { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.acc-main { flex: 1; min-width: 0; }
.acc-mail { color: var(--muted); font-size: 12.5px; font-family: "JetBrains Mono", monospace; word-break: break-all; }
.acc-belong { color: var(--faint); font-size: 12px; }
.acc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.acc-right form { margin: 0; }
.empty-li { padding: 10px; }
.rb { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 7px; margin-left: 4px; background: var(--panel3); color: var(--text2); vertical-align: 1px; }
.rb-developer { background: var(--violet-soft); color: var(--violet); }
.rb-owner { background: var(--amber-soft); color: var(--amber); }
.rb-manager { background: var(--cyan-soft); color: var(--cyan); }
.rb-finance, .rb-delivery { background: var(--green-soft); color: var(--green); }
.rb-test { background: transparent; border: 1px dashed var(--violet); color: var(--violet); }
.rb-off { background: var(--red-soft); color: var(--red); }
.rb-view { background: var(--violet-soft); color: var(--violet); }
.rb-ready { background: var(--green-soft); color: var(--green); }
.rb-skel { background: var(--amber-soft); color: var(--amber); }
.sys-protect { margin: 14px 0 0; padding-left: 18px; }
.form-grid.compact { gap: 10px 14px; }
.chk { display: flex; align-items: center; gap: 8px; }
.chk input { width: auto; min-height: 0; }
.logic-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.lg-b { display: inline-flex; align-items: center; gap: 6px; }
.lg-b i { width: 10px; height: 10px; border-radius: 3px; background: var(--bc); }
.logic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.logic-node { border: 1px solid var(--line2); border-top: 3px solid var(--bc); background: var(--panel); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.logic-node h3 { margin: 4px 0 0; font-size: 15px; }
.lg-tag { font-size: 11px; color: var(--bc); font-weight: 700; }
.logic-node dl { display: grid; grid-template-columns: 54px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.logic-node dt { color: var(--faint); }
.logic-node dd { margin: 0; color: var(--text2); }
.logic-node .btn { align-self: flex-start; margin-top: auto; }
.db-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13px; }
.db-chain span { border: 1px solid var(--line2); background: var(--panel); border-radius: 10px; padding: 6px 10px; }
.db-chain b { color: var(--faint); }
.acc-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acc-list.test { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.logic-node dt { text-transform: capitalize; }
@media (max-width: 760px) { .side-foot .who .meta { display: flex; } .side-foot .online { display: inline-flex; } }
/* v7.1：侧边栏只让菜单滚动，底部自己的信息固定不动 */
.side { overflow: hidden; }
.side-head, .side-tools, .side-foot { flex: none; }
.sidenav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }
.side-foot { background: var(--bg2); }
.side-foot .who .meta { display: flex !important; }
.side-foot .online { display: inline-flex !important; }
body.has-side.driver .topbar, body.has-side.portal .topbar { flex-wrap: nowrap; }
body.has-side.driver main { max-width: 760px; }

/* ===== v7.1 总览（首页第一屏）===== */
.dash { margin-bottom: 28px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-title { margin: 2px 0 4px; font-size: 26px; letter-spacing: .01em; }
.dash-head p { max-width: 720px; margin: 0; }
.dash-ctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dash-seg button { cursor: pointer; }
.dash-custom { display: flex; align-items: center; gap: 6px; margin: 0; }
.dash-custom input { width: auto; min-height: 32px; padding: 2px 8px; font-size: 12.5px; }
.dash-h { margin: 0 0 10px; font-size: 15px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dash-h small { font-weight: 400; font-size: 12px; }
.dash-top { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; margin-bottom: 16px; }
.dash-sum-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-sum-t th, .dash-sum-t td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.dash-sum-t thead th { color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }
.dash-sum-t td.num, .dash-sum-t th.num { text-align: right; font-family: "JetBrains Mono", monospace; }
.dash-sum-t tbody th { color: var(--text2); }
.dash-sum-t tbody td.num { color: var(--text); font-weight: 600; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash-kpis.loading { opacity: .5; }
.dk { border: 1px solid var(--line2); background: var(--bg2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dk-l { color: var(--muted); font-size: 12px; }
.dk b { font-size: 24px; font-family: "Space Grotesk", sans-serif; line-height: 1.15; }
.dk-d { font-size: 12px; font-weight: 600; }
.dk-d.up { color: var(--green); } .dk-d.down { color: var(--red); } .dk-d.same { color: var(--muted); }
.dk small { font-size: 11px; }
.dash-mapcard { padding: 14px; margin-bottom: 16px; }
.dash-maphead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-maphead .dash-h { margin: 0; }
.dash-views { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-mapwrap { position: relative; display: grid; grid-template-columns: 250px 1fr; gap: 12px; height: 600px; }
.dash-map { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); background: var(--map-sea); min-height: 0; }
.dash-map .leaflet-container, .dash-map.leaflet-container { background: var(--map-sea); font-family: inherit; }
.dash-filter { display: flex; flex-direction: column; gap: 12px; overflow: hidden; min-height: 0; }
.df-block { display: flex; flex-direction: column; gap: 6px; }
.df-block > b, .df-row > b { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.df-block select, .df-block input[type=search] { min-height: 32px; padding: 2px 8px; font-size: 13px; }
.df-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.df-row select { width: auto; }
.df-kinds { display: flex; flex-direction: column; gap: 4px; }
.df-kind { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.df-kind input { width: auto; min-height: 0; }
.df-kind i { width: 18px; height: 4px; border-radius: 2px; }
.df-cust { flex: 1; min-height: 0; }
.df-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.df-list li { display: grid; grid-template-columns: auto 22px 1fr auto; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; font-size: 13px; }
.df-list li.on { background: var(--cyan-soft); }
.df-list li input[type=checkbox] { width: auto; min-height: 0; margin: 0; }
.df-list li input[type=color] { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line2); border-radius: 6px; background: none; min-height: 0; cursor: pointer; }
.df-list li input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; } .df-list li input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.df-name { text-align: left; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.df-list b { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }
.dash-detail { position: absolute; top: 10px; right: 10px; bottom: 10px; width: 360px; max-width: calc(100% - 20px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; z-index: 600; scrollbar-width: thin; }
.dd-x { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; font-size: 16px; }
.dd-cust { display: flex; align-items: center; gap: 8px; padding-right: 36px; }
.dd-cust i, .dd-fl .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.dd-lane { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dd-lane h3 { margin: 4px 0; font-size: 15px; }
.dd-recs { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dd-rec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg2); }
.dd-rh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dd-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; }
.dd-steps > i { color: var(--faint); font-style: normal; }
.dd-step { border: 1px dashed var(--line3); border-radius: 7px; padding: 2px 6px; color: var(--muted); display: inline-flex; flex-direction: column; line-height: 1.3; }
.dd-step.done { border-style: solid; border-color: var(--cyan); color: var(--text); }
.dd-step small { color: var(--faint); font-size: 10.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-flow ul { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dd-fl { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; color: var(--text2); cursor: pointer; font: inherit; font-size: 12.5px; }
.dd-fl:hover, .dd-fl.on { border-color: var(--cyan); color: var(--text); }
.dd-fl span:not(.dd-k) { flex: 1; min-width: 0; }
.dd-fl b { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.dd-k { font-size: 10.5px; font-weight: 700; color: var(--k); border: 1px solid var(--k); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.dash-mapnote { margin: 8px 0 0; }
.dash-chartcard { padding: 14px 16px; margin-bottom: 16px; }
.dash-chead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.dash-legend i, .dash-tip i, .pie-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dash-chart { width: 100%; overflow: hidden; }
.dash-svg { display: block; max-width: 100%; }
.dash-svg .grid { stroke: var(--line); stroke-width: 1; }
.dash-svg .ax { fill: var(--faint); font-size: 10.5px; font-family: "JetBrains Mono", monospace; }
.dash-svg .bar:hover rect:not([fill=transparent]) { filter: brightness(1.15); }
.dash-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-pies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-pie { padding: 14px 16px; }
.dash-pie h3 { margin: 0 0 8px; font-size: 14px; }
.dash-pie > div { display: flex; gap: 14px; align-items: center; }
.donut .arc { stroke: var(--panel); stroke-width: 1.5; cursor: pointer; transition: opacity .15s; }
.donut .arc:hover { opacity: .8; }
.donut-n { fill: var(--text); font-size: 17px; font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.pie-legend li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; }
.pie-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.pie-legend b { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.pie-legend small { color: var(--faint); width: 32px; text-align: right; }
.sankey .sk-link { stroke-opacity: .35; transition: stroke-opacity .15s; mix-blend-mode: normal; }
.sankey .sk-link:hover { stroke-opacity: .7; }
.sankey .sk-link.dim { stroke-opacity: .06; }
.sankey .sk-label { fill: var(--text2); font-size: 11.5px; }
.sankey .sk-label.click { fill: var(--text); font-weight: 600; }
.offline-map { cursor: grab; touch-action: none; }
.offline-map .grat { stroke: var(--map-road2); stroke-width: 1; }
.offline-map .ln { cursor: pointer; }
.offline-map .ln:hover { stroke-opacity: 1; filter: brightness(1.2); }
.offline-map .pl { cursor: pointer; }
.offline-map .pl-label { fill: var(--text2); font-size: 11px; paint-order: stroke; stroke: var(--map-sea); stroke-width: 3px; }
.dash-tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 320px; line-height: 1.5; }
.leaflet-tooltip.dash-ltip { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); font: 12.5px/1.5 "Noto Sans SC", sans-serif; padding: 8px 10px; }
.leaflet-tooltip.dash-ltip::before { display: none; }
.dash-map .leaflet-control-attribution { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--muted); }
.dash-map .leaflet-control-attribution a { color: var(--cyan); }
.dash-map .leaflet-bar a { background: var(--panel); color: var(--text); border-color: var(--line2); }
.today-head { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 1280px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-pies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .dash-top, .dash-grid2 { grid-template-columns: 1fr; } .dash-mapwrap { grid-template-columns: 1fr; height: auto; } .dash-map { height: 460px; } .dash-filter { max-height: 260px; } .dash-ctrl { align-items: flex-start; } }
@media (max-width: 640px) { .dash-pies { grid-template-columns: 1fr; } .dash-detail { position: fixed; inset: auto 8px 8px 8px; top: 30vh; width: auto; } }
.dash-filter label.df-kind { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--text2); }
.dash-filter .df-kinds { gap: 2px; }
.dd-src { display: block; font-size: 10.5px; color: var(--faint); }
.dd-src.system { color: var(--cyan); }
@media (max-width: 1000px) { .dash-filter { max-height: none; overflow: visible; } .df-list { max-height: 240px; } }
/* v7.2 总览联动 */
.dash-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 10px; }
.dash-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--cyan); background: var(--cyan-soft); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.dash-chip small { color: var(--muted); }
.dash-chip i { font-style: normal; color: var(--muted); }
.dash-chip:hover i { color: var(--red); }
.dash-stamp { margin: -6px 0 12px; }
a.dk.link { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.dk.link:hover { border-color: var(--cyan); transform: translateY(-1px); }
.dk-l i { font-style: normal; color: var(--faint); font-size: 11px; }
.pie-legend li.click { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: 0 -4px; }
.pie-legend li.click:hover, .pie-legend li.on { background: var(--cyan-soft); }
.pie-legend li.on span { color: var(--cyan); font-weight: 600; }
.donut .arc.click { cursor: pointer; }
.dd-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ===== v7.2 客户首页「我的货在哪」===== */
.pmap { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.pmap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pmap-title { margin: 2px 0 4px; font-size: 20px; }
.pmap-head p { margin: 0; max-width: 760px; }
.pmap-types button small { color: var(--faint); margin-left: 2px; }
.pmap-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.pm-g { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pm-g i { width: 10px; height: 10px; border-radius: 50%; background: var(--g); }
.pm-g b { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.pm-g.on { border-color: var(--g); background: color-mix(in srgb, var(--g) 16%, transparent); color: var(--text); }
.pm-g:disabled { opacity: .45; cursor: default; }
.pmap-body { display: grid; grid-template-columns: 1fr 400px; gap: 14px; height: 540px; }
.pmap-map { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); background: var(--map-sea); min-height: 0; }
.pmap-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pmap-q { min-height: 36px; }
.pmap-list { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.pm-item { border: 1px solid var(--line); background: var(--bg2); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pm-item:hover { border-color: var(--line3); }
.pm-item.on { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-soft); }
.pm-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pm-stage { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--g); border: 1px solid var(--g); border-radius: 999px; padding: 0 8px; }
.pm-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.pm-step { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; color: var(--faint); position: relative; padding: 2px 0; }
.pm-step i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line3); background: var(--panel); justify-self: center; z-index: 1; }
.pm-step:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 13px; bottom: -7px; width: 2px; background: var(--line2); }
.pm-step.done { color: var(--text2); } .pm-step.done i { background: var(--green); border-color: var(--green); }
.pm-step.current { color: var(--text); font-weight: 600; } .pm-step.current i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.pm-step small { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.pmap .offline-map .pm-dot { cursor: pointer; }
@media (max-width: 1000px) { .pmap-body { grid-template-columns: 1fr; height: auto; } .pmap-map { height: 380px; } .pmap-list { max-height: 520px; } }

/* ===== v7.2 自己画的地图轮廓（geo-outline.js）===== */
:root, [data-theme="dark"] { --geo-sea: #0B1A2A; --geo-land: #1D2B3D; --geo-coast: #3A5675; --geo-grat: rgba(120,150,190,0.08); --geo-region: rgba(170,190,215,0.28); --geo-city: #7D8CA3; --geo-road: #33465F; }
[data-theme="light"] { --geo-sea: #DCE9F0; --geo-land: #F7F5EE; --geo-coast: #A9C1CF; --geo-grat: rgba(60,90,120,0.08); --geo-region: rgba(70,90,110,0.30); --geo-city: #6E7682; --geo-road: #D9D3C4; }
.geo-host { position: relative; overflow: hidden; }
.geo-map { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
.geo-map.dragging { cursor: grabbing; }
.geo-sea { fill: var(--geo-sea); }
.geo-land { fill: var(--geo-land); stroke: var(--geo-coast); stroke-width: 1; stroke-linejoin: round; }
.geo-lake { fill: var(--geo-sea); stroke: var(--geo-coast); stroke-width: .8; }
.geo-grat { stroke: var(--geo-grat); stroke-width: 1; }
.geo-road { fill: none; stroke: var(--geo-road); stroke-width: 3; stroke-linecap: round; }
.geo-road-l { fill: var(--faint); font-size: 10px; font-family: "JetBrains Mono", monospace; }
.geo-region { fill: var(--geo-region); font-size: 15px; font-weight: 700; letter-spacing: .25em; pointer-events: none; }
.geo-city { fill: var(--geo-city); }
.geo-pl { fill: var(--text2); font-size: 11.5px; paint-order: stroke; stroke: var(--geo-sea); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.geo-pl.p1 { font-weight: 600; fill: var(--text); }
.geo-pl.biz { fill: var(--text); font-weight: 600; }
.geo-pl.sel { fill: var(--cyan); font-weight: 700; font-family: "JetBrains Mono", monospace; }
.geo-ctrl { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.geo-ctrl button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.geo-ctrl button:hover { border-color: var(--cyan); color: var(--cyan); }
.geo-map .ln { transition: stroke-width .12s; pointer-events: none; }
.geo-map .ln.hover { stroke-width: 7; opacity: 1; }
.geo-map .ln-hit { fill: none; stroke: transparent; cursor: pointer; }
.geo-map .pl { cursor: pointer; }
.geo-map .pl.on { stroke-width: 3; }
.geo-map .pm-dot { cursor: pointer; }
.geo-map .pm-pl { fill: var(--panel); stroke: var(--muted); stroke-width: 1.5; }
.geo-map .pm-halo { opacity: .25; }
/* v7.3 按业务板块排菜单 */
.sn-dept { margin: 10px 10px 4px; font-size: 11px; letter-spacing: .08em; color: var(--cyan); font-weight: 700; }
.sn-more { margin-top: 6px; border-top: 1px dashed var(--line2); padding-top: 4px; }
.sn-more > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--faint); font-size: 12.5px; cursor: pointer; list-style: none; border-radius: 10px; }
.sn-more > summary::-webkit-details-marker { display: none; }
.sn-more > summary:hover { background: var(--panel2); color: var(--text2); }
.sn-more[open] > summary .sn-chev { transform: rotate(90deg); }
.sn-more .sn-group > summary { font-size: 13px; color: var(--muted); }
.acc-pick { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; margin: 4px 0 0; display: flex; flex-direction: column; gap: 8px; }
.acc-pick legend { padding: 0 6px; font-size: 13px; color: var(--text2); font-weight: 600; }
.acc-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.acc-pick-row > b { width: 72px; font-size: 12.5px; color: var(--muted); }
label.chip-opt { flex-direction: row; align-items: center; gap: 0; margin: 0; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-opt span { border: 1px solid var(--line2); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text2); background: var(--bg2); }
.chip-opt input:checked + span { border-color: var(--cyan); background: var(--cyan-soft); color: var(--text); font-weight: 600; }
.chip-opt input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chip-opt input:disabled + span { opacity: .35; cursor: not-allowed; }
.acc-pick-say { margin: 0; padding: 8px 10px; background: var(--bg2); border-radius: 10px; color: var(--text2); }
.dash-deptnote { margin: -6px 0 8px; color: var(--text2); border-left: 3px solid var(--cyan); padding-left: 10px; }
label[hidden] { display: none !important; }

/* v7.4 申请账号 / 注册审核 / 修改密码 */
.sn-badge { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: #111; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.sn-items a { display: flex; align-items: center; gap: 6px; }
.su-link { margin: 12px 0 0; }
.su-steps { padding-left: 18px; line-height: 1.7; }
.su-card textarea { width: 100%; }
.su-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.su-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.su-item { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 10px 18px; }
@media (max-width: 900px) { .su-item { grid-template-columns: 1fr; } }
.su-note { margin: 6px 0; color: var(--text2); }
.su-reject { grid-column: 2; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.su-reject label { flex: 1; min-width: 220px; }
@media (max-width: 900px) { .su-reject { grid-column: 1; } }
.su-pw { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.su-flash { margin: 0 0 12px; }
.su-done { max-width: 560px; }
