﻿:root {
  --ink: #181b1d;
  --ink-2: #353a3d;
  --muted: #687074;
  --hint: #90989c;
  --line: #dde1e2;
  --line-strong: #c4cacd;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --accent: #ff5a00;
  --accent-deep: #dc4b00;
  --primary: #ff5a00;
  --primary-hover: #df4d00;
  --primary-soft: #fff0e7;
  --success: #21865b;
  --success-soft: #e9f5ef;
  --danger: #c63f45;
  --danger-soft: #fbecee;
  --warn: #a96f00;
  --warn-soft: #fff4d9;
  --info: #3676a8;
  --info-soft: #eaf2f8;
  --shadow: 0 1px 2px rgba(24, 27, 29, .035);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0; }
button, input, select { font: inherit; }
button { letter-spacing: 0; }
svg { width: 18px; height: 18px; stroke-width: 1.9; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 12px; background: #1a1d1e; color: #fff; display: flex; flex-direction: column; z-index: 20; }
.brand { min-height: 68px; padding: 3px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.09); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
.brand-logo { width: 124px; max-width: 100%; height: auto; display: block; }
.brand-subtitle { margin-left: 2px; color: #aeb5ba; font-size: 11px; font-weight: 650; letter-spacing: 0; }
.nav { margin-top: 14px; display: grid; gap: 3px; }
.nav-item { position: relative; width: 100%; height: 42px; border: 0; border-radius: 5px; padding: 0 11px; display: flex; align-items: center; gap: 11px; color: #aeb4b6; background: transparent; cursor: pointer; text-align: left; transition: background .18s var(--ease), color .18s var(--ease); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(255, 90, 0, .16); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #ff6a16; }
.nav-item > span:not(.nav-counts) { flex: 1; font-size: 14px; font-weight: 650; }
.nav-item svg { width: 17px; height: 17px; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; background: var(--accent); color: #171817; border-radius: 10px; font-size: 10px; }
.nav-counts { flex: none; display: flex; align-items: center; gap: 4px; }
.nav-badge.going { border: 1px solid rgba(255,255,255,.2); background: #fff; color: #18221d; }
.nav-badge.unread { background: var(--danger); color: #fff; }
[hidden] { display: none !important; }
.nav-label { margin: 18px 11px 5px; color: #6e756f; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.sidebar-status { margin-top: auto; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; gap: 10px; }
.sidebar-status strong, .sidebar-status span { display: block; }
.sidebar-status strong { font-size: 12px; }
.sidebar-status div span { color: #7f877f; font-size: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(255,212,59,.08); }
.status-dot.online { background: #42cd8a; box-shadow: 0 0 0 4px rgba(66,205,138,.1); }

.main { min-width: 0; }
.topbar { height: 62px; padding: 0 26px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15; backdrop-filter: blur(10px); }
.crumb { display: flex; align-items: center; gap: 7px; color: var(--hint); font-size: 12px; }
.crumb svg { width: 14px; height: 14px; }
.crumb strong { color: var(--ink-2); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.global-surcharge-overview { min-width: 154px; height: 44px; padding: 0 10px; border: 1px solid #e3ded8; border-radius: 7px; background: #fffaf6; color: var(--ink-2); display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; cursor: pointer; text-align: left; transition: .18s var(--ease); }
.global-surcharge-overview:hover { border-color: #e1b99f; background: #fff6f0; }
.global-surcharge-overview:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.global-surcharge-icon { width: 30px; height: 30px; border-radius: 6px; background: var(--primary-soft); color: var(--accent-deep); display: grid; place-items: center; }
.global-surcharge-icon svg { width: 17px; height: 17px; }
.global-surcharge-copy { min-width: 0; }
.global-surcharge-copy small, .global-surcharge-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-surcharge-copy small { color: var(--muted); font-size: 10px; font-weight: 700; }
.global-surcharge-copy strong { margin-top: 1px; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.global-surcharge-copy strong b { margin-left: 2px; color: var(--muted); font-size: 10px; font-weight: 700; }
.global-surcharge-overview.active { border-color: #efbea2; background: #fff8f3; }
.global-surcharge-overview.active .global-surcharge-icon { background: #ffe8da; color: var(--accent-deep); }
.global-surcharge-overview.loading, .global-surcharge-overview.unavailable { min-width: 126px; color: var(--muted); }
.global-surcharge-overview.unavailable { border-color: #ead7a7; background: #fffaf0; }
.global-surcharge-overview.unavailable .global-surcharge-icon { background: var(--warn-soft); color: var(--warn); }
.global-weather-overview { min-width: 270px; height: 44px; padding: 0 10px; border: 1px solid #d9e4df; border-radius: 7px; background: #f8fbf9; color: var(--ink-2); display: grid; grid-template-columns: 30px auto minmax(112px, 1fr) auto; align-items: center; gap: 8px; cursor: pointer; text-align: left; transition: .18s var(--ease); }
.global-weather-overview:hover { border-color: #a9c4b7; background: #f2f8f5; }
.global-weather-overview:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.global-weather-icon { width: 30px; height: 30px; border-radius: 6px; background: #e8f4ee; color: #267657; display: grid; place-items: center; }
.global-weather-icon svg { width: 17px; height: 17px; }
.global-weather-primary { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.global-weather-primary strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.global-weather-primary > span { font-size: 11px; font-weight: 750; }
.global-weather-meta { min-width: 0; padding-left: 8px; border-left: 1px solid var(--line); }
.global-weather-meta strong, .global-weather-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-weather-meta strong { font-size: 10px; }
.global-weather-meta small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.global-weather-alert { height: 25px; padding: 0 7px; border: 1px solid #efc977; border-radius: 5px; background: #fff8e8; color: #8b6100; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.global-weather-alert svg { width: 13px; height: 13px; }
.global-weather-alert b { font-size: 9px; }
.global-weather-overview.alerting { border-color: #e7c164; background: #fffdf6; }
.global-weather-overview.loading, .global-weather-overview.unavailable { min-width: 128px; grid-template-columns: 18px auto; color: var(--muted); }
.global-weather-loading { font-size: 10px; font-weight: 700; white-space: nowrap; }
.live-state { height: 30px; padding: 0 10px; border: 1px solid #cfe2dc; border-radius: 5px; display: flex; align-items: center; gap: 7px; color: var(--success); background: #f8fcfa; font-size: 11px; }
.live-state span { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.live-state.warning { border-color: #ead7a7; background: #fffaf0; color: var(--warn); }
.live-state.warning span { background: var(--warn); }
.live-state.danger { border-color: #efc5c8; background: #fff7f7; color: var(--danger); }
.live-state.danger span { background: var(--danger); }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: .18s var(--ease); }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.icon-button.loading svg { animation: spin .8s linear infinite; }
.account-chip { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.account-chip > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.account-chip strong, .account-chip small { display: block; }
.account-chip strong { font-size: 11px; }
.account-chip small { color: var(--muted); font-size: 9px; }
.mobile-menu { display: none; }

.page { width: min(1680px, 100%); margin: 0 auto; padding: 24px 26px 48px; animation: page-in .22s var(--ease); }
.page-head { min-height: 44px; margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.button { height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .18s var(--ease); white-space: nowrap; }
.button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button.dark { border-color: var(--ink); background: var(--ink); color: #fff; }
.button.dark:hover { border-color: #303537; background: #303537; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.accent { border-color: var(--accent); background: var(--accent); color: #1d1e1c; }
.button.danger { color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button svg { width: 16px; height: 16px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: none; }
.metric { min-height: 104px; padding: 15px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-top i { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.metric-top svg { width: 16px; height: 16px; }
.metric strong { display: block; margin-top: 9px; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric small { display: block; margin-top: 8px; color: var(--hint); font-size: 10px; }
.metric small.good { color: var(--success); }
.metric small.warn { color: var(--warn); }

.grid-main { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 18px; }
.rider-rank-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.rider-rank-head { margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.rider-rank-head h2 { margin: 0; font-size: 18px; }
.rider-rank-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.rider-rank-head > span:not(.status) { color: var(--muted); font-size: 12px; }
.rider-rank-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.rider-rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.rider-rank-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rider-rank-card.premium { border-color: #bcd7ca; }
.rider-rank-card header { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.rider-rank-card header > b { width: 28px; height: 28px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; }
.rider-rank-card:nth-child(-n+3) header > b { background: var(--accent); color: var(--ink); }
.rider-card-person { min-width: 0; }
.rider-card-person > div { display: flex; align-items: center; gap: 6px; }
.rider-card-person strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rider-card-person > small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rider-type { flex: none; padding: 3px 5px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 750; }
.rider-type.premium { background: var(--primary-soft); color: var(--primary); }
.rider-rank-card header > p { margin: 0; text-align: right; }
.rider-rank-card header > p small, .rider-rank-card header > p strong { display: block; }
.rider-rank-card header > p small { color: var(--muted); font-size: 9px; }
.rider-rank-card header > p strong { color: var(--primary); font-size: 17px; }
.rider-card-stats { margin-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rider-card-stats > span { min-width: 0; padding: 9px 5px 2px; color: var(--muted); font-size: 9px; }
.rider-card-stats > span:nth-child(n+4) { margin-top: 7px; padding-top: 9px; border-top: 1px solid var(--line); }
.rider-card-stats strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.rider-card-stats .risk strong { color: var(--danger); }
.rider-card-stats .reward strong { color: var(--warn); }
.rider-rank-more { margin-top: 10px; }
.rider-rank-more > summary { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.rider-rank-more > summary::-webkit-details-marker { display: none; }
.rider-rank-more > summary span { flex: 1; font-size: 12px; }
.rider-rank-more > summary strong { color: var(--primary); font-size: 11px; }
.rider-rank-more > summary svg { color: var(--muted); transition: transform .18s; }
.rider-rank-more[open] > summary svg { transform: rotate(180deg); }
.rider-rank-more > .rider-rank-grid { margin-top: 10px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: none; overflow: hidden; }
.panel-head { min-height: 54px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 780; }
.panel-head span { color: var(--muted); font-size: 12px; }
.panel-body { padding: 17px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 14px; background: #f6f7f7; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: 12px; font-weight: 750; white-space: nowrap; }
td { height: 62px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f9f9; }
.primary-cell strong, .primary-cell span { display: block; }
.primary-cell strong { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.primary-cell span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border-radius: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.success { color: var(--success); background: var(--success-soft); }
.status.warning { color: var(--warn); background: var(--warn-soft); }
.status.info { color: var(--info); background: var(--info-soft); }
.status.danger { color: var(--danger); background: var(--danger-soft); }
.rider-tag-list { min-width: 220px; display: flex; flex-wrap: wrap; gap: 6px; }
.rider-tag-list .status { white-space: normal; line-height: 1.35; }
.tag-summary-panel { overflow: hidden; }
.tag-summary-panel .panel-head { padding-bottom: 14px; }
.tag-chip-row { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); display: inline-flex; align-items: center; gap: 8px; }
.tag-chip b { color: var(--ink); font-size: 12px; }
.tag-chip small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tag-chip.dispatchable { border-color: rgba(22, 112, 82, .22); background: var(--success-soft); }
.tag-chip.dispatchable b, .tag-chip.dispatchable small { color: var(--success); }
.tag-chip.muted { background: var(--surface); }
@media (max-width: 760px) {
  .tag-chip-row { padding: 12px; }
  .tag-chip { width: 100%; align-items: flex-start; flex-direction: column; gap: 2px; }
  .tag-chip small { white-space: normal; }
}
.timeline { display: grid; }
.timeline-item { position: relative; min-height: 62px; padding: 3px 0 16px 26px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 17px; bottom: -4px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--info); box-shadow: 0 0 0 1px var(--line-strong); }
.timeline-dot.success { background: var(--success); }
.timeline-dot.error { background: var(--danger); }
.timeline-dot.warning { background: var(--warn); }
.timeline-item strong { display: block; font-size: 11px; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.timeline-item time { display: block; margin-top: 4px; color: var(--hint); font-size: 9px; }

.filters { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.refresh-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.timeout-toolbar { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.month-stepper { min-width: 180px; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 6px; }
.month-stepper strong { text-align: center; font-size: 14px; }
.timeout-metrics { margin-bottom: 16px; }
.timeout-type-tabs { margin-bottom: 10px; display: flex; gap: 4px; }
.timeout-type-tabs .filter-tab b { margin-left: 6px; }
.timeout-table-panel .panel-head { align-items: center; }
.timeout-table-panel .search { width: min(260px, 38vw); }
.timeout-table th, .timeout-table td { white-space: nowrap; }
.table-link { padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; }
.table-link:hover { color: var(--primary); text-decoration: underline; }
.text-danger { color: var(--danger); }
.text-reward { color: var(--primary); }
.timeout-detail-modal { width: min(920px, calc(100vw - 28px)); max-height: min(82vh, 720px); display: flex; flex-direction: column; }
.timeout-detail-modal .modal-head { flex: 0 0 auto; }
.timeout-detail-modal .modal-body { min-height: 0; overflow: auto; }
.search { height: 38px; min-width: 260px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2370766f' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center; outline: none; }
.search:focus, .field input:focus, .field select:focus { border-color: #9ca29c; box-shadow: 0 0 0 3px rgba(22,24,22,.06); }
.empty { min-height: 260px; display: grid; place-items: center; padding: 48px; text-align: center; color: var(--muted); }
.empty svg { width: 32px; height: 32px; margin-bottom: 10px; color: var(--hint); }
.empty strong { display: block; color: var(--ink-2); font-size: 13px; }
.empty p { margin: 5px 0 0; font-size: 11px; }
.skeleton { height: 12px; border-radius: 4px; background: linear-gradient(90deg,#eef0ed,#f8f9f7,#eef0ed); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.field label { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.field input, .field select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); outline: none; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.switch-line { min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.switch-line:last-child { border-bottom: 0; }
.switch-line strong, .switch-line span { display: block; }
.switch-line strong { font-size: 12px; }
.switch-line span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 11px; background: #c9ceca; cursor: pointer; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + i { background: var(--success); }
.switch input:checked + i::after { transform: translateX(16px); }
.compact-grid { gap: 14px; }
.rules-panel { margin-top: 18px; }
.rule-config-list { display: grid; }
.rule-config { min-height: 72px; padding: 12px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(150px, 220px); align-items: center; gap: 14px; }
.rule-config:last-child { border-bottom: 0; }
.rule-config-copy strong, .rule-config-copy span { display: block; }
.rule-config-copy strong { font-size: 14px; }
.rule-config-copy span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.rule-value { height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); display: flex; align-items: center; overflow: hidden; }
.rule-value input { width: 100%; min-width: 0; height: 100%; padding: 0 10px; border: 0; outline: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.rule-value span { padding: 0 10px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
.strategy-selector { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 10px; }
.strategy-option { position: relative; min-height: 118px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease); }
.strategy-option:hover { border-color: var(--line-strong); }
.strategy-option.selected { border-color: var(--ink); background: #fbfcfc; box-shadow: inset 3px 0 0 var(--primary); }
.strategy-option > span, .strategy-option > strong, .strategy-option > small { display: block; }
.strategy-option > span { color: var(--primary); font-size: 10px; font-weight: 800; }
.strategy-option > strong { margin-top: 4px; font-size: 16px; }
.strategy-option > small { max-width: 430px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.strategy-option > em { position: absolute; top: 14px; right: 14px; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 750; }
.strategy-option > em.active { background: var(--success-soft); color: var(--success); }
.strategy-option > em.enabled { background: var(--info-soft); color: var(--info); }
.strategy-option > em.disabled { background: var(--surface-2); color: var(--hint); }
.strategy-selector-action { grid-column: 1 / -1; min-height: 82px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: #1d2123; color: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.strategy-selector-action > span, .strategy-selector-action > strong { display: block; }
.strategy-selector-action > span { color: #aeb5b8; font-size: 10px; }
.strategy-selector-action > strong { margin: 2px 0 10px; font-size: 14px; }
.strategy-selector-action .button { width: 100%; border-color: rgba(255,255,255,.18); background: #fff; color: var(--ink); }
.strategy-running { min-height: 34px; display: flex !important; align-items: center; gap: 7px; color: #78d5a7 !important; font-size: 11px !important; font-weight: 750; }
.strategy-running svg { width: 15px; height: 15px; }
.strategy-runtime-panel { margin-bottom: 16px; }
.strategy-runtime-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.strategy-config-workspace > .panel + .panel { margin-top: 16px; }
.state-rule-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.state-rule-panel { min-width: 0; }
.state-rule-panel .panel-head h2 { display: flex; align-items: center; gap: 7px; }
.state-rule-panel .panel-head h2 svg { width: 17px; height: 17px; color: var(--primary); }
.state-rule-panel .rule-config { grid-template-columns: 40px minmax(0, 1fr) minmax(120px, 170px); padding-inline: 16px; }
.long-order-panel { overflow: hidden; }
.long-order-priority { min-height: 58px; padding: 11px 18px; border-top: 1px solid #f1d49c; background: var(--warn-soft); display: flex; align-items: center; gap: 10px; }
.long-order-priority svg { width: 18px; height: 18px; color: var(--warn); }
.long-order-priority p { margin: 0; }
.long-order-priority strong, .long-order-priority span { display: block; }
.long-order-priority strong { font-size: 11px; }
.long-order-priority span { margin-top: 1px; color: #755b16; font-size: 10px; }

@media (max-width: 1050px) {
  .strategy-selector { grid-template-columns: 1fr 1fr; }
  .strategy-selector-action { grid-column: 1 / -1; min-height: 88px; }
  .strategy-selector-action .button { width: auto; }
  .state-rule-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .strategy-selector, .strategy-runtime-grid { grid-template-columns: 1fr; }
  .strategy-selector-action { grid-column: auto; }
  .strategy-option { min-height: 108px; }
  .rule-config, .state-rule-panel .rule-config { grid-template-columns: 38px minmax(0, 1fr); }
  .rule-value { grid-column: 2; width: 100%; }
  .state-route-evidence { grid-template-columns: 1fr 1fr; }
}
.notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #eadba8; border-radius: 7px; background: var(--warn-soft); color: #6f5200; display: flex; gap: 10px; font-size: 11px; }
.notice svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.pricing-band { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.pricing-value span, .pricing-value strong { display: block; }
.pricing-value span { color: var(--muted); font-size: 11px; }
.pricing-value strong { margin-top: 6px; font-size: 31px; }
.pricing-value strong small { font-size: 12px; color: var(--muted); }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.segmented button { height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.lost-hero { margin-bottom: 16px; display: grid; grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(170px, .55fr)); gap: 12px; }
.lost-scorecard, .lost-split-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.lost-scorecard { min-height: 138px; padding: 20px 22px; position: relative; overflow: hidden; }
.lost-scorecard::after { content: ""; position: absolute; right: 18px; bottom: 18px; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle, rgba(255,90,0,.16), rgba(255,90,0,0) 70%); pointer-events: none; }
.lost-scorecard span, .lost-scorecard strong, .lost-scorecard p,
.lost-split-card span, .lost-split-card strong, .lost-split-card small { display: block; }
.lost-scorecard span, .lost-split-card span { color: var(--muted); font-size: 12px; font-weight: 750; }
.lost-scorecard strong { margin-top: 10px; font-size: 52px; line-height: .95; font-weight: 850; font-variant-numeric: tabular-nums; }
.lost-scorecard p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.lost-split-card { min-height: 138px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.lost-split-card strong { font-size: 30px; line-height: 1; font-weight: 830; font-variant-numeric: tabular-nums; }
.lost-split-card small { color: var(--hint); font-size: 11px; line-height: 1.4; }
.lost-tabs { margin-top: 4px; }
.lost-region-panel { margin-bottom: 12px; }
.lost-region-panel .panel-head h2 { display: flex; align-items: center; gap: 7px; }
.lost-region-panel .panel-head h2 svg { width: 16px; height: 16px; color: var(--primary); }
.lost-region-grid { padding: 12px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.lost-region-card { min-width: 0; min-height: 96px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); display: flex; flex-direction: column; justify-content: space-between; }
.lost-region-card span, .lost-region-card strong, .lost-region-card small { display: block; }
.lost-region-card span { color: var(--muted); font-size: 11px; font-weight: 750; }
.lost-region-card strong { margin-top: 5px; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.lost-region-card small { color: var(--hint); font-size: 10px; line-height: 1.35; }
.lost-region-card i { height: 5px; margin-top: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lost-region-card i::after { content: ""; width: var(--w); height: 100%; border-radius: inherit; background: var(--primary); display: block; }
.lost-analysis-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.lost-analysis-panel { min-height: 330px; }
.lost-analysis-panel .panel-head h2 { display: flex; align-items: center; gap: 7px; }
.lost-analysis-panel .panel-head h2 svg { width: 16px; height: 16px; color: var(--primary); }
.lost-rank-list { padding: 8px 0; }
.lost-rank-row { min-height: 42px; padding: 7px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.lost-rank-row > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lost-rank-row strong { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lost-rank-row span { flex: none; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.lost-rank-row i { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lost-rank-row i::after { content: ""; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #ff9a55); display: block; }
.lost-detail-panel { margin-top: 14px; }
.lost-order-table td { height: 68px; }
.cell-muted { margin-top: 3px; max-width: 420px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.empty.compact { min-height: 180px; padding: 24px; }

@media (max-width: 1100px) {
  .lost-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lost-region-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lost-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .lost-hero, .lost-analysis-grid { grid-template-columns: 1fr; }
  .lost-region-grid { grid-template-columns: 1fr 1fr; }
  .lost-scorecard, .lost-split-card { min-height: 118px; }
  .lost-scorecard strong { font-size: 42px; }
  .lost-analysis-panel { min-height: 0; }
  .lost-detail-panel .panel-head { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
}

.workspace-tabs { margin-bottom: 14px; padding-bottom: 1px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.workspace-tab { min-width: 124px; height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.workspace-tab:hover { color: var(--ink); background: var(--surface-2); }
.workspace-tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.workspace-tab svg { width: 16px; height: 16px; }
.workspace-tab span { font-size: 13px; font-weight: 750; }
.workspace-tab b { min-width: 23px; height: 20px; padding: 0 6px; border-radius: 4px; background: #e7eaeb; color: var(--ink-2); display: grid; place-items: center; font-size: 10px; }
.workspace-tab.active b { background: var(--primary); color: #fff; }
.dispatch-toolbar { margin-bottom: 12px; display: grid; grid-template-columns: auto minmax(300px, 1fr); align-items: start; gap: 12px; }
.dispatch-toolbar .recommendation-filter-tabs, .dispatch-toolbar .recommendation-search-toolbar { margin-bottom: 0; }
.dispatch-order-lane { min-height: 0; }
.system-detail-panel { margin-top: 14px; }
.system-metrics + .system-detail-panel { margin-top: 14px; }
.connection-list { display: grid; }
.connection-list > div { min-height: 54px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.connection-list > div:last-child { border-bottom: 0; }
.connection-list span { color: var(--muted); font-size: 12px; }
.connection-list strong { font-size: 13px; text-align: right; }
.rider-center-report { margin-top: 0; padding-top: 0; border-top: 0; }

.order-tabs { margin-bottom: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.order-tab { min-height: 68px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.order-tab:hover { border-color: var(--line-strong); }
.order-tab.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 -3px var(--primary); }
.order-tab > svg { width: 36px; height: 36px; padding: 9px; border-radius: 7px; background: var(--surface-2); color: var(--primary); }
.order-tab span, .order-tab strong, .order-tab small { display: block; }
.order-tab strong { font-size: 16px; }
.order-tab small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.order-tab b { min-width: 38px; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.order-tab[data-order-tab="pending"] b { background: var(--accent); color: var(--ink); }
.order-search-toolbar, .recommendation-search-toolbar { min-height: 42px; margin-bottom: 14px; padding: 3px 4px 3px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); display: flex; align-items: center; gap: 8px; box-shadow: none; }
.order-search-toolbar > svg, .recommendation-search-toolbar > svg { width: 16px; flex: none; color: var(--muted); }
.order-search-toolbar input, .recommendation-search-toolbar input { min-width: 0; flex: 1; height: 34px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.order-search-toolbar input::placeholder, .recommendation-search-toolbar input::placeholder { color: var(--hint); }
.order-search-toolbar .icon-button, .recommendation-search-toolbar .icon-button { flex: none; width: 30px; height: 30px; }
.order-search-toolbar .button, .recommendation-search-toolbar .button { min-height: 34px; padding: 0 12px; }
.order-center { display: block; }
.order-lane { min-width: 0; }
.order-lane[hidden] { display: none; }
.order-lane-head { min-height: 64px; margin-bottom: 12px; padding: 0 2px 12px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: space-between; }
.order-lane-head > div { display: flex; align-items: center; gap: 11px; }
.order-lane-head > div > svg { width: 36px; height: 36px; padding: 9px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); }
.order-lane-head p { margin: 0; }
.order-lane-head strong, .order-lane-head span { display: block; }
.order-lane-head strong { font-size: 17px; }
.order-lane-head span { margin-top: 1px; color: var(--muted); font-size: 12px; }
.order-lane-head > b { min-width: 38px; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; }
.order-lane:first-child .order-lane-head > b { background: var(--accent); color: var(--ink); }
.order-lane-list { display: grid; gap: 10px; }
.order-center .order-card { box-shadow: none; }
.order-center .order-card > summary { min-height: 88px; padding: 14px 16px; grid-template-columns: minmax(170px, .8fr) minmax(360px, 1.8fr) auto auto; gap: 18px; }
.order-center .order-summary-main, .order-center .order-summary-route, .order-center .order-summary-result { grid-column: auto; grid-row: auto; }
.order-center .order-summary-meta { display: block; }
.order-center .order-card-body { padding: 16px; }
.order-center .order-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.order-center .order-facts > div:nth-child(2) { border-right: 1px solid var(--line); }
.order-center .order-facts > div:nth-child(-n+2) { border-bottom: 0; }
.order-center .order-recommendation-copy strong { font-size: 14px; }
.order-manual-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-manual-actions .button { flex: none; min-height: 34px; }
.order-manual-actions span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal.manual-assign-modal { width: min(780px, 100%); }
.manual-order-summary { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: grid; gap: 8px; }
.manual-order-summary span, .manual-order-summary strong, .manual-order-summary small { display: block; }
.manual-order-summary span { color: var(--muted); font-size: 11px; font-weight: 750; }
.manual-order-summary strong { margin-top: 2px; font-size: 16px; }
.manual-order-summary p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; }
.manual-order-summary b { width: 24px; height: 24px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 10px; }
.manual-rider-toolbar { min-height: 40px; margin-bottom: 10px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 7px; display: flex; align-items: center; gap: 8px; }
.manual-rider-toolbar svg { width: 16px; color: var(--muted); }
.manual-rider-toolbar input { min-width: 0; flex: 1; height: 32px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.manual-rider-toolbar span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.manual-rider-list { max-height: 390px; overflow: auto; display: grid; gap: 8px; }
.manual-rider-option { min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(160px, .55fr); align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.manual-rider-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.manual-rider-option.active { border-color: var(--primary); box-shadow: inset 3px 0 var(--primary); }
.manual-rider-option:disabled { cursor: not-allowed; opacity: .56; background: var(--surface-2); }
.manual-rider-option strong, .manual-rider-option span { display: block; }
.manual-rider-option strong { font-size: 14px; }
.manual-rider-option span, .manual-rider-option small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.manual-rider-option p { margin: 0; text-align: right; }
.manual-rider-option p b { display: block; font-size: 20px; line-height: 1; }
.manual-rider-option small { text-align: right; }
.modal.manual-assign-modal.refined { width: min(900px, calc(100vw - 32px)); max-height: min(840px, calc(100vh - 32px)); display: flex; flex-direction: column; }
.manual-assign-head { align-items: center; }
.manual-assign-head h3, .manual-assign-head p { margin: 0; }
.manual-assign-head h3 { font-size: 16px; }
.manual-assign-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.manual-assign-body { overflow: hidden; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 12px; }
.manual-order-summary.refined { margin: 0; padding: 16px; background: linear-gradient(180deg, #f8fafc, #f3f6f8); grid-template-columns: minmax(220px, .9fr) minmax(0, 1.15fr); gap: 10px 18px; }
.manual-order-title { grid-row: span 2; align-self: center; }
.manual-order-title span { color: var(--primary); }
.manual-order-title strong { font-size: 20px; line-height: 1.15; }
.manual-route-line { min-width: 0; margin: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px; }
.manual-route-line b { width: 28px; height: 28px; border-radius: 6px; background: #fff1e8; color: var(--primary); display: grid; place-items: center; font-size: 11px; }
.manual-route-line.end b { background: #edf7f2; color: var(--success); }
.manual-route-line p { min-width: 0; margin: 3px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.manual-safety-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.manual-safety-strip > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 1px 9px; align-items: center; }
.manual-safety-strip svg { grid-row: span 2; width: 30px; height: 30px; padding: 7px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); }
.manual-safety-strip span, .manual-safety-strip strong { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-safety-strip span { color: var(--muted); font-size: 11px; font-weight: 750; }
.manual-safety-strip strong { color: var(--ink-2); font-size: 12px; }
.manual-rider-toolbar.refined { margin: 0; min-height: 44px; border-radius: 8px; }
.manual-rider-toolbar.refined input { font-size: 14px; }
.manual-rider-toolbar.refined span { font-size: 12px; font-weight: 700; }
.manual-rider-list.refined { max-height: none; min-height: 280px; padding-right: 4px; }
.manual-rider-option.refined { min-height: 76px; padding: 12px 14px; grid-template-columns: minmax(170px, 1fr) minmax(150px, .75fr) 68px 68px 112px; border-radius: 8px; }
.manual-rider-option.refined.active { border-color: var(--primary); background: #fffaf5; box-shadow: inset 4px 0 var(--primary), 0 6px 18px rgba(255,90,0,.09); }
.manual-rider-main strong { font-size: 15px; }
.manual-rider-main span { margin-top: 5px; font-size: 12px; }
.manual-rider-tags span { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.manual-rider-tags span.ok { background: var(--primary-soft); color: var(--primary); }
.manual-rider-tags span.blocked { background: var(--danger-soft); color: var(--danger); }
.manual-rider-tags small { margin-top: 5px; text-align: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-rider-stat { text-align: center; }
.manual-rider-stat b, .manual-rider-stat span { display: block; }
.manual-rider-stat b { color: var(--ink); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.manual-rider-stat span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.manual-rider-status { min-height: 30px; padding: 0 9px; border-radius: 6px; display: inline-grid; place-items: center; justify-self: end; font-size: 12px; font-weight: 800; text-align: center; }
.manual-rider-status.ok { background: #edf7f2; color: var(--success); }
.manual-rider-status.blocked { background: var(--surface-2); color: var(--muted); }
.manual-assign-actions { align-items: center; }
.manual-assign-actions > div { margin-right: auto; color: var(--ink-2); font-size: 12px; font-weight: 750; }
.modal.manual-assign-modal.pro {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.manual-pro-head {
  min-height: 74px;
  align-items: center;
  border-bottom-color: var(--line);
}
.manual-pro-head h3, .manual-pro-head p { margin: 0; }
.manual-pro-head h3 { color: var(--ink); font-size: 20px; line-height: 1.25; font-weight: 850; }
.manual-pro-head p { margin-top: 4px; max-width: 760px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.manual-pro-body {
  min-height: 0;
  overflow: hidden;
  padding: 18px 22px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  background: #fbfcfd;
}
.manual-order-sheet {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
.manual-order-kicker { min-width: 0; padding-right: 18px; border-right: 1px solid var(--line); }
.manual-order-kicker span, .manual-order-kicker strong, .manual-order-kicker small { display: block; }
.manual-order-kicker span { color: var(--primary); font-size: 12px; font-weight: 850; }
.manual-order-kicker strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.manual-order-kicker small { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.manual-order-distance { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.manual-order-distance span, .manual-order-distance strong, .manual-order-distance small { display: block; }
.manual-order-distance span { color: var(--muted); font-size: 11px; font-weight: 850; }
.manual-order-distance strong { margin-top: 3px; color: var(--primary); font-size: 17px; line-height: 1.2; }
.manual-order-distance small { margin-top: 3px; color: var(--hint); font-size: 11px; }
.manual-route-stack { min-width: 0; display: grid; gap: 10px; }
.manual-route-row {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.manual-route-row b {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}
.manual-route-row.end b { background: var(--success-soft); color: var(--success); }
.manual-route-row p {
  min-width: 0;
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.manual-pro-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.manual-pro-note > div {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}
.manual-pro-note svg { flex: none; width: 18px; height: 18px; color: var(--primary); }
.manual-pro-note strong { color: var(--ink); font-size: 13px; font-weight: 850; }
.manual-pro-note span { color: var(--muted); font-size: 12px; }
.manual-rider-toolbar.pro {
  margin: 0;
  min-height: 48px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--surface);
}
.manual-rider-toolbar.pro input { font-size: 15px; }
.manual-rider-toolbar.pro span { color: var(--ink-2); font-size: 12px; font-weight: 800; }
.manual-rider-list.pro {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.manual-rider-option.pro {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, .75fr) minmax(110px, .55fr) 70px 70px 112px;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.manual-rider-option.pro:hover { border-color: var(--primary); background: #fffaf6; }
.manual-rider-option.pro.active { border-color: var(--primary); background: #fffaf6; box-shadow: inset 4px 0 var(--primary); }
.manual-rider-option.pro:disabled { cursor: not-allowed; opacity: .64; background: var(--surface-2); }
.manual-rider-option.pro .manual-rider-main strong { color: var(--ink); font-size: 16px; line-height: 1.25; font-weight: 850; }
.manual-rider-option.pro .manual-rider-main span { margin-top: 6px; color: var(--ink-2); font-size: 12px; }
.manual-rider-option.pro .manual-rider-tags span { font-size: 12px; }
.manual-rider-option.pro .manual-rider-tags small { color: var(--muted); font-size: 12px; line-height: 1.4; white-space: normal; }
.manual-rider-distance { min-width: 0; }
.manual-rider-distance strong, .manual-rider-distance span { display: block; }
.manual-rider-distance strong { color: var(--ink); font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.manual-rider-distance span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.manual-rider-option.pro .manual-rider-stat b { font-size: 25px; }
.manual-rider-option.pro .manual-rider-stat span { color: var(--muted); font-size: 12px; }
.manual-rider-option.pro .manual-rider-status { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: 13px; }
.manual-assign-actions.pro {
  position: sticky;
  bottom: 0;
  min-height: 66px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
}
.manual-assign-actions.pro > div { color: var(--ink); font-size: 14px; font-weight: 850; }
.manual-assign-actions.pro .button { min-height: 40px; }
.manual-route-insight {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(0, 1.15fr);
}
.manual-route-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
}
.manual-route-empty svg { color: var(--primary); }
.manual-route-empty strong { color: var(--ink-2); font-size: 14px; }
.manual-route-map {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #f7fafb;
}
.manual-baidu-map {
  position: relative;
  width: 100%;
  height: 260px;
  min-height: 260px;
  border: 1px solid #d8e1e5;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f5;
}
.manual-map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 10;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border: 1px solid rgba(31, 41, 51, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px 12px;
  pointer-events: none;
}
.manual-map-legend span {
  min-width: 0;
  color: #1f2933;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.manual-map-legend b {
  width: 28px;
  height: 0;
  flex: none;
  border-top: 4px solid currentColor;
  border-radius: 999px;
}
.manual-map-legend b.pending { color: #f97316; }
.manual-map-legend b.accepted {
  color: #2563eb;
  border-top-style: dashed;
}
.manual-map-legend b.selected {
  color: #059669;
  border-top-width: 6px;
}
.manual-map-legend b.overlap {
  color: #7c3aed;
  border-top-width: 6px;
}
.manual-map-loading {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.manual-map-loading svg { color: var(--primary); }
.manual-map-loading strong { color: var(--ink-2); font-size: 14px; }
.manual-map-unavailable {
  min-height: 210px;
  height: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.manual-map-unavailable strong { color: var(--ink); font-size: 14px; }
.manual-map-unavailable span { font-size: 12px; overflow-wrap: anywhere; }
.manual-route-detail { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.manual-route-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.manual-route-metrics > div {
  min-width: 0;
  min-height: 66px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
}
.manual-route-metrics > div:nth-child(2n) { border-right: 0; }
.manual-route-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.manual-route-metrics span, .manual-route-metrics strong { display: block; }
.manual-route-metrics span { color: var(--muted); font-size: 11px; font-weight: 750; }
.manual-route-metrics strong { margin-top: 3px; color: var(--ink); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.manual-route-orders { min-height: 0; max-height: 260px; overflow: auto; padding: 12px; display: grid; align-content: start; gap: 10px; }
.manual-route-orders article { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.manual-route-orders header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.manual-route-orders header strong { color: var(--ink); font-size: 13px; }
.manual-route-orders header span { color: var(--muted); font-size: 11px; }
.manual-route-orders p { margin: 7px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.manual-route-orders p b { margin-right: 6px; color: var(--primary); }
.manual-route-orders footer { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 11px; }
.modal.manual-assign-modal.pro {
  width: min(1420px, calc(100vw - 24px));
  max-height: min(960px, calc(100vh - 18px));
}
.manual-pro-head {
  min-height: 76px;
  padding: 0 22px;
}
.manual-pro-head h3 { font-size: 22px; letter-spacing: 0; }
.manual-pro-head p { max-width: 860px; color: var(--ink-2); font-size: 14px; }
.manual-pro-body {
  padding: 18px 22px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  background: #f7f8f9;
}
.manual-order-sheet {
  padding: 14px 16px;
  grid-template-columns: minmax(250px, .62fr) minmax(0, 1.38fr);
  gap: 14px;
  border-radius: 10px;
  box-shadow: 0 8px 28px -24px rgba(24, 27, 29, .32);
}
.manual-order-kicker strong { font-size: 26px; line-height: 1.1; }
.manual-order-kicker small { font-size: 13px; }
.manual-order-distance { margin-top: 12px; padding-top: 10px; }
.manual-order-distance span { font-size: 12px; }
.manual-order-distance strong { font-size: 20px; }
.manual-route-stack { gap: 8px; }
.manual-route-row {
  min-height: 52px;
  padding: 9px 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  background: #fbfcfd;
}
.manual-route-row b {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 14px;
}
.manual-route-row p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}
.manual-assignment-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(390px, 440px) minmax(0, 1fr);
  gap: 14px;
}
.manual-rider-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.manual-rider-toolbar.pro {
  min-height: 54px;
  padding: 5px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.manual-rider-toolbar.pro input { font-size: 16px; font-weight: 650; }
.manual-rider-toolbar.pro span { font-size: 13px; }
.manual-rider-list.pro {
  padding: 10px;
  gap: 9px;
}
.manual-rider-option.pro {
  min-height: 166px;
  padding: 13px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main status"
    "tags tags"
    "distance load";
  align-items: center;
  gap: 9px 12px;
  border-radius: 10px;
}
.manual-rider-option.pro.active {
  background: #fff7f0;
  box-shadow: inset 5px 0 var(--primary), 0 10px 26px -22px rgba(255, 90, 0, .55);
}
.manual-rider-option.pro .manual-rider-main { grid-area: main; min-width: 0; }
.manual-rider-option.pro .manual-rider-main strong { font-size: 20px; line-height: 1.15; }
.manual-rider-option.pro .manual-rider-main span { margin-top: 5px; font-size: 13px; }
.manual-rider-option.pro .manual-rider-tags { grid-area: tags; min-width: 0; display: flex; align-items: center; gap: 8px; }
.manual-rider-option.pro .manual-rider-tags span {
  max-width: min(100%, 270px);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.15;
}
.manual-rider-option.pro .manual-rider-tags small {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-rider-distance {
  grid-area: distance;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}
.manual-rider-distance strong { font-size: 16px; }
.manual-rider-distance span { margin-top: 3px; font-size: 12px; }
.manual-rider-load {
  grid-area: load;
  min-height: 48px;
  min-width: 104px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f6f4;
  text-align: right;
}
.manual-rider-load span, .manual-rider-load strong { display: block; }
.manual-rider-load span { color: var(--muted); font-size: 12px; font-weight: 750; }
.manual-rider-load strong { margin-top: 4px; color: var(--ink); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.manual-rider-option.pro .manual-rider-status {
  grid-area: status;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.manual-route-insight {
  min-height: 0;
  border-radius: 10px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  grid-template-rows: minmax(0, 1fr);
}
.manual-route-empty {
  min-height: 420px;
}
.manual-route-empty strong { max-width: 440px; font-size: 17px; line-height: 1.55; text-align: center; }
.manual-route-map {
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
.manual-baidu-map {
  height: 100%;
  min-height: clamp(430px, 52vh, 620px);
  border-radius: 10px;
}
.manual-route-detail {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.manual-route-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.manual-route-metrics > div {
  min-height: 70px;
  padding: 11px 13px;
}
.manual-route-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.manual-route-metrics > div:nth-child(2n) { border-right: 0; }
.manual-route-metrics > div:last-child { border-right: 0; }
.manual-route-metrics span { font-size: 12px; }
.manual-route-metrics strong { font-size: 15px; }
.manual-route-orders {
  min-height: 0;
  max-height: none;
  padding: 12px;
  grid-template-columns: 1fr;
  overflow: auto;
}
.manual-route-orders article,
.manual-route-order-card {
  min-width: 0;
  border-radius: 9px;
}
.manual-route-order-card {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.manual-route-order-card:hover {
  border-color: #8ac6aa;
  background: #f6fbf8;
}
.manual-route-order-card.active {
  border-color: #059669;
  background: #eefaf4;
  box-shadow: inset 4px 0 #059669;
}
.manual-route-orders header strong { font-size: 15px; }
.manual-route-orders header span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.manual-route-orders p { font-size: 14px; line-height: 1.45; }
.manual-route-orders footer { font-size: 12px; }
.manual-assign-actions.pro {
  min-height: 70px;
  padding: 12px 22px;
}
.manual-assign-actions.pro > div { font-size: 15px; }
.manual-assign-actions.pro .button { min-height: 44px; padding: 0 18px; font-size: 15px; }
@media (max-width: 1120px) {
  .manual-route-insight {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(360px, auto) auto;
  }
  .manual-route-map {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .manual-baidu-map {
    height: 360px;
    min-height: 360px;
  }
  .manual-route-orders {
    max-height: 180px;
  }
}
@media (max-width: 760px) {
  .manual-order-summary.refined, .manual-safety-strip { grid-template-columns: 1fr; }
  .manual-order-title { grid-row: auto; }
  .manual-rider-option.refined { grid-template-columns: minmax(0, 1fr) 70px; }
  .manual-rider-tags, .manual-rider-status { grid-column: 1 / -1; justify-self: stretch; text-align: left; }
  .manual-rider-stat { text-align: right; }
  .manual-assign-actions { flex-wrap: wrap; }
  .manual-assign-actions > div { width: 100%; }
  .modal.manual-assign-modal.pro { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .manual-pro-body { padding: 14px; }
  .manual-order-sheet, .manual-pro-note { grid-template-columns: 1fr; }
  .manual-order-kicker { padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-rider-option.pro { grid-template-columns: minmax(0, 1fr) 72px; }
  .manual-rider-option.pro .manual-rider-tags, .manual-rider-option.pro .manual-rider-distance, .manual-rider-option.pro .manual-rider-status { grid-column: 1 / -1; justify-self: stretch; text-align: left; }
  .manual-route-insight { grid-template-columns: 1fr; }
  .manual-route-map { border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-route-metrics { grid-template-columns: 1fr; }
  .manual-route-metrics > div { border-right: 0; }
  .manual-route-metrics > div:nth-child(n+2) { border-top: 1px solid var(--line); }
}
.going-order-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.going-order-card header, .going-order-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.going-order-card header div span, .going-order-card header div strong { display: block; }
.going-order-card header div strong { margin-top: 2px; font-size: 15px; }
.going-order-card header > b { font-size: 17px; }
.compact-route { margin: 13px 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; }
.compact-route span { width: 24px; height: 24px; border-radius: 5px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.compact-route span.end { background: var(--primary-soft); color: var(--primary); }
.compact-route p { min-width: 0; margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.going-order-card footer { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.going-order-card footer span { display: flex; align-items: center; gap: 5px; }
.going-order-card footer svg { width: 14px; height: 14px; }
.lane-empty { min-height: 210px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 8px; }
.lane-empty svg { color: var(--hint); }
.pagination { min-height: 48px; padding: 10px 2px 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; }
.pagination .icon-button { width: 30px; height: 30px; }
.pagination .icon-button:disabled { cursor: not-allowed; opacity: .4; }
.pagination-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pagination-size, .pagination-jump { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pagination select, .pagination-jump input { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; outline: none; }
.pagination select { min-width: 56px; padding: 0 6px; }
.pagination-jump input { width: 44px; padding: 0 5px; text-align: center; font-variant-numeric: tabular-nums; }
.pagination-pages { display: inline-flex; align-items: center; gap: 4px; }
.pagination-page { min-width: 30px; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; }
.pagination-page:hover { border-color: var(--line-strong); color: var(--ink); }
.pagination-page.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 800; }
.pagination-ellipsis { width: 18px; text-align: center; color: var(--hint); }
.recommendation-list > .pagination { flex: none; border-top: 1px solid var(--line); padding: 8px; }

.weather-panel { position: relative; min-height: 178px; margin-bottom: 18px; padding: 24px; border: 1px solid #d8e1ec; border-radius: 8px; background: #f5f8fc; display: grid; grid-template-columns: 110px minmax(240px, .8fr) minmax(420px, 1.4fr); align-items: center; gap: 24px; overflow: hidden; }
.weather-visual { height: 112px; border-right: 1px solid #d8e1ec; color: var(--primary); display: grid; place-items: center; align-content: center; gap: 7px; }
.weather-visual svg { width: 64px; height: 64px; stroke-width: 1.4; }
.weather-visual span { font-size: 11px; font-weight: 750; }
.weather-primary > span { color: var(--primary); font-size: 12px; font-weight: 750; }
.weather-primary > strong { display: block; margin-top: 3px; font-size: 44px; line-height: 1.15; }
.weather-primary > strong small { font-size: 18px; }
.weather-primary p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.weather-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid #d8e1ec; }
.weather-stats > div { min-height: 58px; padding: 8px 18px; }
.weather-stats span, .weather-stats strong { display: block; }
.weather-stats span { color: var(--muted); font-size: 11px; }
.weather-stats strong { margin-top: 2px; font-size: 15px; }
.weather-panel > footer { position: absolute; right: 14px; bottom: 8px; color: var(--hint); font-size: 10px; }
.weather-panel.unavailable { grid-template-columns: 60px 1fr; }
.weather-panel.unavailable > svg { width: 42px; height: 42px; color: var(--hint); }
.weather-panel.unavailable span, .weather-panel.unavailable strong { display: block; }
.weather-panel.unavailable strong { margin-top: 3px; }
.weather-panel.unavailable p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(13,15,13,.48); animation: fade-in .18s ease; }
.modal { width: min(470px, 100%); background: var(--surface); border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.25); overflow: hidden; }
.modal-head { min-height: 58px; padding: 0 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 20px; }
.modal-body p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.modal-actions { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toast-host { position: fixed; top: 76px; right: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { width: 320px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.12); display: flex; align-items: flex-start; gap: 10px; animation: toast-in .25s var(--ease); }
.toast svg { width: 16px; height: 16px; margin-top: 1px; color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 11px; }
.toast span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.approval-notification-host { position: fixed; right: 20px; bottom: 20px; z-index: 190; width: min(390px, calc(100vw - 28px)); max-height: min(72vh, 680px); overflow-y: auto; display: grid; gap: 10px; pointer-events: none; }
.approval-notification { border: 1px solid #d9c889; border-left: 4px solid var(--warn); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 46px rgba(15,17,16,.18); overflow: hidden; pointer-events: auto; animation: approval-in .24s var(--ease); }
.approval-notification.processing { opacity: .72; }
.approval-notification header { min-height: 48px; padding: 9px 10px 8px 13px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(0, 1fr) 30px; align-items: center; gap: 9px; }
.approval-notification header > i { width: 28px; height: 28px; border-radius: 7px; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; }
.approval-notification header > i svg { width: 15px; }
.approval-notification header strong, .approval-notification header span { display: block; }
.approval-notification header strong { font-size: 13px; }
.approval-notification header span { margin-top: 1px; color: var(--muted); font-size: 10px; }
.approval-notification header button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.approval-notification header button:hover { background: var(--surface-2); color: var(--ink); }
.approval-notification header button svg { width: 15px; }
.approval-notification-body { padding: 12px 14px; }
.approval-notification-body p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.approval-change-grid { margin-bottom: 10px; display: grid; grid-template-columns: 1fr 18px 1fr auto; align-items: center; gap: 7px; }
.approval-change-grid > div { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.approval-change-grid span, .approval-change-grid strong { display: block; }
.approval-change-grid span { color: var(--muted); font-size: 9px; }
.approval-change-grid strong { margin-top: 2px; font-size: 12px; }
.approval-change-grid > i { color: var(--muted); }
.approval-change-grid > b { color: var(--muted); font-size: 10px; white-space: nowrap; }
.approval-change-grid > b.up { color: var(--danger); }
.approval-change-grid > b.down { color: var(--success); }
.approval-weather-change { margin-bottom: 9px; padding: 8px 9px; border-left: 3px solid var(--info); border-radius: 5px; background: var(--info-soft); display: grid; gap: 4px; }
.approval-weather-change span { color: var(--ink-2); font-size: 10px; line-height: 1.45; }
.approval-weather-change b { display: inline-block; min-width: 84px; color: var(--muted); font-size: 9px; }
.approval-notification-body small { display: block; margin-top: 6px; color: var(--hint); font-size: 9px; }
.approval-notification-actions { padding: 9px 12px 11px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.approval-notification-actions .button { height: 34px; font-size: 11px; }
.approval-notification-actions .button svg { width: 14px; }
.approval-notification-more { display: none; }
.approval-notification-host:empty { display: none; }
.dispatch-approval-slot { margin-bottom: 10px; }
.dispatch-approval-slot:has(.approval-notification-host:empty) { display: none; }
.approval-notification-host.dispatch-mode { position: static; width: 100%; max-height: none; padding-bottom: 2px; overflow-x: auto; overflow-y: hidden; grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 390px)); grid-auto-flow: column; grid-auto-columns: minmax(min(350px, 100%), 390px); scrollbar-gutter: stable; pointer-events: auto; }
.approval-notification-host.dispatch-mode .approval-notification { box-shadow: none; }
.approval-notification-host.dispatch-mode .approval-notification-body { display: none; }
.approval-notification-host.dispatch-mode .approval-notification-actions { grid-template-columns: repeat(3, 1fr); }
.approval-notification-host.dispatch-mode .approval-notification-more { display: inline-flex; }
.approval-detail-modal .approval-change-grid { max-width: 520px; }
.approval-detail-modal > p:last-child { margin-top: 14px; }
@keyframes approval-in { from { opacity: 0; transform: translateY(10px); } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-main { grid-template-columns: 1fr; }
  .weather-panel { grid-template-columns: 90px minmax(220px, .8fr) minmax(330px, 1.2fr); }
  .dispatch-toolbar { grid-template-columns: 1fr; }
  .global-weather-overview { min-width: 110px; grid-template-columns: 28px auto auto; }
  .global-surcharge-overview { min-width: 112px; }
  .global-surcharge-copy small { display: none; }
  .global-weather-meta { display: none; }
  .global-weather-alert b { display: none; }
  .global-weather-alert { width: 25px; padding: 0; justify-content: center; }
}

@media (max-width: 620px) {
  .approval-notification-host { left: 14px; right: 14px; bottom: 14px; width: auto; max-height: 62vh; }
  .approval-notification-host.dispatch-mode { width: 100%; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -248px; width: 232px; transition: left .25s var(--ease); box-shadow: 12px 0 40px rgba(0,0,0,.2); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 58px; padding: 0 14px; }
  .crumb, .live-state, .account-chip { display: none; }
  .top-actions { margin-left: auto; }
  .global-weather-overview { min-width: 88px; height: 36px; padding: 0 7px; border-color: var(--line); background: var(--surface); grid-template-columns: 24px auto auto; gap: 5px; }
  .global-surcharge-overview, .global-surcharge-overview.loading, .global-surcharge-overview.unavailable { min-width: 84px; height: 36px; padding: 0 7px; grid-template-columns: 22px minmax(0, 1fr); gap: 4px; }
  .global-surcharge-icon { width: 22px; height: 22px; background: transparent; }
  .global-surcharge-copy strong { font-size: 12px; }
  .global-surcharge-copy strong b { display: none; }
  .global-weather-icon { width: 24px; height: 24px; background: transparent; }
  .global-weather-primary > span { display: none; }
  .global-weather-primary strong { font-size: 14px; }
  .page { padding: 20px 14px 36px; }
  .execution-mode-control { align-items: stretch; flex-direction: column; }
  .execution-mode-options { flex-basis: auto; width: 100%; }
  .page-head { margin-bottom: 16px; flex-direction: column; }
  .page-head h1 { font-size: 21px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 104px; padding: 14px; }
  .metric strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .filters { align-items: stretch; flex-direction: column; }
  .timeout-toolbar { align-items: stretch; flex-direction: column; }
  .timeout-toolbar .refresh-meta { margin-left: 0; }
  .timeout-toolbar .button { align-self: flex-start; }
  .timeout-table-panel .panel-head { align-items: stretch; flex-direction: column; }
  .timeout-table-panel .search { width: 100%; }
  .search { min-width: 0; width: 100%; }
  .pricing-band { align-items: flex-start; flex-direction: column; }
  .order-tabs { gap: 7px; }
  .order-tab { min-height: 64px; padding: 9px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; }
  .order-tab > svg { width: 30px; height: 30px; padding: 7px; }
  .order-tab strong { font-size: 13px; }
  .order-tab small { display: none; }
  .order-tab b { min-width: 30px; height: 26px; padding: 0 7px; font-size: 11px; }
  .rider-rank-grid { grid-template-columns: 1fr; }
  .weather-panel { padding: 18px; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .weather-visual { height: 92px; }
  .weather-visual svg { width: 48px; height: 48px; }
  .weather-primary > strong { font-size: 34px; }
  .weather-stats { grid-column: 1 / -1; border-top: 1px solid #d8e1ec; border-left: 0; }
  .weather-stats > div { padding: 10px 8px; }
  .weather-panel > footer { position: static; grid-column: 1 / -1; }
  .toast-host { left: 14px; right: 14px; }
  .toast { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Weather operations center */
.weather-unavailable { min-height: 220px; padding: 28px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.weather-unavailable > svg { width: 38px; height: 38px; color: var(--hint); }
.weather-unavailable strong, .weather-unavailable span { display: block; }
.weather-unavailable span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.weather-automation-strip { margin-bottom: 10px; min-height: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.execution-mode-control { margin: 13px 0 14px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.execution-mode-control > div:first-child { min-width: 0; }
.execution-mode-control strong, .execution-mode-control span { display: block; }
.execution-mode-control strong { font-size: 12px; }
.execution-mode-control > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.execution-mode-options { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 6px; flex: 0 0 min(360px, 48%); }
.execution-mode-option { min-height: 50px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.execution-mode-option.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.execution-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.execution-mode-option b, .execution-mode-option small { display: block; }
.execution-mode-option b { font-size: 11px; }
.execution-mode-option b svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.execution-mode-option small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.operation-mode { display: inline-block; margin-left: 7px; padding: 2px 5px; border-radius: 4px; font-size: 8px; font-weight: 700; vertical-align: 1px; }
.operation-mode.auto { background: var(--primary-soft); color: var(--primary); }
.operation-mode.manual { background: var(--surface-2); color: var(--muted); }
.weather-automation-strip > div { min-width: 0; display: grid; grid-template-columns: 16px auto; align-items: center; column-gap: 7px; }
.weather-automation-strip svg { grid-row: 1 / 3; width: 15px; color: var(--primary); }
.weather-automation-strip strong { font-size: 11px; }
.weather-automation-strip span { color: var(--muted); font-size: 10px; }
.surcharge-amount-band { margin-bottom: 10px; min-height: 76px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: flex; align-items: center; gap: 18px; }
.surcharge-amount-band > div { min-width: 130px; }
.surcharge-amount-band span, .surcharge-amount-band strong { display: block; }
.surcharge-amount-band span { color: var(--muted); font-size: 10px; font-weight: 700; }
.surcharge-amount-band strong { margin-top: 3px; font-size: 22px; line-height: 1.1; }
.surcharge-amount-band > svg { width: 18px; color: var(--hint); }
.surcharge-amount-band .surcharge-cap { margin-left: auto; padding-left: 18px; border-left: 1px solid var(--line); text-align: right; }
.surcharge-amount-band .surcharge-cap strong { font-size: 15px; }
.surcharge-amount-band > b { padding: 7px 9px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); display: flex; align-items: center; gap: 5px; font-size: 10px; }
.surcharge-amount-band > b svg { width: 14px; }
.surcharge-command-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.surcharge-command-grid > * { min-width: 0; height: 100%; }
.surcharge-portfolio-panel { min-width: 0; min-height: 372px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.surcharge-portfolio-panel > header { min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.surcharge-portfolio-panel > header span, .surcharge-portfolio-panel > header strong { display: block; }
.surcharge-portfolio-panel > header span { color: var(--muted); font-size: 9px; }
.surcharge-portfolio-panel > header strong { margin-top: 2px; font-size: 14px; }
.surcharge-portfolio-panel > header small { color: var(--muted); font-size: 9px; }
.surcharge-type-list { flex: 1; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.surcharge-type-row { min-height: 0; padding: 8px 9px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(104px, 1fr) minmax(52px, 62px) minmax(52px, 62px) auto; align-items: center; gap: 6px; }
.surcharge-type-row:first-child { border-top: 0; }
.surcharge-type-row.conflict { background: var(--danger-soft); }
.surcharge-type-row.pending { background: #fffaf2; }
.surcharge-type-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.surcharge-type-icon svg { width: 15px; }
.surcharge-type-main { min-width: 0; }
.surcharge-type-main > div { display: flex; align-items: center; gap: 6px; }
.surcharge-type-main > div > strong { font-size: 12px; }
.surcharge-type-main > span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.surcharge-type-main > small { display: block; margin-top: 3px; color: var(--info); font-size: 8px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.surcharge-type-actual span, .surcharge-type-actual strong, .surcharge-type-actual small,
.surcharge-type-plan span, .surcharge-type-plan strong, .surcharge-type-plan small,
.surcharge-type-decision span, .surcharge-type-decision strong { display: block; }
.surcharge-type-actual span, .surcharge-type-plan span, .surcharge-type-decision span { color: var(--muted); font-size: 9px; }
.surcharge-type-actual strong, .surcharge-type-plan strong, .surcharge-type-decision strong { margin-top: 2px; font-size: 13px; }
.surcharge-type-actual small, .surcharge-type-plan small { margin-top: 2px; color: var(--hint); font-size: 8px; }
.surcharge-type-actions { display: flex; justify-content: flex-end; gap: 4px; }
.surcharge-type-actions .icon-button { width: 26px; height: 26px; }
.surcharge-type-actions .icon-button.danger { color: var(--danger); }
.surcharge-type-actions .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.surcharge-type-confirm { display: flex; justify-content: flex-end; gap: 6px; }
.surcharge-type-confirm .button { min-height: 30px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
.surcharge-strategy-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.surcharge-strategy-column { min-width: 0; display: grid; align-content: start; gap: 14px; }
.surcharge-date-list { grid-column: 1 / -1; }
.surcharge-date-list textarea { min-height: 76px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.holiday-rule-summary { grid-column: 1 / -1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.holiday-rule-summary > div { min-height: 58px; padding: 10px 12px 10px 0; border-right: 1px solid var(--line); }
.holiday-rule-summary > div:not(:first-child) { padding-left: 12px; }
.holiday-rule-summary > div:last-child { border-right: 0; }
.holiday-rule-summary span, .holiday-rule-summary strong { display: block; }
.holiday-rule-summary span { color: var(--muted); font-size: 9px; }
.holiday-rule-summary strong { margin-top: 4px; font-size: 11px; line-height: 1.4; }
.operation-current-rule { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.operation-current-rule span { color: var(--muted); font-size: 10px; }
.operation-current-rule strong { font-size: 10px; }
.operation-current-rule b { font-size: 13px; }
.weather-alert-band { margin-bottom: 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.weather-alert-band.clear { min-height: 54px; padding: 0 16px; border-left-color: var(--success); display: flex; align-items: center; gap: 11px; }
.weather-alert-band.clear > svg { color: var(--success); }
.weather-alert-band.clear strong, .weather-alert-band.clear span { display: block; }
.weather-alert-band.clear strong { font-size: 13px; }
.weather-alert-band.clear span { color: var(--muted); font-size: 11px; }
.weather-alert-band.level-blue { border-left-color: #3178a5; }
.weather-alert-band.level-yellow { border-left-color: var(--accent-deep); }
.weather-alert-band.level-orange { border-left-color: #d66b18; }
.weather-alert-band.level-red { border-left-color: var(--danger); }
.weather-alert-head { min-height: 62px; padding: 10px 15px; display: flex; align-items: center; gap: 11px; }
.weather-alert-head > svg { flex: none; color: var(--danger); }
.weather-alert-head > div { min-width: 0; flex: 1; }
.weather-alert-head strong, .weather-alert-head span { display: block; }
.weather-alert-head strong { font-size: 15px; }
.weather-alert-head span { margin-top: 1px; color: var(--muted); font-size: 11px; }
.weather-alert-head > b { min-width: 48px; padding: 4px 9px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 11px; text-align: center; }
.weather-alert-list { border-top: 1px solid var(--line); display: flex; overflow-x: auto; }
.weather-alert-list a { min-width: 210px; padding: 9px 13px; border-right: 1px solid var(--line); color: var(--ink); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 3px 7px; text-decoration: none; }
.weather-alert-list a:hover { background: var(--surface-2); }
.weather-alert-list a span, .weather-alert-list a strong { font-size: 11px; }
.weather-alert-list a small { grid-column: 1 / 3; color: var(--muted); font-size: 9px; }
.weather-alert-list a svg { grid-column: 3; grid-row: 1 / 3; width: 14px; color: var(--hint); }
.weather-command-grid { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(330px, .82fr) minmax(520px, 1.36fr); gap: 14px; align-items: stretch; }
.weather-situation-panel, .weather-decision-panel, .current-pricing-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.weather-situation-panel { min-height: 372px; padding: 14px; display: flex; flex-direction: column; }
.weather-source-card.baidu .weather-condition-icon { background: var(--info-soft); color: var(--info); }
.weather-source-card.baidu header span { color: var(--info); }
.weather-situation-panel > header { display: flex; align-items: center; gap: 10px; }
.weather-condition-icon { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.weather-condition-icon svg { width: 29px; height: 29px; stroke-width: 1.6; }
.weather-situation-panel header span, .weather-situation-panel header strong { display: block; }
.weather-situation-panel header span { color: var(--primary); font-size: 11px; font-weight: 750; }
.weather-situation-panel header strong { font-size: 27px; line-height: 1.12; }
.weather-situation-panel header strong small { font-size: 13px; }
.weather-situation-panel header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.weather-facts { margin-top: 11px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.weather-facts > div { min-height: 43px; padding: 7px 7px 6px 0; display: grid; grid-template-columns: 17px 1fr; align-content: center; gap: 0 5px; }
.weather-facts svg { grid-row: 1 / 3; width: 15px; margin-top: 2px; color: var(--hint); }
.weather-facts span, .weather-facts strong { display: block; min-width: 0; }
.weather-facts span { color: var(--muted); font-size: 9px; }
.weather-facts strong { font-size: 12px; overflow-wrap: anywhere; }
.weather-situation-panel > footer { margin-top: auto; padding: 7px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 10px; }
.weather-warning-events { display: grid; gap: 5px; }
.weather-warning-events > strong, .weather-warning-events > span { display: block; }
.weather-warning-events > strong { font-size: 12px; }
.weather-warning-events > span { color: var(--muted); font-size: 10px; }
.weather-warning-events > div { display: grid; gap: 5px; }
.weather-warning-events a { min-width: 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); text-decoration: none; display: grid; gap: 1px; }
.weather-warning-events a:hover { border-color: var(--primary); }
.weather-warning-events a span, .weather-warning-events a small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-warning-events a span { font-size: 11px; font-weight: 750; }
.weather-warning-events a small { color: var(--muted); font-size: 9px; }
.weather-decision-panel { padding: 17px; }
.weather-decision-panel > header, .current-pricing-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weather-decision-panel > header > span, .current-pricing-panel > header > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.weather-decision-main { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.weather-decision-main > svg { width: 42px; height: 42px; padding: 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.weather-decision-panel.success .weather-decision-main > svg { background: var(--success-soft); color: var(--success); }
.weather-decision-main strong, .weather-decision-main b { display: block; }
.weather-decision-main strong { font-size: 18px; }
.weather-decision-main b { margin-top: 1px; color: var(--primary); font-size: 13px; }
.weather-decision-panel > p { min-height: 40px; margin: 13px 0 10px; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.decision-match-list { min-height: 45px; display: flex; flex-wrap: wrap; gap: 5px; }
.decision-match-list span { height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 9px; }
.decision-match-list b { color: var(--ink); }
.weather-decision-panel > footer { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 10px; }
.weather-decision-panel > footer svg { width: 13px; }
.current-pricing-panel { padding: 17px; }
.current-pricing-value { margin-top: 14px; display: flex; align-items: baseline; gap: 5px; }
.current-pricing-value strong { font-size: 34px; line-height: 1.15; }
.current-pricing-value span { color: var(--muted); font-size: 11px; }
.current-pricing-panel dl { margin: 13px 0 14px; border-top: 1px solid var(--line); }
.current-pricing-panel dl > div { min-height: 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.current-pricing-panel dt { color: var(--muted); font-size: 9px; }
.current-pricing-panel dd { margin: 0; font-size: 10px; font-weight: 700; text-align: right; }
.current-pricing-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.current-pricing-actions .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.pricing-query-error { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 10px; line-height: 1.5; }
.weather-page-tabs { margin: 18px 0 12px; border-bottom: 1px solid var(--line-strong); display: flex; gap: 2px; }
.weather-page-tabs button { position: relative; height: 42px; padding: 0 15px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; cursor: pointer; }
.weather-page-tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.weather-page-tabs button.active { color: var(--ink); }
.weather-page-tabs button.active::after { background: var(--accent); }
.weather-page-tabs svg { width: 15px; }
.weather-overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 14px; }
.weather-trend-panel, .weather-daily-panel { min-height: 330px; }
.weather-chart-wrap { height: 260px; padding: 8px 16px 16px; }
.weather-daily-list { padding: 0 16px 14px; }
.weather-daily-list > div { min-height: 38px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px 52px 1fr auto; align-items: center; gap: 7px; font-size: 10px; }
.weather-daily-list time, .weather-daily-list span { color: var(--muted); }
.weather-daily-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-daily-list b { font-size: 11px; }
.weather-source-panel { margin-top: 14px; }
.weather-source-summary { margin: 0 18px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; font-size: 12px; }
.weather-source-summary strong { color: var(--ink); font-size: 13px; }
.weather-source-summary span { color: var(--ink-2); line-height: 1.55; }
.weather-source-summary.has-diff { border-color: rgba(245, 158, 11, .45); background: var(--warn-soft); }
.weather-minutely-panel { margin: 0 0 14px; }
.weather-minutely-bars { height: 150px; padding: 12px 18px 16px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px; align-items: end; }
.weather-minutely-bars > div { height: 118px; min-width: 0; display: grid; grid-template-rows: 1fr auto auto; gap: 4px; align-items: end; text-align: center; }
.weather-minutely-bars b { width: 100%; min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #2576f2, #14b8a6); box-shadow: inset 0 -1px 0 rgba(255,255,255,.35); }
.weather-minutely-bars span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.weather-minutely-bars small { color: var(--ink); font-size: 9px; font-weight: 750; }
.weather-source-table { overflow-x: auto; }
.weather-source-table.compact { margin-top: 10px; }
.weather-source-row { min-width: 860px; min-height: 48px; padding: 0 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.05fr 92px 1.35fr 1fr .75fr .95fr .65fr; align-items: center; gap: 10px; font-size: 12px; }
.weather-source-row.head { min-height: 34px; border-top: 0; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 700; }
.weather-source-row.weather-source-main strong { font-size: 13px; color: var(--ink); }
.weather-source-row.weather-source-aux { min-width: 680px; grid-template-columns: 1fr 100px 1fr 110px; color: var(--ink-2); }
.weather-source-row time { color: var(--muted); }
.weather-source-metrics { margin: 14px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.weather-source-metrics > div { min-height: 88px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.weather-source-metrics span, .weather-source-metrics strong, .weather-source-metrics small { display: block; }
.weather-source-metrics span { color: var(--muted); font-size: 11px; font-weight: 750; }
.weather-source-metrics strong { margin-top: 5px; font-size: 28px; line-height: 1.1; }
.weather-source-metrics small { margin-top: 6px; color: var(--hint); font-size: 11px; line-height: 1.45; }
.weather-source-history-table { overflow-x: auto; }
.weather-source-history-row { min-width: 980px; min-height: 54px; padding: 0 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 132px 1.2fr 1.2fr 82px 92px 72px 1.1fr; align-items: center; gap: 10px; font-size: 12px; }
.weather-source-history-row.head { min-height: 36px; border-top: 0; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 800; }
.weather-source-history-row.has-diff { background: rgba(245, 158, 11, .05); }
.weather-source-history-row time { color: var(--muted); font-size: 11px; }
.weather-source-history-row span, .weather-source-history-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-source-history-row b { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.weather-source-history-row strong { font-size: 12px; color: var(--ink-2); }
.weather-index-band { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; }
.weather-index-band > div { min-height: 96px; padding: 13px; border-right: 1px solid var(--line); }
.weather-index-band > div:last-child { border-right: 0; }
.weather-index-band span, .weather-index-band strong, .weather-index-band small { display: block; }
.weather-index-band span { color: var(--muted); font-size: 9px; }
.weather-index-band strong { margin-top: 3px; font-size: 14px; }
.weather-index-band small { margin-top: 4px; color: var(--hint); font-size: 9px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.weather-strategy-header .panel-head { margin-bottom: 0; }
.weather-global-settings { padding-top: 0; }
.strategy-inline-note { margin: 12px 0 0; padding: 9px 10px; border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--ink-2); display: flex; align-items: center; gap: 7px; font-size: 10px; }
.strategy-inline-note svg { width: 14px; height: 14px; flex: none; color: var(--warn); }
.weather-rule-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.weather-rule-panel > header { min-height: 62px; padding: 0 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.weather-rule-panel > header > svg { width: 34px; height: 34px; padding: 8px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); }
.weather-rule-panel > header strong, .weather-rule-panel > header span { display: block; }
.weather-rule-panel > header strong { font-size: 14px; }
.weather-rule-panel > header span { color: var(--muted); font-size: 9px; }
.weather-rule-body { padding: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.delivery-time-link { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--line); border-left: 3px solid var(--info); background: var(--info-soft); display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 14px; }
.delivery-time-link .switch-line { padding: 0; border: 0; background: transparent; }
.delivery-time-link .field { margin: 0; }
.simple-global-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.simple-surcharge-layout { margin-top: 14px; display: grid; gap: 14px; }
.simple-secondary-grid { display: grid; grid-template-columns: minmax(300px, .62fr) minmax(0, 1.38fr); align-items: start; gap: 14px; }
.weather-amount-columns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.weather-amount-columns > section { min-width: 0; }
.weather-amount-columns > section > header { min-height: 50px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.weather-amount-columns > section > header > svg { width: 18px; color: var(--primary); }
.weather-amount-columns > section > header strong, .weather-amount-columns > section > header span { display: block; }
.weather-amount-columns > section > header strong { font-size: 13px; }
.weather-amount-columns > section > header span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.weather-amount-row { min-height: 62px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 214px; align-items: center; gap: 12px; }
.weather-amount-row strong, .weather-amount-row span { display: block; }
.weather-amount-row strong { font-size: 12px; }
.weather-amount-row > div:first-child span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.weather-amount-row > div:first-child span b { display: inline; color: var(--info); font-weight: 600; }
.weather-amount-row .weather-input-unit { height: 34px; }
.weather-rule-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.weather-rule-values .weather-input-unit input { min-width: 0; padding: 0 6px; }
.high-temperature-rule { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 13px; }
.high-temperature-preview { grid-column: 1 / -1; min-height: 66px; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.high-temperature-preview span { color: var(--muted); font-size: 10px; text-align: center; }
.high-temperature-preview b { margin-top: 3px; color: var(--ink); display: block; font-size: 14px; }
.high-temperature-preview svg { width: 14px; flex: none; color: var(--hint); }
.holiday-simple-head { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr); align-items: end; gap: 18px; }
.holiday-simple-head > div:last-child { align-self: center; }
.holiday-simple-head > div:last-child strong, .holiday-simple-head > div:last-child span { display: block; }
.holiday-simple-head > div:last-child strong { font-size: 12px; }
.holiday-simple-head > div:last-child span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.holiday-calendar-shell { grid-column: 1 / -1; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.holiday-calendar-toolbar { min-height: 48px; padding: 0 10px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.holiday-calendar-toolbar strong { font-size: 13px; text-align: center; }
.holiday-calendar-toolbar button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.holiday-calendar-toolbar button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.holiday-calendar-toolbar button svg { width: 16px; height: 16px; }
.holiday-calendar-meta { min-height: 34px; padding: 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; font-size: 9px; }
.holiday-calendar-meta span { color: var(--muted); display: flex; align-items: center; gap: 5px; }
.holiday-calendar-meta span i { width: 8px; height: 8px; border-radius: 2px; background: var(--danger-soft); }
.holiday-calendar-meta span:nth-child(2) i { background: var(--primary-soft); }
.holiday-calendar-meta small { margin-left: auto; color: var(--muted); }
.holiday-month { min-width: 0; padding: 12px; background: var(--surface); }
.holiday-month > header { display: none; }
.holiday-weekdays, .holiday-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.holiday-weekdays span { min-height: 24px; color: var(--muted); font-size: 9px; display: grid; place-items: center; }
.holiday-days { margin-top: 4px; }
.holiday-days i { min-width: 0; min-height: 42px; padding: 4px 2px; border-radius: 4px; color: var(--muted); display: grid; align-content: center; text-align: center; font-style: normal; }
.holiday-days i b { font-size: 10px; font-weight: 700; }
.holiday-days i small { overflow: hidden; color: inherit; font-size: 7px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.holiday-days i.holiday { background: var(--danger-soft); color: var(--danger); }
.holiday-days i.workday { background: var(--primary-soft); color: var(--primary); }
.holiday-calendar-loading { min-height: 290px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 8px; font-size: 10px; }
.holiday-calendar-loading svg { width: 20px; }
.holiday-calendar-empty { grid-column: 1 / -1; min-height: 120px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 7px; }
.holiday-calendar-empty svg { width: 24px; }
.holiday-calendar-empty strong { font-size: 11px; }
.weather-tier-amounts { grid-column: 1 / -1; padding-bottom: 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.weather-tier-amounts .field label { font-size: 12px; }
.weather-tier-amounts .field:nth-child(1) label { color: var(--success); }
.weather-tier-amounts .field:nth-child(2) label { color: var(--warn); }
.weather-tier-amounts .field:nth-child(3) label { color: var(--danger); }
.phenomenon-tier-head { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.phenomenon-tier-head strong, .phenomenon-tier-head span { display: block; }
.phenomenon-tier-head strong { font-size: 12px; }
.phenomenon-tier-head span { color: var(--muted); font-size: 9px; }
.phenomenon-tier-list { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.phenomenon-tier-group > header { min-height: 32px; padding: 0 9px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; font-size: 10px; font-weight: 800; }
.phenomenon-tier-row { min-height: 53px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 108px; align-items: center; gap: 12px; }
.phenomenon-tier-row strong, .phenomenon-tier-row span { display: block; }
.phenomenon-tier-row strong { font-size: 12px; }
.phenomenon-tier-row span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.phenomenon-tier-row select { width: 108px; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 700; outline: none; }
.phenomenon-tier-row select:focus { border-color: #9ca29c; box-shadow: 0 0 0 3px rgba(22,24,22,.06); }
.temperature-tier { grid-column: 1 / -1; padding: 13px 0 15px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(130px, .8fr) repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; }
.temperature-tier:first-child { padding-top: 0; }
.temperature-tier > div:first-child { align-self: center; }
.temperature-tier b, .temperature-tier span { display: block; }
.temperature-tier b { color: var(--warn); font-size: 13px; }
.temperature-tier.severe b { color: var(--danger); }
.temperature-tier span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.weather-input-unit { height: 40px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); display: flex; align-items: center; overflow: hidden; }
.weather-input-unit input { min-width: 0; height: 100%; border: 0; border-radius: 0; }
.weather-input-unit span { padding: 0 9px; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; white-space: nowrap; }
.warning-amount-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.weather-history-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.weather-decision-history, .weather-operation-list { max-height: 620px; overflow-y: auto; }
.weather-decision-history article { min-height: 68px; padding: 10px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 110px minmax(0, 1fr) 70px 100px; align-items: center; gap: 10px; }
.weather-decision-history article > div { display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: 10px; font-weight: 750; }
.weather-decision-history article svg { width: 15px; }
.weather-decision-history article > strong { font-size: 11px; font-weight: 600; }
.weather-decision-history article > b { font-size: 12px; }
.weather-decision-history time { color: var(--muted); font-size: 9px; text-align: right; }
.weather-operation-list article { min-height: 76px; padding: 11px 15px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto 100px; align-items: center; gap: 8px; }
.weather-operation-list article > div:first-child strong, .weather-operation-list article > div:first-child span { display: block; }
.weather-operation-list article > div:first-child strong { font-size: 12px; }
.weather-operation-list article > div:first-child span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.weather-operation-list article > time { color: var(--muted); font-size: 9px; text-align: right; }
.weather-operation-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.weather-operation-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.weather-operation-list article > p { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 10px; }

@media (max-width: 1280px) {
  .weather-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .current-pricing-panel { grid-column: 1 / -1; min-height: 210px; }
  .current-pricing-panel dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .current-pricing-panel dl > div { padding: 0 8px; display: block; }
  .current-pricing-panel dd { text-align: left; }
}

/* Dispatch command center */
.dispatch-command-page { width: 100%; max-width: none; padding: 20px 20px 34px; }
.dispatch-command-page .page-head { margin-bottom: 10px; }
.dispatch-command-page .workspace-tabs { margin-bottom: 10px; }
.dispatch-command-center { position: relative; min-width: 0; }
.dispatch-command-metrics { height: 84px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; }
.dispatch-command-metrics > div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); display: grid; place-items: center; align-content: center; gap: 2px; text-align: center; }
.dispatch-command-metrics > div:last-child { border-right: 0; }
.dispatch-command-metrics span { color: var(--muted); font-size: 12px; font-weight: 700; }
.dispatch-command-metrics strong { font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dispatch-command-metrics .success strong { color: var(--success); }
.dispatch-command-metrics .warning strong { color: var(--primary); }
.dispatch-command-metrics .danger strong, .dispatch-command-metrics .danger span { color: var(--danger); }
.dispatch-command-metrics .info strong { color: #168b91; }

.dispatch-command-grid { min-height: calc(100vh - 286px); margin-top: 10px; display: grid; grid-template-columns: minmax(315px, 30%) minmax(450px, 45%) minmax(300px, 25%); }
.dispatch-queue-panel, .dispatch-decision-panel, .dispatch-candidate-panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.dispatch-decision-panel, .dispatch-candidate-panel { border-left: 0; }
.dispatch-queue-panel { border-radius: 5px 0 0 5px; display: flex; flex-direction: column; }
.dispatch-candidate-panel { border-radius: 0 5px 5px 0; }
.dispatch-queue-panel > header { min-height: 62px; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.dispatch-queue-panel h2, .dispatch-candidate-pane h2, .dispatch-event-timeline h3 { margin: 0; }
.dispatch-queue-panel h2 { font-size: 18px; }
.dispatch-queue-panel header span { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.dispatch-queue-tools { min-height: 44px; margin: 10px 10px 8px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; gap: 7px; }
.dispatch-queue-tools > svg { width: 15px; color: var(--muted); }
.dispatch-queue-tools input { min-width: 0; height: 34px; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }
.dispatch-queue-tools .icon-button { width: 32px; height: 32px; }
.dispatch-queue-filters { padding: 0 10px 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dispatch-queue-filters select { min-width: 0; height: 36px; padding: 0 28px 0 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-2); font-size: 12px; }
.dispatch-queue-list { min-height: 280px; max-height: calc(100vh - 454px); border-top: 1px solid var(--line); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-queue-item { width: 100%; min-height: 112px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(104px, .82fr) minmax(126px, 1.25fr) minmax(70px, .66fr); align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.dispatch-queue-item:hover { background: #f8fafb; }
.dispatch-queue-item.active { background: #fff6ef; box-shadow: inset 0 0 0 1px #ff8a46; }
.dispatch-queue-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.dispatch-queue-stage, .dispatch-queue-order, .dispatch-queue-meta { min-width: 0; }
.dispatch-queue-stage strong, .dispatch-queue-stage span, .dispatch-queue-stage b, .dispatch-queue-order span, .dispatch-queue-order strong, .dispatch-queue-order small, .dispatch-queue-meta span, .dispatch-queue-meta strong, .dispatch-queue-meta small { display: block; }
.dispatch-queue-stage strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.dispatch-queue-stage span { margin-top: 2px; font-size: 12px; font-weight: 750; }
.dispatch-queue-stage b { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.dispatch-queue-item.info .dispatch-queue-stage strong, .dispatch-queue-item.info .dispatch-queue-stage span { color: #117f86; }
.dispatch-queue-item.warning .dispatch-queue-stage strong, .dispatch-queue-item.warning .dispatch-queue-stage span { color: var(--primary); }
.dispatch-queue-item.danger .dispatch-queue-stage strong, .dispatch-queue-item.danger .dispatch-queue-stage span, .dispatch-queue-item.danger .dispatch-queue-stage b { color: var(--danger); }
.dispatch-queue-order span { color: var(--primary); font-size: 10px; font-weight: 750; }
.dispatch-queue-order strong, .dispatch-queue-order small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-queue-order strong { margin-top: 3px; font-size: 12px; }
.dispatch-queue-order small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.dispatch-queue-meta { text-align: right; }
.dispatch-queue-meta span { color: var(--muted); font-size: 10px; }
.dispatch-queue-meta strong { margin-top: 4px; font-size: 12px; }
.dispatch-queue-meta small { margin-top: 5px; color: var(--hint); font-size: 9px; }

.dispatch-decision-pane { min-height: 100%; }
.dispatch-decision-head { min-height: 116px; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.dispatch-decision-head span { color: var(--muted); font-size: 11px; font-weight: 750; }
.dispatch-decision-head h2 { margin: 5px 0 0; font-size: 20px; line-height: 1.45; text-wrap: pretty; }
.dispatch-decision-head small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.dispatch-decision-head.danger h2 { color: var(--danger); }
.dispatch-decision-head.warning h2 { color: var(--primary); }
.dispatch-phase-timeline { min-height: 100px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dispatch-phase-timeline > div { position: relative; min-width: 0; padding: 0 8px 20px; text-align: center; }
.dispatch-phase-timeline > div::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 4px; background: #c8ccce; }
.dispatch-phase-timeline > div:first-child::after { border-radius: 4px 0 0 4px; }
.dispatch-phase-timeline > div:last-child::after { border-radius: 0 4px 4px 0; }
.dispatch-phase-timeline b { position: absolute; z-index: 1; left: 50%; bottom: 0; width: 20px; height: 20px; border-radius: 50%; transform: translateX(-50%); background: #7e8588; color: #fff; display: grid; place-items: center; font-size: 10px; }
.dispatch-phase-timeline strong, .dispatch-phase-timeline span { display: block; }
.dispatch-phase-timeline strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.dispatch-phase-timeline span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.dispatch-phase-timeline .active::after, .dispatch-phase-timeline .active b { background: var(--primary); }
.dispatch-phase-timeline .active strong, .dispatch-phase-timeline .active span { color: var(--primary); }
.dispatch-phase-timeline .active.danger::after, .dispatch-phase-timeline .active.danger b { background: var(--danger); }
.dispatch-phase-timeline .active.danger strong, .dispatch-phase-timeline .active.danger span { color: var(--danger); }
.dispatch-order-facts { padding: 12px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.dispatch-order-facts > div { min-width: 0; }
.dispatch-order-facts .wide { grid-column: span 2; }
.dispatch-order-facts span, .dispatch-order-facts strong { display: block; }
.dispatch-order-facts span { color: var(--muted); font-size: 10px; }
.dispatch-order-facts strong { margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-current-action { min-height: 92px; padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; }
.dispatch-current-action > svg { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--info-soft); color: var(--info); }
.dispatch-current-action.warning > svg { background: var(--primary-soft); color: var(--primary); }
.dispatch-current-action.danger > svg { background: var(--danger); color: #fff; }
.dispatch-current-action span, .dispatch-current-action strong, .dispatch-current-action small { display: block; }
.dispatch-current-action span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dispatch-current-action strong { margin-top: 2px; font-size: 13px; line-height: 1.45; }
.dispatch-current-action small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.dispatch-current-action.danger strong, .dispatch-current-action.danger small { color: var(--danger); }
.dispatch-event-timeline { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.dispatch-event-timeline h3 { margin-bottom: 8px; font-size: 14px; }
.dispatch-event-timeline > div { min-height: 30px; display: grid; grid-template-columns: 66px 14px minmax(0, 1fr); align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.dispatch-event-timeline time { font-variant-numeric: tabular-nums; }
.dispatch-event-timeline i { position: relative; width: 8px; height: 8px; border: 2px solid #92999c; border-radius: 50%; background: var(--surface); }
.dispatch-event-timeline i::after { content: ""; position: absolute; top: 6px; left: 1px; width: 2px; height: 23px; background: var(--line); }
.dispatch-event-timeline > div:last-child i::after { display: none; }
.dispatch-event-timeline .active { color: var(--ink); }
.dispatch-event-timeline .active i { border-color: var(--primary); background: var(--primary); }
.dispatch-center-actions { min-height: 58px; padding: 9px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.dispatch-center-actions .button { height: 36px; flex: none; }
.dispatch-center-actions span { color: var(--muted); font-size: 10px; }
.dispatch-evidence-drawer > summary { min-height: 48px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); cursor: pointer; list-style: none; font-size: 12px; font-weight: 750; }
.dispatch-evidence-drawer > summary::-webkit-details-marker { display: none; }
.dispatch-evidence-drawer > summary svg { transition: transform .18s var(--ease); }
.dispatch-evidence-drawer[open] > summary svg { transform: rotate(180deg); }
.dispatch-evidence-drawer > div { max-height: 340px; padding: 12px 18px 18px; border-top: 1px solid var(--line); overflow: auto; }
.dispatch-evidence-drawer p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.dispatch-candidate-pane { min-height: 100%; display: flex; flex-direction: column; }
.dispatch-candidate-pane > header { min-height: 72px; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-candidate-pane > header span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dispatch-candidate-pane > header h2 { margin-top: 1px; font-size: 20px; }
.dispatch-candidate-pane > header small { color: var(--muted); font-size: 10px; text-align: right; }
.dispatch-candidate-list { flex: 1; min-height: 240px; }
.dispatch-candidate-row { min-height: 100px; padding: 11px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(80px, 1fr) minmax(118px, 1.35fr); align-items: center; gap: 8px; }
.dispatch-candidate-row > b { width: 26px; height: 26px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; }
.dispatch-candidate-row.success > b { background: var(--success); }
.dispatch-candidate-row.danger > b { background: var(--danger); }
.dispatch-candidate-row.attempted { background: #fff9f3; }
.dispatch-candidate-row > div { min-width: 0; }
.dispatch-candidate-row > div strong, .dispatch-candidate-row > div span { display: block; }
.dispatch-candidate-row > div strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-candidate-row > div span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dispatch-candidate-row dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.dispatch-candidate-row dl div { min-width: 0; }
.dispatch-candidate-row dt { color: var(--muted); font-size: 8px; }
.dispatch-candidate-row dd { margin: 1px 0 0; overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-candidate-result { grid-column: 2 / -1; overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-candidate-result.success { color: var(--success); }
.dispatch-candidate-result.danger { color: var(--danger); }
.dispatch-execution-state { margin-top: auto; padding: 16px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.dispatch-execution-state span, .dispatch-execution-state strong, .dispatch-execution-state small { display: block; }
.dispatch-execution-state span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dispatch-execution-state strong { margin-top: 5px; font-size: 15px; }
.dispatch-execution-state small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.dispatch-execution-state.danger strong, .dispatch-execution-state.danger small { color: var(--danger); }
.dispatch-execution-state .button { width: 100%; height: 36px; margin-top: 14px; }
.dispatch-command-empty { min-height: 140px; padding: 22px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.dispatch-command-empty.large { min-height: 420px; }
.dispatch-event-dock { position: fixed; right: 24px; bottom: 18px; z-index: 9; min-width: 280px; height: 48px; padding: 0 15px; border: 1px solid #272b2d; border-radius: 5px; background: #202426; color: #fff; display: flex; align-items: center; gap: 9px; cursor: pointer; box-shadow: 0 8px 26px rgba(0,0,0,.18); }
.dispatch-event-dock span { flex: 1; text-align: left; font-size: 12px; }
.dispatch-event-dock strong { color: #ff8b3d; font-size: 11px; }
.dispatch-event-dock svg { width: 16px; }

@media (max-width: 1380px) {
  .dispatch-command-grid { grid-template-columns: minmax(300px, 31%) minmax(420px, 44%) minmax(270px, 25%); }
  .dispatch-queue-item { grid-template-columns: minmax(98px, .9fr) minmax(110px, 1.15fr); }
  .dispatch-queue-meta { display: none; }
  .dispatch-candidate-row { grid-template-columns: 26px minmax(0, 1fr); }
  .dispatch-candidate-row dl { grid-column: 2; }
}

@media (max-width: 1100px) {
  .dispatch-command-metrics { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dispatch-command-metrics > div { min-height: 66px; border-bottom: 1px solid var(--line); }
  .dispatch-command-grid { grid-template-columns: minmax(300px, 36%) minmax(0, 64%); }
  .dispatch-candidate-panel { grid-column: 1 / -1; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 0 5px 5px; }
  .dispatch-candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-candidate-row:nth-child(odd) { border-right: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .dispatch-command-page { padding: 16px 12px 80px; }
  .dispatch-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-command-grid { display: block; }
  .dispatch-queue-panel, .dispatch-decision-panel, .dispatch-candidate-panel { border: 1px solid var(--line); border-radius: 5px; }
  .dispatch-decision-panel, .dispatch-candidate-panel { margin-top: 10px; }
  .dispatch-queue-list { max-height: 430px; }
  .dispatch-order-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-order-facts .wide { grid-column: 1 / -1; }
  .dispatch-candidate-list { display: block; }
  .dispatch-candidate-row:nth-child(odd) { border-right: 0; }
  .dispatch-event-dock { left: 12px; right: 12px; bottom: 10px; min-width: 0; }
}

@media (max-width: 1180px) {
  .surcharge-command-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .weather-command-grid, .weather-overview-grid, .weather-history-grid { grid-template-columns: 1fr; }
  .current-pricing-panel { grid-column: auto; }
  .weather-rule-grid { grid-template-columns: 1fr; }
  .simple-secondary-grid { grid-template-columns: 1fr; }
  .holiday-rule-summary { grid-template-columns: 1fr; }
  .holiday-rule-summary > div { min-height: 48px; padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .holiday-rule-summary > div:not(:first-child) { padding-left: 0; }
  .holiday-rule-summary > div:last-child { border-bottom: 0; }
  .temperature-tier { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .temperature-tier > div:first-child { grid-column: 1 / -1; }
  .surcharge-strategy-grid { grid-template-columns: 1fr; }
  .surcharge-type-row { grid-template-columns: 34px minmax(0, 1fr) 92px 96px; }
  .surcharge-type-actions, .surcharge-type-confirm { grid-column: 2 / -1; justify-content: flex-start; }
  .weather-index-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-index-band > div { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .weather-automation-strip { align-items: stretch; flex-direction: column; gap: 7px; }
  .weather-command-grid { gap: 10px; }
  .weather-situation-panel, .weather-decision-panel, .current-pricing-panel { min-height: 0; }
  .weather-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-page-tabs { overflow-x: auto; }
  .weather-page-tabs button { flex: none; padding: 0 11px; }
  .weather-rule-body, .warning-amount-grid { grid-template-columns: 1fr 1fr; }
  .simple-global-grid, .weather-amount-columns, .holiday-simple-head, .delivery-time-link { grid-template-columns: 1fr; }
  .weather-amount-columns { gap: 14px; }
  .holiday-calendar-meta { align-items: flex-start; flex-wrap: wrap; padding: 8px; gap: 7px 12px; }
  .holiday-calendar-meta small { width: 100%; margin-left: 0; }
  .weather-tier-amounts { grid-template-columns: 1fr; }
  .temperature-tier { grid-template-columns: 1fr; }
  .phenomenon-tier-row { grid-template-columns: minmax(0, 1fr) 92px; }
  .phenomenon-tier-row select { width: 92px; }
  .surcharge-amount-band { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .surcharge-amount-band > div { min-width: calc(50% - 8px); }
  .surcharge-amount-band .surcharge-cap { width: 100%; margin-left: 0; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
  .surcharge-type-row { grid-template-columns: 32px minmax(0, 1fr) 76px; gap: 8px; }
  .surcharge-type-plan { grid-column: 3; grid-row: 1; }
  .surcharge-type-decision { grid-column: 2 / -1; }
  .surcharge-type-actions, .surcharge-type-confirm { grid-column: 2 / -1; grid-row: auto; }
  .surcharge-type-main > span { white-space: normal; }
  .weather-decision-history article { grid-template-columns: 90px minmax(0, 1fr) 58px; }
  .weather-decision-history time { grid-column: 1 / -1; text-align: left; }
  .current-pricing-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .weather-amount-row { padding: 8px 0; grid-template-columns: 1fr; gap: 7px; }
  .weather-rule-values { width: 100%; }
}

/* Dispatch evidence workspace */
.mode-banner { min-height: 38px; margin-bottom: 12px; padding: 0 12px; border: 1px solid #ffd2ba; border-radius: 5px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; gap: 8px; }
.mode-banner.active { border-color: #ffc29f; background: #fff2ea; color: #d94a00; }
.mode-banner.danger { border-color: #f2caca; background: var(--danger-soft); color: var(--danger); }
.mode-banner svg { width: 17px; height: 17px; }
.mode-banner strong { font-size: 12px; }
.mode-banner span { color: #52706e; font-size: 12px; }
.mode-banner.active span { color: #80513a; }
.mode-banner.danger span { color: #7d4b4b; }
.decision-step.disabled { opacity: .62; }
.candidate-checks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.candidate-check { min-height: 76px; padding: 10px; border-right: 1px solid var(--line); background: var(--surface); }
.candidate-check:last-child { border-right: 0; }
.candidate-check span, .candidate-check strong, .candidate-check small { display: block; }
.candidate-check span { color: var(--ink-2); font-size: 11px; }
.candidate-check strong { margin-top: 4px; font-size: 12px; }
.candidate-check small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.candidate-check.passed strong { color: var(--success); }
.candidate-check.failed strong { color: var(--danger); }
.candidate-check.disabled { opacity: .55; }
.route-bypass { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; display: flex; justify-content: space-between; gap: 16px; color: var(--warn); font-size: 11px; }
.route-bypass.passed { border-color: #cfe3d9; background: var(--success-soft); color: var(--success); }
.route-bypass span { color: var(--muted); }
.state-route-evidence { margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.state-route-evidence > div { min-height: 82px; padding: 10px 12px; border-right: 1px solid var(--line); }
.state-route-evidence > div:last-child { border-right: 0; }
.state-route-evidence span, .state-route-evidence strong, .state-route-evidence small { display: block; }
.state-route-evidence span { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.state-route-evidence strong { margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.35; }
.state-route-evidence small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.state-route-evidence .matched { background: var(--success-soft); }
.state-route-evidence .matched strong { color: var(--success); }
.state-route-evidence .snapshot-evidence.complete { background: #f3faf6; }
.state-route-evidence .snapshot-evidence.complete strong { color: var(--success); }
.state-route-evidence .snapshot-evidence.incomplete { background: var(--danger-soft); }
.state-route-evidence .snapshot-evidence.incomplete strong { color: var(--danger); }

.recommendation-workbench { display: grid; grid-template-columns: minmax(320px, 38%) minmax(0, 1fr); align-items: start; gap: 18px; }
.recommendation-filter-tabs { margin-bottom: 14px; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.recommendation-filter-tabs button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.recommendation-filter-tabs button:hover { border-color: var(--line-strong); color: var(--ink); }
.recommendation-filter-tabs button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.recommendation-filter-tabs button span { font-size: 12px; font-weight: 700; }
.recommendation-filter-tabs button b { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font-size: 10px; }
.recommendation-filter-tabs button.active b { background: var(--primary); color: #fff; }
.recommendation-filter-empty { min-height: 260px; padding: 24px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; }
.recommendation-filter-empty svg { color: var(--hint); }
.recommendation-filter-empty strong, .recommendation-filter-empty span { display: block; }
.recommendation-filter-empty span { font-size: 11px; }
.recommendation-detail-empty { min-height: 420px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 9px; }
.recommendation-detail-empty svg { width: 34px; height: 34px; color: var(--hint); }
.recommendation-list { position: sticky; top: 86px; height: clamp(520px, calc(100vh - 250px), 820px); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.workbench-title { height: 58px; flex: none; padding: 0 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.workbench-title strong { font-size: 16px; }
.workbench-title span { color: var(--muted); font-size: 13px; }
.recommendation-list-scroll { min-height: 0; flex: 1; overflow-y: auto; }
.recommendation-list-item { width: 100%; padding: 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: background .16s var(--ease), box-shadow .16s var(--ease); }
.recommendation-list-item:last-child { border-bottom: 0; }
.recommendation-list-item:hover { background: var(--surface-2); }
.recommendation-list-item.active { background: #fff5ef; box-shadow: inset 3px 0 var(--primary); }
.recommendation-list-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.recommendation-order-id { min-width: 0; min-height: 26px; flex: 1 1 150px; display: flex; align-items: center; justify-content: flex-start; gap: 4px; }
.recommendation-order-id > strong { overflow: hidden; color: var(--ink-2); font-size: 13px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-order-id button { width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.recommendation-order-id button:hover, .recommendation-order-id button:focus-visible { border-color: var(--line-strong); background: var(--surface); color: var(--primary); outline: none; }
.recommendation-order-id button svg { width: 15px; height: 15px; }
.recommendation-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.recommendation-item-head > span:first-child { flex: none; color: var(--primary); font-size: 12px; font-weight: 750; }
.recommendation-amount { flex: none; font-size: 14px; }
.dispatch-result-badge { flex: none; min-height: 24px; padding: 3px 8px; border: 1px solid; border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.dispatch-result-badge.success { border-color: #92d6c7; background: #e8f8f3; color: #08745f; }
.dispatch-result-badge.failed { border-color: #efb1b1; background: #fff0f0; color: var(--danger); }
.dispatch-result-badge.uncertain { border-color: #e7cf86; background: var(--warn-soft); color: var(--warn); }
.dispatch-result-badge.unassigned { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); }
.dispatch-result-badge strong { font-weight: 850; }
.dispatch-result-badge svg { width: 13px; height: 13px; }
.evidence-outcome .dispatch-result-badge { min-height: 28px; padding: 4px 10px; font-size: 12px; }
.recommendation-item-route { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 7px; }
.recommendation-item-route > span { width: 23px; height: 23px; border-radius: 5px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.recommendation-item-route > span.dropoff { background: var(--primary-soft); color: var(--primary); }
.recommendation-item-route p { margin: 1px 0 7px; color: var(--ink-2); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.recommendation-item-reason { margin: 7px 0 0; padding: 8px 10px; border-left: 2px solid var(--warn); background: var(--warn-soft); color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.recommendation-list-item footer { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; color: var(--hint); font-size: 11px; }
.recommendation-list-item footer span { display: flex; align-items: center; gap: 5px; }
.recommendation-list-item footer svg { width: 13px; height: 13px; }

.evidence-pane { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.evidence-header { min-height: 92px; padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 750; }
.evidence-header h2 { margin: 5px 0 2px; font-size: 23px; line-height: 1.25; }
.evidence-header p { margin: 0; color: var(--muted); font-size: 12px; }
.evidence-outcome { display: flex; align-items: center; gap: 14px; }
.evidence-outcome > strong { min-width: 60px; color: var(--primary); font-size: 27px; text-align: right; }
.evidence-outcome > strong small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.route-block { padding: 17px 22px; border-bottom: 1px solid var(--line); background: #fafcfa; display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 14px; }
.route-block > div { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.route-block > svg { color: var(--hint); }
.route-block p { min-width: 0; margin: 0; }
.route-block p small, .route-block p strong { display: block; }
.route-block p small { color: var(--muted); font-size: 11px; }
.route-block p strong { margin-top: 2px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.route-marker { width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.route-marker.dropoff { background: var(--primary-soft); color: var(--primary); }
.decision-callout { margin: 20px 22px 0; padding: 14px 16px; border-left: 3px solid var(--warn); border-radius: 4px; background: var(--warn-soft); color: #7a4c10; display: flex; align-items: flex-start; gap: 11px; }
.decision-callout.positive { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.decision-callout svg { margin-top: 2px; flex: none; }
.decision-callout span, .decision-callout strong { display: block; }
.decision-callout span { font-size: 11px; font-weight: 700; }
.decision-callout strong { margin-top: 2px; color: var(--ink); font-size: 15px; }
.evidence-section { padding: 22px; border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-title h3 { margin: 0; font-size: 17px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-title > span { color: var(--primary); font-size: 12px; font-weight: 750; }
.decision-steps { display: grid; }
.decision-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.decision-step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.step-index { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.step-index svg { width: 14px; height: 14px; }
.decision-step.passed .step-index { background: var(--success-soft); color: var(--success); }
.decision-step.failed .step-index { background: var(--danger-soft); color: var(--danger); }
.step-copy { padding: 2px 0 18px; }
.step-copy > div { display: flex; align-items: center; gap: 9px; }
.step-copy > div strong { font-size: 14px; }
.step-copy > div span { color: var(--muted); font-size: 11px; }
.step-copy > p { margin: 5px 0 7px; color: var(--ink-2); font-size: 13px; }
.step-copy footer { display: flex; flex-wrap: wrap; gap: 6px; }
.step-copy footer span, .step-copy footer b { padding: 3px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 600; }
.step-copy footer b { background: var(--info-soft); color: var(--info); }
.candidate-decision-summary { margin-bottom: 10px; padding: 12px 13px; border-left: 3px solid var(--danger); border-radius: 5px; background: var(--danger-soft); }
.candidate-decision-summary.passed { border-left-color: var(--success); background: var(--success-soft); }
.candidate-decision-summary span, .candidate-decision-summary strong, .candidate-decision-summary small { display: block; }
.candidate-decision-summary span { color: var(--ink-2); font-size: 11px; font-weight: 750; }
.candidate-decision-summary strong { margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.candidate-decision-summary small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.candidate-rule-summary { margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.candidate-rule-summary.passed { border-color: #cfe3d9; background: #fbfefc; }
.candidate-rule-summary.failed { border-color: #f0c6ca; background: #fffafa; }
.candidate-rule-summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.candidate-rule-summary-head span { color: var(--ink-2); font-size: 12px; font-weight: 750; }
.candidate-rule-summary-head strong { color: var(--ink); font-size: 13px; }
.candidate-rule-summary.passed .candidate-rule-summary-head strong { color: var(--success); }
.candidate-rule-summary.failed .candidate-rule-summary-head strong { color: var(--danger); }
.candidate-rule-chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-rule-chips > span { min-height: 50px; min-width: 132px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); display: grid; align-content: center; gap: 1px; }
.candidate-rule-chips b, .candidate-rule-chips strong, .candidate-rule-chips small { display: block; }
.candidate-rule-chips b { color: var(--ink-2); font-size: 11px; }
.candidate-rule-chips strong { font-size: 12px; }
.candidate-rule-chips small { color: var(--muted); font-size: 10px; }
.candidate-rule-chips .passed { border-color: #d6eadf; background: var(--success-soft); }
.candidate-rule-chips .passed strong { color: var(--success); }
.candidate-rule-chips .failed { border-color: #efc2c7; background: var(--danger-soft); }
.candidate-rule-chips .failed strong { color: var(--danger); }
.candidate-rule-chips .disabled { opacity: .7; }
.candidate-rule-details { margin-top: 10px; border-top: 1px solid var(--line); }
.candidate-rule-details > summary { min-height: 36px; padding-top: 10px; color: var(--primary); display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 750; }
.candidate-rule-details > summary::-webkit-details-marker { display: none; }
.candidate-rule-details > summary svg { width: 15px; height: 15px; transition: transform .18s var(--ease); }
.candidate-rule-details[open] > summary svg { transform: rotate(180deg); }
.candidate-rule-details .candidate-checks { margin-top: 6px; }
.distance-policy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.distance-policy > div { padding: 13px 14px; border: 1px solid #d6e6ef; border-radius: 7px; background: var(--info-soft); display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; }
.distance-policy svg { color: var(--info); }
.distance-policy span, .distance-policy strong { grid-column: 2; }
.distance-policy span { color: var(--info); font-size: 11px; font-weight: 750; }
.distance-policy strong { margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.candidate-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.candidate-row { border-bottom: 1px solid var(--line); background: var(--surface); }
.candidate-row:last-child { border-bottom: 0; }
.candidate-row > summary { min-height: 70px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.candidate-row > summary::-webkit-details-marker, .order-card > summary::-webkit-details-marker { display: none; }
.candidate-row[open] > summary { background: #fafcfa; }
.candidate-name { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 7px; background: #e8eeea; color: var(--ink-2); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.candidate-name p { margin: 0; }
.candidate-name strong, .candidate-name small { display: block; }
.candidate-name strong { font-size: 14px; }
 .candidate-name small { margin-top: 2px; color: var(--ink-2); font-size: 12px; }
.candidate-metrics { display: flex; align-items: center; gap: 16px; }
 .candidate-metrics > span:not(.status) { color: var(--ink-2); font-size: 11px; text-align: right; }
.candidate-metrics > span strong { display: block; color: var(--ink); font-size: 14px; }
.candidate-row[open] .candidate-metrics > svg { transform: rotate(180deg); }
.candidate-detail { padding: 0 14px 14px; }
.distance-source-line { padding: 9px 10px; border-radius: 5px; background: var(--info-soft); color: var(--info); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; }
.ongoing-table { margin-top: 10px; min-width: 700px; }
.ongoing-head, .ongoing-row { display: grid; grid-template-columns: 1fr 2fr .7fr 1fr .65fr; align-items: center; gap: 10px; }
.ongoing-head { min-height: 34px; padding: 0 10px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 750; }
.ongoing-row { min-height: 58px; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.ongoing-row:last-child { border-bottom: 0; }
.ongoing-row > span { min-width: 0; }
.ongoing-row strong, .ongoing-row small { display: block; }
.ongoing-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.evidence-empty { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.action-boundary { padding: 14px 22px; background: #fafcfa; color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 12px; }
.action-boundary svg { width: 15px; height: 15px; color: var(--primary); }

/* Pending order accordions */
.order-accordion { display: grid; gap: 10px; }
.order-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.order-card > summary { min-height: 88px; padding: 14px 16px; display: grid; grid-template-columns: minmax(170px, .8fr) minmax(360px, 1.8fr) auto auto; align-items: center; gap: 18px; cursor: pointer; list-style: none; }
.order-card > summary:hover { background: #fbfdfb; }
.order-card > summary:focus { outline: none; }
.order-card > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.order-card[open] > summary { border-bottom: 1px solid var(--line); background: #fafcfa; }
.order-summary-main { min-width: 0; }
.order-source { color: var(--primary); font-size: 11px; font-weight: 750; }
.order-summary-main strong, .order-summary-main small { display: block; }
.order-summary-main strong { margin-top: 3px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.order-summary-main small { margin-top: 3px; color: var(--hint); font-size: 10px; }
.order-summary-route { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px 24px minmax(0, 1fr); align-items: center; gap: 7px; }
.order-summary-route > span { width: 24px; height: 24px; border-radius: 5px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.order-summary-route > span.end { background: var(--primary-soft); color: var(--primary); }
.order-summary-route p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.order-summary-route svg { width: 14px; color: var(--hint); }
.order-summary-meta { text-align: right; white-space: nowrap; }
.order-summary-meta strong, .order-summary-meta span { display: block; }
.order-summary-meta strong { font-size: 17px; }
.order-summary-meta span { color: var(--muted); font-size: 11px; }
.order-summary-result { display: flex; align-items: center; gap: 8px; }
.order-summary-result > svg { color: var(--muted); transition: transform .18s; }
.order-card[open] .order-summary-result > svg { transform: rotate(180deg); }
.order-card-body { padding: 16px; }
.order-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.order-facts > div { min-height: 66px; padding: 10px 12px; border-right: 1px solid var(--line); display: grid; grid-template-columns: 20px 1fr; align-content: center; column-gap: 7px; }
.order-facts > div:last-child { border-right: 0; }
.order-facts svg { grid-row: 1 / span 2; color: var(--primary); }
.order-facts span { color: var(--muted); font-size: 10px; }
.order-facts strong { font-size: 14px; }
.order-recommendation-copy { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); }
.order-recommendation-copy strong, .order-recommendation-copy span { display: block; }
.order-recommendation-copy strong { font-size: 14px; }
.order-recommendation-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.button.danger-solid { border-color: var(--danger); background: var(--danger); color: #fff; }
.button.danger-solid:hover { border-color: #a92f2f; background: #a92f2f; }
.danger-confirm { padding: 13px; border: 1px solid #f2caca; border-radius: 7px; background: var(--danger-soft); color: var(--danger); display: flex; gap: 10px; }
.danger-confirm svg { flex: none; margin-top: 2px; }
.danger-confirm strong { font-size: 14px; }
.danger-confirm p { margin: 3px 0 0; color: #7d4b4b; font-size: 12px; }
.delete-rule-summary { margin-top: 14px; display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; }
.delete-rule-summary span { color: var(--muted); font-size: 12px; }
.delete-rule-summary strong { font-size: 13px; }

@media (max-width: 1180px) {
  .recommendation-workbench { grid-template-columns: 330px minmax(0, 1fr); }
  .order-card > summary { grid-template-columns: minmax(160px, .8fr) minmax(280px, 1.5fr) auto; }
  .order-summary-result { grid-column: 3; }
  .order-summary-meta { display: none; }
  .candidate-metrics > span:not(.status) { display: none; }
}

@media (max-width: 900px) {
  .recommendation-workbench { display: block; }
  .recommendation-list { position: static; height: auto; min-height: 0; margin-bottom: 14px; }
  .recommendation-list-scroll { max-height: 340px; }
  .order-card > summary { grid-template-columns: 1fr auto; }
  .order-summary-route { grid-column: 1 / -1; grid-row: 2; }
  .order-summary-result { grid-column: 2; grid-row: 1; }
}

@media (max-width: 760px) {
  .page { padding: 20px 14px 38px; }
  .recommendation-filter-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .recommendation-filter-tabs button { width: 100%; padding: 0 7px; justify-content: space-between; gap: 5px; }
  .recommendation-filter-tabs button span { font-size: 11px; }
  .order-search-toolbar, .recommendation-search-toolbar { padding-left: 10px; }
  .order-search-toolbar .button, .recommendation-search-toolbar .button { min-width: 34px; padding: 0 9px; font-size: 0; }
  .order-search-toolbar .button svg, .recommendation-search-toolbar .button svg { margin: 0; width: 16px; height: 16px; }
  .pagination { justify-content: flex-start; gap: 8px; }
  .pagination-total { width: 100%; }
  .pagination-pages { order: 3; width: 100%; justify-content: center; }
  .page-head h1 { font-size: 24px; }
  .page-head p { font-size: 13px; }
  .workspace-tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px 1px; }
  .workspace-tab { min-width: 112px; padding: 0 9px; }
  .workspace-tab span { font-size: 12px; }
  .mode-banner { align-items: flex-start; padding: 10px 12px; flex-wrap: wrap; }
  .mode-banner span { width: 100%; padding-left: 26px; }
  .recommendation-list-scroll { max-height: 290px; }
  .evidence-header { padding: 17px 15px; }
  .evidence-header h2 { font-size: 20px; }
  .route-block { padding: 14px 15px; grid-template-columns: 1fr; }
  .route-block > svg { display: none; }
  .decision-callout { margin: 15px 15px 0; }
  .evidence-section { padding: 18px 15px; }
  .distance-policy { grid-template-columns: 1fr; }
  .candidate-row > summary { align-items: flex-start; }
  .candidate-metrics { gap: 7px; }
  .candidate-metrics .status { font-size: 10px; }
  .candidate-detail { overflow-x: auto; }
  .rule-config { grid-template-columns: 40px minmax(0, 1fr); }
  .rule-value { grid-column: 2; width: 100%; }
  .candidate-checks { min-width: 520px; }
  .order-card > summary { min-height: 0; padding: 13px; gap: 10px; }
  .order-summary-route { grid-template-columns: 22px minmax(0, 1fr); }
  .order-summary-route > svg { display: none; }
  .order-summary-route > span.end { grid-column: 1; }
  .order-summary-route p { font-size: 11px; }
  .order-facts { grid-template-columns: 1fr 1fr; }
  .order-facts > div:nth-child(2) { border-right: 0; }
  .order-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evidence-outcome > strong { display: none; }
  .order-lane-head span { font-size: 11px; }
  .going-order-card footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Dispatch records workbench */
.dispatch-history-status .mode-banner { min-height: 36px; margin-bottom: 10px; }
.dispatch-history-controls { margin-bottom: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); display: grid; grid-template-columns: auto auto minmax(320px, 1fr); align-items: end; gap: 12px 18px; }
.history-filter-block, .history-search-block { min-width: 0; }
.control-label { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 750; display: block; }
.history-filter-block .recommendation-filter-tabs { margin: 0; gap: 4px; }
.history-filter-block .recommendation-filter-tabs button { min-height: 34px; padding: 0 9px; border-radius: 5px; }
.history-filter-block .recommendation-filter-tabs button.active { background: var(--primary); color: #fff; }
.history-filter-block .recommendation-filter-tabs button.active b { background: rgba(255,255,255,.18); color: #fff; }
.history-search-block .recommendation-search-toolbar { width: 100%; margin: 0; }

.recommendation-workbench { grid-template-columns: minmax(380px, 420px) minmax(0, 1fr); gap: 14px; }
.recommendation-list { top: 76px; height: clamp(580px, calc(100vh - 220px), 860px); border-radius: 6px; box-shadow: none; }
.workbench-title { height: 54px; padding: 0 14px; }
.workbench-title > div { min-width: 0; }
.workbench-title strong, .workbench-title span { display: block; }
.workbench-title strong { font-size: 14px; }
.workbench-title span { margin-top: 1px; font-size: 10px; }
.workbench-title > b { min-width: 48px; padding: 4px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 10px; text-align: center; }
.recommendation-list-item { padding: 13px 14px; }
.recommendation-list-item.active { background: #fff5ef; box-shadow: inset 3px 0 var(--primary); }
.recommendation-item-head { min-height: 25px; justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
.recommendation-item-head > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.recommendation-item-head > div > span { color: var(--primary); font-size: 12px; font-weight: 800; }
.recommendation-amount { color: var(--ink); font-size: 13px; }
.recommendation-item-head .dispatch-result-badge { max-width: 210px; overflow: hidden; }
.recommendation-item-head .dispatch-result-badge span { overflow: hidden; text-overflow: ellipsis; }
.recommendation-order-id { min-height: 28px; margin-top: 5px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.recommendation-order-id > strong { flex: none; color: var(--ink); font-size: 14px; }
.recommendation-item-route { margin-top: 9px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.recommendation-item-route > div { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 7px; }
.recommendation-item-route > div > span { width: 22px; height: 22px; border-radius: 4px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.recommendation-item-route > div > span.dropoff { background: var(--primary-soft); color: var(--primary); }
.recommendation-item-route p { margin: 1px 0 0; font-size: 11px; line-height: 1.45; }
.recommendation-item-reason { margin: 9px 0 0; padding: 8px 9px; border: 0; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; }
.recommendation-item-reason svg { width: 15px; height: 15px; margin-top: 1px; color: var(--warn); }
.recommendation-item-reason p { margin: 0; font-size: 11px; line-height: 1.45; }
.recommendation-list-item footer { margin-top: 8px; padding-top: 0; border-top: 0; }
.recommendation-list-item footer span:last-child { color: var(--muted); }
.recommendation-list-item footer span:last-child svg { color: var(--primary); }

.evidence-pane { position: sticky; top: 76px; height: clamp(580px, calc(100vh - 220px), 860px); border-radius: 6px; box-shadow: none; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.evidence-header { min-height: 82px; padding: 16px 18px; background: var(--surface); }
.evidence-header h2 { margin: 3px 0 2px; font-size: 20px; }
.evidence-header h2 small { margin-left: 7px; color: var(--primary); font-size: 14px; }
.evidence-header p { overflow-wrap: anywhere; }
.evidence-summary-grid { border-bottom: 1px solid var(--line); background: var(--surface-2); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.evidence-summary-grid > div { min-height: 58px; padding: 9px 13px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.evidence-summary-grid > div:last-child { border-right: 0; }
.evidence-summary-grid span { color: var(--muted); font-size: 10px; }
.evidence-summary-grid strong { margin-top: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.route-block { padding: 14px 18px; background: var(--surface); }
.decision-callout { margin: 14px 18px 0; padding: 11px 13px; }
.decision-callout strong { font-size: 13px; }
.evidence-section { padding: 18px; }
.section-title { margin-bottom: 12px; }
.section-title h3 { font-size: 15px; }
.section-title p { font-size: 11px; }
.decision-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.decision-step { min-height: 118px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); grid-template-columns: 26px minmax(0, 1fr); gap: 9px; }
.decision-step:nth-child(2n) { border-right: 0; }
.decision-step:nth-last-child(-n+2) { border-bottom: 0; }
.decision-step:not(:last-child)::before { display: none; }
.step-index { width: 26px; height: 26px; border-radius: 5px; }
.step-copy { padding: 1px 0 0; }
.step-copy > div { align-items: flex-start; justify-content: space-between; }
.step-copy > div strong { font-size: 12px; }
.step-copy > div span { flex: none; }
.step-copy > p { margin: 4px 0 7px; font-size: 11px; line-height: 1.45; }
.distance-policy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.distance-policy > div { padding: 11px 12px; background: #f3f7f9; }
.distance-policy strong { font-size: 12px; }
.candidate-row > summary { min-height: 64px; }
.candidate-row.assigned { box-shadow: inset 4px 0 var(--primary); background: #fffaf7; }
.candidate-row.assigned > summary, .candidate-row.assigned[open] > summary { background: #fff3eb; }
.candidate-row.assigned .avatar { background: var(--primary); color: #fff; }
.candidate-row.recommended { box-shadow: inset 4px 0 var(--info); background: #f8fbff; }
.candidate-row.recommended > summary, .candidate-row.recommended[open] > summary { background: #eef6fc; }
.candidate-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.candidate-role-badge { min-height: 20px; padding: 2px 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 800; }
.candidate-role-badge svg { width: 11px; height: 11px; }
.candidate-role-badge.assigned { background: var(--primary); color: #fff; }
.candidate-role-badge.recommended { background: var(--info); color: #fff; }
.action-boundary { padding: 12px 18px; }

@media (max-width: 1180px) {
  .dispatch-history-controls { grid-template-columns: 1fr; }
  .recommendation-workbench { grid-template-columns: 350px minmax(0, 1fr); }
  .evidence-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-route-evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-route-evidence > div:nth-child(2n) { border-right: 0; }
  .state-route-evidence > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evidence-summary-grid > div:nth-child(2) { border-right: 0; }
  .evidence-summary-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .decision-steps { grid-template-columns: 1fr; }
  .decision-step { min-height: 0; border-right: 0; }
  .decision-step:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .distance-policy { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .recommendation-workbench { display: block; }
  .recommendation-list { height: auto; }
  .recommendation-list-scroll { max-height: 410px; }
  .evidence-pane { position: static; height: auto; overflow: hidden; }
}

@media (max-width: 760px) {
  .dispatch-history-controls { padding: 10px; }
  .history-filter-block .recommendation-filter-tabs { display: grid; }
  .recommendation-item-head { align-items: flex-start; }
  .recommendation-item-head .dispatch-result-badge { max-width: 170px; }
  .evidence-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .evidence-outcome { width: 100%; justify-content: space-between; }
  .evidence-summary-grid { grid-template-columns: 1fr 1fr; }
  .state-route-evidence { grid-template-columns: 1fr; }
  .state-route-evidence > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .state-route-evidence > div:last-child { border-bottom: 0; }
  .route-block, .evidence-section { padding-left: 14px; padding-right: 14px; }
  .decision-callout { margin-left: 14px; margin-right: 14px; }
  .candidate-row > summary { align-items: flex-start; flex-direction: column; }
  .candidate-metrics { width: 100%; justify-content: space-between; }
}


/* Dispatch detail redesign: decision-first, audit-on-demand */
.evidence-pane {
  border-color: #d9dee3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.evidence-header {
  min-height: 80px;
  padding: 16px 18px;
  background: #fff;
}
.eyebrow { color: #596168; font-size: 11px; font-weight: 750; }
.evidence-header h2 { margin: 3px 0 2px; color: #16191c; font-size: 20px; }
.evidence-header h2 small { color: var(--primary); font-size: 14px; }
.evidence-header p { color: #626b72; font-size: 11px; }
.evidence-outcome { gap: 12px; }
.evidence-outcome > strong { min-width: 48px; color: #202428; font-size: 21px; line-height: 1; }
.evidence-outcome > strong small { margin-top: 4px; color: #737c83; font-size: 10px; }
.evidence-summary-grid { background: #f7f8fa; }
.evidence-summary-grid > div { min-height: 54px; padding: 9px 12px; }
.evidence-summary-grid span { color: #626b72; font-size: 11px; }
.evidence-summary-grid strong { color: #202428; font-size: 14px; }
.route-block { padding: 13px 18px; background: #fff; }
.route-block p small { color: #6d757c; font-size: 11px; }
.route-block p strong { color: #25292d; font-size: 13px; font-weight: 650; }
.decision-callout {
  margin: 14px 18px 0;
  padding: 13px 14px;
  border: 1px solid #d9dee3;
  border-radius: 7px;
  background: #f8f9fa;
  color: #697178;
}
.decision-callout.positive { border-color: #b9ddcc; background: #f5faf7; color: var(--success); }
.decision-callout.negative { border-color: #e8bdc1; background: #fff7f7; color: var(--danger); }
.decision-callout.neutral { border-color: #e3d39d; background: #fffdf7; color: var(--warn); }
.decision-callout span { color: inherit; font-size: 11px; }
.decision-callout strong { margin-top: 2px; color: #1f2326; font-size: 14px; line-height: 1.5; }
.decision-callout small { display: block; margin-top: 4px; color: #697178; font-size: 11px; }
.candidate-section { padding-top: 18px; background: #fff; }
.candidate-list { border-color: #d9dee3; border-radius: 7px; background: #fff; }
.candidate-row { background: #fff; }
.candidate-row.assigned, .candidate-row.recommended { box-shadow: none; background: #fff; }
.candidate-row.assigned > summary, .candidate-row.assigned[open] > summary,
.candidate-row.recommended > summary, .candidate-row.recommended[open] > summary { background: #fff; }
.candidate-row > summary { min-height: 70px; padding: 12px 14px; }
.candidate-row > summary:hover, .candidate-row[open] > summary { background: #f8f9fa; }
.candidate-row.assigned > summary { box-shadow: inset 0 -1px #e2e5e8; }
.candidate-row.assigned .avatar { background: var(--primary); color: #fff; }
.candidate-row.recommended .avatar { background: #e9f2f8; color: var(--info); }
.candidate-name strong { color: #181b1e; font-size: 15px; }
.candidate-name small { color: #5f686f; font-size: 11px; }
.candidate-role-badge { min-height: 21px; padding: 2px 7px; font-size: 10px; }
.candidate-role-badge.assigned { background: #fff0e7; color: #d94a00; }
.candidate-role-badge.recommended { background: #edf4f8; color: #2e6e9d; }
.candidate-metrics { display: grid; grid-template-columns: repeat(3, minmax(74px, auto)) auto 18px; gap: 12px; }
.candidate-metrics > span:not(.status) { color: #697178; font-size: 10px; }
.candidate-metrics > span strong { color: #1d2124; font-size: 13px; font-variant-numeric: tabular-nums; }
.candidate-detail { padding: 14px; border-top: 1px solid #e2e5e8; background: #fbfcfd; }
.candidate-decision-summary {
  margin-bottom: 10px;
  padding: 12px 13px;
  border: 1px solid #d9dee3;
  border-radius: 7px;
  background: #fff;
}
.candidate-decision-summary.passed { border-color: #b9ddcc; background: #fff; }
.candidate-decision-summary.failed { border-color: #e8bdc1; background: #fff; }
.candidate-decision-summary span { color: #616a71; font-size: 11px; }
.candidate-decision-summary strong { color: #1b1f22; font-size: 14px; line-height: 1.6; }
.candidate-decision-summary small { color: #626b72; font-size: 11px; }
.candidate-fact-grid {
  display: grid;
  grid-template-columns: 1.25fr .72fr .8fr 1.5fr;
  border: 1px solid #d9dee3;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.candidate-fact-grid > div { min-height: 84px; padding: 11px 12px; border-right: 1px solid #e2e5e8; }
.candidate-fact-grid > div:last-child { border-right: 0; }
.candidate-fact-grid span, .candidate-fact-grid strong, .candidate-fact-grid small { display: block; }
.candidate-fact-grid span { color: #626b72; font-size: 11px; font-weight: 650; }
.candidate-fact-grid strong { margin-top: 4px; color: #1d2124; font-size: 14px; line-height: 1.35; }
.candidate-fact-grid small { margin-top: 4px; color: #626b72; font-size: 11px; line-height: 1.45; }
.candidate-fact-grid .fact-failed strong { color: var(--danger); }
.long-order-note { margin-top: 8px; color: #697178; display: flex; align-items: center; gap: 7px; font-size: 11px; }
.long-order-note svg { width: 14px; height: 14px; }
.long-order-note.matched { color: var(--success); }
.candidate-orders-section { margin-top: 10px; border: 1px solid #d9dee3; border-radius: 7px; background: #fff; overflow: hidden; }
.candidate-subsection-head { min-height: 48px; padding: 9px 12px; border-bottom: 1px solid #e2e5e8; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.candidate-subsection-head span, .candidate-subsection-head strong { display: block; }
.candidate-subsection-head span { color: #626b72; font-size: 10px; }
.candidate-subsection-head strong { margin-top: 1px; color: #1f2326; font-size: 13px; }
.candidate-subsection-head > small { color: #737c83; font-size: 10px; }
.ongoing-table { margin-top: 0; min-width: 0; }
.ongoing-head, .ongoing-row { grid-template-columns: 1fr 1.35fr .82fr .62fr .68fr; gap: 7px; }
.ongoing-head { min-height: 32px; padding: 0 12px; background: #f7f8fa; color: #5f686f; font-size: 10px; }
.ongoing-row { min-height: 64px; padding: 9px 12px; color: #353b40; }
.ongoing-row > span > strong { color: #202428; font-size: 12px; line-height: 1.4; }
.ongoing-row small { color: #697178; font-size: 10px; }
.candidate-more-orders { border-top: 1px solid #e2e5e8; }
.candidate-more-orders > summary, .candidate-source-details > summary, .evidence-disclosure > summary {
  min-height: 42px;
  padding: 0 12px;
  color: #3b4349;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.candidate-more-orders > summary::-webkit-details-marker,
.candidate-source-details > summary::-webkit-details-marker,
.evidence-disclosure > summary::-webkit-details-marker { display: none; }
.candidate-more-orders > summary span { font-size: 11px; font-weight: 700; }
.candidate-more-orders > summary svg, .candidate-source-details > summary > svg, .evidence-disclosure > summary > svg { width: 15px; height: 15px; transition: transform .18s var(--ease); }
.candidate-more-orders[open] > summary svg, .candidate-source-details[open] > summary > svg, .evidence-disclosure[open] > summary > svg { transform: rotate(180deg); }
.candidate-rule-summary { margin-top: 10px; margin-bottom: 0; border-color: #d9dee3; background: #fff; }
.candidate-rule-summary.passed, .candidate-rule-summary.failed { background: #fff; }
.candidate-rule-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.candidate-rule-chips > span { min-width: 0; min-height: 52px; border-color: #e2e5e8; background: #f7f8fa; }
.candidate-rule-chips .passed { border-color: #d7e5dd; background: #f7faf8; }
.candidate-rule-chips .failed { border-color: #edc9cc; background: #fff7f7; }
.candidate-rule-details > summary { color: #4e575e; }
.candidate-source-details { margin-top: 10px; border: 1px solid #d9dee3; border-radius: 7px; background: #fff; }
.candidate-source-details > summary > span, .evidence-disclosure > summary > span { display: flex; align-items: center; gap: 8px; }
.candidate-source-details > summary svg, .evidence-disclosure > summary span svg { width: 15px; height: 15px; color: #657078; }
.candidate-source-details > summary b, .evidence-disclosure > summary b { color: #252a2e; font-size: 12px; }
.candidate-source-details > summary small, .evidence-disclosure > summary small { color: #697178; font-size: 11px; }
.candidate-source-details.incomplete > summary b { color: var(--danger); }
.candidate-source-grid { border-top: 1px solid #e2e5e8; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.candidate-source-grid > div { min-height: 58px; padding: 9px 12px; border-right: 1px solid #e2e5e8; }
.candidate-source-grid > div:last-child { border-right: 0; }
.candidate-source-grid span, .candidate-source-grid strong { display: block; }
.candidate-source-grid span { color: #697178; font-size: 10px; }
.candidate-source-grid strong { margin-top: 2px; color: #252a2e; font-size: 13px; }
.candidate-source-details > p { margin: 0; padding: 9px 12px; border-top: 1px solid #e2e5e8; color: #626b72; font-size: 11px; }
.candidate-orders-empty { margin-top: 10px; padding: 12px; border: 1px solid #d9dee3; border-radius: 7px; background: #fff; display: flex; align-items: center; gap: 10px; }
.candidate-orders-empty svg { color: var(--success); }
.candidate-orders-empty strong, .candidate-orders-empty span { display: block; }
.candidate-orders-empty strong { color: #202428; font-size: 13px; }
.candidate-orders-empty span { color: #697178; font-size: 11px; }
.audit-section { background: #f7f8fa; }
.evidence-disclosure { margin-top: 8px; border: 1px solid #d9dee3; border-radius: 7px; background: #fff; overflow: hidden; }
.evidence-disclosure:first-of-type { margin-top: 0; }
.evidence-disclosure > summary { min-height: 48px; }
.evidence-disclosure .decision-steps { margin: 0; border: 0; border-top: 1px solid #e2e5e8; border-radius: 0; }
.audit-copy { padding: 13px 14px; border-top: 1px solid #e2e5e8; }
.audit-copy strong { color: #202428; font-size: 13px; }
.audit-copy p { margin: 4px 0 0; color: #626b72; font-size: 11px; line-height: 1.55; }
.action-boundary { background: #fff; color: #697178; }
.action-boundary svg { color: #697178; }
@media (max-width: 1180px) {
  .candidate-metrics { grid-template-columns: repeat(2, minmax(74px, auto)) auto 18px; }
  .candidate-metrics > span:nth-child(3) { display: none; }
  .candidate-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-fact-grid > div { border-bottom: 1px solid #e2e5e8; }
  .candidate-fact-grid > div:nth-child(2n) { border-right: 0; }
  .candidate-fact-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .candidate-rule-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .candidate-metrics { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)) auto 18px; }
  .candidate-metrics > span:nth-child(3) { display: block; }
  .candidate-fact-grid { grid-template-columns: 1fr; }
  .candidate-fact-grid > div { border-right: 0; border-bottom: 1px solid #e2e5e8; }
  .candidate-fact-grid > div:last-child { border-bottom: 0; }
  .candidate-rule-chips, .candidate-source-grid { grid-template-columns: 1fr; }
  .candidate-source-grid > div { border-right: 0; border-bottom: 1px solid #e2e5e8; }
  .candidate-source-grid > div:last-child { border-bottom: 0; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .candidate-metrics > span:nth-child(-n+2) { display: block; }
  .candidate-metrics > span:nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  .candidate-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; row-gap: 8px; }
  .candidate-metrics > span:not(.status) { display: block; text-align: left; }
  .candidate-metrics .status { grid-column: 1 / 4; justify-self: start; }
  .candidate-metrics > svg { grid-column: 4; grid-row: 1 / 3; align-self: center; }
}


/* Dispatch report v4: continuous evidence layout */
.decision-flow-section,
.candidate-section,
.cancelled-rider-line { padding: 20px 22px; border-top: 1px solid #e2e6e9; background: #fff; }
.decision-flow-section { margin-top: 18px; }
.decision-steps-inline { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); border: 1px solid #dfe3e6; border-radius: 7px; overflow-x: auto; background: #fff; }
.decision-steps-inline .decision-step { min-width: 210px; padding: 14px; border: 0; border-right: 1px solid #e2e6e9; background: #fff; align-items: flex-start; }
.decision-steps-inline .decision-step:last-child { border-right: 0; }
.decision-steps-inline .step-copy p { min-height: 42px; color: #4c555c; font-size: 12px; line-height: 1.55; }
.decision-steps-inline .step-copy footer { align-items: flex-start; gap: 5px; }

.candidate-switcher { margin: 14px 0 0; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.candidate-switch { flex: 0 0 auto; min-width: 178px; min-height: 58px; padding: 9px 12px; border: 1px solid #dfe3e6; border-radius: 7px; background: #fff; color: #252a2e; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.candidate-switch:hover { border-color: #b8c0c6; background: #fafbfc; }
.candidate-switch.active { border-color: var(--primary); background: #fff8f2; box-shadow: 0 0 0 2px rgba(242, 105, 26, .12); }
.candidate-switch span, .candidate-switch b, .candidate-switch small { display: block; }
.candidate-switch b { color: #202428; font-size: 14px; }
.candidate-switch small { margin-top: 2px; color: #626b72; font-size: 11px; }
.candidate-switch > strong { color: #697178; font-size: 11px; white-space: nowrap; }
.candidate-switch.failed:not(.active) > strong { color: var(--danger); }
.candidate-switch.assigned.active > strong,
.candidate-switch.recommended.active > strong { color: var(--primary); }

.candidate-workspace { border: 1px solid #dfe3e6; border-radius: 7px; overflow: hidden; background: #fff; }
.candidate-report[hidden] { display: none !important; }
.candidate-report { background: #fff; }
.candidate-report-head { min-height: 78px; padding: 14px 16px; border-bottom: 1px solid #e2e6e9; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfcfc; }
.candidate-report-head .candidate-metrics { flex: 0 0 auto; }
.candidate-report .candidate-decision-summary { margin: 0; padding: 14px 16px; border: 0; border-bottom: 1px solid #e2e6e9; border-radius: 0; background: #fff; }
.candidate-report .candidate-decision-summary.passed { border-left: 3px solid var(--success); }
.candidate-report .candidate-decision-summary.failed { border-left: 3px solid var(--danger); }
.candidate-report .candidate-decision-summary strong { font-size: 14px; line-height: 1.62; }
.candidate-report .candidate-decision-summary small { margin-top: 5px; color: #59636a; font-size: 12px; }
.candidate-report .candidate-fact-grid { margin: 0; border: 0; border-bottom: 1px solid #e2e6e9; border-radius: 0; }
.candidate-report .long-order-note { margin: 0; border: 0; border-bottom: 1px solid #e2e6e9; border-radius: 0; }

.candidate-source-status { border-bottom: 1px solid #e2e6e9; background: #f8faf9; }
.source-status-title { min-height: 52px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.source-status-title > svg { width: 18px; height: 18px; color: var(--success); flex: none; }
.candidate-source-status.incomplete .source-status-title > svg,
.candidate-source-status.incomplete .source-status-title > b { color: var(--danger); }
.source-status-title > div { min-width: 0; flex: 1; }
.source-status-title strong, .source-status-title span { display: block; }
.source-status-title strong { color: #252a2e; font-size: 13px; }
.source-status-title span { margin-top: 2px; color: #626b72; font-size: 11px; }
.source-status-title > b { color: var(--success); font-size: 11px; white-space: nowrap; }
.candidate-source-status .candidate-source-grid { border-top: 1px solid #e2e6e9; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.candidate-source-status > p { margin: 0; padding: 9px 16px; border-top: 1px solid #e2e6e9; color: #59636a; font-size: 11px; line-height: 1.5; }

.candidate-report-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(350px, 2fr); align-items: start; }
.candidate-report-main { min-width: 0; border-right: 1px solid #e2e6e9; }
.candidate-report-rules { min-width: 0; position: sticky; top: 0; }
.candidate-route-analysis,
.candidate-orders-section { padding: 16px; background: #fff; }
.candidate-route-analysis { border-bottom: 1px solid #e2e6e9; }
.candidate-subsection-head { margin: 0 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.candidate-subsection-head > div span,
.candidate-subsection-head > div strong { display: block; }
.candidate-subsection-head > div span { color: #697178; font-size: 11px; font-weight: 700; }
.candidate-subsection-head > div strong { margin-top: 2px; color: #202428; font-size: 14px; }
.candidate-subsection-head > small { color: #697178; font-size: 11px; text-align: right; }
.route-metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e0e4e7; border-radius: 6px; overflow: hidden; }
.route-metric-strip > div { min-height: 76px; padding: 11px 12px; border-right: 1px solid #e2e6e9; display: grid; align-content: center; }
.route-metric-strip > div:last-child { border-right: 0; }
.route-metric-strip span, .route-metric-strip strong, .route-metric-strip small { display: block; }
.route-metric-strip span { color: #697178; font-size: 10px; }
.route-metric-strip strong { margin-top: 3px; color: #202428; font-size: 15px; }
.route-metric-strip small { margin-top: 2px; color: #697178; font-size: 10px; }
.route-language { margin-top: 10px; min-height: 48px; padding: 9px 12px; border-left: 3px solid #77828a; background: #f6f7f8; display: flex; align-items: center; gap: 10px; }
.route-language svg { width: 18px; height: 18px; color: #59636a; }
.route-language span, .route-language strong { display: block; }
.route-language span { color: #697178; font-size: 10px; }
.route-language strong { margin-top: 2px; color: #2b3135; font-size: 12px; }

.candidate-orders-scroll { max-height: 340px; overflow: auto; border: 1px solid #e0e4e7; border-radius: 6px; scrollbar-width: thin; }
.candidate-orders-scroll .ongoing-head { position: sticky; top: 0; z-index: 1; background: #f3f5f6; }
.candidate-orders-scroll .ongoing-row { background: #fff; }
.candidate-orders-scroll .ongoing-row:last-child { border-bottom: 0; }

.candidate-report-rules .candidate-rule-summary { margin: 0; padding: 16px; border: 0; border-radius: 0; background: #fff; }
.candidate-rule-table { border: 1px solid #e0e4e7; border-radius: 6px; overflow: hidden; }
.candidate-rule-row { min-height: 52px; padding: 8px 10px; border-bottom: 1px solid #e6e9eb; display: grid; grid-template-columns: minmax(145px, 1.5fr) 64px minmax(70px, .7fr) minmax(70px, .7fr); align-items: center; gap: 8px; color: #30363a; font-size: 11px; }
.candidate-rule-row:last-child { border-bottom: 0; }
.candidate-rule-row > span { min-width: 0; }
.candidate-rule-row > span:first-child strong,
.candidate-rule-row > span:first-child small { display: block; }
.candidate-rule-row > span:first-child strong { color: #252a2e; font-size: 11px; }
.candidate-rule-row > span:first-child small { margin-top: 2px; color: #778087; font-size: 9px; overflow-wrap: anywhere; }
.candidate-rule-row b { font-size: 11px; }
.candidate-rule-row.passed b { color: var(--success); }
.candidate-rule-row.failed { background: #fff7f7; box-shadow: inset 3px 0 0 var(--danger); }
.candidate-rule-row.failed b { color: var(--danger); }
.candidate-rule-row.disabled { background: #fafafa; color: #8b9297; }
.candidate-rule-head { min-height: 34px; background: #f3f5f6; color: #626b72; font-size: 10px; font-weight: 700; }

.cancelled-rider-line { display: flex; align-items: flex-start; gap: 11px; background: #fafbfc; }
.cancelled-rider-line > svg { width: 18px; height: 18px; margin-top: 2px; color: #68737a; flex: none; }
.cancelled-rider-line span, .cancelled-rider-line strong { display: block; }
.cancelled-rider-line span { color: #697178; font-size: 11px; font-weight: 700; }
.cancelled-rider-line strong { margin-top: 2px; color: #252a2e; font-size: 13px; }
.cancelled-rider-line p { margin: 4px 0 0; color: #59636a; font-size: 12px; line-height: 1.55; }
.action-boundary-final { min-height: 64px; padding: 12px 22px; justify-content: flex-start; gap: 11px; border-top: 1px solid #e2e6e9; background: #fff; }
.action-boundary-final > div { min-width: 0; flex: 1; }
.action-boundary-final strong, .action-boundary-final span { display: block; }
.action-boundary-final strong { color: #252a2e; font-size: 12px; }
.action-boundary-final > div > span { margin-top: 2px; color: #626b72; font-size: 11px; }
.action-boundary-final .dispatch-result-badge { flex: none; }


.recommendation-workbench { grid-template-columns: minmax(310px, 34%) minmax(0, 1fr); }
.candidate-workspace { container-type: inline-size; }
@container (max-width: 820px) {
  .candidate-report-columns { grid-template-columns: 1fr; }
  .candidate-report-main { border-right: 0; border-bottom: 1px solid #e2e6e9; }
  .candidate-report-rules { position: static; }
  .route-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-metric-strip > div:nth-child(2) { border-right: 0; }
  .route-metric-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e2e6e9; }
}
@container (max-width: 560px) {
  .candidate-source-status .candidate-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-source-status .candidate-source-grid > div:nth-child(2) { border-right: 0; }
}

@media (max-width: 1120px) {
  .decision-steps-inline { grid-template-columns: repeat(4, minmax(230px, 1fr)); }
  .candidate-report-columns { grid-template-columns: 1fr; }
  .candidate-report-main { border-right: 0; border-bottom: 1px solid #e2e6e9; }
  .candidate-report-rules { position: static; }
}
@media (max-width: 760px) {
  .decision-flow-section, .candidate-section, .cancelled-rider-line { padding: 16px; }
  .candidate-report-head { align-items: flex-start; flex-direction: column; }
  .candidate-report-head .candidate-metrics { width: 100%; }
  .candidate-source-status .candidate-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-source-status .candidate-source-grid > div:nth-child(2) { border-right: 0; }
  .route-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-metric-strip > div:nth-child(2) { border-right: 0; }
  .route-metric-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e2e6e9; }
  .candidate-subsection-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .candidate-subsection-head > small { text-align: left; }
}
@media (max-width: 480px) {
  .candidate-switch { min-width: 158px; }
  .candidate-report-head, .candidate-route-analysis, .candidate-orders-section, .candidate-report-rules .candidate-rule-summary { padding: 13px; }
  .candidate-rule-row { grid-template-columns: minmax(118px, 1.4fr) 54px 62px 62px; gap: 5px; padding: 8px; }
  .candidate-rule-row > span:first-child small { display: none; }
  .candidate-source-status .candidate-source-grid { grid-template-columns: 1fr; }
  .candidate-source-status .candidate-source-grid > div { border-right: 0; }
  .route-metric-strip { grid-template-columns: 1fr; }
  .route-metric-strip > div { min-height: 62px; border-right: 0; border-bottom: 1px solid #e2e6e9; }
  .route-metric-strip > div:last-child { border-bottom: 0; }
  .decision-callout { margin-left: 14px; margin-right: 14px; }
}

/* Dispatch report v4 readability hardening */
.candidate-report .candidate-metrics > span,
.candidate-report .candidate-metrics .status,
.candidate-source-grid span,
.route-metric-strip span,
.route-metric-strip small,
.route-language span,
.ongoing-head,
.ongoing-row small,
.candidate-rule-row > span:first-child small,
.candidate-rule-head { font-size: 11px; }
.candidate-report .candidate-metrics > span { color: #59636a; }
.candidate-source-grid span,
.route-metric-strip span,
.route-metric-strip small,
.route-language span,
.ongoing-row small,
.candidate-rule-row > span:first-child small { color: #626b72; }
@media (max-width: 480px) {
  .candidate-rule-table { overflow: hidden; }
  .candidate-rule-head { display: none; }
  .candidate-rule-row:not(.candidate-rule-head) { min-height: 76px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 10px; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(1) { grid-column: 1; grid-row: 1; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(2) { grid-column: 2; grid-row: 1; text-align: right; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(3) { grid-column: 1; grid-row: 2; color: #4f5960; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(4) { grid-column: 2; grid-row: 2; color: #4f5960; text-align: right; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(3)::before { content: '实际值 '; color: #7a8389; }
  .candidate-rule-row:not(.candidate-rule-head) > span:nth-child(4)::before { content: '门槛 '; color: #7a8389; }
}


/* Dispatch report v5: wide route area and compact rules */
.candidate-report-columns { grid-template-columns: minmax(0, 1fr) minmax(210px, 30%); }
.candidate-report-main { border-right: 1px solid #e2e6e9; border-bottom: 0; }
.candidate-report-rules { position: static; min-width: 0; background: #fafbfc; }
.candidate-report-rules .candidate-rule-summary { padding: 14px 12px; background: #fafbfc; }
.candidate-report-rules .candidate-subsection-head { margin-bottom: 10px; }
.candidate-report-rules .candidate-subsection-head > div strong { font-size: 13px; }

.compact-rule-list { border-top: 1px solid #dde2e5; }
.compact-rule { padding: 10px 8px; border-bottom: 1px solid #e1e5e8; background: transparent; }
.compact-rule:last-child { border-bottom: 0; }
.compact-rule.failed { margin: 0 -2px; padding-left: 10px; border-left: 3px solid var(--danger); background: #fff6f6; }
.compact-rule.disabled { opacity: .62; }
.compact-rule-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.compact-rule-title strong { min-width: 0; color: #252a2e; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.compact-rule-title b { flex: none; color: var(--success); font-size: 11px; }
.compact-rule.failed .compact-rule-title b { color: var(--danger); }
.compact-rule.disabled .compact-rule-title b { color: #747d83; }
.compact-rule-values { margin-top: 6px; display: grid; grid-template-columns: 1fr; gap: 3px; }
.compact-rule-values span { color: #6a7379; font-size: 11px; line-height: 1.4; }
.compact-rule-values span strong { color: #333a3f; font-size: 11px; font-weight: 700; }
.compact-rule.failed .compact-rule-values span:first-child strong { color: var(--danger); }

.ongoing-order-list { max-height: 420px; padding: 0; border: 1px solid #dfe3e6; border-radius: 6px; overflow-y: auto; overflow-x: hidden; background: #fff; }
.ongoing-order-item { padding: 12px 13px; border-bottom: 1px solid #e2e6e9; background: #fff; }
.ongoing-order-item:last-child { border-bottom: 0; }
.ongoing-order-item header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ongoing-order-item header > div { min-width: 0; }
.ongoing-order-item header strong,
.ongoing-order-item header small { display: block; }
.ongoing-order-item header strong { color: #252a2e; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ongoing-order-item header small { margin-top: 2px; color: #626b72; font-size: 11px; overflow-wrap: anywhere; }
.ongoing-order-state { flex: none; padding: 3px 6px; border-radius: 4px; background: #f1f3f4; color: #4f5960; font-size: 11px; font-weight: 700; }
.ongoing-order-address { margin-top: 9px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 7px; }
.ongoing-order-address span { width: 28px; height: 22px; border-radius: 4px; background: #fff2e9; color: var(--primary); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.ongoing-order-address strong { min-width: 0; color: #252a2e; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; word-break: break-word; }
.ongoing-order-item footer { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #e1e5e8; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ongoing-order-item footer > span { min-width: 0; }
.ongoing-order-item footer small,
.ongoing-order-item footer strong,
.ongoing-order-item footer em { display: block; }
.ongoing-order-item footer small { color: #737c82; font-size: 10px; }
.ongoing-order-item footer strong { margin-top: 2px; color: #30363a; font-size: 12px; overflow-wrap: anywhere; }
.ongoing-order-item footer em { margin-top: 1px; color: #737c82; font-size: 10px; font-style: normal; overflow-wrap: anywhere; }
.candidate-route-analysis { padding-right: 18px; padding-left: 18px; }
.candidate-orders-section { padding-right: 18px; padding-left: 18px; }

@container (max-width: 560px) {
  .candidate-report-columns { grid-template-columns: 1fr; }
  .candidate-report-main { border-right: 0; border-bottom: 1px solid #e2e6e9; }
  .candidate-report-rules .candidate-rule-summary { padding: 14px; background: #fff; }
  .compact-rule-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 380px) {
  .ongoing-order-item footer { grid-template-columns: 1fr 1fr; }
  .ongoing-order-item footer > span:last-child { grid-column: 1 / -1; }
  .compact-rule-values { grid-template-columns: 1fr; }
}

/* Inquiry pricing archive */
.inquiry-filters { align-items: end; }
.inquiry-filters .field { min-width: 150px; }
.inquiry-filters .filter-note { margin-left: auto; color: #69737a; font-size: 12px; }
.inquiry-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inquiry-overview-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); }
.price-distribution { display: flex; flex-wrap: wrap; gap: 5px; min-width: 180px; }
.price-distribution span { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 6px; border: 1px solid #dfe4e7; border-radius: 5px; background: #f8fafb; white-space: nowrap; }
.price-distribution b { color: #242a2e; font-size: 12px; }
.price-distribution small { color: #747d83; font-size: 10px; }
.table-sub { display: block; margin-top: 3px; color: #737d83; font-size: 11px; }
.field.grow { min-width: 240px; flex: 1; }
.inquiry-archive-toolbar .filter-note { margin-left: auto; color: #69737a; font-size: 12px; }
.merchant-dossier-list { display: grid; }
.merchant-dossier { border-bottom: 1px solid var(--line); }
.merchant-dossier:last-child { border-bottom: 0; }
.merchant-dossier > summary { min-height: 72px; padding: 12px 14px; display: grid; grid-template-columns: minmax(210px, 1fr) auto 20px; align-items: center; gap: 16px; list-style: none; cursor: pointer; transition: background .16s var(--ease); }
.merchant-dossier > summary::-webkit-details-marker { display: none; }
.merchant-dossier > summary:hover { background: #f8fafb; }
.merchant-dossier[open] > summary { background: #f7f9fa; border-bottom: 1px solid var(--line); }
.merchant-dossier-title { min-width: 0; }
.merchant-dossier-title strong, .merchant-dossier-title span { display: block; }
.merchant-dossier-title strong { overflow-wrap: anywhere; font-size: 14px; }
.merchant-dossier-title span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.merchant-dossier-summary { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.merchant-dossier-summary > span:not(.status) { color: var(--muted); font-size: 11px; white-space: nowrap; }
.merchant-dossier-summary b { margin-left: 3px; color: var(--ink); font-size: 13px; }
.merchant-dossier-toggle { width: 17px; height: 17px; color: var(--muted); transition: transform .18s var(--ease); }
.merchant-dossier[open] .merchant-dossier-toggle { transform: rotate(180deg); }
.merchant-dossier-body { padding: 0 14px 14px; background: #fbfcfd; }
.merchant-dossier-meta { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; }
.merchant-dossier-meta span:first-child { color: var(--ink-2); font-weight: 700; }
.warning-text { color: var(--warn); }
.success-text { color: var(--success); }
.price-more { align-self: center; color: var(--muted); font-size: 10px; white-space: nowrap; }

.pagination { min-height: 56px; padding: 10px 14px; border-top: 1px solid #e2e6e9; display: flex; align-items: center; justify-content: center; gap: 14px; }
.pagination span { color: #687279; font-size: 12px; }
@media (max-width: 1100px) {
  .inquiry-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-overview-grid { grid-template-columns: 1fr; }
  .inquiry-filters .filter-note { width: 100%; margin-left: 0; }
}
@media (max-width: 640px) {
  .inquiry-metrics { grid-template-columns: 1fr; }
  .inquiry-filters .field, .field.grow { min-width: 100%; }
  .inquiry-archive-toolbar .filter-note { width: 100%; margin-left: 0; }
  .merchant-dossier { min-width: 0; overflow: hidden; }
  .merchant-dossier > summary { width: 100%; min-width: 0; padding: 12px; grid-template-columns: minmax(0, 1fr) 18px; gap: 8px; }
  .merchant-dossier-summary { min-width: 0; grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; gap: 6px 12px; }
  .merchant-dossier-summary > span:not(.status) { white-space: normal; }
  .merchant-dossier-toggle { grid-column: 2; grid-row: 1; }
  .merchant-dossier-body { min-width: 0; padding: 0 8px 10px; }
  .merchant-dossier-body .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
  .merchant-dossier-meta { padding: 7px 4px; }
  .pagination { justify-content: space-between; }
}


.fallback-config-workspace { display: grid; gap: 14px; }
.fallback-config-workspace > .panel { margin: 0; }
.fallback-runtime-strip { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.fallback-runtime-strip > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 10px; }
.fallback-runtime-strip span { color: var(--muted); font-size: 10px; font-weight: 750; }
.fallback-runtime-strip strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.fallback-runtime-strip small { grid-column: 2; color: var(--hint); font-size: 10px; }
.fallback-primary-switch { margin-bottom: 16px; padding: 2px 0 16px; border-bottom: 1px solid var(--line); }
.fallback-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.fallback-config-grid .field { min-width: 0; }
.fallback-readonly-field { min-height: 98px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); display: flex; flex-direction: column; }
.fallback-readonly-field label { color: var(--muted); font-size: 11px; font-weight: 750; }
.fallback-readonly-field strong { margin-top: 8px; font-size: 19px; line-height: 1.2; }
.fallback-readonly-field small { margin-top: auto; padding-top: 8px; color: var(--hint); font-size: 10px; line-height: 1.45; }
.fallback-config-note { margin-top: 14px; padding: 11px 12px; border-radius: 7px; background: var(--info-soft); color: var(--ink); display: flex; align-items: flex-start; gap: 8px; font-size: 11px; line-height: 1.55; }
.fallback-config-note i { width: 17px; height: 17px; flex: 0 0 auto; color: var(--info); }
.fallback-preview { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--hint); border-radius: 8px; background: var(--surface); }
.fallback-preview.enabled { border-left-color: var(--success); background: var(--success-soft); }
.fallback-preview.disabled { border-left-color: var(--hint); background: var(--surface-2); }
.fallback-preview > div { display: flex; align-items: center; gap: 7px; }
.fallback-preview > div i { width: 17px; height: 17px; color: var(--primary); }
.fallback-preview > div span { color: var(--muted); font-size: 10px; font-weight: 800; }
.fallback-preview p { margin: 7px 0 4px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.6; }
.fallback-preview small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.fallback-timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fallback-timeline-item { min-height: 122px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: flex; gap: 11px; }
.fallback-timeline-item > b { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: 0 0 auto; font-size: 10px; }
.fallback-timeline-item strong, .fallback-timeline-item span { display: block; }
.fallback-timeline-item strong { font-size: 13px; }
.fallback-timeline-item span { margin-top: 3px; color: var(--primary); font-size: 10px; font-weight: 750; }
.fallback-timeline-item p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.fallback-fixed-summary { padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.fallback-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fallback-summary-head h2 { margin: 0; font-size: 15px; }
.fallback-summary-head > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.fallback-summary-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fallback-summary-grid > div { min-height: 88px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.fallback-summary-grid > div.warn { border-color: rgba(212, 136, 24, .3); background: var(--warning-soft); }
.fallback-summary-grid span, .fallback-summary-grid strong, .fallback-summary-grid small { display: block; }
.fallback-summary-grid span { color: var(--muted); font-size: 10px; font-weight: 750; }
.fallback-summary-grid strong { margin-top: 5px; font-size: 12px; }
.fallback-summary-grid small { margin-top: 5px; color: var(--hint); font-size: 10px; line-height: 1.5; }
.fallback-rule-details { margin-top: 12px; border-top: 1px solid var(--line); }
.fallback-rule-details > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; color: var(--ink-2); font-size: 11px; font-weight: 750; }
.fallback-rule-details > summary::-webkit-details-marker { display: none; }
.fallback-rule-details > summary i { width: 16px; height: 16px; color: var(--muted); transition: transform .18s var(--ease); }
.fallback-rule-details[open] > summary i { transform: rotate(180deg); }
.fallback-rule-details-body { padding: 2px 0 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fallback-rule-details-body > div { padding: 11px 12px; border-radius: 7px; background: var(--surface-2); }
.fallback-rule-details-body h3 { margin: 0 0 7px; font-size: 12px; }
.fallback-rule-details-body ul, .fallback-rule-details-body ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.65; }

@media (max-width: 980px) {
  .fallback-config-grid, .fallback-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fallback-timeline, .fallback-rule-details-body { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .fallback-runtime-strip, .fallback-config-grid, .fallback-summary-grid, .fallback-timeline { grid-template-columns: 1fr; }
}




/* Dispatch center fallback status and tags */
.dispatch-result-badge.waiting { border-color: #e7cf86; background: var(--warn-soft); color: var(--warn); }
.candidate-switch.fallback > strong { color: var(--primary); }
.candidate-identity-badge { min-height: 20px; padding: 2px 7px; border-radius: 4px; font-size: 9px; font-weight: 850; }
.candidate-identity-badge.premium { background: var(--primary-soft); color: var(--primary); }
.candidate-identity-badge.fallback { background: var(--warn-soft); color: #9a6100; }
.candidate-tag-list { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.candidate-tag-list span { max-width: 220px; padding: 3px 7px; border: 1px solid #dfe3e6; border-radius: 999px; background: #fff; color: #4f5960; font-size: 10px; font-weight: 700; line-height: 1.3; }
.candidate-tag-list.empty span { color: var(--muted); font-weight: 600; }
.candidate-report.fallback .candidate-report-head { align-items: flex-start; }
.candidate-report.fallback .candidate-decision-summary { border-left-color: var(--warn); }
.candidate-report-columns.fallback { grid-template-columns: 1fr; }
.fallback-candidate-factors { padding: 16px 18px; }
.fallback-factor-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #e2e6e9; border-radius: 7px; overflow: hidden; }
.fallback-factor-grid > div { min-height: 76px; padding: 11px 12px; border-right: 1px solid #e2e6e9; border-bottom: 1px solid #e2e6e9; background: #fff; }
.fallback-factor-grid > div:nth-child(3n) { border-right: 0; }
.fallback-factor-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.fallback-factor-grid span, .fallback-factor-grid strong { display: block; }
.fallback-factor-grid span { color: var(--muted); font-size: 10px; font-weight: 750; }
.fallback-factor-grid strong { margin-top: 6px; color: var(--ink); font-size: 12px; line-height: 1.45; }
.fallback-factor-grid .positive strong { color: var(--success); }
.fallback-factor-grid .warning strong { color: var(--warn); }
@media (max-width: 900px) { .fallback-factor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fallback-factor-grid > div, .fallback-factor-grid > div:nth-child(3n) { border-right: 1px solid #e2e6e9; border-bottom: 1px solid #e2e6e9; } .fallback-factor-grid > div:nth-child(2n) { border-right: 0; } .fallback-factor-grid > div:nth-last-child(-n+2) { border-bottom: 0; } }
@media (max-width: 560px) { .fallback-factor-grid { grid-template-columns: 1fr; } .fallback-factor-grid > div, .fallback-factor-grid > div:nth-child(2n), .fallback-factor-grid > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e2e6e9; } .fallback-factor-grid > div:last-child { border-bottom: 0; } }

/* Unified dispatch workspace */
.dispatch-unified-center { min-width: 0; }
.dispatch-unified-metrics { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.dispatch-unified-grid { min-height: calc(100vh - 286px); margin-top: 10px; display: grid; grid-template-columns: minmax(330px, 30%) minmax(500px, 45%) minmax(320px, 25%); }
.dispatch-unified-stream, .dispatch-unified-grid > .dispatch-decision-panel, .dispatch-unified-grid > .dispatch-candidate-panel { min-width: 0; min-height: 0; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.dispatch-unified-grid > .dispatch-decision-panel, .dispatch-unified-grid > .dispatch-candidate-panel { border-left: 0; }
.dispatch-unified-stream { border-radius: 5px 0 0 5px; display: flex; flex-direction: column; }
.dispatch-unified-grid > .dispatch-candidate-panel { border-radius: 0 5px 5px 0; }
.dispatch-unified-stream > header { min-height: 62px; padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.dispatch-unified-stream > header h2 { margin: 0; font-size: 18px; }
.dispatch-unified-stream > header span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.dispatch-unified-search { min-height: 42px; margin: 10px 10px 8px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; gap: 7px; }
.dispatch-unified-search > svg { width: 15px; color: var(--muted); }
.dispatch-unified-search input { min-width: 0; height: 32px; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.dispatch-unified-search .icon-button { width: 31px; height: 31px; }
.dispatch-unified-filters { padding: 0 10px 9px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
.dispatch-unified-filters select { min-width: 0; height: 34px; padding: 0 24px 0 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-2); font-size: 11px; }
.dispatch-unified-filters label { min-height: 34px; grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.dispatch-unified-filters label input { accent-color: var(--primary); }
.dispatch-unified-groups { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-stream-group { border-top: 1px solid var(--line); }
.dispatch-stream-group-head { width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; gap: 7px; text-align: left; cursor: pointer; }
.dispatch-stream-group-head > span { min-width: 0; flex: 1; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; }
.dispatch-stream-group-head > span svg, .dispatch-stream-group-head > svg { width: 15px; }
.dispatch-stream-group-head > b { min-width: 22px; color: var(--muted); font-size: 11px; text-align: right; }
.dispatch-stream-group-head > svg:last-child { color: var(--muted); transition: transform .16s var(--ease); }
.dispatch-stream-group.collapsed .dispatch-stream-group-head > svg:last-child { transform: rotate(-90deg); }
.dispatch-stream-group.collapsed .dispatch-stream-group-list { display: none; }
.dispatch-stream-row { width: 100%; min-height: 76px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; grid-template-columns: minmax(54px, .7fr) minmax(90px, 1.15fr) minmax(66px, .85fr) auto; align-items: center; gap: 7px; text-align: left; cursor: pointer; }
.dispatch-stream-row:hover { background: #f8fafb; }
.dispatch-stream-row.active { background: #fff6ef; box-shadow: inset 0 0 0 1px #ff8a46; }
.dispatch-stream-row.linked { box-shadow: inset 3px 0 0 #3d9ca0; }
.dispatch-stream-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-stream-row strong { font-size: 12px; }
.dispatch-stream-row span, .dispatch-stream-row time { color: var(--muted); font-size: 11px; }
.dispatch-stream-row b { padding: 3px 5px; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.dispatch-stream-row b.success { background: var(--success-soft); color: var(--success); }
.dispatch-stream-row b.warning { background: var(--warn-soft); color: var(--warn); }
.dispatch-stream-row b.danger { background: var(--danger-soft); color: var(--danger); }
.dispatch-stream-row b.info { background: var(--info-soft); color: var(--info); }
.dispatch-stream-id { display: flex; align-items: center; gap: 4px; color: var(--primary) !important; font-weight: 800; }
.dispatch-stream-id svg, .dispatch-stream-rider svg { width: 12px; flex: 0 0 auto; }
.dispatch-stream-rider { display: flex; align-items: center; gap: 5px; color: var(--ink-2) !important; }
.dispatch-stream-empty { min-height: 64px; padding: 18px 12px; color: var(--muted); font-size: 11px; text-align: center; }
.dispatch-context-pane, .dispatch-context-side { min-height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-context-pane > header, .dispatch-context-side > header { min-height: 84px; padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-context-pane > header h2, .dispatch-context-side > header h2 { margin: 4px 0 0; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.dispatch-context-pane > header span, .dispatch-context-side > header span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dispatch-context-pane > header small, .dispatch-context-side > header small { color: var(--muted); font-size: 10px; }
.dispatch-lifecycle { min-height: 76px; padding: 13px 18px 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.dispatch-lifecycle > div { position: relative; padding-top: 25px; color: var(--muted); text-align: center; font-size: 10px; }
.dispatch-lifecycle > div::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 3px; background: #d7dcde; }
.dispatch-lifecycle > div:first-child::before { border-radius: 3px 0 0 3px; }
.dispatch-lifecycle > div:last-child::before { border-radius: 0 3px 3px 0; }
.dispatch-lifecycle b { position: absolute; z-index: 1; top: 0; left: 50%; width: 20px; height: 20px; border-radius: 50%; transform: translateX(-50%); background: #8b9397; color: #fff; display: grid; place-items: center; font-size: 9px; }
.dispatch-lifecycle .done::before, .dispatch-lifecycle .done b, .dispatch-lifecycle .active::before, .dispatch-lifecycle .active b { background: var(--primary); }
.dispatch-lifecycle .done, .dispatch-lifecycle .active { color: var(--primary); font-weight: 800; }
.dispatch-rider-live-facts, .dispatch-history-reason, .dispatch-execution-audit { margin: 0; padding: 13px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dispatch-rider-live-facts > div, .dispatch-history-reason > div, .dispatch-execution-audit > div { min-width: 0; }
.dispatch-rider-live-facts dt, .dispatch-history-reason span, .dispatch-execution-audit span { color: var(--muted); font-size: 10px; }
.dispatch-rider-live-facts dd, .dispatch-history-reason strong, .dispatch-execution-audit b { margin: 3px 0 0; display: block; overflow-wrap: anywhere; font-size: 12px; }
.dispatch-side-note { margin: 14px; padding: 11px 12px; border: 1px solid #dce4e6; border-radius: 6px; background: var(--surface-2); color: var(--muted); display: flex; align-items: flex-start; gap: 7px; font-size: 10px; line-height: 1.5; }
.dispatch-side-note svg { width: 15px; flex: 0 0 auto; color: var(--success); }
.dispatch-context-side > .button { margin: 0 14px 14px; width: calc(100% - 28px); }
.dispatch-history-candidates { padding: 10px 12px; display: grid; gap: 7px; }
.dispatch-history-candidates article { padding: 9px; border: 1px solid var(--line); border-radius: 5px; display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 6px; background: var(--surface); }
.dispatch-history-candidates article.assigned { border-color: #9cd8ca; background: var(--success-soft); }
.dispatch-history-candidates article > b { width: 22px; height: 22px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 9px; }
.dispatch-history-candidates article.assigned > b { background: var(--success); }
.dispatch-history-candidates article strong, .dispatch-history-candidates article span { display: block; overflow-wrap: anywhere; }
.dispatch-history-candidates article strong { font-size: 11px; }
.dispatch-history-candidates article span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.dispatch-history-candidates article dl { grid-column: 2; margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.dispatch-history-candidates article dt { color: var(--muted); font-size: 8px; }
.dispatch-history-candidates article dd { margin: 2px 0 0; font-size: 9px; font-weight: 750; }
.dispatch-execution-audit { margin: 0 12px 12px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }
.dispatch-execution-audit h3 { grid-column: 1 / -1; margin: 0; font-size: 12px; }
.dispatch-history-loading { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-size: 12px; }
.dispatch-history-loading svg { width: 22px; animation: dispatch-spin 1s linear infinite; }
@keyframes dispatch-spin { to { transform: rotate(360deg); } }

@media (max-width: 1380px) {
  .dispatch-unified-grid { grid-template-columns: minmax(300px, 31%) minmax(420px, 44%) minmax(270px, 25%); }
  .dispatch-unified-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto; }
  .dispatch-unified-metrics > div { min-height: 64px; border-bottom: 1px solid var(--line); }
  .dispatch-stream-row { grid-template-columns: minmax(54px, .75fr) minmax(80px, 1fr) auto; }
  .dispatch-stream-row > time { display: none; }
}
@media (max-width: 1100px) {
  .dispatch-unified-grid { grid-template-columns: minmax(300px, 36%) minmax(0, 64%); }
  .dispatch-unified-grid > .dispatch-candidate-panel { grid-column: 1 / -1; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 0 5px 5px; }
  .dispatch-unified-grid > .dispatch-candidate-panel .dispatch-context-side { min-height: 260px; }
}
@media (max-width: 700px) {
  .dispatch-head-performance > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-unified-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-unified-grid { display: block; min-height: 0; }
  .dispatch-unified-stream, .dispatch-unified-grid > .dispatch-decision-panel, .dispatch-unified-grid > .dispatch-candidate-panel { border-radius: 0; border-left: 1px solid var(--line); }
  .dispatch-unified-stream { max-height: 52vh; }
  .dispatch-unified-grid > .dispatch-decision-panel { border-top: 0; }
  .dispatch-unified-grid > .dispatch-candidate-panel { border-top: 0; }
  .dispatch-context-pane, .dispatch-context-side { min-height: 0; max-height: none; }
  .dispatch-context-pane > header, .dispatch-context-side > header { padding-left: 13px; padding-right: 13px; }
  .dispatch-order-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 13px; padding-right: 13px; }
  .dispatch-order-facts .wide { grid-column: 1 / -1; }
  .dispatch-event-dock { left: 12px; right: 12px; bottom: 10px; min-width: 0; }
}

/* Dispatch decision audit workbench: faithful three-column reference layout. */
@media (min-width: 1181px) {
  .dispatch-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
  .dispatch-mode .topbar { display: none; }
  .dispatch-mode .sidebar { position: fixed; z-index: 120; inset: 0 auto 0 0; display: flex; width: 190px; transform: translateX(-102%); box-shadow: 12px 0 30px rgba(21, 27, 30, .2); transition: transform .18s var(--ease); }
  .dispatch-mode .sidebar.open { transform: translateX(0); }
  .dispatch-mode .dispatch-command-page { display: flex; flex-direction: column; height: 100vh; padding: 0 7px 7px; background: #f7f8f8; }
}
.dispatch-module-menu { display: none; flex: 0 0 auto; border-color: #d8dddf; background: #fff; }
.dispatch-audit-app-head { min-height: 48px; padding: 0 15px; border-bottom: 1px solid #dfe3e5; background: #fff; display: flex; align-items: center; gap: 22px; }
.dispatch-audit-brand { padding-right: 22px; border-right: 1px solid #dfe3e5; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.dispatch-audit-brand img { width: 102px; height: auto; display: block; }
.dispatch-audit-brand strong { font-size: 19px; }
.dispatch-audit-app-head h1 { margin: 0; font-size: 19px; letter-spacing: 0; }
.dispatch-audit-runtime { min-height: 52px; padding: 6px 15px; border-bottom: 1px solid #dfe3e5; background: #fff; display: flex; align-items: center; gap: 28px; }
.dispatch-audit-runtime > strong, .dispatch-audit-runtime > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.dispatch-audit-runtime svg { width: 16px; height: 16px; }
.dispatch-audit-runtime .success { color: #119447; }
.dispatch-audit-runtime .warning { color: #c97700; }
.dispatch-audit-runtime .muted { color: var(--muted); }
.dispatch-audit-runtime-actions { margin-left: auto; display: flex; gap: 10px; }
.dispatch-audit-runtime-actions .button { min-width: 118px; height: 36px; background: #fff; }
.button.warning-outline { border-color: #ff8a31; color: #f26b00; }
.button.success-outline { border-color: #4bc477; color: #158c43; }
.button.danger-outline { border-color: #ff4b52; color: #e7353b; }
#dispatchWorkspace { min-height: 0; flex: 1 1 auto; }
.dispatch-unified-center { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.dispatch-audit-tabs { flex: 0 0 46px; border: 1px solid #e0e3e5; border-bottom: 0; border-radius: 6px 6px 0 0; background: #fff; display: flex; }
.dispatch-audit-tabs button { position: relative; min-width: 205px; height: 46px; padding: 0 18px; border: 0; border-right: 1px solid #e5e7e8; background: #fff; color: #202427; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; cursor: pointer; }
.dispatch-audit-tabs button.active { color: #ef6500; }
.dispatch-audit-tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: #ff6c00; content: ""; }
.dispatch-audit-tabs svg { width: 17px; }
.dispatch-audit-tabs b { color: inherit; font-size: 15px; }
.dispatch-unified-grid.audit-mode { flex: 1 1 auto; height: auto; min-height: 0; grid-template-columns: minmax(360px, 28%) minmax(540px, 40%) minmax(430px, 32%); border: 1px solid #dfe3e5; border-bottom: 0; }
.dispatch-unified-grid.audit-mode > * { border: 0; border-right: 1px solid #dfe3e5; border-radius: 0; }
.dispatch-unified-grid.audit-mode > *:last-child { border-right: 0; }
.dispatch-unified-grid.audit-mode .dispatch-context-pane,
.dispatch-unified-grid.audit-mode .dispatch-context-side { overflow: auto; scrollbar-gutter: auto; }
.dispatch-audit-list-head { min-height: 37px; padding: 0 11px; display: flex; align-items: center; }
.dispatch-audit-list-head h2 { margin: 0; font-size: 14px; }
.dispatch-audit-filter-row { padding: 0 8px 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.dispatch-audit-filter-row button { min-height: 30px; padding: 2px 3px; border: 1px solid #dce1e4; border-radius: 4px; background: #fff; color: #31383d; font-size: 11px; cursor: pointer; }
.dispatch-audit-filter-row button.active { border-color: #ff7b28; color: #ef6500; font-weight: 800; }
.dispatch-audit-order-head, .dispatch-audit-order { display: grid; grid-template-columns: 70px minmax(82px, 1fr) minmax(92px, 1.1fr) 70px 66px; align-items: center; gap: 4px; }
.dispatch-audit-order-head { min-height: 34px; padding: 0 8px; border-top: 1px solid #e5e7e8; border-bottom: 1px solid #e5e7e8; background: #fafbfb; color: #616970; font-size: 10px; }
.dispatch-audit-order-list { min-height: 0; flex: 1 1 auto; overflow: auto; }
.dispatch-unified-stream:has(.dispatch-audit-order-list) { display: flex; flex-direction: column; }
.dispatch-audit-order { width: 100%; min-height: 46px; padding: 4px 8px; border: 0; border-bottom: 1px solid #e6e8e9; background: #fff; color: #202427; text-align: left; cursor: pointer; }
.dispatch-audit-order:hover { background: #fffaf5; }
.dispatch-audit-order.active { box-shadow: inset 3px 0 #ff6c00; background: #fff8f2; }
.dispatch-audit-order > strong, .dispatch-audit-order > span:not(.platform), .dispatch-audit-order > time { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.dispatch-audit-order .platform { width: fit-content; padding: 3px 5px; border-radius: 3px; color: #fff; font-size: 10px; font-weight: 800; }
.dispatch-audit-order .platform.eleme { background: #168eea; }
.dispatch-audit-order .platform.meituan { background: #f1bc00; color: #292400; }
.dispatch-audit-order .platform.jd { background: #e73535; }
.dispatch-audit-order .platform.uu { background: #f26b00; }
.dispatch-audit-list-pager { min-height: 38px; padding: 5px 8px; border-top: 1px solid #dfe3e5; display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--muted); font-size: 10px; }
.history-context > header { min-height: 56px; padding: 8px 11px; }
.history-context > header h2 { font-size: 17px; }
.history-context > header p { display: none; }
.history-context > header .button { display: none; }
.dispatch-attribution-summary { grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr .9fr; }
.dispatch-history-timeline { padding: 8px 10px; }
.dispatch-history-timeline > div { grid-template-columns: 18px 112px 54px 38px 54px minmax(0, 1fr); }
.dispatch-history-timeline .neutral b { background: #9ba2a6; }
.dispatch-history-timeline .neutral em { color: #6c7479; }
.dispatch-winner-evidence > header { min-height: 52px; }
.dispatch-winner-evidence > header small { flex-basis: 145px; }
.dispatch-context-side.history-side > header { min-height: 66px; padding: 9px 11px; }
.dispatch-context-side.history-side > header h2 { font-size: 18px; }
.dispatch-history-candidate-head { grid-template-columns: 32px minmax(84px, .9fr) minmax(112px, 1fr) minmax(112px, 1.25fr); }
.dispatch-history-candidates article { grid-template-columns: 32px minmax(84px, .9fr) minmax(112px, 1fr) minmax(112px, 1.25fr); }
.dispatch-audit-legend { flex: 0 0 47px; min-height: 47px; padding: 7px 14px; border: 1px solid #dfe3e5; border-radius: 0 0 6px 6px; background: #fff; display: flex; align-items: center; gap: 20px; color: #444b50; font-size: 10px; white-space: nowrap; }
.dispatch-audit-legend > strong { font-size: 12px; }
.dispatch-audit-legend span { display: flex; align-items: center; gap: 5px; }
.dispatch-audit-legend b { padding: 3px 6px; border: 1px solid; border-radius: 3px; }
.dispatch-audit-legend .rider-grab { border-color: #9fd9b5; background: #effbf3; color: #158746; }
.dispatch-audit-legend .system { border-color: #95c7ef; background: #f0f8ff; color: #1475ba; }
.dispatch-audit-legend .manual { border-color: #ffc29f; background: #fff6ef; color: #e65f00; }
.dispatch-audit-legend .pending { border-color: #f0cf75; background: #fffaf0; color: #b77a00; }
@media (max-width: 1380px) and (min-width: 1181px) {
  .dispatch-unified-grid.audit-mode { grid-template-columns: minmax(330px, 29%) minmax(470px, 40%) minmax(360px, 31%); }
  .dispatch-audit-runtime { gap: 15px; }
  .dispatch-audit-runtime-actions .button { min-width: 92px; }
  .dispatch-audit-legend { gap: 10px; font-size: 9px; }
}
@media (max-width: 1180px) {
  .dispatch-audit-app-head, .dispatch-audit-runtime { flex-wrap: wrap; padding: 9px 12px; }
  .dispatch-audit-runtime-actions { width: 100%; margin-left: 0; }
  .dispatch-audit-tabs { overflow-x: auto; }
  .dispatch-audit-tabs button { min-width: 170px; }
  .dispatch-audit-legend { min-height: 0; padding: 10px 12px; flex-wrap: wrap; white-space: normal; }
}
@media (max-width: 700px) {
  .dispatch-audit-brand strong { font-size: 15px; }
  .dispatch-audit-app-head h1 { width: 100%; font-size: 17px; }
  .dispatch-audit-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-audit-order-head { display: none; }
  .dispatch-audit-order { grid-template-columns: 64px minmax(0, 1fr) 82px; grid-template-rows: repeat(2, auto); }
  .dispatch-audit-order > span:nth-of-type(2), .dispatch-audit-order > time { grid-row: 2; }
}


/* Dispatch order fallback stage and rider tags */
.order-stage-badge { min-height: 24px; padding: 3px 8px; border: 1px solid; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.order-stage-badge svg { width: 13px; height: 13px; }
.order-stage-badge.info { border-color: #b9d2e5; background: var(--info-soft); color: var(--info); }
.order-stage-badge.success { border-color: #92d6c7; background: var(--success-soft); color: var(--success); }
.order-stage-badge.warning { border-color: #e7cf86; background: var(--warn-soft); color: var(--warn); }
.order-stage-badge.danger { border-color: #efb1b1; background: var(--danger-soft); color: var(--danger); }
.order-summary-result .order-stage-badge { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.order-rider-context { margin-top: 12px; padding: 11px 12px; border: 1px solid #e1e5e8; border-radius: 7px; background: #fbfcfc; display: grid; grid-template-columns: minmax(180px, auto) minmax(0, 1fr); align-items: center; gap: 12px; }
.order-rider-context > div:first-child span, .order-rider-context > div:first-child strong { display: block; }
.order-rider-context > div:first-child span { color: var(--muted); font-size: 10px; font-weight: 750; }
.order-rider-context > div:first-child strong { margin-top: 4px; color: var(--ink); font-size: 12px; }
.order-rider-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.order-rider-tags span { padding: 3px 7px; border: 1px solid #d9dee2; border-radius: 999px; background: #fff; color: #4f5960; font-size: 10px; font-weight: 750; }
.order-rider-tags span.empty { color: var(--muted); font-weight: 600; }
.order-rider-context.compact { margin: 8px 0 0; padding: 8px 9px; grid-template-columns: 1fr; gap: 6px; background: var(--surface-2); }
.order-rider-context.compact .order-rider-tags { justify-content: flex-start; }
.recommendation-stage-context { padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.recommendation-stage-context > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recommendation-stage-context > div:first-child > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.recommendation-stage-context .order-rider-context { margin-top: 10px; }
@media (max-width: 700px) { .order-rider-context { grid-template-columns: 1fr; } .order-rider-tags { justify-content: flex-start; } .order-summary-result .order-stage-badge { max-width: 145px; } }

/* Dispatch decision-first workspace */
@media (min-width: 1181px) {
  body.dispatch-mode { height: 100vh; overflow: hidden; }
  .dispatch-mode .app-shell { height: 100vh; grid-template-columns: 232px minmax(0, 1fr); overflow: hidden; }
  .dispatch-mode .sidebar { position: sticky; width: auto; padding: 18px 12px; }
  .dispatch-mode .brand { min-height: 68px; padding: 3px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
  .dispatch-mode .brand-logo { width: 124px; }
  .dispatch-mode .brand-subtitle { margin-left: 2px; color: #aeb5ba; font-size: 11px; font-weight: 650; }
  .dispatch-mode .nav { margin-top: 14px; gap: 3px; }
  .dispatch-mode .nav-label { display: block; }
  .dispatch-mode .nav-item { height: 42px; padding: 0 11px; gap: 11px; border-radius: 5px; }
  .dispatch-mode .nav-item > span:not(.nav-counts) { font-size: 14px; }
  .dispatch-mode .nav-item.active { background: rgba(255, 90, 0, .16); box-shadow: none; }
  .dispatch-mode .nav-item.active::before { display: block; }
  .dispatch-mode .nav-counts { display: flex; }
  .dispatch-mode .sidebar-status { padding: 12px 10px; }
  .dispatch-mode .topbar { display: flex; }
  .dispatch-mode .main { height: 100vh; overflow: hidden; }
  .dispatch-mode .dispatch-command-page { height: calc(100vh - 62px); padding: 14px 18px 18px; overflow: hidden; }
}

.dispatch-page-head { min-height: 42px; margin-bottom: 10px; align-items: center; }
.dispatch-page-head > div:first-child { display: block; }
.dispatch-page-head h1 { font-size: 24px; }
.dispatch-page-head p { margin-top: 2px; font-size: 12px; }
.dispatch-page-state { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.dispatch-page-state svg { width: 15px; }
.dispatch-page-state span { color: var(--ink-2); font-weight: 750; }
.dispatch-page-state b { padding-left: 8px; border-left: 1px solid var(--line); color: var(--primary); }
.dispatch-page-state time { font-variant-numeric: tabular-nums; }
.dispatch-page-state.success svg { color: var(--success); }
.dispatch-page-state.warning svg { color: var(--warn); }
.dispatch-approval-slot { margin-bottom: 8px; }

.dispatch-unified-grid.decision-first { height: calc(100vh - 142px); min-height: 560px; margin-top: 0; display: grid; grid-template-columns: minmax(330px, 26%) minmax(520px, 1fr) minmax(360px, 29%); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.dispatch-unified-grid.decision-first > .dispatch-unified-stream,
.dispatch-unified-grid.decision-first > .dispatch-decision-panel,
.dispatch-unified-grid.decision-first > .dispatch-candidate-panel { height: 100%; min-height: 0; border: 0; border-radius: 0; background: var(--surface); overflow: hidden; }
.dispatch-unified-grid.decision-first > .dispatch-decision-panel,
.dispatch-unified-grid.decision-first > .dispatch-candidate-panel { border-left: 1px solid var(--line); }

.dispatch-order-rail-head { flex: 0 0 54px; min-height: 54px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-order-rail-head h2 { margin: 0; font-size: 16px; }
.dispatch-order-rail-head span, .dispatch-order-rail-head time { display: block; color: var(--muted); font-size: 10px; }
.dispatch-order-filter { flex: 0 0 auto; padding: 7px 7px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.dispatch-order-filter button { min-width: 0; min-height: 38px; padding: 3px 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); cursor: pointer; }
.dispatch-order-filter button span, .dispatch-order-filter button b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-order-filter button span { font-size: 10px; }
.dispatch-order-filter button b { margin-top: 1px; color: var(--ink-2); font-size: 10px; }
.dispatch-order-filter button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dispatch-order-filter button.active b { color: var(--primary); }
.dispatch-unified-grid.decision-first .dispatch-unified-search { flex: 0 0 36px; min-height: 36px; margin: 6px 7px; }
.dispatch-unified-grid.decision-first .dispatch-unified-search input { height: 29px; }
.dispatch-unified-grid.decision-first .dispatch-unified-stream { display: flex; flex-direction: column; }
.dispatch-feed-list { min-height: 0; flex: 1; border-top: 1px solid var(--line); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-feed-row { width: 100%; min-height: 62px; padding: 7px 9px; border: 0; border-bottom: 1px solid #e8ebed; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: 54px minmax(0, 1fr) 92px; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.dispatch-feed-row:hover { background: #fafbfb; }
.dispatch-feed-row.active { background: #fff7f1; box-shadow: inset 3px 0 0 var(--primary); }
.dispatch-feed-time strong, .dispatch-feed-time span, .dispatch-feed-order strong, .dispatch-feed-order span, .dispatch-feed-state b, .dispatch-feed-state span { display: block; }
.dispatch-feed-time strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.dispatch-feed-time span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.dispatch-feed-order { min-width: 0; }
.dispatch-feed-order strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-feed-order span { margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-feed-state { min-width: 0; text-align: right; }
.dispatch-feed-state b { width: fit-content; max-width: 100%; margin-left: auto; padding: 2px 5px; border-radius: 4px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-feed-state b.success, .dispatch-feed-state span.success { color: var(--success); }
.dispatch-feed-state b.warning, .dispatch-feed-state span.warning { color: var(--warn); }
.dispatch-feed-state b.danger, .dispatch-feed-state span.danger { color: var(--danger); }
.dispatch-feed-state b.info, .dispatch-feed-state span.info { color: var(--info); }
.dispatch-feed-state b.neutral { background: var(--surface-2); color: var(--muted); }
.dispatch-feed-state b.success { background: var(--success-soft); }
.dispatch-feed-state b.warning { background: var(--warn-soft); }
.dispatch-feed-state b.danger { background: var(--danger-soft); }
.dispatch-feed-state b.info { background: var(--info-soft); }
.dispatch-feed-state span { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-feed-pagination { flex: 0 0 42px; min-height: 42px; padding: 5px 8px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.dispatch-feed-pagination > div { display: flex; align-items: center; gap: 6px; }
.dispatch-feed-pagination .icon-button { width: 28px; height: 28px; }
.dispatch-feed-pagination b { min-width: 42px; color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }

.dispatch-decision-panel { overflow: auto !important; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-decision-first-pane, .dispatch-context-pane.history-context { min-height: 100%; display: flex; flex-direction: column; }
.dispatch-decision-first-pane > header, .dispatch-context-pane.history-context > header { min-height: 78px; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-decision-first-pane > header span, .dispatch-context-pane.history-context > header span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dispatch-decision-first-pane > header h2, .dispatch-context-pane.history-context > header h2 { margin: 2px 0 0; font-size: 20px; }
.dispatch-decision-first-pane > header p, .dispatch-context-pane.history-context > header p { margin: 1px 0 0; color: var(--muted); font-size: 9px; }
.dispatch-decision-order-id { display: flex; flex-wrap: wrap; gap: 3px 14px; line-height: 1.35; }
.dispatch-decision-order-id span { color: #657077 !important; font-size: 10px !important; font-weight: 650 !important; }
.dispatch-decision-order-id b { margin-left: 3px; color: #273136; font-size: 11px; font-weight: 750; }
.dispatch-context-pane.history-context > header p.dispatch-decision-order-id { display: flex; }
.dispatch-rider-change-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-bottom: 1px solid #f2c98e;
  background: #fff8e9;
  color: #8b4d08;
}
.dispatch-rider-change-notice > svg { width: 18px; height: 18px; flex: 0 0 auto; }
.dispatch-rider-change-notice strong,
.dispatch-rider-change-notice span { display: block; }
.dispatch-rider-change-notice strong { font-size: 12px; }
.dispatch-rider-change-notice span { margin-top: 2px; font-size: 11px; font-weight: 600; }
.dispatch-decision-stage { flex: none; padding: 4px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.dispatch-decision-stage.success { background: var(--success-soft); color: var(--success); }
.dispatch-decision-stage.warning { background: var(--warn-soft); color: var(--warn); }
.dispatch-decision-stage.danger { background: var(--danger-soft); color: var(--danger); }
.dispatch-decision-stage.info { background: var(--info-soft); color: var(--info); }
.dispatch-decision-order-meta { padding: 8px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dispatch-decision-order-meta span, .dispatch-decision-order-meta strong { display: block; }
.dispatch-decision-order-meta span { color: var(--muted); font-size: 9px; }
.dispatch-decision-order-meta strong { margin-top: 2px; font-size: 12px; }
.dispatch-decision-route { min-height: 64px; padding: 9px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 8px; }
.dispatch-decision-route > div { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; }
.dispatch-decision-route b { width: 23px; height: 23px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 10px; }
.dispatch-decision-route > div:last-child b { background: var(--danger); }
.dispatch-decision-route span { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-decision-route > svg { width: 17px; color: var(--muted); }
.dispatch-decision-lifecycle { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dispatch-decision-lifecycle > div { position: relative; min-width: 0; padding-top: 23px; color: var(--muted); text-align: center; }
.dispatch-decision-lifecycle > div::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: #d9dddf; }
.dispatch-decision-lifecycle > div:first-child::before { left: 50%; }
.dispatch-decision-lifecycle > div:last-child::before { right: 50%; }
.dispatch-decision-lifecycle b { position: absolute; z-index: 1; top: 0; left: 50%; width: 17px; height: 17px; border-radius: 50%; transform: translateX(-50%); background: #a0a7aa; color: #fff; display: grid; place-items: center; font-size: 8px; }
.dispatch-decision-lifecycle .done::before, .dispatch-decision-lifecycle .done b { background: var(--primary); }
.dispatch-decision-lifecycle strong, .dispatch-decision-lifecycle time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-decision-lifecycle strong { font-size: 9px; }
.dispatch-decision-lifecycle time { margin-top: 1px; font-size: 8px; }
.dispatch-final-decision { margin: 10px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.dispatch-final-decision > svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--success); color: #fff; }
.dispatch-final-decision.warning > svg { background: var(--warn); }
.dispatch-final-decision span { color: var(--muted); font-size: 9px; }
.dispatch-final-decision h3 { margin: 1px 0 0; color: var(--success); font-size: 17px; }
.dispatch-final-decision.warning h3 { color: var(--warn); }
.dispatch-final-decision p { margin: 3px 0 0; color: var(--ink-2); font-size: 10px; line-height: 1.45; }
.dispatch-rider-snapshot { margin: 0 12px 10px; border: 1px solid var(--line); border-radius: 5px; }
.dispatch-rider-snapshot > header { min-height: 52px; padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-rider-snapshot > header span, .dispatch-rider-snapshot > header small { color: var(--muted); font-size: 9px; }
.dispatch-rider-snapshot > header h3 { margin: 1px 0 0; font-size: 14px; }
.dispatch-rider-snapshot > header small { text-align: right; }
.dispatch-snapshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dispatch-snapshot-grid > div { min-height: 48px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dispatch-snapshot-grid > div:nth-child(3n) { border-right: 0; }
.dispatch-snapshot-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.dispatch-snapshot-grid span, .dispatch-snapshot-grid strong { display: block; }
.dispatch-snapshot-grid span { color: var(--muted); font-size: 9px; }
.dispatch-snapshot-grid strong { margin-top: 2px; font-size: 11px; }
.dispatch-snapshot-orders { border-top: 1px solid var(--line); }
.dispatch-snapshot-orders > strong { min-height: 32px; padding: 0 10px; background: var(--surface-2); display: flex; align-items: center; font-size: 10px; }
.dispatch-snapshot-orders > div { min-height: 34px; padding: 5px 10px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 74px 70px minmax(0, 1fr); align-items: center; gap: 7px; font-size: 9px; }
.dispatch-snapshot-orders small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.dispatch-decision-actions { position: sticky; bottom: 0; z-index: 3; min-height: 54px; margin-top: auto; padding: 8px 12px; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); display: flex; align-items: center; gap: 10px; }
.dispatch-decision-actions .button { flex: none; height: 36px; }
.dispatch-decision-actions span { color: var(--muted); font-size: 9px; }

.dispatch-candidate-panel { overflow: hidden !important; }
.dispatch-rejected-inspector { height: 100%; display: grid; grid-template-rows: minmax(260px, 55%) minmax(220px, 45%); }
.dispatch-rejected-list, .dispatch-rejected-detail { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dispatch-rejected-list { border-bottom: 1px solid var(--line); }
.dispatch-rejected-list > header, .dispatch-rejected-detail > header { min-height: 58px; padding: 8px 11px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dispatch-rejected-list > header span, .dispatch-rejected-list > header small, .dispatch-rejected-detail > header span { color: var(--muted); font-size: 9px; }
.dispatch-rejected-list > header h2, .dispatch-rejected-detail > header h3 { margin: 1px 0 0; font-size: 16px; }
.dispatch-rejected-list > header small { text-align: right; }
.dispatch-rejected-detail > header > b { color: var(--primary); font-size: 12px; }
.dispatch-rejected-columns { flex: 0 0 28px; min-height: 28px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; grid-template-columns: minmax(110px, 1.35fr) 54px 40px minmax(88px, 1fr); align-items: center; gap: 5px; font-size: 8px; }
.dispatch-rejected-rows { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-rejected-row { width: 100%; min-height: 48px; padding: 5px 8px; border: 0; border-bottom: 1px solid #e8ebed; background: var(--surface); color: var(--ink); display: grid; grid-template-columns: 22px minmax(82px, 1.15fr) 54px 40px minmax(88px, 1fr); align-items: center; gap: 5px; text-align: left; cursor: pointer; }
.dispatch-rejected-row:hover { background: #fafbfb; }
.dispatch-rejected-row.active { background: #fff7f1; box-shadow: inset 3px 0 0 var(--primary); }
.dispatch-rejected-row > b { width: 20px; height: 20px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 8px; }
.dispatch-rejected-row div { min-width: 0; }
.dispatch-rejected-row strong, .dispatch-rejected-row div span, .dispatch-rejected-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-rejected-row strong { font-size: 10px; }
.dispatch-rejected-row div span { color: var(--muted); font-size: 8px; }
.dispatch-rejected-row em, .dispatch-rejected-row > span { font-size: 9px; font-style: normal; }
.dispatch-rejected-row small { color: var(--danger); font-size: 8px; }
.dispatch-rejected-detail { overflow: auto; overscroll-behavior: contain; }
.dispatch-rejected-detail > p { margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line); color: var(--danger); font-size: 10px; line-height: 1.45; }
.dispatch-rejected-facts { margin: 0; padding: 8px 11px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.dispatch-rejected-facts dt { color: var(--muted); font-size: 8px; }
.dispatch-rejected-facts dd { margin: 1px 0 0; font-size: 10px; font-weight: 750; }
.dispatch-rejected-checks { padding: 5px 10px 10px; }
.dispatch-rejected-checks > div { min-height: 34px; padding: 5px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(72px, 1fr) 58px 62px 40px; align-items: center; gap: 5px; }
.dispatch-rejected-checks span, .dispatch-rejected-checks strong, .dispatch-rejected-checks small, .dispatch-rejected-checks b { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-rejected-checks small { color: var(--muted); }
.dispatch-rejected-checks b { color: var(--success); text-align: right; }
.dispatch-rejected-checks .failed b { color: var(--danger); }

.dispatch-reassign-boundary { width: min(560px, calc(100vw - 28px)); }
.dispatch-reassign-boundary .modal-head > div p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.boundary-alert { padding: 13px; border: 1px solid #efc5c8; border-radius: 6px; background: var(--danger-soft); display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.boundary-alert > svg { width: 26px; color: var(--danger); }
.boundary-alert strong { color: var(--danger); font-size: 13px; }
.boundary-alert p { margin: 4px 0 0; color: var(--ink-2); font-size: 11px; line-height: 1.55; }
.dispatch-reassign-boundary dl { margin: 12px 0 0; }
.dispatch-reassign-boundary dl div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.dispatch-reassign-boundary dt { color: var(--muted); font-size: 10px; }
.dispatch-reassign-boundary dd { margin: 2px 0 0; font-size: 11px; }

@media (max-width: 1380px) and (min-width: 1181px) {
  .dispatch-mode .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .dispatch-unified-grid.decision-first { grid-template-columns: 320px minmax(470px, 1fr) 340px; }
  .dispatch-feed-row { grid-template-columns: 48px minmax(0, 1fr) 84px; }
}

@media (max-width: 1180px) {
  .dispatch-unified-grid.decision-first { height: auto; min-height: 0; grid-template-columns: minmax(310px, 36%) minmax(0, 64%); overflow: visible; }
  .dispatch-unified-grid.decision-first > .dispatch-unified-stream { min-height: 690px; }
  .dispatch-unified-grid.decision-first > .dispatch-candidate-panel { grid-column: 1 / -1; min-height: 620px; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  .dispatch-page-head { align-items: flex-start; }
  .dispatch-page-state { display: none; }
  .dispatch-unified-grid.decision-first { display: block; border-radius: 0; }
  .dispatch-unified-grid.decision-first > .dispatch-unified-stream { min-height: 620px; }
  .dispatch-unified-grid.decision-first > .dispatch-decision-panel,
  .dispatch-unified-grid.decision-first > .dispatch-candidate-panel { min-height: 620px; border-top: 1px solid var(--line); border-left: 0; }
  .dispatch-order-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dispatch-feed-row { grid-template-columns: 48px minmax(0, 1fr) 78px; }
  .dispatch-decision-order-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-decision-lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  .dispatch-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-snapshot-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .dispatch-snapshot-grid > div:nth-child(2n) { border-right: 0; }
  .dispatch-rejected-inspector { min-height: 620px; }
}

/* Dispatch reference alignment */
@media (min-width: 1181px) {
  body.dispatch-mode { height: 100vh; overflow: hidden; }
  .dispatch-mode .app-shell { height: 100vh; min-height: 0; grid-template-columns: 165px minmax(0, 1fr); overflow: hidden; }
  .dispatch-mode .sidebar { width: 165px; padding: 10px 8px; }
  .dispatch-mode .brand { min-height: 82px; padding: 2px 17px 12px; border-bottom: 0; }
  .dispatch-mode .brand-logo { width: 111px; }
  .dispatch-mode .brand-subtitle { margin-left: 0; color: #fff; font-size: 16px; font-weight: 700; }
  .dispatch-mode .nav { margin-top: 0; gap: 4px; }
  .dispatch-mode .nav-label { display: none; }
  .dispatch-mode .nav-item { height: 47px; padding: 0 16px; gap: 10px; border-radius: 6px; }
  .dispatch-mode .nav-item > span:not(.nav-counts) { font-size: 15px; }
  .dispatch-mode .nav-item.active { background: linear-gradient(135deg, #f36b00, #ff8a10); box-shadow: 0 6px 18px rgba(255, 91, 0, .22); }
  .dispatch-mode .nav-item.active::before { display: none; }
  .dispatch-mode .nav-counts { display: none; }
  .dispatch-mode .sidebar-status { padding: 10px 8px; }
  .dispatch-mode .topbar { display: none; }
  .dispatch-mode .main { height: 100vh; overflow: hidden; }
  .dispatch-mode .dispatch-command-page { height: 100vh; padding: 12px 18px 28px; overflow: hidden; }
}
.dispatch-command-page .page-head { min-height: 30px; margin-bottom: 8px; align-items: center; }
.dispatch-command-page .page-head > div { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.dispatch-command-page .page-head h1 { font-size: 22px; line-height: 1.25; }
.dispatch-command-page .page-head p { margin: 0; font-size: 12px; white-space: nowrap; }
.dispatch-page-head { display: grid; grid-template-columns: auto minmax(460px, 1fr) auto; gap: 12px; }
.dispatch-page-head .dispatch-page-title { display: block; }
.dispatch-head-performance { min-width: 0; height: 44px; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.dispatch-head-performance header { min-width: 0; padding: 5px 9px; border-right: 1px solid var(--line); background: #fbfcfc; }
.dispatch-head-performance strong,
.dispatch-head-performance small,
.dispatch-head-performance em,
.dispatch-head-performance b { display: block; font-style: normal; line-height: 1.15; white-space: nowrap; }
.dispatch-head-performance header strong { color: var(--ink); font-size: 13px; font-weight: 800; }
.dispatch-head-performance header small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }
.dispatch-head-performance > div { min-width: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.dispatch-head-performance span { min-width: 0; padding: 5px 7px; border-right: 1px solid var(--line); }
.dispatch-head-performance span:last-child { border-right: 0; }
.dispatch-head-performance em { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 650; text-overflow: ellipsis; }
.dispatch-head-performance b { margin-top: 3px; color: var(--ink); font-size: 14px; font-weight: 850; font-variant-numeric: tabular-nums; }
.dispatch-live-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dispatch-live-meta b { margin-left: 7px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.dispatch-unified-metrics { height: 90px; border: 0; border-radius: 0; background: transparent; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; overflow: visible; }
.dispatch-unified-metrics > div { min-height: 90px; padding: 8px; border: 1px solid var(--line) !important; border-radius: 5px; background: var(--surface); }
.dispatch-unified-metrics span { color: var(--ink-2); font-size: 13px; font-weight: 650; }
.dispatch-unified-metrics strong { margin-top: 1px; font-size: 29px; }
.dispatch-unified-metrics .neutral strong { color: var(--primary); }
.dispatch-unified-metrics .warning strong { color: #1172c6; }
.dispatch-unified-grid { height: calc(100vh - 176px); min-height: 0; margin-top: 7px; grid-template-columns: minmax(335px, 28%) minmax(500px, 41%) minmax(370px, 31%); }
.dispatch-unified-stream, .dispatch-unified-grid > .dispatch-decision-panel, .dispatch-unified-grid > .dispatch-candidate-panel { height: 100%; min-height: 0; }
.dispatch-unified-stream > header { min-height: 40px; padding: 7px 12px; }
.dispatch-unified-stream > header h2 { font-size: 13px; }
.dispatch-unified-stream > header span { display: none; }
.dispatch-unified-search { min-height: 34px; margin: 7px 8px 5px; }
.dispatch-unified-search input { height: 27px; font-size: 11px; }
.dispatch-unified-search .icon-button { width: 27px; height: 27px; }
.dispatch-unified-filters { padding: 0 8px 6px; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.dispatch-unified-filters select { height: 31px; font-size: 10px; }
.dispatch-unified-filters label { min-height: 31px; grid-column: auto; padding: 0 3px; white-space: nowrap; }
.dispatch-unified-groups { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dispatch-stream-group { min-height: 0; flex: 1 1 0; display: flex; flex-direction: column; }
.dispatch-stream-group.history { min-height: 0; }
.dispatch-stream-group.collapsed { flex: 0 0 auto; }
.dispatch-stream-group.collapsed .dispatch-history-filter-row { display: none; }
.dispatch-stream-group-head { min-height: 34px; padding: 0 10px; }
.dispatch-stream-group-head > span { font-size: 11px; }
.dispatch-stream-group-list { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dispatch-stream-group.pending .dispatch-stream-group-list,
.dispatch-stream-group.going .dispatch-stream-group-list,
.dispatch-stream-group.history .dispatch-stream-group-list { flex: 1 1 auto; max-height: none; }
.dispatch-stream-row { min-height: 42px; padding: 6px 7px; gap: 5px; border-bottom-color: #e8ebec; }
.dispatch-stream-row.pending { grid-template-columns: 44px 50px 28px minmax(72px, 1fr) 48px 52px; }
.dispatch-stream-row.going { min-height: 44px; grid-template-columns: 54px 54px 42px minmax(88px, 1fr) 52px 46px; }
.dispatch-stream-row.history { min-height: 44px; grid-template-columns: 50px minmax(58px, .85fr) minmax(100px, 1.35fr) 60px minmax(62px, .9fr); }
.dispatch-stream-row strong { font-size: 12px; }
.dispatch-stream-row span, .dispatch-stream-row time { font-size: 11px; line-height: 1.25; }
.dispatch-stream-row b { min-height: 22px; padding: 3px 5px; font-size: 10px; line-height: 16px; text-align: center; }
.dispatch-assignment-source { min-height: 24px; padding: 4px 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2) !important; font-size: 10px !important; font-weight: 800; line-height: 16px !important; text-align: center; }
.dispatch-assignment-source.rider_grab { background: #e9f7ff; color: #0878a5 !important; }
.dispatch-assignment-source.system_dispatch { background: #edf7ef; color: #167743 !important; }
.dispatch-assignment-source.local_manual { background: #fff2e8; color: #c24e00 !important; }
.dispatch-assignment-source.local_auto { background: #e8f6ee; color: #087a43 !important; }
.dispatch-assignment-source.local_mismatch { background: #fff4d7; color: #9a5b00 !important; }
.dispatch-assignment-source.cancelled { background: #eef1f3; color: #576168 !important; }
.dispatch-assignment-source.pending_review { background: #f1f3f4; color: #687176 !important; }
.dispatch-history-filter-row { padding: 5px 8px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 6px; }
.dispatch-history-filter { min-width: 0; flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 3px; }
.dispatch-history-filter button { min-height: 30px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 10px; line-height: 1.15; cursor: pointer; }
.dispatch-history-filter button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.dispatch-stream-group.history.updating .dispatch-stream-group-list { opacity: .72; }
.dispatch-history-pager { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.dispatch-history-pager span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.dispatch-history-pager .icon-button { width: 27px; height: 27px; }
.dispatch-stream-row.pending > span:nth-of-type(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-stream-row.active { background: #fff8f1; box-shadow: inset 0 0 0 1px #ff6a16; }
.dispatch-stream-row.linked { box-shadow: inset 3px 0 0 #198ed1; }
.dispatch-context-pane, .dispatch-context-side, .dispatch-decision-pane, .dispatch-candidate-pane { height: 100%; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.history-context { display: flex; flex-direction: column; }
.dispatch-live-risk { min-height: 39px; padding: 5px 9px; border-bottom: 1px solid #efc4c4; background: #fff0f0; color: var(--danger); display: flex; align-items: center; gap: 7px; }
.dispatch-live-risk svg { width: 15px; flex: 0 0 auto; }
.dispatch-live-risk strong { min-width: 0; flex: 1; font-size: 10px; }
.dispatch-live-risk .button { height: 27px; padding: 0 9px; font-size: 9px; }
.dispatch-context-pane > header, .dispatch-context-side > header { min-height: 63px; padding: 9px 12px; }
.dispatch-context-pane > header h2, .dispatch-context-side > header h2 { margin-top: 2px; font-size: 16px; }
.dispatch-context-pane > header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.dispatch-context-pane > header .button { height: 30px; padding: 0 9px; font-size: 9px; }
.history-context > header > div > span { display: flex; align-items: center; gap: 5px; }
.history-context > header > div > span b { padding: 2px 5px; border: 1px solid #ff9b5e; border-radius: 4px; color: var(--primary); }
.history-context > header > div > span small { color: var(--muted); font-weight: 500; }
.dispatch-lifecycle { min-height: 54px; padding: 8px 12px 6px; }
.dispatch-lifecycle > div { padding-top: 20px; font-size: 11px; }
.dispatch-lifecycle > div::before { top: 7px; height: 2px; }
.dispatch-lifecycle b { width: 16px; height: 16px; font-size: 8px; }
.history-context .dispatch-order-facts { padding: 8px 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; }
.history-context .dispatch-order-facts .wide { grid-column: span 2; }
.history-context .dispatch-order-facts > div { min-height: 24px; display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: baseline; gap: 5px; }
.history-context .dispatch-order-facts span { font-size: 12px; }
.history-context .dispatch-order-facts strong { margin: 0; font-size: 13px; }
.history-context .dispatch-order-facts .wide strong { white-space: normal; line-height: 1.35; }
.dispatch-history-timeline { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.dispatch-history-timeline h3 { margin: 0 0 4px; font-size: 13px; }
.dispatch-history-timeline h3 small { margin-left: 6px; color: var(--muted); font-size: 10px; font-weight: 500; }
.dispatch-history-timeline > div { position: relative; min-height: 25px; display: grid; grid-template-columns: 18px 76px 58px 42px 36px minmax(0, 1fr); align-items: center; gap: 4px; font-size: 11px; }
.dispatch-history-timeline > div::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -8px; width: 1px; background: #c7ced1; }
.dispatch-history-timeline > div:last-child::before { display: none; }
.dispatch-history-timeline b { position: relative; z-index: 1; width: 13px; height: 13px; border-radius: 50%; background: #8d969b; color: #fff; display: grid; place-items: center; font-size: 7px; }
.dispatch-history-timeline .complete b { background: var(--success); }
.dispatch-history-timeline .success b { background: var(--success); }
.dispatch-history-timeline .danger b { background: var(--danger); }
.dispatch-history-timeline .warning b { background: #d58a00; }
.dispatch-history-timeline .info b { background: #198ed1; }
.dispatch-history-timeline strong { font-size: 12px; }
.dispatch-history-timeline time, .dispatch-history-timeline span { color: var(--muted); }
.dispatch-history-timeline em { color: var(--success); font-style: normal; }
.dispatch-history-timeline .danger em { color: var(--danger); }
.dispatch-history-timeline .warning em { color: #ad6e00; }
.dispatch-history-timeline .info em { color: #147aae; }
.dispatch-history-timeline p { margin: 0; overflow: hidden; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.dispatch-history-result { margin: 7px 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 8px; }
.dispatch-history-result span { color: var(--muted); font-size: 11px; }
.dispatch-history-result strong { font-size: 13px; }
.dispatch-history-result small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.dispatch-history-result.success { border-color: #78cf96; background: #f3fff7; }
.dispatch-history-result.success strong { color: var(--success); }
.dispatch-history-result.danger { border-color: #efb1b1; background: var(--danger-soft); }
.dispatch-history-reason { min-height: 0; padding: 10px 9px; flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.dispatch-history-reason > div { padding: 0 9px; border-right: 1px solid var(--line); }
.dispatch-history-reason > div:first-child { padding-left: 0; }
.dispatch-history-reason > div:last-child { padding-right: 0; border-right: 0; }
.dispatch-history-reason h3 { margin: 0 0 6px; font-size: 14px; }
.dispatch-history-reason ul { margin: 0; padding: 0; list-style: none; }
.dispatch-history-reason li { position: relative; min-height: 21px; padding-left: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.dispatch-history-reason li::before { position: absolute; left: 0; top: 0; color: var(--muted); content: "·"; font-weight: 900; }
.dispatch-history-reason li.passed::before { color: var(--success); content: "✓"; }
.dispatch-history-reason li.failed::before { color: var(--danger); content: "×"; }
.dispatch-evidence-direct { min-height: 0; flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--surface); }
.dispatch-evidence-direct > header { min-height: 42px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-evidence-direct > header span { color: var(--ink); font-size: 14px; font-weight: 800; }
.dispatch-evidence-direct > header small { color: var(--muted); font-size: 12px; text-align: right; }
.dispatch-evidence-content { min-height: 0; }
.dispatch-context-side > header small { text-align: right; }
.dispatch-history-candidate-head { min-height: 34px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: grid; grid-template-columns: 42px minmax(68px, .8fr) minmax(78px, .9fr) minmax(0, 1.3fr); align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.dispatch-history-candidates { padding: 0; gap: 0; }
.dispatch-history-candidates article { min-height: 58px; padding: 5px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; grid-template-columns: 42px minmax(68px, .8fr) minmax(78px, .9fr) minmax(0, 1.3fr); align-items: center; gap: 4px; }
.dispatch-history-candidates article.assigned { background: #f4fff8; }
.dispatch-history-candidates article.active { box-shadow: inset 0 0 0 2px var(--primary); background: #fff8f1; }
.dispatch-history-candidates article > b { width: 24px; height: 19px; font-size: 9px; }
.dispatch-candidate-name { margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.dispatch-candidate-name:hover { color: var(--primary); text-decoration: underline; }
.dispatch-candidate-name:focus-visible { border-radius: 3px; outline: 2px solid var(--primary); outline-offset: 2px; }
.dispatch-history-candidates article span { margin: 0; font-size: 11px; }
.dispatch-history-candidates article dl { grid-column: 3; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dispatch-history-candidates article dt { font-size: 10px; }
.dispatch-history-candidates article dd { font-size: 11px; }
.dispatch-history-candidates article > span:last-child { grid-column: 4; display: block; overflow: visible; color: var(--danger); font-weight: 700; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.dispatch-history-candidates article.assigned > span:last-child { color: var(--success); }
.dispatch-candidate-snapshot { border-top: 1px solid var(--line); background: var(--surface); }
.dispatch-candidate-snapshot > header { min-height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-candidate-snapshot > header span,
.dispatch-candidate-snapshot > header strong { display: block; }
.dispatch-candidate-snapshot > header span { color: var(--muted); font-size: 12px; }
.dispatch-candidate-snapshot > header strong { margin-top: 2px; font-size: 15px; }
.dispatch-candidate-snapshot > header small { color: var(--muted); font-size: 11px; }
.dispatch-candidate-snapshot-body .candidate-report { border: 0; border-radius: 0; }
.dispatch-candidate-snapshot-body .candidate-report-head { min-height: 0; padding: 10px 12px; align-items: flex-start; flex-direction: column; gap: 8px; }
.dispatch-candidate-snapshot-body .candidate-report-head .candidate-metrics { width: 100%; }
.dispatch-candidate-snapshot-body .candidate-report-columns { grid-template-columns: 1fr; }
.dispatch-candidate-snapshot-body .candidate-report-main { border-right: 0; border-bottom: 1px solid var(--line); }
.dispatch-candidate-snapshot-body .candidate-report-rules { position: static; }
.dispatch-candidate-snapshot-body .dispatch-audit-candidate-detail[hidden] { display: none; }
.dispatch-candidate-snapshot-body .route-metric-strip,
.dispatch-candidate-snapshot-body .fallback-factor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dispatch-candidate-snapshot-body .route-metric-strip > div,
.dispatch-candidate-snapshot-body .fallback-factor-grid > div { min-height: 62px; }
.dispatch-candidate-snapshot-body .candidate-route-analysis,
.dispatch-candidate-snapshot-body .candidate-orders-section,
.dispatch-candidate-snapshot-body .fallback-candidate-factors { padding: 12px; }
.dispatch-event-dock { position: absolute; right: 8px; bottom: 1px; width: calc(31% - 16px); min-width: 300px; height: 45px; box-shadow: none; }
.dispatch-attribution-summary { min-height: 68px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr 1fr .9fr; background: #fffdfb; }
.dispatch-attribution-summary > div { min-width: 0; padding: 9px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.dispatch-attribution-summary > div:last-child { border-right: 0; }
.dispatch-attribution-summary span, .dispatch-attribution-summary small { color: var(--muted); font-size: 10px; }
.dispatch-attribution-summary strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.3; }
.dispatch-attribution-summary strong.success { color: var(--success); }
.dispatch-attribution-summary strong.warning { color: #ad6e00; }
.dispatch-audit-order-line { min-height: 39px; padding: 6px 11px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) 62px 116px; align-items: center; gap: 6px; color: var(--ink-2); font-size: 10px; }
.dispatch-audit-order-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-audit-order-line svg { width: 14px; color: var(--muted); }
.dispatch-audit-order-line b, .dispatch-audit-order-line time { white-space: nowrap; text-align: right; }
.dispatch-winner-evidence { border-top: 1px solid var(--line); background: var(--surface); }
.dispatch-winner-evidence > header { min-height: 58px; padding: 8px 11px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-winner-evidence > header div { min-width: 0; }
.dispatch-winner-evidence > header span, .dispatch-winner-evidence > header strong { display: block; }
.dispatch-winner-evidence > header span { color: var(--primary); font-size: 12px; font-weight: 800; }
.dispatch-winner-evidence > header strong { margin-top: 3px; font-size: 11px; line-height: 1.4; }
.dispatch-winner-evidence > header small { flex: 0 0 120px; color: var(--muted); font-size: 10px; text-align: right; }
.dispatch-decision-route-board {
  margin: 12px;
  padding: 0 18px 11px;
  border: 1px solid #dfe4e8;
  background-color: #f7f9fa;
  background-image: linear-gradient(#e8ecef 1px, transparent 1px), linear-gradient(90deg, #e8ecef 1px, transparent 1px);
  background-size: 28px 28px;
}
.dispatch-decision-route-board > header {
  min-height: 48px;
  margin: 0 -18px 16px;
  padding: 8px 12px;
  border-bottom: 1px solid #dfe4e8;
  background: rgba(255, 255, 255, .88);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dispatch-decision-route-board > header span,
.dispatch-decision-route-board > header strong { display: block; }
.dispatch-decision-route-board > header span {
  color: var(--dispatch-secondary);
  font-size: 11px;
  font-weight: 550;
}
.dispatch-decision-route-board > header strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
}
.dispatch-decision-route-board > header > b {
  max-width: 48%;
  overflow: hidden;
  color: var(--success);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-decision-route-line {
  display: grid;
  grid-template-columns: 28px 1fr 28px 1fr 28px;
  align-items: center;
}
.dispatch-decision-route-line span {
  height: 4px;
  background: linear-gradient(90deg, #19a153 0 48%, #2784dd 48% 100%);
}
.dispatch-decision-route-line i {
  display: block;
  width: 26px;
  height: 26px;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px #83909c;
}
.dispatch-decision-route-line i.pickup { background: #16a05a; }
.dispatch-decision-route-line i.rider { background: #ff6a00; }
.dispatch-decision-route-line i.dropoff { background: #e4473b; }
.dispatch-decision-route-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #29343d;
  font-size: 12px;
}
.dispatch-decision-route-labels b:nth-child(2) { color: var(--primary); }
.dispatch-decision-route-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
  color: var(--dispatch-secondary);
  font-size: 11px;
}
.dispatch-decision-route-addresses span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-decision-route-addresses span:last-child { text-align: right; }
.dispatch-decision-route-metrics {
  margin-top: 10px;
  border: 1px solid #dfe4e8;
  background: rgba(255, 255, 255, .82);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dispatch-decision-route-metrics > div {
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px;
  border-right: 1px solid #dfe4e8;
}
.dispatch-decision-route-metrics > div:last-child { border-right: 0; }
.dispatch-decision-route-metrics span,
.dispatch-decision-route-metrics strong { display: block; }
.dispatch-decision-route-metrics span {
  color: var(--dispatch-secondary);
  font-size: 10px;
}
.dispatch-decision-route-metrics strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
}
.dispatch-decision-route-board p {
  margin: 11px 0 0;
  color: #6b7680;
  font-size: 11px;
  text-align: center;
}
.dispatch-decision-route-board.unavailable { padding-bottom: 0; background-image: none; }
.dispatch-decision-route-board.unavailable > header {
  margin-bottom: 0;
  background: #fffaf0;
}
.dispatch-decision-route-board.unavailable > header > b { color: var(--warn); }
.dispatch-decision-route-unavailable {
  min-height: 112px;
  margin: 0 -18px;
  padding: 18px 22px;
  background: #fbfcfc;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.dispatch-decision-route-unavailable > svg {
  width: 28px;
  height: 28px;
  color: var(--warn);
}
.dispatch-decision-route-unavailable strong { font-size: 14px; }
.dispatch-decision-route-unavailable p {
  margin: 5px 0 0;
  color: var(--dispatch-secondary);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}
.dispatch-decision-route-board > footer {
  min-height: 34px;
  margin: 0 -18px;
  padding: 7px 12px;
  border-top: 1px solid #dfe4e8;
  background: #fff;
  color: var(--dispatch-secondary);
  font-size: 11px;
  text-align: center;
}
@media (max-width: 700px) {
  .dispatch-decision-route-board { margin: 10px; padding-right: 12px; padding-left: 12px; }
  .dispatch-decision-route-board > header,
  .dispatch-decision-route-unavailable,
  .dispatch-decision-route-board > footer { margin-right: -12px; margin-left: -12px; }
  .dispatch-decision-route-addresses { gap: 8px; font-size: 10px; }
  .dispatch-decision-route-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-decision-route-metrics > div { border-bottom: 1px solid #dfe4e8; }
  .dispatch-decision-route-metrics > div:nth-child(2n) { border-right: 0; }
  .dispatch-decision-route-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.dispatch-audit-check-head, .dispatch-audit-check { min-height: 31px; padding: 4px 8px; border-bottom: 1px solid #e8ebec; display: grid; grid-template-columns: 62px minmax(92px, 1.2fr) 68px 90px 54px minmax(88px, 1fr); align-items: center; gap: 5px; font-size: 10px; }
.dispatch-audit-check-head { min-height: 29px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.dispatch-audit-check > * { min-width: 0; overflow-wrap: anywhere; }
.dispatch-audit-check > span, .dispatch-audit-check > small, .dispatch-audit-check > i { color: var(--muted); font-style: normal; }
.dispatch-audit-check > em { color: var(--success); font-style: normal; font-weight: 800; }
.dispatch-audit-check.failed { background: #fff8f8; }
.dispatch-audit-check.failed > b, .dispatch-audit-check.failed > em { color: var(--danger); }
.dispatch-audit-check.unknown { background: #fffaf0; }
.dispatch-audit-check.unknown > b, .dispatch-audit-check.unknown > em { color: #9a6700; }
.dispatch-timeline-attempts { grid-column: 2 / -1; margin: 4px 0 7px; padding: 0; list-style: none; display: grid; gap: 3px; }
.dispatch-timeline-attempts li { min-height: 24px; padding: 4px 7px; border-left: 2px solid #c9cfd2; background: var(--surface-2); display: grid; grid-template-columns: 54px minmax(80px, 1fr) 70px 52px; align-items: center; gap: 6px; }
.dispatch-timeline-attempts li.success { border-left-color: var(--success); }
.dispatch-timeline-attempts li.danger { border-left-color: var(--danger); }
.dispatch-timeline-attempts li.warning { border-left-color: #d58a00; }
.dispatch-timeline-attempts li > b { width: auto; height: auto; border-radius: 0; background: transparent !important; color: var(--ink); display: block; font-size: 10px; }
.dispatch-timeline-attempts li small { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
.dispatch-audit-candidate-detail { background: var(--surface); }
.dispatch-audit-candidate-summary { min-height: 38px; padding: 6px 9px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 72px 74px; align-items: center; gap: 5px; font-size: 10px; }
.dispatch-audit-candidate-summary span { color: var(--muted); }
.dispatch-audit-candidate-summary b, .dispatch-audit-candidate-summary em { min-height: 23px; padding: 3px 5px; border-radius: 3px; background: var(--surface-2); font-style: normal; line-height: 17px; text-align: center; }
.dispatch-audit-candidate-detail.success .dispatch-audit-candidate-summary em { background: var(--success-soft); color: var(--success); }
.dispatch-audit-candidate-detail.danger .dispatch-audit-candidate-summary em { background: var(--danger-soft); color: var(--danger); }
.dispatch-audit-empty { min-height: 120px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.dispatch-audit-empty svg { width: 20px; }
.dispatch-audit-empty strong { color: var(--ink); font-size: 12px; }
.dispatch-audit-empty span { font-size: 11px; line-height: 1.45; }
.dispatch-strategy-boundary { padding: 9px 11px 12px; border-top: 1px solid var(--line); background: #fbfcfc; }
.dispatch-strategy-boundary h3 { margin: 0 0 5px; font-size: 12px; }
.dispatch-strategy-boundary ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.dispatch-exception-modal { width: min(980px, calc(100vw - 48px)); max-height: min(78vh, 760px); display: flex; flex-direction: column; }
.dispatch-exception-modal .modal-body { min-height: 0; padding: 12px; overflow: auto; }
.dispatch-exception-modal .panel { margin: 0; border: 0; box-shadow: none; }
.dispatch-exception-modal .table-wrap { max-height: calc(78vh - 150px); overflow: auto; }
.dispatch-exception-modal table { width: 100%; min-width: 820px; table-layout: fixed; }
.dispatch-exception-modal th, .dispatch-exception-modal td { padding: 9px 10px; font-size: 12px; line-height: 1.35; vertical-align: middle; overflow-wrap: anywhere; }
.dispatch-exception-modal th:nth-child(1) { width: 120px; }
.dispatch-exception-modal th:nth-child(2) { width: 175px; }
.dispatch-exception-modal th:nth-child(3) { width: 90px; }
.dispatch-exception-modal th:nth-child(4) { width: 90px; }
.dispatch-exception-modal th:nth-child(5) { width: 100px; }

@media (max-width: 1380px) and (min-width: 1181px) {
  .dispatch-mode .app-shell { grid-template-columns: 150px minmax(0, 1fr); }
  .dispatch-mode .sidebar { width: 150px; }
  .dispatch-page-head { grid-template-columns: auto minmax(360px, 1fr) auto; gap: 8px; }
  .dispatch-head-performance { grid-template-columns: 118px minmax(0, 1fr); }
  .dispatch-head-performance span { padding-left: 5px; padding-right: 5px; }
  .dispatch-unified-grid { grid-template-columns: minmax(310px, 28%) minmax(470px, 41%) minmax(340px, 31%); }
  .dispatch-unified-metrics span { font-size: 11px; }
  .dispatch-stream-row { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .dispatch-stream-row.pending { grid-template-columns: 50px 28px minmax(62px, 1fr) 46px 50px; }
  .dispatch-stream-row.going { grid-template-columns: 52px 50px 40px minmax(88px, 1fr) 46px; }
  .dispatch-stream-row.history { grid-template-columns: minmax(56px, .8fr) minmax(96px, 1.35fr) 60px minmax(62px, .9fr); }
  .dispatch-audit-check-head, .dispatch-audit-check { grid-template-columns: 54px minmax(82px, 1.2fr) 60px 78px 48px minmax(72px, 1fr); font-size: 9px; }
}

@media (max-width: 1180px) {
  body.dispatch-mode { overflow: auto; }
  .dispatch-page-head { display: block; }
  .dispatch-head-performance { height: auto; margin-top: 8px; grid-template-columns: 1fr; }
  .dispatch-head-performance header { border-right: 0; border-bottom: 1px solid var(--line); }
  .dispatch-head-performance > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dispatch-command-page .page-head > div { display: block; }
  .dispatch-command-page .page-head p { margin-top: 3px; white-space: normal; }
  .dispatch-unified-metrics { height: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dispatch-unified-metrics > div { min-height: 66px; }
  .dispatch-unified-grid { height: auto; grid-template-columns: minmax(300px, 36%) minmax(0, 64%); }
  .dispatch-unified-grid > .dispatch-candidate-panel { grid-column: 1 / -1; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 0 5px 5px; }
  .dispatch-unified-grid > .dispatch-candidate-panel .dispatch-context-side { min-height: 260px; }
  .dispatch-stream-group.history .dispatch-stream-group-list { max-height: 352px; }
  .dispatch-stream-row.pending { grid-template-columns: 44px 50px 28px minmax(82px, 1fr) 48px 52px; }
  .dispatch-stream-row.going { grid-template-columns: 54px 54px 42px minmax(96px, 1fr) 52px 46px; }
  .dispatch-stream-row.history { grid-template-columns: 50px minmax(62px, .8fr) minmax(104px, 1.35fr) 60px minmax(68px, .9fr); }
  .dispatch-attribution-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dispatch-attribution-summary > div { border-bottom: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .dispatch-unified-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-unified-metrics > div { min-height: 60px; }
  .dispatch-unified-metrics span { font-size: 11px; }
  .dispatch-unified-metrics strong { font-size: 24px; }
  .dispatch-stream-row { min-height: 58px; grid-template-columns: 58px minmax(0, 1fr) 64px; grid-template-rows: repeat(2, minmax(22px, auto)); column-gap: 7px; row-gap: 4px; padding: 6px 8px; }
  .dispatch-stream-row.pending > time { display: block; grid-area: 1 / 1; }
  .dispatch-stream-row.pending > strong { grid-area: 1 / 2; }
  .dispatch-stream-row.pending > span:nth-of-type(1) { grid-area: 2 / 1; }
  .dispatch-stream-row.pending > span:nth-of-type(2) { grid-area: 2 / 2; }
  .dispatch-stream-row.pending > span:nth-of-type(3) { grid-area: 2 / 3; }
  .dispatch-stream-row.pending > b { grid-area: 1 / 3; }
  .dispatch-stream-row.going > .dispatch-stream-id { grid-area: 1 / 1; }
  .dispatch-stream-row.going > strong { grid-area: 1 / 2; }
  .dispatch-stream-row.going > span:nth-of-type(2) { grid-area: 2 / 1; }
  .dispatch-stream-row.going > .dispatch-assignment-source { grid-area: 2 / 2; }
  .dispatch-stream-row.going > time { display: block; grid-area: 2 / 3; }
  .dispatch-stream-row.going > b { grid-area: 1 / 3; }
  .dispatch-stream-row.history > time { display: block; grid-area: 1 / 1; }
  .dispatch-stream-row.history > strong { grid-area: 1 / 2; }
  .dispatch-stream-row.history > .dispatch-assignment-source { grid-area: 2 / 1 / 3 / 3; }
  .dispatch-stream-row.history > b { grid-area: 1 / 3; }
  .dispatch-stream-row.history > .dispatch-stream-rider { grid-area: 2 / 3; }
  .dispatch-stream-group.history .dispatch-stream-group-list { max-height: 464px; }
  .dispatch-history-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-history-filter-row { align-items: stretch; flex-direction: column; }
  .dispatch-history-pager { justify-content: flex-end; }
  .dispatch-attribution-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-audit-order-line { grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); }
  .dispatch-audit-order-line b, .dispatch-audit-order-line time { display: none; }
  .dispatch-audit-check-head { display: none; }
  .dispatch-audit-check { min-height: 56px; grid-template-columns: minmax(90px, 1fr) 72px 54px; grid-template-rows: repeat(2, auto); }
  .dispatch-audit-check > span { grid-area: 1 / 1; }
  .dispatch-audit-check > strong { grid-area: 2 / 1; }
  .dispatch-audit-check > b { grid-area: 1 / 2; }
  .dispatch-audit-check > small { grid-area: 2 / 2; }
  .dispatch-audit-check > em { grid-area: 1 / 3; }
  .dispatch-audit-check > i { grid-area: 2 / 3; }
}

/* Shared operations workspace: dispatch visual language across all modules. */
@media (min-width: 1181px) {
  .operations-mode .app-shell { grid-template-columns: 165px minmax(0, 1fr); }
  .operations-mode .sidebar { width: 165px; padding: 10px 8px; }
  .operations-mode .brand { min-height: 82px; padding: 2px 17px 12px; border-bottom: 0; gap: 5px; }
  .operations-mode .brand-logo { width: 111px; }
  .operations-mode .brand-subtitle { margin-left: 0; color: #fff; font-size: 16px; font-weight: 700; }
  .operations-mode .nav { margin-top: 0; gap: 4px; }
  .operations-mode .nav-label { display: none; }
  .operations-mode .nav-item { height: 47px; padding: 0 16px; gap: 10px; border-radius: 6px; }
  .operations-mode .nav-item > span:not(.nav-counts) { font-size: 15px; }
  .operations-mode .nav-item.active { background: linear-gradient(135deg, #f36b00, #ff8a10); box-shadow: 0 6px 18px rgba(255, 91, 0, .22); }
  .operations-mode .nav-item.active::before { display: none; }
  .operations-mode .nav-counts { display: none; }
  .operations-mode .sidebar-status { padding: 10px 8px; }
}

.operations-mode .topbar { height: 54px; padding: 0 20px; box-shadow: none; }
.operations-mode .global-weather-overview { height: 38px; }
.operations-mode .global-surcharge-overview { height: 38px; }
.operations-mode .page { width: min(1720px, 100%); padding: 16px 20px 32px; animation: none; }
.operations-mode .page-head { min-height: 36px; margin-bottom: 12px; align-items: center; }
.operations-mode .page-head h1 { font-size: 22px; line-height: 1.25; }
.operations-mode .page-head p { margin-top: 2px; font-size: 13px; }
.operations-mode .metrics { min-height: 90px; border-radius: 5px; }
.operations-mode .metric { min-height: 88px; padding: 12px 16px; }
.operations-mode .metric strong { margin-top: 6px; font-size: 24px; }
.operations-mode .metric small { margin-top: 6px; }
.operations-mode .panel { border-radius: 5px; }
.operations-mode .panel-head { min-height: 48px; padding: 0 16px; }
.operations-mode .panel-head h2 { font-size: 15px; }
.operations-mode .panel-body { padding: 16px; }
.operations-mode .workspace-tabs { margin-bottom: 12px; gap: 0; }
.operations-mode .workspace-tab { min-width: 112px; height: 40px; }
.operations-mode .filters { margin-bottom: 12px; }
.operations-mode th { height: 38px; padding: 0 12px; }
.operations-mode td { height: 54px; padding: 8px 12px; }
.operations-mode .grid-main,
.operations-mode .rider-rank-section,
.operations-mode .rules-panel { margin-top: 12px; }
.operations-mode .rule-config { min-height: 64px; padding: 10px 16px; gap: 12px; }
.operations-mode .strategy-option { min-height: 104px; padding: 12px 16px; border-radius: 6px; }
.operations-mode .lost-hero { margin-bottom: 12px; gap: 8px; }
.operations-mode .lost-scorecard,
.operations-mode .lost-split-card { min-height: 112px; border-radius: 6px; }
.operations-mode .lost-scorecard { padding: 16px; }
.operations-mode .lost-scorecard strong { font-size: 40px; }
.operations-mode .lost-split-card { padding: 16px; }
.operations-mode .lost-analysis-grid,
.operations-mode .lost-region-grid { gap: 8px; }
.operations-mode .system-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.operations-mode .system-metrics .metric { border-bottom: 0; }
.operations-mode .weather-situation-panel,
.operations-mode .weather-decision-panel,
.operations-mode .current-pricing-panel { min-height: 0; }
.operations-mode .status { min-height: 26px; font-size: 12px; }
.operations-mode .pagination { min-height: 48px; }
.dispatch-performance-band { margin-top: 12px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: rgba(255,255,255,.58); }
.dispatch-performance-band > header { min-height: 48px; padding: 8px 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dispatch-performance-band h2 { margin: 0; font-size: 16px; }
.dispatch-performance-band header span,
.dispatch-performance-band header small { color: var(--muted); font-size: 11px; }
.dispatch-performance-band header span { display: block; margin-top: 2px; }
.dispatch-performance-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.dispatch-performance-grid > div { min-width: 0; min-height: 72px; padding: 10px 12px; border-right: 1px solid var(--line); }
.dispatch-performance-grid > div:last-child { border-right: 0; }
.dispatch-performance-grid span,
.dispatch-performance-grid strong,
.dispatch-performance-grid small { display: block; }
.dispatch-performance-grid span { color: var(--muted); font-size: 11px; }
.dispatch-performance-grid strong { margin-top: 2px; font-size: 20px; font-variant-numeric: tabular-nums; }
.dispatch-performance-grid small { margin-top: 2px; overflow: hidden; color: var(--hint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-performance-grid .warning strong { color: var(--warn); }
.dispatch-command-page .dispatch-performance-band-compact { flex: 0 0 auto; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.dispatch-command-page .dispatch-performance-band-compact > header { min-height: 34px; padding: 5px 10px; gap: 10px; }
.dispatch-command-page .dispatch-performance-band-compact h2 { font-size: 14px; line-height: 1.2; }
.dispatch-command-page .dispatch-performance-band-compact header span,
.dispatch-command-page .dispatch-performance-band-compact header small { font-size: 10px; line-height: 1.25; }
.dispatch-command-page .dispatch-performance-band-compact .dispatch-performance-grid > div { min-height: 50px; padding: 6px 9px; }
.dispatch-command-page .dispatch-performance-band-compact .dispatch-performance-grid span { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.dispatch-command-page .dispatch-performance-band-compact .dispatch-performance-grid strong { margin-top: 1px; font-size: 18px; line-height: 1.1; }
.dispatch-command-page .dispatch-performance-band-compact .dispatch-performance-grid small { margin-top: 1px; font-size: 10px; }

/* Readability and shared operational typography. */
:root {
  --muted: #535d62;
  --hint: #687278;
}
.page-head p,
.panel-head span,
.refresh-meta,
.filter-note { color: var(--muted); font-size: 13px; }
.metric small { color: var(--muted); font-size: 12px; }
.switch-line span,
.field small,
.rule-config-copy span,
.strategy-option small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.dispatch-command-page .page-head p,
.dispatch-live-meta { font-size: 13px; }
.dispatch-context-pane > header span,
.dispatch-context-side > header span,
.dispatch-context-pane > header small,
.dispatch-context-side > header small { color: var(--muted); font-size: 12px; }
.dispatch-context-pane > header p { color: var(--muted); font-size: 12px; }
.dispatch-side-note { color: var(--muted); font-size: 12px; }
.dispatch-history-timeline h3 small,
.dispatch-history-result span,
.dispatch-history-result small,
.dispatch-history-reason li { font-size: 12px; }
.dispatch-evidence-drawer > summary { font-size: 12px; }

.dispatch-timing-panel { border-color: #f1aa78; background: #fffaf6; }
.dispatch-timing-panel .panel-head { min-height: 56px; }
.dispatch-timing-result { flex: 0 0 auto; padding: 6px 10px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.dispatch-timing-panel .rule-config { min-height: 72px; }
.dispatch-timing-panel .rule-value { min-width: 126px; }
.dispatch-timing-panel .rule-value input { font-size: 16px; font-weight: 800; }

/* Dispatch center: readable dense layout, horizontal audit flow and bounded maps. */
.dispatch-command-page,
.dispatch-unified-grid { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.dispatch-stream-row { font-size: 12px; }
.dispatch-stream-row strong { font-size: 13px; }
.dispatch-stream-row small,
.dispatch-stream-row time,
.dispatch-stream-row span { font-size: 11px; }
.dispatch-history-filter button,
.dispatch-history-pager span { font-size: 11px; }
.dispatch-context-pane > header h2,
.dispatch-context-side > header h2 { font-size: 18px; }
.dispatch-decision-order-meta span,
.dispatch-decision-stage,
.dispatch-decision-actions span { font-size: 11px; }
.dispatch-decision-order-meta strong,
.dispatch-decision-route span { font-size: 13px; }
.dispatch-decision-lifecycle strong { font-size: 11px; }
.dispatch-decision-lifecycle time { font-size: 10px; }
.dispatch-snapshot-grid span { font-size: 11px; }
.dispatch-snapshot-grid strong { font-size: 14px; }
.dispatch-history-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}
.dispatch-history-timeline h3 { grid-column: 1 / -1; margin-bottom: 0; font-size: 14px; }
.dispatch-history-timeline > div {
  min-height: 112px;
  padding: 10px 10px 9px 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 12px;
}
.dispatch-history-timeline > div::before { display: none; }
.dispatch-history-timeline > div > b { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; font-size: 9px; }
.dispatch-history-timeline > div > strong { font-size: 13px; line-height: 1.25; }
.dispatch-history-timeline > div > time,
.dispatch-history-timeline > div > span,
.dispatch-history-timeline > div > em { font-size: 11px; }
.dispatch-history-timeline > div > p {
  width: 100%;
  margin-top: 3px;
  overflow: visible;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}
.dispatch-timeline-attempts { width: 100%; grid-column: auto; margin: 5px 0 0; }
.dispatch-timeline-attempts li { grid-template-columns: 46px minmax(0, 1fr); gap: 3px 6px; }
.dispatch-timeline-attempts li time,
.dispatch-timeline-attempts li small { grid-column: 2; }
.dispatch-reassign-modal { width: min(900px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 28px)); display: flex; flex-direction: column; }
.dispatch-reassign-modal .modal-body { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }
.dispatch-reassign-status { min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); display: flex; align-items: center; gap: 8px; }
.dispatch-reassign-status svg { width: 17px; color: var(--primary); }
.dispatch-reassign-status strong { font-size: 13px; }
.dispatch-reassign-mobile,
.dispatch-reassign-remark { margin-top: 12px; display: grid; gap: 6px; }
.dispatch-reassign-mobile span,
.dispatch-reassign-remark span { font-size: 13px; font-weight: 750; }
.dispatch-reassign-mobile > div { position: relative; min-width: 0; }
.dispatch-reassign-mobile > div > svg { position: absolute; z-index: 1; top: 50%; left: 11px; width: 17px; height: 17px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.dispatch-reassign-mobile input,
.dispatch-reassign-remark textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; font: inherit; font-size: 13px; }
.dispatch-reassign-mobile input { height: 42px; padding-left: 36px; }
.dispatch-reassign-mobile input:focus,
.dispatch-reassign-remark textarea:focus { border-color: var(--primary); outline: 2px solid rgba(255, 90, 0, .12); }
.dispatch-reassign-list { max-height: min(390px, 46vh); margin-top: 10px; border: 1px solid var(--line); border-radius: 5px; overflow-x: hidden; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.dispatch-reassign-list > button { min-width: 0; min-height: 126px; padding: 11px 12px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.dispatch-reassign-list > button:nth-child(2n) { border-right: 0; }
.dispatch-reassign-list > button:hover { background: var(--surface-2); }
.dispatch-reassign-list > button.active { background: #fff7f0; box-shadow: inset 4px 0 var(--primary); }
.dispatch-reassign-list > button > header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dispatch-reassign-list > button > header > div { min-width: 0; }
.dispatch-reassign-list > button > header strong,
.dispatch-reassign-list > button > header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-reassign-list > button > header strong { font-size: 16px; }
.dispatch-reassign-list > button > header span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.dispatch-reassign-list > button > header > b { flex: 0 0 auto; min-width: 54px; padding: 5px 7px; border-radius: 4px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1.05; text-align: center; }
.dispatch-reassign-list > button > header > b small { margin-top: 3px; color: inherit; font-size: 9px; font-weight: 650; }
.dispatch-reassign-list > button > header > b.online { min-width: auto; background: var(--success-soft); color: var(--success); font-size: 11px; }
.dispatch-reassign-list dl { margin: 9px 0 0; display: grid; grid-template-columns: .8fr .8fr 1.4fr; gap: 8px; }
.dispatch-reassign-list dt { color: var(--muted); font-size: 10px; }
.dispatch-reassign-list dd { margin: 2px 0 0; overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-reassign-list > button > p { margin: 8px 0 0; color: var(--ink-2); font-size: 11px; line-height: 1.45; }
.dispatch-reassign-list > .lane-empty { grid-column: 1 / -1; min-height: 150px; }
.dispatch-reassign-remark textarea { width: 100%; min-height: 78px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; resize: vertical; font: inherit; font-size: 13px; }
.dispatch-reassign-modal .modal-actions > span { min-width: 0; flex: 1; color: var(--muted); font-size: 12px; }
.manual-assignment-grid,
.manual-route-insight,
.manual-route-map,
.manual-baidu-map { min-width: 0; max-width: 100%; overflow: hidden; }
.manual-assignment-grid { min-height: 0; overflow: hidden; }
.manual-route-insight { min-height: 0; overflow: hidden; }
.manual-route-map { min-height: 0; contain: layout paint; }
.manual-baidu-map { width: 100%; height: 100%; min-height: 0; contain: layout paint; }

@media (max-width: 1500px) {
  .dispatch-history-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .manual-baidu-map { height: 320px; min-height: 320px; }
}

@media (max-width: 760px) {
  .dispatch-history-timeline { grid-template-columns: 1fr; }
  .manual-baidu-map { height: 320px; min-height: 320px; }
  .dispatch-reassign-list { grid-template-columns: 1fr; }
  .dispatch-reassign-list > button { border-right: 0; }
  .dispatch-reassign-modal .modal-actions { align-items: stretch; flex-wrap: wrap; }
  .dispatch-reassign-modal .modal-actions > span { flex-basis: 100%; }
}

.going-context,
.going-side-context { display: flex; flex-direction: column; }
.dispatch-going-evidence,
.dispatch-going-candidates { min-height: 0; border-top: 1px solid var(--line); background: var(--surface); }
.dispatch-going-evidence { flex: 1 1 auto; display: flex; flex-direction: column; }
.dispatch-going-evidence > header,
.dispatch-going-candidates > header { min-height: 44px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-going-evidence > header span,
.dispatch-going-evidence > header strong { display: block; }
.dispatch-going-evidence > header span { color: var(--muted); font-size: 12px; }
.dispatch-going-evidence > header strong,
.dispatch-going-candidates > header strong { margin-top: 2px; font-size: 14px; }
.dispatch-going-evidence > header > b { flex: 0 0 auto; }
.dispatch-going-evidence.empty,
.dispatch-going-evidence.loading { padding: 22px; align-items: center; justify-content: center; text-align: center; }
.dispatch-going-evidence.empty > header { width: 100%; padding: 0 0 10px; justify-content: center; }
.dispatch-going-evidence.empty p,
.dispatch-going-candidates.empty p { margin: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dispatch-going-evidence.loading svg { width: 22px; color: var(--primary); animation: dispatch-spin 1s linear infinite; }
.dispatch-going-evidence.loading span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.dispatch-going-reasons { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dispatch-going-reasons h3 { margin: 0 0 5px; font-size: 13px; }
.dispatch-going-reasons ul { margin: 0; padding: 0; list-style: none; }
.dispatch-going-reasons li { position: relative; min-height: 20px; padding-left: 13px; color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.dispatch-going-reasons li::before { position: absolute; left: 0; color: var(--muted); content: "·"; font-weight: 900; }
.dispatch-going-reasons li.passed::before { color: var(--success); content: "✓"; }
.going-evidence-drawer { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.going-evidence-drawer > summary { flex: 0 0 auto; }
.going-evidence-drawer[open] > div { max-height: none; min-height: 0; flex: 1 1 auto; }
.dispatch-going-candidates { flex: 1 1 auto; overflow: auto; }
.dispatch-going-candidates.loading { min-height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.dispatch-going-candidates > header span { color: var(--muted); font-size: 12px; }
@media (max-width: 1180px) {
  .history-context .dispatch-order-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-context .dispatch-order-facts .wide { grid-column: 1 / -1; }
}

@media (max-width: 1180px) {
  .operations-mode .system-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dispatch-performance-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dispatch-performance-grid > div:nth-child(4n) { border-right: 0; }
}

@media (max-width: 760px) {
  .operations-mode .topbar { height: 58px; padding: 0 12px; }
  .operations-mode .page { padding: 16px 12px 28px; }
  .operations-mode .page-head { align-items: flex-start; }
  .operations-mode .page-head h1 { font-size: 22px; }
  .operations-mode .metrics,
  .operations-mode .system-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-mode .metric { min-height: 76px; padding: 10px 12px; }
  .operations-mode .metric strong { font-size: 22px; }
  .operations-mode .panel-head { padding: 8px 12px; }
  .dispatch-performance-band > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .dispatch-performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-performance-grid > div { min-height: 68px; padding: 8px; }
  .dispatch-performance-grid > div:nth-child(2n) { border-right: 0; }
}

/* Final desktop authority: dispatch keeps a full-width canvas and opens navigation as a drawer. */
@media (min-width: 1181px) {
  body.dispatch-mode { height: 100vh; overflow: hidden; }
  .dispatch-mode .app-shell { height: 100vh; min-height: 0; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
  .dispatch-mode .topbar { display: none; }
  .dispatch-mode .sidebar { position: fixed; z-index: 120; inset: 0 auto 0 0; display: flex; width: 190px; transform: translateX(-102%); box-shadow: 12px 0 30px rgba(21, 27, 30, .2); transition: transform .18s var(--ease); }
  .dispatch-mode .sidebar.open { transform: translateX(0); }
  .dispatch-module-menu { display: inline-flex; }
  .dispatch-mode .main { width: 100%; height: 100vh; min-width: 0; overflow: hidden; }
  .dispatch-mode .dispatch-command-page { width: 100%; height: 100vh; min-width: 0; padding: 0 7px 7px; overflow: hidden; }
}

/* Scheme 3 final authority: keep the shared navigation and topbar visible. */
@media (min-width: 1181px) {
  .dispatch-mode .app-shell { grid-template-columns: 165px minmax(0, 1fr); }
  .dispatch-mode .topbar { display: flex; }
  .dispatch-mode .sidebar { position: sticky; inset: auto; width: 165px; padding: 10px 8px; transform: none; box-shadow: none; }
  .dispatch-mode .sidebar.open { transform: none; }
  .dispatch-mode .brand { min-height: 82px; padding: 2px 17px 12px; border-bottom: 0; gap: 5px; }
  .dispatch-mode .brand-logo { width: 111px; }
  .dispatch-mode .brand-subtitle { margin-left: 0; color: #fff; font-size: 16px; font-weight: 700; }
  .dispatch-mode .nav { margin-top: 0; gap: 4px; }
  .dispatch-mode .nav-label { display: none; }
  .dispatch-mode .nav-item { height: 47px; padding: 0 16px; gap: 10px; border-radius: 6px; }
  .dispatch-mode .nav-item > span:not(.nav-counts) { font-size: 15px; }
  .dispatch-mode .nav-item.active { background: linear-gradient(135deg, #f36b00, #ff8a10); box-shadow: 0 6px 18px rgba(255, 91, 0, .22); }
  .dispatch-mode .nav-item.active::before { display: none; }
  .dispatch-mode .nav-counts { display: none; }
  .dispatch-mode .sidebar-status { padding: 10px 8px; }
  .dispatch-module-menu { display: none; }
  .dispatch-mode .main { width: auto; height: 100vh; }
  .dispatch-mode .dispatch-command-page { width: 100%; max-width: none; height: calc(100vh - 62px); margin: 0; padding: 10px 12px 14px; }
}

@media (max-width: 1380px) and (min-width: 1181px) {
  .dispatch-mode .app-shell { grid-template-columns: 165px minmax(0, 1fr); }
  .dispatch-unified-grid.decision-first { grid-template-columns: minmax(290px, 28%) minmax(400px, 1fr) minmax(290px, 28%); }
}

.dispatch-command-page:has(.dispatch-approval-slot .approval-notification-host:not(:empty)) .dispatch-unified-grid.decision-first {
  height: calc(100vh - 260px);
  min-height: 420px;
}
/* Dispatch center readability authority: scheme 3 must remain legible on dense desktop layouts. */
.dispatch-feed-row { min-height: 72px; line-height: 1.4; }
.dispatch-feed-time strong { font-size: 14px; }
.dispatch-feed-time span,
.dispatch-feed-order span,
.dispatch-feed-state span,
.dispatch-feed-pagination { font-size: 11px; }
.dispatch-feed-order strong,
.dispatch-feed-state b { font-size: 12px; }
.dispatch-feed-state b { padding: 3px 6px; }

.dispatch-decision-first-pane > header span,
.dispatch-context-pane.history-context > header span,
.dispatch-decision-first-pane > header p,
.dispatch-context-pane.history-context > header p,
.dispatch-decision-order-meta span,
.dispatch-final-decision span,
.dispatch-rider-snapshot > header span,
.dispatch-rider-snapshot > header small,
.dispatch-snapshot-grid span,
.dispatch-decision-actions span { font-size: 11px; }
.dispatch-decision-stage,
.dispatch-decision-order-meta strong,
.dispatch-decision-route span,
.dispatch-final-decision p,
.dispatch-snapshot-grid strong,
.dispatch-snapshot-orders > strong,
.dispatch-snapshot-orders > div { font-size: 12px; }
.dispatch-decision-lifecycle strong { font-size: 11px; }
.dispatch-decision-lifecycle time { font-size: 10px; }

.dispatch-attribution-summary span,
.dispatch-attribution-summary small { font-size: 11px; }
.dispatch-attribution-summary strong { font-size: 13px; }
.dispatch-audit-order-line,
.dispatch-audit-check-head,
.dispatch-audit-check { min-height: 36px; font-size: 12px; line-height: 1.35; }
.dispatch-audit-check-head { min-height: 32px; }
.dispatch-winner-evidence > header strong { font-size: 12px; }
.dispatch-winner-evidence > header small { font-size: 11px; }

.dispatch-rejected-list > header span,
.dispatch-rejected-list > header small,
.dispatch-rejected-detail > header span { font-size: 11px; }
.dispatch-rejected-columns { min-height: 32px; font-size: 11px; }
.dispatch-rejected-row { min-height: 58px; line-height: 1.35; }
.dispatch-rejected-row > b { font-size: 10px; }
.dispatch-rejected-row strong { font-size: 13px; }
.dispatch-rejected-row div span,
.dispatch-rejected-row em,
.dispatch-rejected-row > span,
.dispatch-rejected-row small { font-size: 11px; }
.dispatch-rejected-detail > p { font-size: 12px; }
.dispatch-rejected-facts dt { font-size: 11px; }
.dispatch-rejected-facts dd { font-size: 12px; }
.dispatch-rejected-checks > div { min-height: 42px; }
.dispatch-rejected-checks span,
.dispatch-rejected-checks strong,
.dispatch-rejected-checks small,
.dispatch-rejected-checks b { font-size: 11px; line-height: 1.35; }

/* Dispatch business text authority: readable at a glance without flattening hierarchy. */
.dispatch-command-page {
  --dispatch-secondary: #3f494e;
  --dispatch-supporting: #566167;
}

.dispatch-feed-row { min-height: 78px; }
.dispatch-feed-time strong { font-size: 15px; font-weight: 800; }
.dispatch-feed-time span,
.dispatch-feed-order span,
.dispatch-feed-state span,
.dispatch-feed-pagination {
  color: var(--dispatch-secondary);
  font-size: 12px;
  font-weight: 550;
}
.dispatch-feed-order strong { font-size: 14px; font-weight: 800; }
.dispatch-feed-state b { font-size: 12px; font-weight: 800; }

.dispatch-decision-first-pane > header span,
.dispatch-context-pane.history-context > header span,
.dispatch-decision-first-pane > header p,
.dispatch-context-pane.history-context > header p,
.dispatch-decision-order-meta span,
.dispatch-final-decision span,
.dispatch-rider-snapshot > header span,
.dispatch-rider-snapshot > header small,
.dispatch-snapshot-grid span,
.dispatch-decision-actions span {
  color: var(--dispatch-secondary);
  font-size: 12px;
  font-weight: 550;
}
.dispatch-decision-stage { font-size: 12px; font-weight: 800; }
.dispatch-decision-order-meta strong,
.dispatch-final-decision p,
.dispatch-snapshot-grid strong,
.dispatch-snapshot-orders > strong,
.dispatch-snapshot-orders > div { font-size: 13px; }
.dispatch-decision-route span { font-size: 14px; font-weight: 750; }
.dispatch-decision-lifecycle strong { font-size: 12px; font-weight: 750; }
.dispatch-decision-lifecycle time { color: var(--dispatch-supporting); font-size: 11px; }

.dispatch-history-timeline h3 small { color: var(--dispatch-supporting); font-size: 12px; font-weight: 550; }
.dispatch-history-timeline > div { min-height: 124px; font-size: 13px; }
.dispatch-history-timeline > div > strong { font-size: 14px; font-weight: 800; }
.dispatch-history-timeline > div > time,
.dispatch-history-timeline > div > span,
.dispatch-history-timeline > div > em { color: var(--dispatch-secondary); font-size: 12px; font-weight: 600; }
.dispatch-history-timeline > div > p { color: var(--dispatch-secondary); font-size: 12px; line-height: 1.55; }
.dispatch-timeline-attempts li > b,
.dispatch-timeline-attempts li span,
.dispatch-timeline-attempts li em,
.dispatch-timeline-attempts li time,
.dispatch-timeline-attempts li small { font-size: 12px; line-height: 1.4; }

.dispatch-attribution-summary span,
.dispatch-attribution-summary small,
.dispatch-winner-evidence > header small { color: var(--dispatch-secondary); font-size: 12px; font-weight: 550; }
.dispatch-attribution-summary strong,
.dispatch-winner-evidence > header strong { font-size: 14px; }
.dispatch-audit-order-line,
.dispatch-audit-check-head,
.dispatch-audit-check { min-height: 40px; color: var(--dispatch-secondary); font-size: 13px; line-height: 1.4; }
.dispatch-audit-check-head { min-height: 36px; font-weight: 750; }
.dispatch-audit-check strong,
.dispatch-audit-check b,
.dispatch-audit-check em { font-weight: 750; }

.dispatch-rejected-list > header span,
.dispatch-rejected-list > header small,
.dispatch-rejected-detail > header span { color: var(--dispatch-secondary); font-size: 12px; font-weight: 550; }
.dispatch-rejected-columns { min-height: 36px; color: var(--dispatch-secondary); font-size: 12px; font-weight: 750; }
.dispatch-rejected-row { min-height: 64px; line-height: 1.45; }
.dispatch-rejected-row > b { font-size: 11px; font-weight: 800; }
.dispatch-rejected-row strong { font-size: 14px; font-weight: 800; }
.dispatch-rejected-row div span,
.dispatch-rejected-row em,
.dispatch-rejected-row > span,
.dispatch-rejected-row small { font-size: 12px; font-weight: 600; }
.dispatch-rejected-row div span { color: var(--dispatch-secondary); }
.dispatch-rejected-detail > p { font-size: 13px; font-weight: 650; line-height: 1.55; }
.dispatch-rejected-facts dt { color: var(--dispatch-secondary); font-size: 12px; }
.dispatch-rejected-facts dd { font-size: 13px; font-weight: 800; }
.dispatch-rejected-checks > div { min-height: 46px; }
.dispatch-rejected-checks span,
.dispatch-rejected-checks strong,
.dispatch-rejected-checks small,
.dispatch-rejected-checks b { font-size: 12px; line-height: 1.4; }
.dispatch-rejected-checks small { color: var(--dispatch-secondary); }

/* Candidate ranking and rider audit snapshot in the dispatch right rail. */
.dispatch-rejected-inspector {
  grid-template-rows: minmax(250px, 44%) minmax(320px, 56%);
}
.dispatch-rejected-list > header {
  min-height: 72px;
  padding: 10px 12px;
}
.dispatch-rejected-list > header > div { min-width: 0; }
.dispatch-rejected-list > header span,
.dispatch-rejected-list > header strong { display: block; }
.dispatch-rejected-list > header span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.dispatch-rejected-list > header strong {
  margin-top: 4px;
  color: var(--dispatch-secondary);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}
.dispatch-rejected-list > header > b {
  flex: none;
  color: var(--primary);
  font-size: 20px;
  font-weight: 850;
}
.dispatch-rejected-columns,
.dispatch-rejected-row {
  grid-template-columns: 24px minmax(72px, 1fr) 58px 46px 42px 52px;
  gap: 5px;
}
.dispatch-rejected-columns {
  min-height: 36px;
  padding: 0 9px;
  color: var(--dispatch-secondary);
  font-size: 11px;
  font-weight: 750;
}
.dispatch-rejected-row {
  min-height: 60px;
  padding: 6px 9px;
}
.dispatch-rejected-row > b {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
.dispatch-rejected-row strong { font-size: 13px; }
.dispatch-rejected-row div span {
  margin-top: 2px;
  color: var(--dispatch-secondary);
  font-size: 11px;
  font-weight: 550;
}
.dispatch-rejected-row em,
.dispatch-rejected-row > span,
.dispatch-rejected-row > small {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dispatch-rejected-row > small.passed { color: var(--success); }
.dispatch-rejected-row > small.failed { color: var(--danger); }
.dispatch-rejected-row .dispatch-candidate-score {
  color: var(--success);
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}
.dispatch-rejected-detail > header {
  min-height: 68px;
  padding: 10px 14px;
}
.dispatch-rejected-detail > header span {
  color: var(--dispatch-secondary);
  font-size: 12px;
  font-weight: 550;
}
.dispatch-rejected-detail > header h3 {
  margin-top: 3px;
  font-size: 18px;
}
.dispatch-rejected-detail > header > b {
  color: var(--primary);
  font-size: 30px;
  font-weight: 850;
}
.dispatch-rejected-detail > header > b small {
  margin-left: 2px;
  color: var(--primary);
  font-size: 11px;
}
.dispatch-candidate-score-parts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.dispatch-candidate-score-parts > div {
  min-width: 0;
  padding: 9px 4px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.dispatch-candidate-score-parts > div:last-child { border-right: 0; }
.dispatch-candidate-score-parts span,
.dispatch-candidate-score-parts strong { display: block; }
.dispatch-candidate-score-parts span {
  overflow: hidden;
  color: var(--dispatch-secondary);
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-candidate-score-parts strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}
.dispatch-rejected-checks { padding: 0; }
.dispatch-rejected-checks > div {
  min-height: 74px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 7px;
}
.dispatch-rejected-checks > div > svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}
.dispatch-rejected-checks > div.failed > svg { color: var(--danger); }
.dispatch-rejected-checks > div > span { min-width: 0; }
.dispatch-rejected-checks > div > span strong,
.dispatch-rejected-checks > div > span small { display: block; }
.dispatch-rejected-checks > div > span strong {
  overflow: visible;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: clip;
  white-space: normal;
}
.dispatch-rejected-checks > div > span small {
  margin-top: 3px;
  overflow: visible;
  color: var(--dispatch-secondary);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}
.dispatch-rejected-checks > div > b {
  overflow: visible;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.dispatch-rejected-checks > div.failed > b { color: var(--danger); }
.dispatch-rejected-checks > div > em {
  grid-column: 2 / 4;
  overflow: visible;
  color: #98514b;
  font-size: 11px;
  font-style: normal;
  font-weight: 550;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 420px) {
  .dispatch-candidate-score-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dispatch-candidate-score-parts > div { border-bottom: 1px solid var(--line); }
}

/* Unified order cards: three aligned business blocks with explicit status tags. */
.dispatch-feed-row {
  height: 108px;
  min-height: 108px;
  padding: 6px;
  grid-template-columns: 78px minmax(0, 1fr) 104px;
  align-items: stretch;
  gap: 6px;
  background: #f4f6f7;
}
.dispatch-feed-row:hover { background: #eef2f3; }
.dispatch-feed-row.active { background: #fff1e7; box-shadow: inset 3px 0 var(--primary); }
.dispatch-feed-time,
.dispatch-feed-order,
.dispatch-feed-state {
  min-width: 0;
  height: 96px;
  min-height: 96px;
  padding: 7px 8px;
  border: 1px solid #dce2e5;
  border-radius: 4px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.dispatch-feed-row.active .dispatch-feed-time,
.dispatch-feed-row.active .dispatch-feed-order,
.dispatch-feed-row.active .dispatch-feed-state { border-color: #f3c4a7; }
.dispatch-feed-section-label {
  min-height: 14px;
  margin-bottom: 3px;
  color: #59646a;
  display: block;
  font-size: 10px;
  font-weight: 750;
  line-height: 14px;
}
.dispatch-feed-time strong {
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}
.dispatch-feed-time span {
  margin-top: auto;
  color: #3f494e;
  font-size: 12px;
  font-weight: 650;
}
.dispatch-feed-order strong {
  width: 100%;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}
.dispatch-feed-order span {
  width: 100%;
  margin-top: 2px;
  color: #364046;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.dispatch-feed-state { text-align: left; }
.dispatch-feed-state b,
.dispatch-feed-state span {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  border-radius: 3px;
  text-align: center;
}
.dispatch-feed-state b {
  padding: 3px 5px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}
.dispatch-feed-state span {
  margin-top: 5px;
  padding: 3px 5px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dispatch-feed-state b.neutral,
.dispatch-feed-state span.neutral { background: #e8edef; color: #344047; }
.dispatch-feed-state b.success,
.dispatch-feed-state span.success { background: var(--success-soft); color: #08724c; }
.dispatch-feed-state b.warning,
.dispatch-feed-state span.warning { background: var(--warn-soft); color: #8b5900; }
.dispatch-feed-state b.danger,
.dispatch-feed-state span.danger { background: var(--danger-soft); color: #b8323a; }
.dispatch-feed-state b.info,
.dispatch-feed-state span.info { background: var(--info-soft); color: #176a82; }

@media (max-width: 1380px) {
  .dispatch-feed-row { grid-template-columns: 74px minmax(0, 1fr) 88px; gap: 5px; }
  .dispatch-feed-time,
  .dispatch-feed-order,
  .dispatch-feed-state { padding-right: 6px; padding-left: 6px; }
  .dispatch-feed-time strong { font-size: 14px; }
}

/* Historical order audit: same operations-console language, with filters grouped by decision scope. */
.history-order-filter-panel { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.history-order-filter-panel > header { min-height: 58px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.history-order-filter-panel > header h2 { margin: 0; font-size: 16px; }
.history-order-filter-panel > header span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.history-order-filters { padding: 14px 17px 16px; display: grid; grid-template-columns: auto 150px minmax(170px, 1.3fr) minmax(150px, 1fr) minmax(150px, 1fr) 160px 160px auto; align-items: end; gap: 10px; }
.history-order-filters .field { min-width: 0; margin: 0; }
.history-order-filters .field > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.history-order-filters input, .history-order-filters select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--surface); color: var(--ink); font-size: 12px; }
.history-order-filters input:focus, .history-order-filters select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,90,0,.1); }
.history-date-mode { align-self: end; min-height: 38px; }
.history-date-mode button { min-width: 50px; height: 30px; }
.history-order-submit { height: 38px; padding-inline: 13px; }
.history-order-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.history-order-metrics > div { min-height: 82px; padding: 13px 16px; border-right: 1px solid var(--line); }
.history-order-metrics > div:last-child { border-right: 0; }
.history-order-metrics span, .history-order-metrics strong, .history-order-metrics small { display: block; }
.history-order-metrics span { color: var(--muted); font-size: 11px; font-weight: 700; }
.history-order-metrics strong { margin-top: 6px; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.history-order-metrics strong.good { color: var(--success); }
.history-order-metrics strong.warn { color: var(--warn); }
.history-order-metrics small { margin-top: 5px; color: var(--hint); font-size: 10px; }
.history-order-results { overflow: hidden; }
.history-order-results > .panel-head { min-height: 60px; }
.history-order-results > .panel-head h2 { display: flex; align-items: center; gap: 7px; }
.history-result-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.history-order-table-wrap { overflow-x: auto; }
.history-order-table { min-width: 1080px; }
.history-order-table th { height: 42px; padding: 0 13px; background: #f4f6f7; font-size: 11px; }
.history-order-table td { min-height: 76px; height: 76px; padding: 10px 13px; font-size: 12px; vertical-align: middle; }
.history-order-table td > strong, .history-order-table td > small, .history-order-table td > span { display: block; }
.history-order-table td > strong { color: var(--ink-2); font-size: 12px; font-weight: 800; }
.history-order-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.history-order-table .status { width: fit-content; min-height: 24px; padding-inline: 8px; font-size: 11px; }
.history-order-route { min-width: 300px; }
.history-order-route > strong { font-size: 13px !important; }
.history-order-route > span { margin-top: 4px; overflow: hidden; color: var(--ink-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-order-route > span b { display: inline-grid; width: 16px; height: 16px; margin-right: 5px; border-radius: 50%; place-items: center; background: var(--success-soft); color: var(--success); font-size: 9px; }
.history-order-route > span:nth-of-type(2) b { background: var(--danger-soft); color: var(--danger); }
.history-order-route > small { margin-top: 5px !important; color: var(--hint) !important; }
.history-detail-button { height: 32px; padding: 0 9px; font-size: 11px; }
.history-detail-button svg { width: 14px; height: 14px; }
.history-order-pagination { min-height: 50px; padding: 0 13px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.history-order-pagination > div { display: flex; align-items: center; gap: 7px; }
.history-order-pagination b { min-width: 25px; color: var(--ink-2); text-align: center; }
.history-orders-empty { min-height: 310px; }
.history-order-audit-modal { width: min(820px, calc(100vw - 28px)); max-height: min(86vh, 760px); display: flex; flex-direction: column; }
.history-order-audit-modal .modal-head { flex: 0 0 auto; }
.history-order-audit-modal .modal-head h3 { font-size: 16px; }
.history-order-audit-modal .modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.history-order-audit-modal .modal-body { min-height: 0; padding: 0; overflow: auto; }
.history-audit-summary { padding: 14px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: var(--surface-2); }
.history-audit-summary span, .history-audit-summary strong { display: block; }
.history-audit-summary span { color: var(--muted); font-size: 10px; }
.history-audit-summary strong { margin-top: 4px; font-size: 13px; }
.history-audit-route { padding: 13px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.history-audit-route span, .history-audit-route strong { display: block; }
.history-audit-route span { color: var(--muted); font-size: 10px; }
.history-audit-route strong { margin-top: 4px; color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.history-audit-section { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.history-audit-section:last-child { border-bottom: 0; }
.history-audit-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.history-audit-section h4 { margin: 0; font-size: 13px; }
.history-audit-section > header span { color: var(--muted); font-size: 11px; }
.history-audit-facts { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.history-audit-facts span, .history-audit-facts strong { display: block; }
.history-audit-facts span { color: var(--muted); font-size: 10px; }
.history-audit-facts strong { margin-top: 3px; font-size: 12px; }
.history-audit-candidates { margin-top: 10px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.history-audit-candidates > div { min-height: 42px; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: 24px 130px minmax(0, 1fr); align-items: center; gap: 8px; }
.history-audit-candidates > div:last-child { border-bottom: 0; }
.history-audit-candidates b { width: 20px; height: 20px; border-radius: 4px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 10px; }
.history-audit-candidates strong { font-size: 12px; }
.history-audit-candidates span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-audit-empty { margin-top: 10px; padding: 15px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 1180px) {
  .history-order-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .history-filter-wide { grid-column: span 2; }
  .history-order-submit { grid-column: span 2; }
}
@media (max-width: 760px) {
  .history-order-filter-panel > header { min-height: 68px; padding: 10px 14px; align-items: flex-start; }
  .history-order-filters { padding: 12px 14px 14px; grid-template-columns: 1fr 1fr; }
  .history-date-mode, .history-filter-wide, .history-order-submit { grid-column: 1 / -1; }
  .history-order-metrics { grid-template-columns: 1fr 1fr; }
  .history-order-metrics > div:nth-child(2) { border-right: 0; }
  .history-order-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .history-result-meta { display: none; }
  .history-audit-summary, .history-audit-facts { grid-template-columns: 1fr 1fr; }
  .history-audit-route { grid-template-columns: 1fr; gap: 10px; }
  .history-audit-section > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .history-audit-candidates > div { grid-template-columns: 24px minmax(0, 1fr); }
  .history-audit-candidates span { grid-column: 2; }
}
