/* 林境车辆进度 — design tokens
   The route (China, the sea, Ghana) and the stamped VIN plate carry the identity; everything around them stays quiet. */
:root {
  --bg: #edf1f0;
  --surface: #ffffff;
  --surface-2: #f5f8f7;
  --surface-3: #e5ebe9;
  --ink: #12222a;
  --ink-2: #44555c;
  --ink-3: #6f8086;
  --line: #d4dddb;
  --line-2: #e4eae8;
  --brand: #0e5a49;
  --brand-2: #0a4538;
  --brand-soft: #dcece6;
  --signal: #a8690a;
  --signal-soft: #fbefd5;
  --bad: #b03a25;
  --bad-soft: #f8e1da;
  --good: #23744a;
  --good-soft: #def0e4;
  --sea: #1f6491;
  --sea-soft: #dce9f2;
  --done: #56676d;
  --done-soft: #e6ecea;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --shadow: 0 1px 0 rgba(18, 34, 42, 0.04), 0 10px 30px -14px rgba(18, 34, 42, 0.28);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Roboto Mono", "Liberation Mono", monospace;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath d='M0 3 Q3 0 6 3 T12 3' fill='none' stroke='%2391b6cf' stroke-width='1.5'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a1e; --surface: #16242a; --surface-2: #1b2b31; --surface-3: #24363d;
    --ink: #e4ecee; --ink-2: #b3c2c6; --ink-3: #85979c; --line: #2c3f46; --line-2: #22343a;
    --brand: #4fb79b; --brand-2: #3d9c82; --brand-soft: #173a33;
    --signal: #e2a948; --signal-soft: #3a2e17; --bad: #ec7a63; --bad-soft: #3d2019;
    --good: #5cc48a; --good-soft: #17352a; --sea: #6bb1de; --sea-soft: #173041; --done: #9aabb0; --done-soft: #22333a;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--font); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 650; letter-spacing: 0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; margin: 18px 0 8px; color: var(--ink-2); }
h4 small, h2 small, h3 small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; margin-left: 6px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0.02em; }
.sub { color: var(--ink-3); font-size: 13px; }
.lead { color: var(--ink-2); margin: 4px 0 14px; }
.mute { color: var(--ink-3); }
.center { text-align: center; }
.warn { color: var(--signal); }
.bad { color: var(--bad); }
em.warn, em.bad { font-style: normal; font-weight: 600; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.hint { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; }
.fhint { display: block; font-size: 12.5px; margin-top: 4px; color: var(--ink-3); }
.fhint.warn { color: var(--signal); }
.link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ic { width: 18px; height: 18px; flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- buttons, chips, tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font-weight: 550; white-space: nowrap; text-decoration: none; transition: background 0.12s, border-color 0.12s; }
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--bad); }
.btn.danger:not(.ghost) { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; min-height: 42px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm .ic { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); white-space: nowrap; font-size: 13.5px; }
.chip i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.chip.zero { color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-pressed="true"] i { color: var(--surface-3); }
.chip.mine { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 550; white-space: nowrap; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--signal-soft); color: var(--signal); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.sea { background: var(--sea-soft); color: var(--sea); }
.tag.done { background: var(--done-soft); color: var(--done); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: var(--r); margin: 0 0 16px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; color: var(--ink-2); font-weight: 550; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 34, 42, 0.12); }
.seg i, .d-tabs i { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; }

/* ---------- the VIN plate ---------- */
.plate { display: inline-flex; align-items: center; flex: none; padding: 2px 6px 2px 7px; border: 1.5px solid var(--ink); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--line); font: 700 13px/1.25 var(--mono); letter-spacing: 0.09em; white-space: nowrap; }
.plate.big { padding: 6px 10px 6px 12px; font-size: 21px; border-width: 2px; box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--line); }
.vin { font-family: var(--mono); letter-spacing: 0.04em; color: var(--ink-3); }
.vin-b { color: var(--ink); font-weight: 700; }

/* ---------- the route ---------- */
.route { display: flex; align-items: center; height: 16px; }
.leg { display: flex; align-items: center; height: 100%; }
.leg.cn { flex: 6 1 0; }
.leg.gh { flex: 4 1 0; }
.stop { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.stop::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line); }
.stop::after { content: ""; position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.stop.done::before { background: var(--brand); }
.stop.done::after { background: var(--brand); border-color: var(--brand); }
.stop.cur::before { background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%); }
.stop.cur::after { width: 13px; height: 13px; border: 3px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.leg.cn .stop:first-child::before { left: 50%; }
.stop.end::before { right: 50%; }
.stop.end::after { border-radius: 2px; width: 10px; height: 10px; }
.sealeg { position: relative; flex: 5 1 0; height: 100%; margin: 0 3px; }
.sealeg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; background: var(--wave) repeat-x left center / 12px 6px; opacity: 0.85; }
.sealeg .wake { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; width: 0; background: var(--sea); border-radius: 1px; }
.sealeg.sailing .wake { width: var(--p); }
.sealeg.crossed .wake { width: 100%; background: var(--brand); }
.sealeg .boat { position: absolute; top: 50%; left: var(--p); width: 24px; height: 14px; margin: -11px 0 0 -12px; color: var(--sea); display: none; }
.sealeg .boat svg { display: block; width: 100%; height: 100%; }
.sealeg.sailing .boat { display: block; }
.sealeg.late .boat { color: var(--bad); }
.sealeg.late .wake { background: var(--bad); }
.route-l { display: flex; margin-top: 3px; font-size: 11.5px; color: var(--ink-3); }
.route-l span:nth-child(1) { flex: 6 1 0; }
.route-l span:nth-child(2) { flex: 5 1 0; text-align: center; }
.route-l span:nth-child(3) { flex: 4 1 0; text-align: right; }
.route.full { height: 38px; align-items: flex-start; margin-top: 14px; }
.route.full .leg, .route.full .sealeg { height: 16px; }
.route.full em { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.route.full .stop.cur em { color: var(--brand); font-weight: 650; }
.route.full .sealeg em { color: var(--sea); }

/* ---------- shell ---------- */
.app { min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: 228px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 20; }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.brand-t { display: flex; flex-direction: column; line-height: 1.25; }
.brand-t b { font-size: 15px; }
#syncState { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
#syncState::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
#syncState[data-s="live"]::before { background: var(--good); }
#syncState[data-s="error"] { color: var(--bad); }
#syncState[data-s="error"]::before { background: var(--bad); }
.nav { flex: 1; padding: 6px 10px; overflow-y: auto; }
.nav-i { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; margin: 1px 0; border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-weight: 550; position: relative; }
.nav-i:hover { background: var(--surface-2); color: var(--ink); }
.nav-i[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav-i[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-g { margin: 18px 12px 6px; font-size: 12px; color: var(--ink-3); }
.me-box { padding: 14px 16px 16px; border-top: 1px solid var(--line-2); }
.me-id { display: flex; flex-direction: column; line-height: 1.35; margin-bottom: 8px; }
.me-id small { color: var(--ink-3); font-size: 12px; }
.me-a { display: flex; gap: 4px; flex-wrap: wrap; margin-left: -10px; }
.ver { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.main { padding: 28px 36px 64px 264px; max-width: 1560px; }
.view { animation: none; }
.tabbar { display: none; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h .sub { margin-top: 6px; max-width: 72ch; }
.page-a { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px; }
.panel > h2, .panel > h3 { margin-bottom: 10px; }
.panel .sub + * { margin-top: 10px; }
.p-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.empty p { max-width: 46ch; margin: 0 auto 12px; }
.empty p:last-child { margin-bottom: 0; }
.banner { padding: 10px 14px; border-radius: var(--r); background: var(--surface-3); color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }
.banner.good { background: var(--good-soft); color: var(--good); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.q-more { margin: 16px 0 0; text-align: center; }

/* ---------- forms ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; align-items: end; margin: 6px 0 4px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fl { font-size: 12.5px; color: var(--ink-2); }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); }
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-3); }
input[type="search"]::-webkit-search-cancel-button { display: none; }
.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.roles { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px 10px; margin: 14px 0 10px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.roles legend { font-size: 12.5px; color: var(--ink-2); padding: 0 4px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.f-search { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.f-search .ic { position: absolute; left: 11px; color: var(--ink-3); pointer-events: none; }
.f-search input { padding-left: 36px; }
.f-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.f-sel select { width: auto; min-width: 110px; }

/* ---------- 查车 ---------- */
.q-hero { max-width: 760px; margin-bottom: 20px; }
.q-title { font-size: 30px; margin-bottom: 14px; letter-spacing: 0.02em; }
.q-search { position: relative; display: flex; align-items: center; }
.q-search > .ic { position: absolute; left: 16px; width: 22px; height: 22px; color: var(--ink-3); pointer-events: none; }
.q-search input { min-height: 56px; padding: 10px 52px 10px 50px; font-size: 19px; border-radius: var(--r-lg); border: 1.5px solid var(--line); box-shadow: var(--shadow); letter-spacing: 0.02em; }
.q-search input::placeholder { color: var(--ink-3); letter-spacing: 0; font-size: 16px; }
.q-clear { position: absolute; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-3); border-radius: var(--r); display: grid; place-items: center; }
.q-chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.q-chips::-webkit-scrollbar { display: none; }
.fleet { display: grid; grid-template-columns: 6fr 3fr 3fr 2fr; margin: 4px 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.fl-seg { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 16px 14px; border: 0; border-right: 1px solid var(--line-2); background: transparent; text-align: left; color: var(--ink); }
.fl-seg:last-child { border-right: 0; }
.fl-seg:hover { background: var(--surface-2); }
.fl-seg[aria-pressed="true"] { background: var(--brand-soft); box-shadow: inset 0 -3px 0 var(--brand); }
.fl-seg.sea { background-image: var(--wave); background-repeat: repeat-x; background-position: left 0 bottom 10px; background-size: 12px 6px; }
.fl-seg.sea[aria-pressed="true"] { background-color: var(--sea-soft); box-shadow: inset 0 -3px 0 var(--sea); }
.fl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 550; }
.fl-h b { font-size: 28px; line-height: 1; font-weight: 650; color: var(--ink); }
.fl-seg.sea .fl-h b { color: var(--sea); }
.fl-stops { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); }
.fl-stops i { font-style: normal; font-weight: 650; color: var(--ink-2); margin-right: 3px; }
.fl-stops .zero i { color: var(--ink-3); font-weight: 400; }
.fl-wave { font-size: 12px; color: var(--ink-3); }
.q-meta { margin-bottom: 12px; }
.q-meta h2 { font-size: 16px; }
.q-meta p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.q-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.card.open { grid-column: 1 / -1; border-color: var(--ink-3); }
.card-head { display: grid; gap: 10px; width: 100%; padding: 14px 16px 12px; border: 0; background: transparent; text-align: left; }
.card-head:hover { background: var(--surface-2); }
.c-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c-name b { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-spec, small > span { font-size: 12.5px; color: var(--ink-3); }
.c-spec span + span::before, small > span + span::before, .dh-spec span + span::before { content: ""; display: inline-block; width: 1px; height: 10px; background: var(--line); margin: 0 7px; vertical-align: -1px; }
.c-state { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); }
.c-state b { color: var(--brand); white-space: nowrap; }
.c-state.sea b { color: var(--sea); }
.c-state.bad b, .c-state.bad { color: var(--bad); }
.c-state.warn b { color: var(--signal); }
.c-state.good b { color: var(--good); }
.c-state.done b { color: var(--done); }
.c-people { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); }
.c-people b { color: var(--ink-2); font-weight: 600; }
.card-body { padding: 4px 16px 16px; border-top: 1px solid var(--line-2); }
.d-vin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; font-size: 15px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scroll-snap-type: x mandatory; }
.strip .ph { flex: 0 0 168px; scroll-snap-align: start; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; padding: 1px 0 0 1px; }
.specs div { background: var(--surface); padding: 8px 12px; border: 1px solid var(--line-2); margin: -1px 0 0 -1px; }
.specs dt { font-size: 12px; color: var(--ink-3); }
.specs dd { margin: 2px 0 0; font-weight: 600; }
.specs.price dd { font-size: 16px; font-family: var(--mono); }
.d-cond { margin: 0; padding-left: 18px; color: var(--ink-2); }
.d-cond li { margin: 3px 0; }
.d-note { white-space: pre-wrap; color: var(--ink-2); }
.d-nophoto { color: var(--ink-3); font-size: 13px; margin: 10px 0; }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 12px 22px; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; color: var(--ink-3); }
.tl li::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.tl li::after { content: ""; position: absolute; left: 5.5px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li b { flex: 0 0 76px; color: var(--ink-3); font-weight: 600; }
.tl li.done::before { background: var(--brand); border-color: var(--brand); }
.tl li.done::after { background: var(--brand); }
.tl li.done b { color: var(--ink); }
.tl li.done { color: var(--ink-2); }
.tl li.cur::before { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl li.cur b, .tl li .now { color: var(--brand); font-weight: 650; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.nf { max-width: 520px; margin: 8px auto; padding: 28px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.nf-plate { margin-bottom: 14px; }
.nf h3 { font-size: 18px; margin-bottom: 6px; }
.nf p { color: var(--ink-2); margin-bottom: 16px; }
.nf-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--good) !important; font-weight: 600; }
.q-watch { margin-top: 28px; }
.q-watch h2 { margin-bottom: 10px; }
.q-watch ul, .rows { list-style: none; margin: 0; padding: 0; }
.q-watch li, .rows li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.q-watch li > span:not(.plate), .rows li > span:not(.plate) { flex: 1; min-width: 120px; color: var(--ink-2); font-size: 13.5px; }
.rows li > .tk-car { flex: 2 1 260px; }

/* ---------- 车辆 ---------- */
.age { margin-bottom: 18px; }
.age h2 { font-size: 15px; }
.age .sub { margin: 2px 0 10px; }
.age-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.age-row button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; min-width: 0; }
.age-row span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.age-row b { font-size: 20px; font-weight: 650; line-height: 1.2; }
.age-row b small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.age-row em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.age-row .over { border-color: color-mix(in srgb, var(--signal) 55%, var(--line)); background: var(--signal-soft); }
.age-row .over b, .age-row .over em { color: var(--signal); }
.age-row .none b { color: var(--ink-3); }
.age-row button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.node-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.batch { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--r); background: var(--ink); color: var(--surface); }
.batch .btn { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 35%, transparent); }
.tbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tr { display: grid; gap: 14px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.tr:last-child { border-bottom: 0; }
.tr:hover { background: var(--surface-2); }
.tr.th { cursor: default; background: var(--surface-2); padding: 8px 16px; font-size: 12px; color: var(--ink-3); font-weight: 550; }
.tr > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.tr small { font-size: 12.5px; color: var(--ink-2); }
.tr small.mute { color: var(--ink-3); }
.tr .c-side, .tr .c-alert { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.tbl.cars .tr { grid-template-columns: 28px minmax(220px, 2.3fr) minmax(170px, 2fr) minmax(90px, 0.9fr) minmax(150px, 1.3fr) minmax(130px, 1.3fr); }
.tbl.tickets .tr { grid-template-columns: 1.1fr 2fr 2.2fr 1.3fr 0.9fr 0.9fr; }
.tbl.users .tr { grid-template-columns: 1fr 1fr 2fr 1.3fr 1fr 0.7fr; }
.tbl.deals .tr { grid-template-columns: var(--cols); }
.tr .num { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13.5px; }
.tr.th .num { font-family: var(--font); }
.tr .owe { color: var(--signal); font-weight: 650; }
.tr b.w { font-weight: 550; overflow-wrap: anywhere; }
.plate.none { border-style: dashed; color: var(--ink-3); letter-spacing: 0.04em; font-family: var(--font); font-weight: 600; box-shadow: none; }
.kpis .warnbox { border-color: color-mix(in srgb, var(--signal) 45%, var(--line)); background: var(--signal-soft); }
.kpis .warnbox b { color: var(--signal); }
.df-file .files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 38px; }
.df-file .file { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: 13px; }
.df-file label.btn { cursor: pointer; }
.matrix.dealm td { padding: 6px 8px; }
.matrix.dealm select { min-height: 30px; padding: 2px 6px; font-size: 12.5px; width: auto; }
.vt { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--surface-3); }
.vt label { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.vt label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 34, 42, 0.12); }
.vt input { width: 14px !important; height: 14px !important; margin: 0; }
.vt.off { opacity: 0.4; }
.sel { display: grid; place-items: center; width: 28px; height: 28px; margin: -4px; cursor: pointer; }
.sel input { width: 17px; height: 17px; accent-color: var(--brand); }
.c-car { flex-direction: row !important; align-items: center !important; gap: 12px !important; }
.c-car > span { display: flex; flex-direction: column; min-width: 0; }
.c-car b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.clip { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--ink-2); }

/* ---------- the side panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(12, 22, 27, 0.42); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(800px, 100%); z-index: 50; display: flex; flex-direction: column; background: var(--bg); box-shadow: -18px 0 50px -20px rgba(12, 22, 27, 0.45); }
.d-head { padding: 18px 22px 12px; background: var(--surface); }
.dh-top { display: flex; align-items: flex-start; gap: 14px; }
.dh-t { flex: 1; min-width: 0; }
.dh-t h2 { font-size: 19px; }
.dh-spec b { margin-right: 8px; color: var(--ink-2); }
.dh-spec { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; }
.dh-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.dh-text { font-size: 13px; color: var(--ink-2); margin-left: 4px; }
.dh-text.bad { color: var(--bad); }
.dh-text.sea { color: var(--sea); }
.d-tabs { display: flex; gap: 2px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.d-tabs button { border: 0; background: none; padding: 10px 12px 11px; color: var(--ink-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.d-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.d-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; overscroll-behavior: contain; }
.d-foot { display: flex; align-items: center; gap: 12px; padding: 10px 22px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.d-foot #dMsg { flex: 1; font-size: 13px; color: var(--ink-2); }
.d-foot #dMsg.err { color: var(--bad); font-weight: 550; }
.d-foot .btn { min-width: 96px; }
.alerts { display: grid; gap: 6px; margin-bottom: 14px; }
.alert { padding: 8px 12px; border-radius: var(--r); font-size: 13.5px; border-left: 3px solid; }
.alert.warn { background: var(--signal-soft); color: var(--signal); border-color: var(--signal); }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.d-h3 { font-size: 13px; color: var(--ink-3); font-weight: 600; margin: 22px 0 8px; }
.steps { position: relative; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 8px; }
.step.cur { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step > summary { list-style: none; display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; cursor: pointer; }
.step > summary::-webkit-details-marker { display: none; }
.s-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 12px; font-weight: 700; }
.step.done .s-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.cur .s-dot { border-color: var(--brand); color: var(--brand); }
.s-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.s-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.s-name b { font-size: 15px; }
.s-name small { font-size: 12px; color: var(--ink-3); }
.s-lines { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-2); }
.s-state { font-size: 12px; font-weight: 600; color: var(--ink-3); padding-top: 4px; white-space: nowrap; }
.step.done .s-state { color: var(--brand); }
.step.cur .s-state { color: var(--brand); }
.step.due { border-color: var(--signal); }
.step.due .s-dot { border-color: var(--signal); }
.step.due .s-state { color: var(--signal); }
.s-body { padding: 2px 16px 16px 56px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.s-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sticky-acts { position: sticky; bottom: -28px; padding: 12px 0; margin-bottom: -12px; background: linear-gradient(transparent, var(--bg) 30%); }
.chk-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; font-size: 13px; color: var(--ink-3); }
.chk-head b { color: var(--ink); font-size: 13.5px; }
.chk-head .btn { margin-left: auto; }
.chk-list { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.chk-list .chk-head { margin: 0; padding: 8px 12px; background: var(--surface-2); }
.chk-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.chk-row.bad { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
.chk-row input { grid-column: 1 / -1; min-height: 34px; }
.seg-btns, .chk-row .seg { display: inline-flex; padding: 2px; gap: 2px; margin: 0; border-radius: 7px; background: var(--surface-3); }
.chk-row .seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 5px; font-size: 13px; color: var(--ink-2); }
.chk-row .seg button[aria-pressed="true"][data-s="ok"] { background: var(--good); color: #fff; }
.chk-row .seg button[aria-pressed="true"][data-s="bad"] { background: var(--bad); color: #fff; }
.t-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r); }
.t-wrap table, .chg { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t-wrap th, .t-wrap td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.t-wrap th { background: var(--surface-2); font-weight: 550; color: var(--ink-3); font-size: 12px; }
.t-wrap td input, .t-wrap td select { min-height: 32px; padding: 4px 8px; }
.t-wrap .n { text-align: right; width: 120px; }
.t-wrap .x { width: 40px; text-align: center; }
.t-wrap tfoot td { font-weight: 650; border-bottom: 0; background: var(--surface-2); }
.t-wrap td.bad { color: var(--bad); }
.parts td:nth-child(3), .parts td:nth-child(4) { width: 110px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ph { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line); overflow: hidden; display: grid; place-items: center; }
.ph.has { border-style: solid; background: var(--surface-3); }
.ph a, .ph img, .ph video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.62)); }
.ph-cap { font-size: 12px; color: var(--ink-3); text-align: center; padding: 0 6px; }
.ph.add label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; cursor: pointer; }
.ph.add:hover { border-color: var(--brand); background: var(--brand-soft); }
.ph-do { font-size: 12.5px; color: var(--brand); font-weight: 600; }
.ph input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ph-rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; }
.ph-rm .ic { width: 14px; height: 14px; }
.issue table td b { font-weight: 650; }
.svc-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-sum div { display: flex; flex-direction: column; gap: 2px; }
.svc-sum span { font-size: 12px; color: var(--ink-3); }
.svc-sum b { font-size: 17px; }
.svc-sum small { font-size: 12.5px; color: var(--ink-2); }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.plan li:last-child { border-bottom: 0; }
.plan li.done b::after { content: "✓"; color: var(--good); margin-left: 6px; }
.plan li.later { color: var(--ink-3); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-list button { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); text-align: left; }
.tk-list button:hover { border-color: var(--ink-3); }
.tk-list button > span:nth-of-type(2) { flex: 1; min-width: 120px; color: var(--ink-2); font-size: 13px; }
.flow { list-style: none; display: flex; margin: 14px 0 0; padding: 0; counter-reset: f; overflow-x: auto; }
.flow li { flex: 1 0 auto; position: relative; padding: 18px 8px 0 0; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.flow li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line); }
.flow li::after { content: ""; position: absolute; top: 1px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.flow li.done::before, .flow li.done::after { background: var(--brand); border-color: var(--brand); }
.flow li.cur { color: var(--brand); font-weight: 650; }
.flow li.cur::after { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.suggest { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--sea-soft); color: var(--ink); }
.suggest h4 { margin: 0 0 6px; color: var(--sea); }
.suggest ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; font-size: 13px; }
.suggest li { display: flex; gap: 8px; }
.suggest li span:first-child { color: var(--ink-3); }
.suggest p { font-size: 13.5px; margin-bottom: 8px; }
.score { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.score .fl { margin-right: 6px; }
.score button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-weight: 650; }
.score button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.score small { color: var(--ink-3); margin-left: 6px; }

/* ---------- operation log ---------- */
.evs { list-style: none; margin: 0; padding: 0; }
.evs.days { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ev-day h3 { padding: 10px 16px 8px; font-size: 13px; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.ev { border-bottom: 1px solid var(--line-2); }
.d-body .ev { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 6px; }
.ev-head { display: grid; grid-template-columns: 64px minmax(120px, 0.9fr) 104px 86px minmax(0, 3fr) 76px; gap: 10px; align-items: center; padding: 9px 16px; font-size: 13.5px; }
.d-body .ev-head { grid-template-columns: 118px minmax(100px, 0.9fr) 96px minmax(0, 3fr) 70px; padding: 9px 12px; }
.ev-head time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.ev-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ev-who small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-act { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ev-car { border: 0; background: none; padding: 0; }
.ev-txt { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.ev-txt em { font-style: normal; }
.ev-more { border: 0; background: none; color: var(--brand); font-size: 12.5px; white-space: nowrap; padding: 4px 0; justify-self: end; }
.ev.bad .ev-act, .ev.bad .ev-txt { color: var(--bad); }
.ev.quiet .ev-txt, .ev.quiet .ev-act { color: var(--ink-3); }
.ev-body { padding: 0 16px 12px; }
.chg { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; font-size: 13px; }
.chg th, .chg td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.chg th { background: var(--surface-2); font-size: 12px; color: var(--ink-3); font-weight: 550; }
.chg td:first-child { width: 34%; color: var(--ink-2); }
.chg .was { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.chg .now { color: var(--ink); font-weight: 550; }
.ev-lines { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.ev-msg { margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r); font: 13px/1.6 var(--font); white-space: pre-wrap; color: var(--ink-2); }
.ev-wait { padding: 24px; text-align: center; color: var(--ink-3); }

/* ---------- 售后 ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col h3 { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.tk { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); text-align: left; }
.tk:hover { border-color: var(--ink-3); }
.tk-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.tk-c { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-c b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.tk-x { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-f { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-f small { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.tk-car { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.tk-car > span { display: flex; flex-direction: column; min-width: 0; }
.tk-car small { font-size: 12.5px; color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpis div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.kpis span { font-size: 12.5px; color: var(--ink-3); }
.kpis b { font-size: 26px; font-weight: 650; line-height: 1.2; }
.kpis b small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.kpis div > small { font-size: 12px; color: var(--ink-3); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; }
.bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 96px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 10px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 管理 ---------- */
.matrix-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); max-height: calc(100vh - 170px); }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.matrix th, .matrix td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-align: center; white-space: nowrap; }
.matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.matrix .rowh { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 550; z-index: 1; min-width: 150px; }
.matrix thead .rowh { z-index: 3; }
.matrix .rowh small { display: block; font-weight: 400; color: var(--signal); font-size: 11.5px; }
.matrix .rh { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; position: relative; padding: 0 14px; }
.matrix .rh small { color: var(--ink-3); font-weight: 400; font-size: 11.5px; }
.matrix .rh .icon-btn { position: absolute; top: -6px; right: -12px; width: 22px; height: 22px; opacity: 0.55; }
.matrix .rh .icon-btn:hover { opacity: 1; }
.matrix .grp th { background: var(--surface-2); text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; position: sticky; left: 0; }
.matrix td input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.matrix tr.nobody .rowh { color: var(--signal); }
.matrix tbody tr:hover td, .matrix tbody tr:hover .rowh { background: var(--surface-2); }
.settings { max-width: 880px; }
.settings .state { margin: 10px 0 12px; display: flex; align-items: center; gap: 8px; }
.settings .chk { display: flex; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- sign-in ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: min(420px, 100%); }
.auth-route { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 12.5px; color: var(--ink-3); }
.auth-route span { white-space: nowrap; }
.ar-line { flex: 1 1 18px; height: 2px; background: var(--brand); border-radius: 1px; }
.ar-sea { flex: 3 1 60px; height: 6px; background: var(--wave) repeat-x center / 12px 6px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; }
.auth-card .sub { margin: 6px 0 18px; }
.auth-card form { display: grid; gap: 12px; }
.auth-card form + .sub { margin: 16px 0 0; }
.auth-card input { min-height: 44px; font-size: 16px; }

/* ---------- dialogs and toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(12, 22, 27, 0.5); overflow-y: auto; }
.box { width: min(560px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.box.wide { width: min(780px, 100%); }
.box h2 { font-size: 18px; margin-bottom: 4px; }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 32px)); padding: 11px 18px; border-radius: var(--r); background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: var(--shadow); }
.toast[data-tone="bad"] { background: var(--bad); color: #fff; }
.drawer:not([hidden]) ~ .toast { bottom: 84px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .age-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tbl.cars .tr { grid-template-columns: 28px minmax(200px, 2.2fr) minmax(160px, 2fr) minmax(90px, 1fr) minmax(120px, 1.3fr); }
  .tbl.cars .tr > .c-side { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body { font-size: 15px; }
  .rail { position: sticky; top: 0; inset: auto; width: auto; height: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .rail-brand { padding: 10px 14px; }
  .mark { width: 34px; height: 34px; font-size: 12.5px; border-radius: 9px; }
  .nav, .me-box { display: none; }
  .main { padding: 18px 16px calc(88px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .tabbar .nav-i { flex-direction: column; justify-content: center; gap: 2px; height: 52px; padding: 0; font-size: 11.5px; }
  .tabbar .nav-i .ic { width: 22px; height: 22px; }
  .tabbar .nav-i[aria-current="page"] { background: transparent; }
  .tabbar .nav-i[aria-current="page"]::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .page-h { margin-bottom: 14px; }
  h1 { font-size: 22px; }
  .q-title { font-size: 24px; }
  .q-search input { min-height: 52px; font-size: 18px; }
  .fleet { grid-template-columns: 1fr 1fr; }
  .fl-seg { border-bottom: 1px solid var(--line-2); }
  .fl-seg:nth-child(2n) { border-right: 0; }
  .fl-seg.cn, .fl-seg.done { grid-column: 1 / -1; border-right: 0; }
  .fl-seg.done { border-bottom: 0; }
  .fl-h b { font-size: 24px; }
  .age-row { display: flex; overflow-x: auto; }
  .age-row button { flex: 0 0 110px; }
  .tbl { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .tr.th { display: none !important; }
  .tr { display: flex !important; flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .tr > span { flex: 1 1 100%; }
  .tbl.cars .tr > .sel { order: 9; }
  .tbl.cars .tr > .c-sale, .tbl.cars .tr > .c-side { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 6px; }
  .tbl.cars .tr > .c-side { display: flex; }
  .tbl.cars .tr > .c-alert:has(small.mute) { display: none; }
  .tbl.tickets .tr > span, .tbl.users .tr > span, .tbl.deals .tr > span { flex: 1 1 40%; }
  .tbl.deals .tr > .c-car { flex: 1 1 100%; }
  .tr .num { align-items: flex-start; text-align: left; }
  .drawer { width: 100%; }
  .d-head { padding: 14px 16px 10px; padding-top: calc(14px + env(safe-area-inset-top)); }
  .plate.big { font-size: 18px; padding: 5px 9px; }
  .route.full .stop:not(.cur) em { display: none; }
  .dh-spec .mono { display: none; }
  .dh-spec .mono + span::before { display: none; }
  .d-body { padding: 14px 14px 24px; }
  .d-foot { padding-left: 16px; padding-right: 16px; }
  .s-body { padding: 12px 14px 14px; }
  .ev-head, .d-body .ev-head { grid-template-columns: auto 1fr auto; padding: 10px 14px; }
  .ev-head time { grid-row: 1; }
  .ev-who { grid-column: 2; }
  .ev-act { grid-column: 3; text-align: right; }
  .ev-car { grid-column: 1; }
  .ev-txt { grid-column: 1 / -1; }
  .ev-more { grid-column: 1 / -1; justify-self: start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-sum { grid-template-columns: 1fr 1fr; }
  .plan li { grid-template-columns: 1fr auto; }
  .plan li > span:nth-of-type(1) { grid-column: 1; grid-row: 2; color: var(--ink-3); }
  .matrix-wrap { max-height: none; }
  .modal { align-items: end; padding: 0; }
  .box, .box.wide { width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .q-list { grid-template-columns: 1fr; }
  .fld:has(input.mono) { grid-column: 1 / -1; }
  .c-people { flex-direction: column; gap: 2px; }
  .d-actions .btn { flex: 1 1 100%; }
  .bars li { grid-template-columns: 80px 1fr 30px; }
}
@media print {
  .rail, .tabbar, .drawer, .scrim, .toast, .modal { display: none !important; }
  .main { padding: 0; }
}

/* ---------- ship tracking: the lane drawn offline, the ship on it ---------- */
:root { --sea-wash: #e3edf3; --land: #d6dfdb; --land-line: #bfccc7; }
@media (prefers-color-scheme: dark) { :root { --sea-wash: #122a35; --land: #23363c; --land-line: #304a51; } }
.ship { display: grid; gap: 10px; }
.ship-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; }
.ship-h h3 { margin-bottom: 2px; }
.ship-st { font-weight: 600; color: var(--ink); max-width: 60ch; }
.ship-a { display: flex; gap: 6px; flex-wrap: wrap; }
.ship-map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--sea-wash); }
.smap { display: block; width: 100%; height: auto; }
.smap .sea { fill: var(--sea-wash); }
.smap .eq { stroke: var(--land-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.smap .land { fill: var(--land); stroke: var(--land-line); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.smap .home { fill: var(--brand-soft); stroke: color-mix(in srgb, var(--brand) 50%, transparent); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.smap .lane { fill: none; stroke: var(--sea); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.smap .gone, .smap .trk { fill: none; stroke: var(--sea); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.smap .port circle { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.5; }
.smap .port.end circle { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.smap text { font-size: 11.5px; font-weight: 600; fill: var(--ink-2); paint-order: stroke; stroke: var(--sea-wash); stroke-width: 3px; stroke-linejoin: round; }
.smap .ship text { fill: var(--ink); font-weight: 700; }
.smap .ship .halo { fill: color-mix(in srgb, var(--brand) 20%, transparent); }
.smap .ship .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.smap .ship.est .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.2; stroke-dasharray: 3 2; }
.smap .ship.est .halo, .smap .ship.still .halo { fill: none; }
.smap .ship .dir { fill: var(--brand); }
.ship-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 12px; color: var(--ink-3); }
.ship-key span { display: inline-flex; align-items: center; gap: 6px; }
.ship-key i { display: inline-block; width: 18px; border-top: 2.5px solid var(--sea); }
.ship-key i.k-lane { border-top: 1.5px dashed var(--sea); opacity: 0.75; }
.ship-key i.k-ship { width: 10px; height: 10px; border: 2px solid var(--brand); background: var(--brand); border-radius: 50%; }
.ship-key i.k-ship.est { background: var(--surface); border-style: dashed; }
.ship-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 2px 0 0; }
.ship-facts div { min-width: 0; }
.ship-facts dt { font-size: 12px; color: var(--ink-3); }
.ship-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.ship-facts dd small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.ship-note { font-size: 12.5px; color: var(--ink-3); max-width: 72ch; }
.ship-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 16px; background: var(--surface); display: grid; gap: 12px; }
.ship-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.card-body .ship { margin-bottom: 4px; max-width: 760px; }

/* ---------- the page a customer opens from a shared link ---------- */
body.pub { background: var(--bg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
.pub-top { display: flex; align-items: center; gap: 10px; max-width: 780px; margin: 0 auto; padding: 18px 20px 4px; }
.pub-brand { display: flex; flex-direction: column; line-height: 1.25; }
.pub-brand small { color: var(--ink-3); font-size: 12px; }
.pub-main { max-width: 780px; margin: 0 auto; padding: 10px 20px 40px; display: grid; gap: 14px; }
.pub-car, .pub-now, .pub-ship { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.pub-k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pub-car h1 { font-size: 25px; margin: 2px 0 12px; }
.pub-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pub-id > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pub-id small { color: var(--ink-3); }
.pub-text { font-size: 17px; font-weight: 600; margin: 4px 0 18px; max-width: 54ch; }
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pub-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; font-size: 12px; color: var(--ink-3); padding: 0 2px; }
.pub-steps li::before { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.pub-steps li:first-child::before { display: none; }
.pub-steps li.done::before, .pub-steps li.cur::before { background: var(--brand); }
.ps-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.pub-steps li.done .ps-dot { background: var(--brand); border-color: var(--brand); }
.pub-steps li.cur .ps-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.pub-steps b { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.pub-steps li.cur b { color: var(--ink); }
.pub-foot { text-align: center; color: var(--ink-2); font-size: 13px; display: grid; gap: 4px; padding-top: 4px; }
.pub-err, .pub-wait { text-align: center; padding: 48px 20px; color: var(--ink-2); }
@media (max-width: 600px) {
  .pub-main { padding: 6px 12px 32px; gap: 10px; }
  .pub-car, .pub-now, .pub-ship { padding: 16px; }
  .pub-car h1 { font-size: 22px; }
  .pub-text { font-size: 16px; }
  .pub-steps { grid-template-columns: 1fr; gap: 12px; }
  .pub-steps li { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 0; }
  .pub-steps li::before { left: 6px; right: auto; top: -13px; width: 2px; height: 14px; }
  .pub-steps small { margin-left: auto; }
}

/* ---------- charts: validated palette (categorical c1-c4, ordered teal o1-o7, ageing a1-a4) and the marks ---------- */
:root {
  --c1: #1f8a70; --c2: #3576c7; --c3: #e0607e; --c4: #6b52c9;
  --o1: #64c3a7; --o2: #41b092; --o3: #199c7e; --o4: #00876c; --o5: #00725a; --o6: #005e49; --o7: #004939;
  --o1i: #12222a; --o2i: #12222a; --o3i: #12222a; --o4i: #fff; --o5i: #fff; --o6i: #fff; --o7i: #fff;
  --a1: #ec9d53; --a2: #ca791d; --a3: #a45e05; --a4: #7c4607;
  --a1i: #12222a; --a2i: #12222a; --a3i: #fff; --a4i: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c1: #2eb090; --c2: #589ce6; --c3: #e26c8c; --c4: #957ee5;
    --o1: #1d6350; --o2: #1e7861; --o3: #278d73; --o4: #31a386; --o5: #4ab89a; --o6: #6ccbae; --o7: #8fddc4;
    --o1i: #fff; --o2i: #fff; --o3i: #fff; --o4i: #0f1a1e; --o5i: #0f1a1e; --o6i: #0f1a1e; --o7i: #0f1a1e;
    --a1: #8b551c; --a2: #b77024; --a3: #e08f40; --a4: #fbb77b;
    --a1i: #fff; --a2i: #0f1a1e; --a3i: #0f1a1e; --a4i: #0f1a1e;
  }
}
.chart { display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .cap { font-size: 11.5px; font-weight: 650; fill: var(--ink-2); }
.chart .hit { fill: transparent; }
.chart .hit[data-pick] { cursor: pointer; }
.chart .hit:hover, .chart .hit:focus { fill: color-mix(in srgb, var(--ink) 6%, transparent); outline: none; }
.ctip { position: fixed; z-index: 95; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12.5px; min-width: 110px; max-width: 280px; }
.ctip .ct-h { color: var(--ink-2); font-weight: 600; margin-bottom: 3px; }
.ctip .ct-r { display: flex; align-items: center; gap: 6px; line-height: 1.6; }
.ctip .ct-r i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.ctip .ct-r b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ctip .ct-r span { color: var(--ink-3); }
.hb { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hb li { display: grid; grid-template-columns: minmax(70px, 8em) minmax(0, 1fr) 8.6em; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 6px; font-size: 13px; }
.hb li[data-pick] { cursor: pointer; }
.hb li:hover, .hb li:focus-visible { background: var(--surface-2); outline: none; }
.hb li.on { background: var(--brand-soft); }
.hb-l { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.hb-l small { display: block; color: var(--ink-3); font-size: 11.5px; }
.hb-t { display: block; }
.hb-b { display: flex; gap: 2px; height: 12px; min-width: 3px; }
.hb-b i { display: block; height: 100%; min-width: 1px; }
.hb-b i:last-child { border-radius: 0 4px 4px 0; }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; min-width: 0; }
.hb-v small { white-space: normal; }
.hb-v small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.fn { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fn li { display: grid; grid-template-columns: 6.2em minmax(0, 1fr) 5.2em 7.6em; gap: 10px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.fn li[data-pick] { cursor: pointer; }
.fn li:hover, .fn li:focus-visible { background: var(--surface-2); outline: none; }
.fn li.on { background: var(--brand-soft); }
.fn-t { display: block; }
.fn-b { display: block; height: 20px; border-radius: 0 4px 4px 0; }
.fn-v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-v small { margin-left: 6px; color: var(--ink-3); font-weight: 400; font-size: 11.5px; }
.fn-c { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.sb { display: flex; gap: 2px; height: 28px; }
.sb-p { display: flex; align-items: center; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 650; white-space: nowrap; min-width: 3px; overflow: hidden; }
.sb-p:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.sb-key, .ch-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; font-size: 12px; color: var(--ink-2); }
.sb-key i, .ch-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ch-key .warn-k { color: var(--signal); font-weight: 600; }

/* ---------- 报表 ---------- */
.rp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.rp-bar .seg { margin: 0; flex-wrap: wrap; }
.rp-dates { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.rp-dates input { width: auto; min-height: 34px; padding: 4px 8px; }
.rp-range { font-size: 13px; color: var(--ink-3); }
.rp-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rp-tabs button { border: 0; background: none; padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.rp-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.rk b { font-variant-numeric: proportional-nums; font-feature-settings: "tnum" 0; }
.rk .badbox { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); }
.rk .badbox b { color: var(--bad); }
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 16px; align-items: start; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 18px; margin-bottom: 16px; min-width: 0; }
.rc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.rc-h h3 { font-size: 15px; }
.rc-h .sub { margin-top: 2px; }
.rc-sw { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--surface-3); flex: none; }
.rc-sw button { border: 0; background: transparent; padding: 3px 9px; border-radius: 4px; font-size: 12px; color: var(--ink-2); }
.rc-sw button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 34, 42, 0.12); }
.rc-none { padding: 26px 10px; text-align: center; color: var(--ink-3); font-size: 13px; }
.rt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt th { text-align: left; font-weight: 550; color: var(--ink-3); font-size: 12px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.rt td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rt .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt tr[data-open] { cursor: pointer; }
.rt tr[data-open]:hover td { background: var(--surface-2); }
.rt td small { display: block; color: var(--ink-3); font-size: 12px; }
.rt tfoot td { font-weight: 650; border-bottom: 0; }
.rt-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r); }
.rp-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 10px; font-size: 13px; color: var(--ink-2); }
.rp-more { margin-top: 10px; }
@media (max-width: 900px) {
  .rgrid { grid-template-columns: 1fr; }
  .fn li { grid-template-columns: 5.4em minmax(0, 1fr) 4.6em; }
  .fn-c { display: none; }
}
@media (max-width: 520px) {
  .rcard { padding: 14px 12px 14px; }
  .hb li { grid-template-columns: minmax(56px, 5.5em) minmax(0, 1fr) 7.4em; gap: 8px; }
}

.share-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.share-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.share-a { display: inline-flex; gap: 4px; }

/* ---------- 客户 (merged from the OA): the hand-over from China to Ghana ---------- */
.f-toggle { display: none; }
.bell { display: none; }
.f-toggle i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; }
.nav-i .nav-n, .links .nav-n, .bell .nav-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font: 600 11.5px/20px var(--font); font-style: normal; text-align: center; }
.links .nav-n { margin-left: 6px; }
.tag .side { font-style: normal; font-weight: 500; opacity: 0.72; margin-right: 5px; padding-right: 5px; border-right: 1px solid currentColor; }
.handoff { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* the sea between the two sides, the same wave the route uses */
.ho-arrow { width: 16px; height: 6px; background: var(--wave) repeat-x center / 8px 4px; opacity: 0.9; flex: none; }
.tbl.custs .tr { grid-template-columns: minmax(180px, 2fr) minmax(100px, 1fr) minmax(220px, 2.3fr) minmax(150px, 1.6fr) minmax(110px, 1fr); }
.tr.hot { box-shadow: inset 3px 0 0 var(--bad); }
.c-who { gap: 4px !important; }
.c-who .tag { margin-top: 1px; }
.c-st { flex-direction: row !important; }
.c-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.banner.warn { background: var(--signal-soft); color: var(--signal); }
.banner.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--sea-soft); color: var(--ink); border-left: 3px solid var(--sea); }
.banner.notice .ic { color: var(--sea); flex: none; margin-top: 2px; }
.c-mono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 18px; flex: none; }
.dh-t h2 small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.c-contact { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 8px; }
.c-contact .mono { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; margin-right: 4px; }
.c-contact .ic { width: 16px; height: 16px; }
.c-note { display: flex; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.c-note .ic { flex: none; margin-top: 2px; color: var(--ink-3); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-card.gh { border-top-color: var(--sea); }
.sc-h { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: space-between; }
.rule { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 2px 0 0; font-size: 13px; }
.rule dt { color: var(--ink-3); }
.rule dd { margin: 0; color: var(--ink-2); }
.next { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.next.due { color: var(--signal); font-weight: 600; }
.next .ic { width: 15px; height: 15px; }
.appt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.appt > span { display: flex; flex-direction: column; gap: 2px; }
.appt small { color: var(--signal); }
.appt.now { background: var(--brand-soft); color: var(--brand); }
.appt.late { background: var(--signal-soft); color: var(--signal); }
.appt.ok { background: var(--good-soft); color: var(--good); }
.appt .ic { flex: none; margin-top: 2px; }
.remind { list-style: none; margin: 0 0 10px; padding: 0; }
.remind li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.remind li:last-child { border-bottom: 0; }
.remind .chk span { display: flex; flex-direction: column; }
.remind small { color: var(--ink-3); font-size: 12.5px; }
.remind li.late b { color: var(--signal); }
.remind li.done b { text-decoration: line-through; color: var(--ink-3); font-weight: 400; }
.recs { list-style: none; margin: 0; padding: 0; }
.rec { position: relative; padding: 10px 0 12px 16px; border-bottom: 1px solid var(--line-2); }
.rec:last-child { border-bottom: 0; }
.rec::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--brand); }
.rec.gh::before { background: var(--sea); }
.rec-h { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.rec-h time { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.rec-st { font-weight: 600; color: var(--ink-2); }
.rec p { overflow-wrap: anywhere; white-space: pre-wrap; }
.m-h { margin: 14px 0 4px; font-size: 14px; color: var(--ink-2); }
.pri-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 12px; }
.pri-o { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.pri-o span { display: flex; flex-direction: column; gap: 2px; }
.pri-o small { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.pri-o:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.pri-o:has(input:disabled) { cursor: default; opacity: 0.8; }
.st-pick { border: 0; padding: 0; margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.st-pick legend { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.st-o { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); }
.st-o input { margin: 0; }
.st-o span { display: flex; flex-direction: column; line-height: 1.25; }
.st-o small { font-size: 11.5px; color: var(--ink-3); }
.st-o:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.st-o[data-tone='good']:has(input:checked) { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); background: var(--good-soft); }
.st-o[data-tone='bad']:has(input:checked) { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: var(--bad-soft); }
.st-o[data-tone='warn']:has(input:checked) { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); background: var(--signal-soft); }
.st-o[data-tone='sea']:has(input:checked) { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); background: var(--sea-soft); }
.st-o[data-tone='brand']:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.deal-mini { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.deal-mini > span { display: flex; flex-direction: column; }
.deal-mini small { color: var(--ink-3); font-size: 12px; }
.deal-mini .num b { font-family: var(--mono); }
.deal-cta { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: color-mix(in srgb, var(--good-soft) 55%, var(--surface)); }
.deal-cta .btn { margin-top: 12px; }
small.on { color: var(--good) !important; }

/* ---------- 工作台 ---------- */
.home-h { align-items: center; }
.clocks { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.clocks span { display: flex; flex-direction: column; padding: 8px 16px; min-width: 92px; }
.clocks span + span { border-left: 1px solid var(--line-2); }
.clocks small { font-size: 12px; color: var(--ink-3); }
.clocks b { font: 600 22px/1.2 var(--mono); letter-spacing: 0.02em; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.home-grid > .panel { margin-bottom: 0; }
.home-side .panel:last-child { margin-bottom: 0; }
.rate-ask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate-ask input { width: 100px; min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.rate-ask .ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.td { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.td:first-child { padding-top: 0; }
.td:last-child { border-bottom: 0; padding-bottom: 0; }
.td h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin-bottom: 6px; }
.td h3 i { font-style: normal; font-weight: 600; font-size: 12px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); display: inline-grid; place-items: center; }
.td-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.td[data-tone='bad'] .td-dot { background: var(--bad); } .td[data-tone='warn'] .td-dot { background: var(--signal); } .td[data-tone='brand'] .td-dot { background: var(--brand); } .td[data-tone='good'] .td-dot { background: var(--good); } .td[data-tone='sea'] .td-dot { background: var(--sea); }
.td[data-tone='bad'] h3 i { background: var(--bad-soft); color: var(--bad); }
.td-all { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--brand); text-decoration: none; }
.td ul { list-style: none; margin: 0; padding: 0; }
.td-row { display: flex; align-items: center; gap: 4px 10px; width: 100%; padding: 7px 8px; margin: 0 -8px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; flex-wrap: wrap; }
.td-row:hover { background: var(--surface-2); }
.td-row b { font-weight: 600; }
.td-row .mute { font-size: 13px; }
.td-x { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.owe { color: var(--signal); font-weight: 600; }
.mini-c { list-style: none; margin: 0; padding: 0; }
.mini-c button { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; text-align: left; }
.mini-c li:last-child button { border-bottom: 0; }
.mini-c button:hover b { color: var(--brand); }
.mini-c small { color: var(--ink-3); }
.mini-c .handoff, .mini-c button > .tag { flex-basis: 100%; }
.st-h { font-size: 13px; color: var(--ink-2); margin: 12px 0 6px; font-weight: 600; }
.st-h:first-of-type { margin-top: 0; }
.st-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.st-bars li { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.st-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--brand); }
.st-bars b { text-align: right; font: 600 12.5px var(--mono); color: var(--ink); }

/* ---------- 约面日历 ---------- */
.cal-nav .btn { min-width: 40px; }
.flip { display: inline-flex; transform: scaleX(-1); }
.cal-range { margin: -8px 0 12px; color: var(--ink-2); font-weight: 550; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.cal-day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-day.past { background: var(--surface-2); }
.cal-day h3 { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--ink-3); font-weight: 550; margin-bottom: 2px; }
.cal-day h3 b { color: var(--ink); font-size: 16px; }
.cal-day h3 em { font-style: normal; margin-left: auto; font-size: 12px; color: var(--brand); font-weight: 600; }
.cal-i, .cal-r { display: grid; gap: 2px; width: 100%; padding: 7px 8px; border: 1px solid var(--line-2); border-left: 3px solid var(--brand); border-radius: var(--r-sm); background: var(--surface); text-align: left; }
.cal-i:hover, .cal-r:hover { border-color: var(--ink-3); }
.cal-i.ok { border-left-color: var(--good); }
.cal-i.late { border-left-color: var(--signal); }
.cal-t b { font: 600 15px var(--mono); }
.cal-t small, .cal-n small, .cal-r small { display: block; font-size: 11.5px; color: var(--ink-3); }
.cal-n b { font-size: 13.5px; overflow-wrap: anywhere; }
.cal-s .tag { height: 20px; font-size: 11.5px; }
.cal-r { grid-template-columns: auto 1fr; align-items: start; gap: 6px; border-left-color: var(--signal); background: var(--signal-soft); }
.cal-r .ic { width: 14px; height: 14px; color: var(--signal); margin-top: 2px; }
.cal-r b { font-size: 12.5px; font-weight: 550; }
.cal-none { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

/* ---------- 消息 ---------- */
.inbox { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.inbox > li:only-child .empty { border: 0; border-radius: 0; }
.msg { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.msg:last-child { border-bottom: 0; }
.msg:hover { background: var(--surface-2); }
.msg .tag { justify-self: start; }
.msg-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-b b { font-weight: 500; }
.msg-b span { color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.msg time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.msg.new { background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.msg.new .msg-b b { font-weight: 650; }
.msg.new time::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-right: 6px; vertical-align: 1px; }

/* ---------- 审批 ---------- */
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.req { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.req h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-d { color: var(--ink-2); font-size: 13.5px; }

/* ---------- 工具 ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; }
.tool:hover { border-color: var(--brand); }
.tool > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.tool small { color: var(--ink-3); font-size: 12.5px; }
.tool-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand); flex: none; }
.tool-go { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.two-col > .panel { margin: 0; }
.rate-now { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rate-now > b { font: 650 40px/1 var(--mono); }
.rate-now > span { display: flex; flex-direction: column; color: var(--ink-2); }
.rate-now small { color: var(--ink-3); font-size: 12.5px; }
.rate-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rate-form .err { flex-basis: 100%; }
.rates { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rates th { text-align: left; font-weight: 550; color: var(--ink-3); font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rates td { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.rates .num { text-align: right; font-family: var(--mono); }
.co-h { font-size: 14px; margin: 16px 0 6px; color: var(--ink-2); }
#tCompany dl { margin: 0; }
.co-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.co-row dt { color: var(--ink-3); font-size: 13px; }
.co-row dd { margin: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.co-row dd > span:first-child { overflow-wrap: anywhere; }
.co-a { display: inline-flex; gap: 2px; flex: none; }

/* ---------- Call desk (English, for the Accra call staff) ---------- */
.desk-nav { align-items: center; }
.desk-nav #kPos { color: var(--ink-2); font-weight: 550; margin-right: 4px; }
.desk { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.desk.taken { border-color: var(--signal); }
.desk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.desk-top h2 { font-size: 24px; }
.desk-phone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.desk-phone .mono { font-size: 22px; font-weight: 600; margin-right: auto; letter-spacing: 0.02em; }
.desk-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.desk-facts > div.wide { grid-column: 1 / -1; }
.desk-facts dt { color: var(--ink-3); font-size: 12.5px; }
.desk-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.desk-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 14px; }

@media (max-width: 1180px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .tbl.custs .tr { grid-template-columns: minmax(170px, 2fr) minmax(96px, 1fr) minmax(210px, 2.2fr) minmax(140px, 1.5fr); }
  .tbl.custs .tr > span:nth-child(5) { display: none; }
  .cal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .tbl.custs .tr { grid-template-columns: minmax(160px, 2fr) minmax(200px, 2.2fr) minmax(130px, 1.5fr); }
  .tbl.custs .tr > span:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
  .tbl.custs .tr > span:nth-child(2) { display: flex; }
  .rail-brand { flex: 1; }
  .bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border-radius: var(--r); color: var(--ink-2); }
  .bell[hidden] { display: none; }
  .bell[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
  .bell .ic { width: 22px; height: 22px; }
  .bell .nav-n { position: absolute; top: 2px; right: 0; margin: 0; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; line-height: 17px; }
  .tabbar .nav-i { position: relative; }
  .tabbar .nav-n { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; line-height: 17px; }
  .clocks span { padding: 6px 12px; min-width: 78px; }
  .clocks b { font-size: 18px; }
  .home-grid, .two-col, .sides { grid-template-columns: 1fr; }
  .pri-pick { grid-template-columns: 1fr; }
  .tbl.custs .tr > span { flex: 1 1 45%; }
  .tbl.custs .tr > span:nth-child(5) { display: flex; }
  .filters .f-toggle { display: inline-flex; }
  .filters.folded .f-sel, .filters.folded .chk { display: none; }
  .filters .f-search { flex: 1 1 200px; }
  .tbl.custs .tr > .c-who, .tbl.custs .tr > .c-st { flex: 1 1 100%; }
  .cal { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; }
  .cal-day.past:not(:has(.cal-i, .cal-r)) { display: none; }
  .msg { grid-template-columns: minmax(0, 1fr) auto; }
  .msg .tag { grid-column: 1 / -1; }
  .co-row { grid-template-columns: 1fr; gap: 2px; }
  .desk { padding: 16px; }
  .desk-facts { grid-template-columns: 1fr; }
}

/* ======================================================================
   1.4 — the five tools inside the system, their documents, 今日简报, 客户概览
   The documents are printed paper: they keep their own colours whatever the screen theme.
   ====================================================================== */
.tools .tool-go .ic { width: 16px; height: 16px; }
.tool-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tool-t { flex: 1 1 260px; min-width: 0; }
.tool-t h1 { font-size: 22px; }
.tool-t h1 small { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.tool-t .sub a { color: var(--brand); }
.tool-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-seg { display: none; }
.tool-body { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tool-form { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.tool-paper { position: sticky; top: 12px; background: var(--surface-3); border-radius: var(--r-lg); padding: 14px; max-height: calc(100vh - 150px); overflow: auto; }
.paper-fit { position: relative; overflow: hidden; }
.paper-fit > * { transform-origin: 0 0; }
.tbox { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 12px 14px 14px; margin: 0; min-width: 0; position: relative; }
.tbox > legend { font-weight: 650; font-size: 14px; padding: 0 6px; margin-left: -6px; }
.tbox > legend small { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.tbox-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: -2px 0 6px; }
.tbox-b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: start; }
.tbox-b > .fld.wide, .tbox-b > .trow, .tbox-b > .trow-add, .tbox-b > .trow-total, .tbox-b > .chk, .tbox-b > ul, .tbox-b > p, .tbox-b > .insp-mod, .tbox-b > .preset-row, .tbox-b > .insp-sum { grid-column: 1 / -1; }
.tbox .fld input:not([type=checkbox]):not([type=radio]), .tbox .fld select, .tbox .fld textarea { width: 100%; }
.tbox .fld > .chk { align-self: flex-start; }
.fhint { font-size: 12px; color: var(--ink-3); }
em.must { color: var(--bad); font-style: normal; }
.trow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface-2); }
.trow > .fld.wide, .trow > .trow-h, .trow > .trow-sum { grid-column: 1 / -1; }
.trow.slim { grid-template-columns: 1fr auto; align-items: start; }
.trow.slim > .fld { grid-column: auto; }
.trow.two .fld { grid-column: 1 / -1; }
.trow-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.trow-h b { font-size: 13px; }
.trow-h small { color: var(--ink-3); font-weight: 400; }
.trow-sum { font-size: 12.5px; color: var(--ink-2); text-align: right; font-family: var(--mono); }
.trow-add { display: flex; gap: 8px; flex-wrap: wrap; }
.trow-total { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; font-size: 13px; }
.trow-total b { font-size: 17px; font-family: var(--mono); }
.trow-total small { color: var(--ink-3); font-size: 11.5px; text-align: right; }
.seg-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; }
.seg-pick label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: center; min-height: 44px; }
.seg-pick label.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick label:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.seg-pick b { font-size: 14px; }
.seg-pick small { font-size: 11px; color: var(--ink-3); line-height: 1.3; }
.img-pick { display: flex; align-items: center; gap: 8px; }
.img-pick img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-3); }
.img-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.img-th { position: relative; }
.img-th img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.img-th .icon-btn { position: absolute; top: -8px; right: -8px; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; width: 22px; height: 22px; }
.preset-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.preset-row .fld { flex: 1 1 200px; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.svc-list li.off { color: var(--ink-3); text-decoration: line-through; }
.svc-list li.gift { color: var(--signal); }
.calc-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); }
.calc-sum span { font-size: 13px; color: var(--ink-2); }
.calc-sum b { font-size: 26px; font-family: var(--mono); color: var(--brand); }
.calc-sum small { color: var(--ink-3); flex: 1 1 100%; }
.pick-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; display: grid; gap: 4px; }
.pick-list button { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pick-list button:hover { border-color: var(--brand); }
.pick-list small { color: var(--ink-3); font-size: 12px; }
.insp-sum { font-size: 13px; }
.insp-mod { border-top: 1px solid var(--line-2); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.insp-mod .trow-h b small { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.insp-it { display: grid; grid-template-columns: auto minmax(0, 1fr) 56px; gap: 4px 8px; align-items: center; }
.insp-it .insp-nt { grid-column: 2 / -1; }
.insp-it > .icon-btn { grid-column: 3; justify-self: end; }
.insp-tx { display: flex; flex-direction: column; min-width: 0; }
.insp-tx b { font-size: 13px; font-weight: 550; }
.insp-tx small { font-size: 11px; color: var(--ink-3); }
.insp-tx-in, .insp-sc, .insp-nt { min-height: 30px; font-size: 12.5px; }
.tri { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tri button { border: 0; background: var(--surface); padding: 4px 8px; font-size: 12px; color: var(--ink-3); min-height: 30px; }
.tri button + button { border-left: 1px solid var(--line); }
.tri button.on.ok { background: var(--good-soft); color: var(--good); font-weight: 650; }
.tri button.on.bad { background: var(--bad-soft); color: var(--bad); font-weight: 650; }
.gr { font-size: 11.5px; padding: 1px 8px; border-radius: 10px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.gr-new, .gr-good { background: var(--good-soft); color: var(--good); }
.gr-warn { background: var(--signal-soft); color: var(--signal); }
.doc-list, .file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-list a, .file-list a { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.file-list li { display: flex; align-items: center; gap: 6px; }
.file-list li a { flex: 1; grid-template-columns: 72px minmax(0, 1fr); }
.doc-list a:hover, .file-list a:hover { background: var(--surface-2); }
.doc-k { justify-self: start; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 600; white-space: nowrap; }
.doc-k.k-contract { background: var(--sea-soft); color: var(--sea); }
.doc-k.k-estimate { background: var(--signal-soft); color: var(--signal); }
.doc-k.k-inspect { background: var(--good-soft); color: var(--good); }
.doc-t { display: flex; flex-direction: column; min-width: 0; }
.doc-t b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-t small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.doc-new { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.file-up { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.qc-report { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lic button { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.lic img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 4px; }
.lic-big { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto 12px; }
.lic-row { display: flex; gap: 12px; flex-wrap: wrap; }
.lic-set { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; width: 180px; }
.lic-set img { width: 180px; height: 130px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.lic-set figcaption { font-size: 12.5px; color: var(--ink-2); }
.bank-card { border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.calc-card { background: #fff; color: #1e293b; border-radius: 14px; padding: 18px 20px; width: 560px; font-size: 13px; box-shadow: var(--shadow); }
.calc-card.empty-card { text-align: center; padding: 40px 24px; }
.calc-card .calc-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #f1f5f9; color: #64748b; margin-bottom: 10px; }
.calc-card h3 { font-size: 17px; margin-bottom: 6px; }
.calc-card p { color: #64748b; }
.calc-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.calc-h b { font-size: 16px; }
.calc-h span { color: #64748b; font-size: 12.5px; }
.calc-t { width: 100%; border-collapse: collapse; }
.calc-t th, .calc-t td { padding: 9px 4px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.calc-t th { text-align: left; font-weight: 600; }
.calc-t th small { display: block; font-weight: 400; color: #64748b; font-size: 11.5px; margin-top: 2px; }
.calc-t td { text-align: right; font-family: var(--mono); white-space: nowrap; }
.calc-t tr.minus td { color: #b45309; }
.calc-t tr.sub th, .calc-t tr.sub td { background: #f8fafc; }
.calc-t tr.total th, .calc-t tr.total td { border-bottom: 0; font-size: 15px; color: #0e5a49; padding-top: 12px; }
.calc-foot { margin-top: 12px; font-size: 11.5px; color: #94a3b8; }

/* ---------- 今日简报 ---------- */
.tbl.brief .tr { grid-template-columns: 90px minmax(120px, 1fr) 140px 120px minmax(200px, 2.2fr); color: var(--ink); text-decoration: none; }
.tag.sm { font-size: 11px; padding: 0 6px; }
#view-briefing .page-a { align-items: center; }
#view-briefing .seg { margin: 0; }
#view-briefing input[type=date] { min-height: 34px; width: auto; }

/* ---------- 客户概览 on 工作台 ---------- */
.ov-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ov-f .seg { margin: 0; }
.ov-f .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 34, 42, 0.12); }
.ov-d { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.ov-d input { min-height: 30px; font-size: 12.5px; padding: 2px 6px; }
.ov-a select { min-height: 30px; font-size: 12.5px; }
.ov-k { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ov-k button { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.ov-k button:hover { border-color: var(--brand); }
.ov-k span { font-size: 12px; color: var(--ink-3); }
.ov-k b { font-size: 20px; }
.ov .st-bars button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 8px; cursor: pointer; border-radius: 4px; padding: 1px 2px; }
.ov .st-bars button:hover:not(:disabled) { background: var(--surface-2); }
.ov .st-bars button:focus-visible { outline: 2px solid var(--brand); }
.ov .st-bars button:disabled { cursor: default; opacity: 0.55; }
.f-date { display: inline-flex; align-items: center; gap: 6px; }
.f-date input { min-height: 34px; max-width: 150px; }

@media (max-width: 1100px) {
  .tool-body { grid-template-columns: 1fr; }
  .tool-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: var(--r); margin: 0 0 12px; }
  .tool-seg button { border: 0; background: transparent; padding: 6px 18px; border-radius: 6px; color: var(--ink-2); font-weight: 550; }
  .tool-seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 34, 42, 0.12); }
  .tool-body[data-pane="form"] .tool-paper { display: none; }
  .tool-body[data-pane="paper"] .tool-form { display: none; }
  .tool-form, .tool-paper { max-height: none; overflow: visible; position: static; }
  .tool-paper { overflow-x: hidden; }
}
@media (max-width: 600px) {
  .tbox-b, .trow { grid-template-columns: 1fr; }
  .tool-acts { width: 100%; }
  .tool-acts .btn { flex: 1 1 auto; }
  .tbl.brief .tr { grid-template-columns: 1fr; gap: 2px; }
  .doc-list a { grid-template-columns: 64px minmax(0, 1fr); }
  .doc-list time { grid-column: 2; }
  .lic { grid-template-columns: 1fr; }
  .calc-card { width: 100%; }
}

/* ---------- the paper ---------- */
.paper { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px -12px rgba(0, 0, 0, 0.25); font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper.a4 { width: 210mm; min-height: 297mm; padding: 14mm 14mm 16mm; font-size: 9.5pt; line-height: 1.45; position: relative; }
.paper h1, .paper h2, .paper h3, .paper h4 { letter-spacing: 0; color: inherit; }
.paper .sig-name { font-family: "Snell Roundhand", "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive; font-size: 20pt; color: #1a2744; line-height: 1.1; min-height: 24pt; }
.paper .sig-line { display: block; width: 52mm; border-top: 1px solid #555; margin: 2mm 0 1mm; }
.paper-foot { margin-top: 8mm; padding-top: 3mm; border-top: 1px solid #ddd; text-align: center; font-size: 7.5pt; color: #888; }
.lj-logo { display: flex; flex-direction: column; align-items: center; gap: 1mm; margin: 6mm 0 7mm; }
.lj-logo .lj-mark { width: 30mm; height: auto; }
.lj-logo b { font: 800 26pt/1 "Arial Black", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.04em; color: #111; }
.lj-logo span { font: 700 13pt/1.2 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; color: #222; letter-spacing: 0.02em; }

/* PI */
.doc-pi { color: #1a2744; }
.pi-top { display: flex; justify-content: space-between; gap: 8mm; align-items: flex-start; }
.pi-seller { display: flex; flex-direction: column; gap: 1mm; font-size: 7.5pt; color: #555; max-width: 120mm; }
.pi-seller b { font-size: 10pt; color: #1a2744; }
.pi-title { font: 800 19pt/1.15 "Helvetica Neue", Arial, sans-serif; text-align: right; letter-spacing: 0.08em; color: #1a2744; }
.pi-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4mm; padding: 3mm 4mm; background: #f4f6f9; border: 1px solid #e2e6ec; }
.pi-bar span, .pi-parties .cap { display: block; font-size: 7pt; color: #666; text-transform: none; }
.pi-bar b { font-size: 10pt; }
.pi-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin: 5mm 0; }
.pi-parties > div { border: 1px solid #e2e6ec; padding: 3mm 4mm; font-size: 8pt; color: #444; }
.pi-parties b { display: block; font-size: 9.5pt; color: #1a2744; margin: 1mm 0; }
.pi-parties p { margin: 0.5mm 0; }
.pi-goods { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.pi-goods th { background: #1a2744; color: #fff; font-weight: 700; padding: 2mm; text-align: left; font-size: 7.5pt; }
.pi-goods td { border-bottom: 1px solid #e2e6ec; padding: 2mm; vertical-align: middle; }
.pi-goods td.n, .pi-goods th:nth-child(3), .pi-goods th:nth-child(5) { text-align: right; white-space: nowrap; }
.pi-goods td.c, .pi-goods th:nth-child(4) { text-align: center; }
.pi-goods td.pic { width: 22mm; }
.pi-goods td.pic img { width: 20mm; height: 14mm; object-fit: cover; display: block; }
.pi-goods td.pic span { display: grid; place-items: center; width: 20mm; height: 14mm; background: #f4f6f9; color: #aaa; font-size: 6.5pt; }
.pi-goods tr.sub td { text-align: right; font-weight: 700; background: #fafbfc; }
.pi-goods tr.grand td { background: #1a2744; color: #fff; font-weight: 800; font-size: 10.5pt; text-align: right; }
.pi-words { margin: 4mm 0; padding: 2.5mm 4mm; background: #fffbea; border-left: 3px solid #c9a962; }
.pi-words span { font-size: 8pt; color: #666; }
.pi-words b { font-size: 9pt; }
.pi-h { font-size: 9.5pt; font-weight: 800; color: #1a2744; border-bottom: 1.5px solid #1a2744; padding-bottom: 1mm; margin: 5mm 0 2mm; letter-spacing: 0.04em; break-after: avoid; }
.pi-pt { font-weight: 700; margin-bottom: 1mm; }
.pi-ol { margin: 0; padding-left: 5mm; font-size: 8.5pt; color: #333; }
.pi-ol li { margin: 1mm 0; }
.pi-bank { margin-top: 5mm; padding: 3mm 4mm; background: #f4f6f9; border: 1px solid #e2e6ec; break-inside: avoid; }
.pi-bank h3 { font-size: 9pt; font-weight: 800; margin-bottom: 2mm; }
.pi-acct { padding: 2mm 0; break-inside: avoid; }
.pi-acct + .pi-acct { border-top: 1px solid #dfe3ea; }
.pi-acct > b { color: #2b5fa8; font-size: 8.5pt; }
.pi-acct dl { display: grid; grid-template-columns: 26mm 1fr 22mm 1fr; gap: 0.6mm 3mm; margin: 1mm 0 0; font-size: 8pt; }
.pi-acct dt { color: #666; }
.pi-acct dd { margin: 0; font-weight: 600; }
.pi-acct dd.w { grid-column: 2 / -1; }
.pi-sign { display: flex; flex-direction: column; align-items: flex-start; margin-top: 8mm; font-size: 7.5pt; color: #666; break-inside: avoid; }

/* 清关费预估单 */
.doc-est { color: #1e293b; }
.est-head { display: flex; justify-content: space-between; gap: 8mm; padding-bottom: 4mm; border-bottom: 2px solid #1b3a5c; }
.est-head > div { display: flex; flex-direction: column; gap: 0.8mm; font-size: 7.5pt; color: #555; max-width: 120mm; }
.est-head > div b { font-size: 10.5pt; color: #1b3a5c; }
.est-head dl { display: grid; grid-template-columns: auto auto; gap: 0.8mm 3mm; margin: 0; font-size: 8pt; align-content: start; }
.est-head dt { color: #666; text-align: right; }
.est-head dd { margin: 0; font-weight: 700; }
.doc-est h1 { text-align: center; font-size: 15pt; letter-spacing: 0.06em; color: #1b3a5c; margin: 4.5mm 0 1mm; }
.est-sub { text-align: center; color: #64748b; margin-bottom: 2.5mm; }
.doc-est h2 { font-size: 9pt; letter-spacing: 0.06em; color: #1b3a5c; border-bottom: 1px solid #cbd5e1; padding-bottom: 1mm; margin: 4mm 0 1.5mm; }
.est-to { display: grid; grid-template-columns: 34mm 1fr; gap: 0.6mm 3mm; margin: 0; }
.est-to dt { color: #64748b; }
.est-to dd { margin: 0; font-weight: 600; }
.est-v { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.est-v th { background: #f1f5f9; text-align: left; padding: 1.1mm 2mm; font-weight: 600; color: #475569; font-size: 7.5pt; }
.est-v td { padding: 1.3mm 2mm; border-bottom: 1px solid #e2e8f0; font-weight: 600; }
.est-f { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.est-f td { padding: 1.15mm 2mm; border-bottom: 1px solid #eef2f6; }
.est-f td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.est-f td small { display: block; color: #94a3b8; font-size: 7pt; }
.est-f tr.grp td { background: #1b3a5c; color: #fff; font-weight: 700; letter-spacing: 0.04em; }
.est-f tr.sub td { background: #f8fafc; font-weight: 700; }
.est-f tr.total td { background: #c9a962; color: #1b3a5c; font-weight: 800; font-size: 10pt; }
.est-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3mm; margin-top: 4mm; break-inside: avoid; }
.est-boxes div { border: 1px solid #cbd5e1; padding: 3mm; text-align: center; display: flex; flex-direction: column; gap: 1mm; }
.est-boxes span { font-size: 7pt; color: #64748b; letter-spacing: 0.04em; }
.est-boxes b { font-size: 11pt; color: #1b3a5c; }
.est-boxes .hi { background: #1b3a5c; border-color: #1b3a5c; }
.est-boxes .hi span { color: #c9d6e5; }
.est-boxes .hi b { color: #fff; }
.est-range { text-align: center; color: #64748b; font-size: 8pt; margin-top: 2mm; }
.est-notes { break-before: page; padding-top: 2mm; }
.est-notes ol { margin: 0; padding-left: 5mm; font-size: 8.5pt; color: #334155; }
.est-notes li { margin: 1.5mm 0; }
.est-sign { display: flex; flex-direction: column; align-items: flex-end; margin-top: 12mm; font-size: 8pt; color: #475569; }

/* 报价单 (a picture, not a page) */
.doc-qt { width: 720px; font-size: 11px; color: #1f2937; }
.qt-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 18px 10px; border-bottom: 3px solid #1B3A5C; text-align: center; }
.qt-head b { font-size: 22px; font-weight: 700; color: #1B3A5C; letter-spacing: 1px; }
.qt-head span { font-size: 11px; color: #555; }
.qt-head i { font-style: normal; display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700; color: #1B3A5C; border: 1px solid #1B3A5C; border-radius: 3px; padding: 2px 10px; letter-spacing: 1px; }
.qt-sec { padding: 14px 18px 0; }
.qt-sec h3 { background: #1B3A5C; color: #fff; text-align: center; font-weight: 700; letter-spacing: 1.5px; font-size: 14px; padding: 9px 0; margin: 0; }
.qt-t, .qt-s { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.qt-t th { background: #EAF0F6; color: #1B3A5C; font-size: 10px; font-weight: 600; border: 1px solid #E5E7EB; padding: 6px 4px; }
.qt-t td, .qt-s td { border: 1px solid #E5E7EB; padding: 5px 4px; text-align: center; overflow-wrap: anywhere; }
.qt-t td.b { font-weight: 600; }
.qt-t td.pic img { width: 100%; height: 52px; object-fit: cover; display: block; }
.qt-t tr.tot td { background: #F4F6F9; font-weight: 700; font-size: 12px; }
.qt-usd { text-align: right; font-size: 10px; color: #666; margin: 6px 0 0; }
.qt-s td { text-align: left; }
.qt-s td.mk { text-align: center; }
.qt-s tr.gift td { background: #FFF3CD; }
.qt-s em { font-style: normal; color: #856404; font-weight: 700; }
.qt-s i { font-style: normal; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 2px; font-weight: 700; font-size: 12px; line-height: 1; }
.qt-s i.yes { background: #1B3A5C; color: #fff; }
.qt-s i.no { background: #e5e7eb; color: #d64545; }
.qt-nofee { margin: 0; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #856404; background: #FFF3CD; border-top: 1px solid #E5E7EB; padding: 7px; }
.qt-total { margin-top: 14px; background: #1B3A5C; color: #fff; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 14px 18px; }
.qt-total span { font-size: 13px; font-weight: 600; letter-spacing: 0.5px; }
.qt-total b { font-size: 24px; font-weight: 800; color: #C9A962; }
.qt-foot { margin: 0; font-size: 9px; color: #aaa; text-align: center; padding: 8px 18px; border-top: 1px solid #E5E7EB; }

/* 合同 */
.doc-ct { font-family: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, "Times New Roman", serif; color: #1f2937; font-size: 9pt; }
.ct-band { display: flex; justify-content: space-between; align-items: center; background: #1b3a5c; color: #fff; padding: 5mm 7mm; margin: -14mm -14mm 6mm; }
.ct-band div { display: flex; flex-direction: column; gap: 0.6mm; }
.ct-band b { font-size: 13pt; letter-spacing: 0.08em; }
.ct-band span { font: 700 8.5pt "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.08em; }
.ct-band em { font: 600 7pt "Helvetica Neue", Arial, sans-serif; font-style: normal; color: #c9a962; letter-spacing: 0.12em; margin-top: 1.5mm; border-top: 1px solid #c9a962; padding-top: 1.2mm; }
.ct-band .ct-logo { width: 16mm; filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.6)); }
.ct-title { text-align: center; font: 700 17pt "Times New Roman", Georgia, serif; letter-spacing: 0.3em; color: #1b3a5c; margin-bottom: 4mm; }
.ct-title small { display: block; font-size: 9pt; letter-spacing: 0.6em; color: #555; margin-top: 1mm; }
.ct-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 2mm 8mm; background: #f4f6f9; border: 1px solid #e2e6ec; padding: 2.5mm 4mm; margin-bottom: 4mm; font-weight: 700; }
.ct-info i { font-style: normal; font: 600 7pt "Helvetica Neue", Arial, sans-serif; color: #c9a962; margin-right: 2mm; letter-spacing: 0.06em; }
.ct-info .wide { flex: 1 1 100%; font-weight: 400; }
.ct-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 4mm; }
.ct-parties > div, .ct-bank { border: 1px solid #e2e6ec; }
.ct-parties h4, .ct-bank h4 { background: #1b3a5c; color: #fff; font: 600 8pt "Helvetica Neue", Arial, sans-serif; padding: 1.5mm 3mm; letter-spacing: 0.06em; border-left: 3px solid #c9a962; }
.ct-parties h4 b, .ct-bank h4 b { margin-right: 1.5mm; }
.ct-parties dl, .ct-bank dl { display: grid; grid-template-columns: auto 1fr; gap: 1mm 3mm; margin: 0; padding: 2mm 3mm; font-size: 8.5pt; }
.ct-parties dt, .ct-bank dt { color: #c9a962; font-size: 7.5pt; white-space: nowrap; }
.ct-parties dd, .ct-bank dd { margin: 0; }
.ct-bank { margin-bottom: 5mm; }
.ct-bank dl { grid-template-columns: auto 1fr auto 1fr; }
.ct-bank dd.w { grid-column: 2 / -1; }
.ct-art { margin: 4mm 0; }
.ct-art h3, .ct-sub { break-after: avoid; }
.ct-t tr, .ct-ports, .ct-grid, .ct-words, .ct-cn + .ct-en { break-inside: avoid; }
.ct-art h3 { display: flex; align-items: center; gap: 2.5mm; margin-bottom: 2mm; padding-bottom: 1mm; border-bottom: 1px solid #e2e6ec; }
.ct-art h3 i { font-style: normal; display: grid; place-items: center; width: 6mm; height: 6mm; border-radius: 50%; background: #1b3a5c; color: #fff; font: 700 8pt "Helvetica Neue", Arial, sans-serif; flex: none; }
.ct-art h3 span { display: flex; flex-direction: column; }
.ct-art h3 b { font-size: 9.5pt; color: #1b3a5c; }
.ct-art h3 small { font: 600 6.5pt "Helvetica Neue", Arial, sans-serif; color: #c9a962; letter-spacing: 0.08em; }
.ct-cn { margin: 1.5mm 0 0.6mm; }
.ct-en { margin: 0 0 1.5mm; color: #374151; font-family: "Times New Roman", Georgia, serif; text-align: justify; }
.ct-t { width: 100%; border-collapse: collapse; font-size: 8pt; margin: 2mm 0; }
.ct-t th { background: #eef2f7; color: #1b3a5c; padding: 1.5mm; border: 1px solid #d5dbe4; font-weight: 700; text-align: center; }
.ct-t th small, .ct-t td small { display: block; font-weight: 400; font-size: 6.5pt; color: #666; }
.ct-t td { padding: 1.5mm; border: 1px solid #d5dbe4; text-align: center; }
.ct-t td.n { text-align: right; white-space: nowrap; }
.ct-t tr.tot td { background: #1b3a5c; color: #fff; font-weight: 700; text-align: right; }
.ct-svc td:nth-child(2) i { font-style: italic; display: block; }
.ct-sub { margin: 3mm 0 1mm; font-weight: 700; color: #1b3a5c; font-size: 8.5pt; }
.ct-ports, .ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; margin: 2mm 0; }
.ct-ports div, .ct-grid div { border: 1px solid #e2e6ec; border-left: 3px solid #c9a962; padding: 1.5mm 3mm; font-size: 8.5pt; }
.ct-ports i, .ct-grid i, .ct-words i { font-style: normal; display: block; font: 600 6.5pt "Helvetica Neue", Arial, sans-serif; color: #c9a962; letter-spacing: 0.06em; margin-bottom: 0.5mm; }
.ct-words { background: #fffbea; border: 1px solid #ecdcaa; padding: 2.5mm 3.5mm; margin-top: 2mm; display: flex; flex-direction: column; gap: 0.8mm; }
.ct-words b { font-family: "Times New Roman", Georgia, serif; }
.ct-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; margin-top: 8mm; break-inside: avoid; }
.ct-sign h4 { font: 700 8.5pt "Helvetica Neue", Arial, sans-serif; color: #1b3a5c; border-bottom: 1.5px solid #1b3a5c; padding-bottom: 1mm; }
.ct-sign h4 b { margin-right: 1.5mm; }
.ct-sign p { margin: 1.5mm 0 9mm; font-weight: 700; font-size: 8.5pt; min-height: 4mm; }
.ct-sign span { display: block; border-top: 1px solid #555; padding-top: 1mm; margin-bottom: 7mm; font-size: 7.5pt; color: #666; }
.ct-foot { display: flex; justify-content: space-between; text-align: left; }

/* 内检报告 */
.doc-ir { color: #1e293b; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150'%3E%3Ctext x='150' y='80' text-anchor='middle' font-family='Arial' font-size='16' fill='%231b3a5c' fill-opacity='0.05' transform='rotate(-24 150 75)'%3ELinjing Used Car Inspection%3C/text%3E%3C/svg%3E"); background-repeat: repeat; }
.ir-h { text-align: center; padding-bottom: 4mm; border-bottom: 2px solid #1b3a5c; margin-bottom: 5mm; }
.ir-h h1 { font: 800 18pt "Helvetica Neue", Arial, sans-serif; color: #1b3a5c; letter-spacing: 0.02em; }
.ir-h p { color: #64748b; margin: 1mm 0 3mm; }
.ir-h div { display: flex; justify-content: center; gap: 3mm; align-items: baseline; font-size: 8.5pt; }
.ir-h span { color: #94a3b8; font-size: 7pt; letter-spacing: 0.06em; }
.ir-h div b + span { margin-left: 5mm; }
.ir-veh { display: grid; grid-template-columns: 68mm 1fr; gap: 5mm; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 3mm; padding: 4mm; }
.ir-photo { display: grid; place-items: center; background: #e2e8f0; border-radius: 2mm; overflow: hidden; min-height: 46mm; color: #94a3b8; font-size: 8pt; }
.ir-photo img { width: 100%; height: 100%; max-height: 56mm; object-fit: cover; display: block; }
.ir-info h2 { font-size: 10pt; color: #1b3a5c; margin-bottom: 1.5mm; letter-spacing: 0.04em; }
.ir-vin { font-size: 8pt; color: #64748b; margin: 0 0 1.5mm; }
.ir-vin b { font-family: var(--mono); color: #1e293b; letter-spacing: 0.04em; }
.ir-info dl { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 1.2mm 3mm; margin: 0; font-size: 8pt; }
.ir-info dt { color: #64748b; }
.ir-info dd { margin: 0; font-weight: 600; }
.ir-sec { font-size: 9.5pt; color: #1b3a5c; letter-spacing: 0.06em; border-bottom: 1.5px solid #1b3a5c; padding-bottom: 1mm; margin: 5mm 0 2.5mm; break-after: avoid; }
.ir-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5mm; }
.ir-sum div { display: flex; justify-content: space-between; align-items: center; border: 1px solid #e2e8f0; padding: 1.5mm 2.5mm; font-size: 8pt; background: #fff; }
.ir-sum b, .ir-mod h3 .gr { font-size: 6.5pt; padding: 0.4mm 2mm; border-radius: 2mm; letter-spacing: 0.04em; }
.ir-sum b.pass { background: #dcfce7; color: #15803d; }
.ir-sum b.fail { background: #fee2e2; color: #b91c1c; }
.ir-sum b.na { background: #f1f5f9; color: #94a3b8; }
.ir-ov { font-size: 8.5pt; color: #334155; text-align: justify; }
.ir-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm; }
.ir-gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.5mm; display: block; }
.ir-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
.ir-mod { border: 1px solid #e2e8f0; border-radius: 2mm; padding: 2.5mm 3mm; background: #fff; break-inside: avoid; }
.ir-mod h3 { display: flex; justify-content: space-between; align-items: center; font-size: 8pt; color: #1b3a5c; margin-bottom: 1.5mm; letter-spacing: 0.04em; }
.ir-mod .gr-new, .ir-mod .gr-good { background: #dcfce7; color: #15803d; }
.ir-mod .gr-normal { background: #e0f2fe; color: #0369a1; }
.ir-mod .gr-warn { background: #fef3c7; color: #b45309; }
.ir-mod .gr-none { background: #f1f5f9; color: #94a3b8; }
.ir-mod ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1mm; }
.ir-mod li { display: grid; grid-template-columns: 3.5mm 1fr auto; gap: 1.5mm; align-items: start; font-size: 7.5pt; }
.ir-mod li i { font-style: normal; font-weight: 800; }
.ir-mod li.pass i { color: #15803d; }
.ir-mod li.fail i { color: #b91c1c; }
.ir-mod li.na i { color: #94a3b8; }
.ir-mod li small { display: block; color: #b45309; font-size: 7pt; }
.ir-mod li b { font-size: 7pt; color: #475569; font-family: var(--mono); }
.ir-notes { font-size: 8.5pt; color: #334155; }
.ir-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10mm; margin-top: 8mm; break-inside: avoid; }
.ir-sig { display: flex; flex-direction: column; align-items: flex-start; font-size: 8pt; color: #475569; }
.ir-stamp { width: 34mm; height: 34mm; transform: rotate(-12deg); opacity: 0.88; }
.ir-stamp circle { stroke: currentColor; }
.ir-stamp.pass { color: #15803d; }
.ir-stamp.fail { color: #b91c1c; }
.ir-stamp text { fill: currentColor; font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 800; }
.ir-stamp .t1 { font-size: 10.5px; letter-spacing: 1.5px; }
.ir-stamp .t2 { font-size: 10px; }
.ir-stamp .t3 { font-size: 19px; letter-spacing: 1px; }

/* ---------- printing: only #printRoot goes on paper ---------- */
#printRoot { display: none; }
@media print {
  @page { size: A4; margin: 11mm 12mm 12mm; }
  body.printing > *:not(#printRoot) { display: none !important; }
  body.printing { background: #fff !important; }
  body.printing #printRoot { display: block; }
  #printRoot .paper { box-shadow: none; transform: none !important; margin: 0 auto; }
  #printRoot .paper.a4 { width: auto; min-height: 0; padding: 0; }
  #printRoot .ct-band { margin: 0 0 6mm; }
  #printRoot .doc-qt { width: 100%; }
}

/* ---------- 1.5: car problems and parts, approvals inside a car, papers, containers, registration ---------- */
.std { display: grid; gap: 6px; margin: 2px 0 10px; }
.probs > .sub { margin-bottom: 10px; }
.prob-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prob { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.prob.ruled { opacity: 0.6; }
.prob.ruled .prob-h input[type="text"] { text-decoration: line-through; }
.prob-h, .prob-b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.prob-h input[type="text"] { flex: 1 1 220px; min-width: 0; }
.prob-h select { width: auto; }
.prob-b { font-size: 13.5px; }
.prob-b input[type="text"] { width: 168px; }
.prob-b select { width: auto; }
.prob .seg { margin: 0; padding: 2px; border-radius: 7px; }
.prob .seg button { padding: 5px 12px; font-size: 13px; }
.prob .seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.photos.sm { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
table.cost th { width: 96px; color: var(--ink-2); background: transparent; font-size: 13.5px; }
table.cost td.sub { font-size: 12.5px; }
/* 装柜 */
.pool .p-h, .asks .p-h, .ask .p-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.pool-l { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pool-l li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 36px; padding: 2px 0; border-bottom: 1px solid var(--line-2); }
.pool-l li input { width: 18px; height: 18px; accent-color: var(--brand); }
.pool details { margin-top: 10px; }
.pool summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; min-height: 32px; display: flex; align-items: center; }
.boxes { display: grid; gap: 10px; }
.bx { display: grid; gap: 8px; width: 100%; text-align: left; color: var(--ink); font: inherit; cursor: pointer; margin: 0; }
.bx:hover { border-color: var(--ink-3); }
.bx:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 1px; }
.bx-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bx-h b { font-size: 16px; letter-spacing: 0.04em; }
.bx-d { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; }
.bx-d small { color: var(--ink-3); margin-right: 5px; font-size: 12px; }
.bx-w { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-c { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-cars td .link { text-align: left; }
.bx-cars td input { width: 110px; text-align: right; }
.bx-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bx-add select { flex: 1 1 260px; width: auto; }
.m-actions .grow { flex: 1; }
.m-actions { flex-wrap: wrap; }
/* settings: one price rule per line */
.prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 150px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
/* 账号: registrations waiting */
.asks { border-color: color-mix(in srgb, var(--signal) 45%, var(--line)); }
.ask { padding: 12px 0; border-top: 1px solid var(--line-2); }
.ask:first-of-type { border-top: 0; }
.chks { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 6px 0; }
.rg-roles { border: 0; padding: 0; margin: 0; }
.rg-roles legend { padding: 0; margin-bottom: 4px; }
#rg-roles { display: flex; flex-wrap: wrap; gap: 0 16px; }
@media (max-width: 640px) {
  .prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .prow input[type="number"] { grid-column: 1 / 3; }
  .prob-b input[type="text"] { flex: 1 1 140px; width: auto; }
  .bx-cars td input { width: 86px; }
}
/* the page is older than the server: one bar until it is refreshed */
.upd { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: min(560px, calc(100% - 24px)); padding: 10px 14px; border-radius: var(--r); background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: var(--shadow); }
/* 设置: one card per group robot; the step templates beside what the group will see */
.bot { padding: 12px 0; border-top: 1px solid var(--line-2); }
.bot:first-child { border-top: 0; }
.bot-h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.bot-h .fld { width: 180px; }
.bot-h .fld.grow { flex: 1 1 320px; width: auto; }
.tpl-g { border-top: 1px solid var(--line-2); padding: 4px 0; }
.tpl-g summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tpl { padding: 10px 0 14px; }
.tpl .p-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpl h4 { margin: 0; font-size: 14px; }
.tpl-b { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tpl-b textarea { font-family: inherit; font-size: 13.5px; }
.tpl-pv { margin: 0; }
.tpl-pv pre { margin: 4px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.55; }
.panel code { font-size: 12.5px; padding: 1px 4px; border-radius: 4px; background: var(--surface-2); }
@media (max-width: 760px) { .tpl-b { grid-template-columns: 1fr; } .bot-h .fld { width: 100%; } }
