/* ==========================================================
   Dispatch: CAD board (components/dispatch.js), map widget
   (components/map.js) and the on-screen alert HUD (dispatch-hud.js).
   Uses the shared tokens from variables.css.
   ========================================================== */

/* ---------------- Board layout ---------------- */
.dsp-header { margin-bottom: 12px; }
.dsp-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(320px, 390px);
  gap: 12px;
  height: calc(var(--mdt-h) - var(--topbar-h) - var(--statusbar-h) - 222px);
  min-height: 440px;
}
.dsp-grid > .panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dsp-map { padding: 0; }
.dsp-map .map-mount { flex: 1; min-height: 0; }
.dsp-map .map-panel { border: none; border-radius: 0; }

.cad-stat-value .dsp-of { font-size: 12px; font-weight: 600; color: var(--text-3); margin-left: 4px; }
.cad-stat-value .dsp-st-label { font-size: 11px; font-weight: 700; color: var(--text-2); letter-spacing: .4px; }
.dsp-assign { min-width: 200px; max-width: 300px; }
.dsp-assign.on { cursor: pointer; background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.dsp-assign-title { font-size: 13px; font-weight: 600; color: var(--text-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dsp-strip-right { margin-left: auto; display: flex; align-items: center; padding: 0 14px; }
.text-danger { color: var(--danger-strong); }

/* ---------------- Left: tabs + list ---------------- */
.dsp-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border-soft); flex: none; }
.dsp-filters { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); flex: none; }
.dsp-filters .seg { display: flex; }
.dsp-filters .seg button { flex: 1; }
.dsp-filters .input { height: 32px; min-height: 32px; font-size: 12px; }
.dsp-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }

.dsp-call {
  flex: none; position: relative; display: flex; align-items: stretch; width: 100%; text-align: left;
  background: var(--bg-3); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 0; cursor: pointer; color: var(--text-1); font: inherit; overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.dsp-call:hover { border-color: var(--border-strong); background: var(--bg-4); }
.dsp-call.sel { border-color: var(--accent-border); background: color-mix(in srgb, var(--accent) 7%, var(--bg-3)); box-shadow: 0 0 0 1px var(--accent-border); }
.dsp-call.closed { opacity: .72; }
.dsp-call-rail { width: 4px; flex: none; background: var(--priority-3); }
.dsp-call.p1 .dsp-call-rail { background: var(--priority-1); }
.dsp-call.p2 .dsp-call-rail { background: var(--priority-2); }
.dsp-call.panic .dsp-call-rail { animation: dsp-flash 0.9s steps(2, start) infinite; }
.dsp-call.mine::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 14px 14px 0; border-color: transparent var(--accent) transparent transparent; }
.dsp-call-main > * { flex: none; }
.dsp-call-main { flex: 1; min-width: 0; padding: 9px 11px 10px; display: flex; flex-direction: column; gap: 4px; }
.dsp-call-top { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.dsp-call-top .badge { height: 18px; font-size: 9.5px; padding: 0 6px; }
.dsp-code {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px;
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text-0);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .2px;
}
.dsp-call.p1 .dsp-code { color: var(--danger-strong); border-color: rgba(224,70,75,.4); background: var(--danger-soft); }
.dsp-code.lg { height: 22px; font-size: 12px; padding: 0 8px; }
.dsp-call-id { color: var(--text-2); font-weight: 600; }
.dsp-call-time { margin-left: auto; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.dsp-call-title { font-size: 13.5px; font-weight: 650; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsp-call-loc { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.dsp-call-loc svg { width: 12px; height: 12px; flex: none; color: var(--text-3); }
.dsp-call-loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dsp-call-loc em { margin-left: auto; font-style: normal; color: var(--text-1); font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.dsp-call-units { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.dsp-uchip {
  display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px 0 6px; border-radius: 10px;
  background: var(--bg-1); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--text-1);
}
.dsp-uchip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--uc, #8a93ad); }
.dsp-uchip.more::before { display: none; }
.dsp-nounits { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--warn-strong); }
.dsp-call.closed .dsp-nounits { color: var(--text-3); }

/* units tab */
.dsp-unit-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.dsp-unit-group-head { display: flex; align-items: center; gap: 7px; padding: 6px 6px 4px; font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--text-3); }
.dsp-unit-group-head .count { margin-left: auto; color: var(--text-2); }
.dsp-dept-dot { width: 8px; height: 8px; border-radius: 2px; }
.dsp-unit {
  flex: none; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 46px; align-items: center; gap: 8px;
  width: 100%; text-align: left; padding: 8px 9px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--text-1); font: inherit; font-size: 12px; cursor: pointer;
}
.dsp-unit:hover { background: var(--bg-3); border-color: var(--border-soft); }
.dsp-unit.me { background: var(--accent-soft); }
.dsp-unit-cs { color: var(--accent-strong); font-weight: 700; }
.dsp-unit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); }
.dsp-unit-name .badge { height: 16px; font-size: 9px; padding: 0 5px; }
.dsp-unit-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-1); }
.dsp-unit-call { color: var(--text-2); font-size: 11px; text-align: right; }

/* ---------------- Right: detail ---------------- */
.dsp-detail { position: relative; }
.dsp-detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 30px; }
.dsp-detail-empty .es-title { font-size: 13px; font-weight: 600; color: var(--text-1); }
.dsp-detail-empty .es-sub { font-size: 11.5px; color: var(--text-3); max-width: 260px; line-height: 1.5; }
.dsp-empty-ico { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-3); border: 1px solid var(--border); color: var(--text-3); margin-bottom: 6px; }
.dsp-empty-ico svg { width: 20px; height: 20px; }

.dsp-d-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--border-soft); position: relative; flex: none; }
.dsp-d-head::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--priority-3); }
.dsp-d-head.p1::before { background: var(--priority-1); }
.dsp-d-head.p2::before { background: var(--priority-2); }
.dsp-d-head.panic::before { animation: dsp-flash 0.9s steps(2, start) infinite; }
.dsp-d-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dsp-d-prio { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.dsp-d-head.p1 .dsp-d-prio { color: var(--danger-strong); }
.dsp-d-head.p2 .dsp-d-prio { color: var(--warn-strong); }
.dsp-d-id { color: var(--text-2); font-weight: 700; font-size: 12px; }
.dsp-d-top .badge { margin-left: auto; }
.dsp-d-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text-0); margin-top: 8px; line-height: 1.25; }
.dsp-d-loc { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-1); }
.dsp-d-loc svg { width: 13px; height: 13px; color: var(--accent-strong); flex: none; }
.dsp-d-loc em { font-style: normal; color: var(--text-2); }

.dsp-d-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border-soft); flex: none; }
.dsp-d-actions .btn { height: 30px; font-size: 11.5px; padding: 0 10px; }
.dsp-prio-seg button { height: 24px; padding: 0 9px; font-family: var(--font-mono); }
.dsp-prio-seg button[data-prio="1"].active { box-shadow: inset 0 -2px 0 var(--priority-1); color: var(--danger-strong); }
.dsp-prio-seg button[data-prio="2"].active { box-shadow: inset 0 -2px 0 var(--priority-2); color: var(--warn-strong); }
.dsp-d-actions .btn.danger { margin-left: auto; }

.dsp-d-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.dsp-d-msg { font-size: 13px; line-height: 1.55; color: var(--text-0); background: var(--bg-1); border: 1px solid var(--border-soft); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; }
.dsp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.dsp-fact-l { font-size: 9.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }
.dsp-fact-v { font-size: 12.5px; color: var(--text-0); margin-top: 2px; overflow-wrap: anywhere; }
.dsp-sec-title { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); padding-top: 4px; }
.dsp-sec-title .count { color: var(--text-3); }
.dsp-sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.dsp-d-units { display: flex; flex-direction: column; gap: 4px; }
.dsp-d-unit { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-3); border: 1px solid var(--border-soft); border-left: 3px solid var(--uc, #8a93ad); border-radius: var(--radius-sm); font-size: 12px; }
.dsp-d-unit-cs { font-weight: 700; color: var(--text-0); min-width: 50px; }
.dsp-d-unit-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.dsp-d-unit .badge { height: 18px; font-size: 9.5px; padding: 0 6px; }
.dsp-muted { font-size: 11.5px; color: var(--text-3); }
.dsp-notes { display: flex; flex-direction: column; gap: 8px; }
.dsp-note { position: relative; padding-left: 14px; }
.dsp-note::before { content: ''; position: absolute; left: 2px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dsp-note::after { content: ''; position: absolute; left: 4.5px; top: 14px; bottom: -8px; width: 1px; background: var(--border); }
.dsp-note:last-child::after { display: none; }
.dsp-note-head { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.dsp-note-by { font-weight: 700; color: var(--text-0); }
.dsp-note-time { color: var(--text-3); margin-left: auto; }
.dsp-note-text { font-size: 12.5px; color: var(--text-1); line-height: 1.5; margin-top: 2px; }
.dsp-d-compose { flex: none; padding: 10px 12px; border-top: 1px solid var(--border-soft); background: var(--bg-1); display: flex; flex-direction: column; gap: 6px; }
.dsp-compose-row { display: flex; gap: 6px; }
.dsp-compose-row .input { flex: 1; height: 34px; min-height: 34px; font-size: 12.5px; }
.dsp-compose-row .btn { height: 34px; width: 40px; padding: 0; justify-content: center; }
.dsp-reply-btn { align-self: flex-start; }

/* modals */
.dsp-modal-sub { margin: 0 0 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.dsp-loc-pick { display: flex; align-items: center; gap: 8px; }
.dsp-loc-val { flex: 1; display: flex; align-items: center; height: 34px; padding: 0 11px; border-radius: var(--radius-sm); background: var(--bg-1); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-0); }
.dsp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-1); cursor: pointer; }
.modal-box .seg { display: flex; }
.modal-box .seg button { flex: 1; }

/* ---------------- Map widget ---------------- */
.mw { display: flex; flex-direction: column; background: #0b1a2c; user-select: none; }
.mw-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; }
.mw-viewport.dragging { cursor: grabbing; }
.mw.picking .mw-viewport { cursor: crosshair; }
.mw-stage { position: absolute; left: 0; top: 0; width: 2200px; height: 3300px; transform-origin: 0 0; will-change: transform; --inv: 3; }
.mw-img { display: block; width: 2200px; height: 3300px; max-width: none; pointer-events: none; filter: saturate(.85) brightness(.92); }
html.mdt-light .mw-img { filter: none; }
.mw-layer { position: absolute; inset: 0; pointer-events: none; }
.mw-call, .mw-unit { position: absolute; transform: translate(-50%, -50%) scale(var(--inv)); pointer-events: auto; }

.mw-call { width: 26px; height: 26px; cursor: pointer; z-index: 2; }
.mw-call .mw-pin {
  position: absolute; inset: 3px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--priority-3); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
}
.mw-call .mw-pin b { transform: rotate(45deg); font-size: 10px; font-weight: 800; color: #fff; font-family: var(--font-mono); }
.mw-call.p1 .mw-pin { background: var(--priority-1); }
.mw-call.p2 .mw-pin { background: var(--priority-2); }
.mw-call .mw-pulse { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--priority-3); opacity: 0; }
.mw-call.p1 .mw-pulse, .mw-call.panic .mw-pulse { border-color: var(--priority-1); animation: mw-pulse 1.6s ease-out infinite; }
.mw-call.sel { z-index: 4; }
.mw-call.sel .mw-pin { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 0 0 5px var(--accent); }
.mw-call.mine .mw-pin { border-color: var(--accent-strong); }
.mw-tag {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%); white-space: nowrap;
  padding: 2px 6px; border-radius: 3px; background: rgba(14,16,24,.92); border: 1px solid var(--accent-border);
  color: var(--text-0); font-family: var(--font-mono); font-size: 10px; font-weight: 700;
}

.mw-unit { width: 16px; height: 16px; z-index: 3; }
.mw-unit .mw-dot {
  position: absolute; inset: 2px; border-radius: 50%; background: var(--uc); border: 2px solid #0e1018;
  box-shadow: 0 0 0 1.5px var(--uc), 0 2px 5px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 7px; font-weight: 800;
}
.mw-unit .mw-arrow { position: absolute; inset: -5px; }
.mw-unit .mw-arrow::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--uc); }
.mw-unit .mw-callsign {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  padding: 1px 5px; border-radius: 3px; background: rgba(14,16,24,.88); color: #eceef5;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; border-left: 2px solid var(--uc);
}
.mw-unit.me { z-index: 5; }
.mw-unit.me .mw-dot { box-shadow: 0 0 0 1.5px var(--uc), 0 0 0 5px rgba(203,152,7,.35); }
.mw-unit.st-emergency .mw-dot { animation: dsp-flash 0.8s steps(2, start) infinite; }
.mw-legend-unit { background: #4a86e8; box-shadow: 0 0 0 2px #0e1018, 0 0 0 3px #4a86e8; }
.mw-pickbar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: var(--radius);
  background: rgba(14,16,24,.95); border: 1px solid var(--accent-border); color: var(--text-0); font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-md);
}
.mw-pickbar.hidden { display: none; }

@keyframes mw-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes dsp-flash { 0% { background: var(--priority-1); } 100% { background: #3b82f6; } }

/* ---------------- On-screen alert HUD ---------------- */
#dispatch-hud {
  position: fixed; top: 19vh; right: 22px; width: 372px; z-index: 40;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  font-family: var(--font-ui);
}
#dispatch-hud.hidden { display: none; }
.dh-card {
  position: relative; display: flex; overflow: hidden;
  background: rgba(19, 21, 33, 0.97); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,0.04);
  color: #eceef5; animation: dh-in .28s var(--ease) both;
  opacity: .9; transform-origin: right center; transition: opacity .15s ease, transform .15s ease;
}
.dh-card.focused, .dh-card.dh-notice, .dh-card.dh-reply { opacity: 1; }
.dh-card.focused { border-color: rgba(203,152,7,.55); box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(203,152,7,.25); }
.dh-card.leaving { animation: dh-out .22s ease both; }
.dh-rail { width: 4px; flex: none; background: #6f7896; }
.dh-card.p1 .dh-rail { background: #e0464b; }
.dh-card.p2 .dh-rail { background: #e8a317; }
.dh-card.panic .dh-rail { animation: dsp-flash .7s steps(2, start) infinite; width: 5px; }
.dh-card.panic { border-color: rgba(224,70,75,.6); }
.dh-body { flex: 1; min-width: 0; padding: 11px 14px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.dh-head { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.dh-code { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 3px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.dh-card.p1 .dh-code { background: rgba(224,70,75,.18); border-color: rgba(224,70,75,.5); color: #f6a2a5; }
.dh-prio { font-size: 9.5px; font-weight: 800; letter-spacing: .9px; color: #7c8299; }
.dh-card.p1 .dh-prio { color: #f16a6e; }
.dh-card.p2 .dh-prio { color: #f5bb45; }
.dh-id { font-family: var(--font-mono); color: #7c8299; font-weight: 600; }
.dh-time { margin-left: auto; color: #7c8299; font-weight: 600; }
.dh-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.25; }
.dh-count { font-size: 11px; font-weight: 700; color: #cb9807; }
.dh-msg { font-size: 12px; line-height: 1.45; color: #b4b9cc; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dh-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #d6d9e4; margin-top: 1px; }
.dh-pin { display: flex; color: #cb9807; }
.dh-pin svg { width: 12px; height: 12px; }
.dh-loc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-dist { margin-left: auto; flex: none; font-weight: 700; color: #eceef5; font-variant-numeric: tabular-nums; }
.dh-foot { display: flex; align-items: center; gap: 10px; margin-top: 3px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.06); font-size: 10.5px; }
.dh-units { color: #f5bb45; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 9.5px; }
.dh-units.has { color: #4cc985; }
.dh-card.mine .dh-units { color: #e2ad1d; }
.dh-keys { margin-left: auto; display: flex; gap: 10px; color: #b4b9cc; }
.dh-keys span, .dh-cycle { display: inline-flex; align-items: center; gap: 5px; }
#dispatch-hud kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px;
  border-radius: 3px; background: #cb9807; color: #16171f; font-family: var(--font-mono); font-size: 10px; font-weight: 800;
  box-shadow: 0 2px 0 #7d5e04;
}
.dh-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.04); }
.dh-progress span { display: block; height: 100%; width: 100%; background: rgba(203,152,7,.7); transform-origin: left; animation: dh-progress linear forwards; }
.dh-card.p1 .dh-progress span { background: rgba(224,70,75,.8); }
.dh-cycle { justify-content: flex-end; font-size: 10.5px; color: #b4b9cc; padding: 0 2px; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.dh-notice .dh-body { padding: 10px 14px 10px 12px; gap: 3px; }
.dh-notice-title { font-size: 13px; font-weight: 700; }
.dh-notice.t-good .dh-rail { background: #2eaa68; }
.dh-notice.t-warn .dh-rail { background: #e8a317; }
.dh-notice.t-danger .dh-rail { background: #e0464b; }
.dh-notice.t-info .dh-rail { background: #4a86e8; }
.dh-reply .dh-rail { background: #4a86e8; }
.dh-reply .dh-code { background: rgba(74,134,232,.18); border-color: rgba(74,134,232,.5); color: #a9c6f5; }
.dh-reply .dh-msg { -webkit-line-clamp: 5; color: #eceef5; font-size: 12.5px; }

@keyframes dh-in { from { opacity: 0; transform: translateX(28px); } to { transform: none; } }
@keyframes dh-out { to { opacity: 0; transform: translateX(28px); } }
@keyframes dh-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 1500px) {
  .dsp-grid { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(300px, 340px); }
}
@media (max-width: 1320px) {
  .dsp-grid { grid-template-columns: 300px minmax(0, 1fr); height: auto; }
  .dsp-map { height: 460px; }
  .dsp-detail { grid-column: 1 / -1; min-height: 420px; }
}

/* ---------------- Dispatcher Mode ---------------- */
.dsp-disp-btn { position: relative; }
.dsp-disp-state { margin-left: 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 3px; background: var(--bg-1); color: var(--text-3); border: 1px solid var(--border); }
.dsp-disp-btn.on { background: var(--info-soft); border-color: rgba(74,134,232,.55); color: var(--info-strong); box-shadow: 0 0 0 1px rgba(74,134,232,.25); }
.dsp-disp-btn.on .dsp-disp-state { background: var(--info); color: #fff; border-color: var(--info); }
.dsp-mode-stat { background: var(--info-soft); box-shadow: inset 0 -2px 0 var(--info); }
.dsp-mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--info-strong); }
.dsp-mode-pill svg { width: 14px; height: 14px; }
.dsp-gtag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 3px; font-size: 9px; font-weight: 800; letter-spacing: .6px; border: 1px solid var(--border); color: var(--text-2); background: var(--bg-1); }
.dsp-gtag.g-leo { color: var(--info-strong); border-color: rgba(74,134,232,.4); }
.dsp-gtag.g-ems { color: var(--danger-strong); border-color: rgba(224,70,75,.4); }
.dsp-gtag.g-tow { color: var(--warn-strong); border-color: rgba(232,163,23,.4); }
.dsp-gseg button { font-size: 11px; padding: 0 6px; }
.dsp-disp-hint { font-size: 11.5px; color: var(--text-2); padding: 4px 6px 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
.dsp-disp-hint b { color: var(--accent-strong); font-family: var(--font-mono); }
.dsp-unit.disp { display: flex; flex-direction: column; gap: 6px; cursor: default; padding: 8px 9px; }
.dsp-unit.disp:hover { background: var(--bg-3); }
.dsp-unit-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 46px; align-items: center; gap: 8px; }
.dsp-unit-actions { display: flex; align-items: center; gap: 5px; padding-left: 70px; flex-wrap: wrap; }
.dsp-st-select { height: 24px; min-height: 24px; padding: 0 22px 0 7px; font-size: 10.5px; font-family: var(--font-mono); width: 132px; min-width: 132px; flex: none; background-position: right 5px center; }
.dsp-st-select.sm { width: 112px; min-width: 112px; }
.dsp-unit-actions .btn.xs { height: 24px; }
.dsp-x { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); background: transparent; border: 1px solid var(--border); color: var(--text-2); cursor: pointer; }
.dsp-x:hover { color: var(--danger-strong); border-color: rgba(224,70,75,.45); background: var(--danger-soft); }
.dsp-x svg { width: 12px; height: 12px; }
.dsp-d-actions-disp .dsp-assign-row { display: flex; gap: 6px; width: 100%; }
.dsp-d-actions-disp .dsp-assign-row .input { flex: 1; height: 30px; min-height: 30px; font-size: 12px; }
.dsp-d-actions-disp .btn.danger { margin-left: auto; }
.dsp-assign-list { display: flex; flex-direction: column; gap: 2px; max-height: 170px; overflow-y: auto; padding: 4px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dsp-assign-opt { display: grid; grid-template-columns: 18px 62px 1fr 10px 44px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-xs); font-size: 12px; color: var(--text-1); cursor: pointer; }
.dsp-assign-opt:hover { background: var(--bg-3); }
.dsp-assign-opt .mono:first-of-type { color: var(--accent-strong); font-weight: 700; }
.mw-unit.disp .mw-dot { border-radius: 4px; }

/* HUD: assigned + broadcast cards */
.dh-assigned { display: flex; align-items: center; gap: 6px; margin: -2px 0 2px; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #75a4f0; }
.dh-assigned svg { width: 12px; height: 12px; }
.dh-card.assigned { border-color: rgba(74,134,232,.6); opacity: 1; }
.dh-broadcast { opacity: 1; }
.dh-broadcast .dh-rail { background: #7a5cff; }
.dh-broadcast .dh-code { background: rgba(122,92,255,.18); border-color: rgba(122,92,255,.5); color: #c4b5ff; }
.dh-broadcast .dh-msg { -webkit-line-clamp: 5; color: #eceef5; font-size: 13px; }
.dh-broadcast.urgent { border-color: rgba(224,70,75,.6); }
.dh-broadcast.urgent .dh-rail { background: #e0464b; }
.dh-broadcast.urgent .dh-code { background: rgba(224,70,75,.2); border-color: rgba(224,70,75,.5); color: #f6a2a5; }
select.input.dsp-st-select { width: 132px; min-width: 132px; }
select.input.dsp-st-select.sm { width: 112px; min-width: 112px; }
.dsp-unit-actions { flex-wrap: nowrap; }
.dsp-unit.disp, .dsp-unit.disp * { text-align: left; }
.dsp-unit.disp .dsp-unit-actions { padding-left: 0; }
.dsp-unit.disp .dsp-unit-call { text-align: right; }
.dsp-unit.disp { align-items: stretch; }

/* ---------------- Web Dispatch login code ---------------- */
.dsp-webcode { font-family: var(--font-mono); font-size: 40px; font-weight: 800; letter-spacing: 10px; text-align: center; color: var(--accent-strong); background: var(--bg-1); border: 1px dashed var(--accent-border); border-radius: var(--radius); padding: 16px 0 16px 10px; margin-bottom: 14px; }
.dsp-weburl { padding: 9px 11px; border-radius: var(--radius-sm); background: var(--bg-1); border: 1px solid var(--border); font-size: 12px; color: var(--text-0); overflow-wrap: anywhere; user-select: all; }
.dh-webcode .dh-rail { background: #cb9807; }
.dh-webcode { opacity: 1; border-color: rgba(203,152,7,.5); }
.dh-bigcode { font-family: var(--font-mono); font-size: 30px; font-weight: 800; letter-spacing: 8px; color: #e2ad1d; margin: 2px 0; }
.dh-webcode .dh-msg { -webkit-line-clamp: 4; }
.dh-webcode .dh-msg b { color: #eceef5; font-weight: 600; word-break: break-all; }

.dsp-copy-row { display: flex; gap: 8px; margin-top: 10px; }
.dsp-copy-row .btn { flex: 1; justify-content: center; }
.dsp-copied { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--good-strong); }
.dsp-copied.hidden { display: none; }
.dh-copied { color: #4cc985 !important; font-weight: 700; }

/* ---------------- Mini dispatch v2 (compact, top-right) ---------------- */
#dispatch-hud { top: 14px; right: 14px; width: 340px; gap: 8px; }
.dh-card.dh-call { background: rgba(24, 26, 34, 0.96); border: none; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.35); opacity: .92; }
.dh-card.dh-call.focused { opacity: 1; box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.18); border: none; }
.dh-call .dh-rail { width: 5px; background: #3b82f6; }
.dh-call.p1 .dh-rail { background: #ef4444; }
.dh-call.p3 .dh-rail { background: #64748b; }
.dh-call.panic .dh-rail { width: 5px; }
.dh-call .dh-body { padding: 10px 12px 9px 12px; gap: 6px; }
.dh-top { display: flex; align-items: flex-start; gap: 8px; }
.dh-call .dh-title { flex: 1; min-width: 0; font-family: var(--font-ui); font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.25; }
.dh-distx { font-size: 13px; font-weight: 400; color: #c9ccd6; }
.dh-pills { display: flex; gap: 5px; flex: none; padding-top: 1px; }
.dh-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 10px; background: #2563eb; color: #fff; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dh-call.p1 .dh-pill { background: #dc2626; }
.dh-call.p3 .dh-pill { background: #475569; }
.dh-rows { display: flex; flex-direction: column; gap: 4px; }
.dh-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 600; color: #eef0f5; line-height: 1.35; }
.dh-row > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-row-msg > span:last-child { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 500; color: #c9ccd6; }
.dh-row-units { color: #86efac; }
.dh-ico { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #d4d7e0; display: inline-flex; }
.dh-ico svg { width: 15px; height: 15px; }
.dh-row-units .dh-ico { color: #86efac; }
.dh-bottom { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.dh-ago { font-size: 12px; color: #a3a7b4; }
.dh-call .dh-keys { margin-left: auto; display: flex; gap: 10px; font-size: 10.5px; color: #c9ccd6; }
.dh-call .dh-assigned { margin: 0 0 1px; color: #93c5fd; }
.dh-call .dh-assigned svg { width: 13px; height: 13px; }
.dh-call .dh-count { color: #fbbf24; font-size: 12px; }
.dh-cycle { justify-content: flex-end; }
.dh-card.dh-call .dh-rail, .dh-card.dh-call.p2 .dh-rail { background: #3b82f6; }
.dh-card.dh-call.p1 .dh-rail { background: #ef4444; }
.dh-card.dh-call.p3 .dh-rail { background: #64748b; }
.dh-card.dh-call.panic .dh-rail { animation: dsp-flash .7s steps(2, start) infinite; }
.dh-card.dh-call.assigned .dh-rail { background: #60a5fa; }

/* pursuit / escalation */
.dh-call .dh-escalated { color: #fca5a5; }
.dh-call .dh-pursuit { color: #fca5a5; animation: dhBlink 1.2s ease-in-out infinite; }
@keyframes dhBlink { 50% { opacity: .45; } }
.dh-card.dh-call.chase .dh-rail { animation: dsp-flash .9s steps(2, start) infinite; }
.mw-trails { overflow: visible; }
.mw-trail { fill: none; stroke: #ef4444; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 7 6; opacity: .9; }
.mw-trail.live { animation: mwDash 1s linear infinite; }
.mw-trail.ended { stroke: #94a3b8; opacity: .6; }
@keyframes mwDash { to { stroke-dashoffset: -13; } }
.mw-call.pursuit .mw-pin { background: #ef4444; border-radius: 50%; transform: none; }
.mw-call.pursuit .mw-pin b { transform: none; font-size: 9px; }
.mw-call.pursuit .mw-pulse { border-color: #ef4444; animation: mw-pulse 1.1s ease-out infinite; }
.mw-tag.pursuit { border-color: rgba(239,68,68,.6); color: #fecaca; top: -22px; }
.dsp-live { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px; border-radius: 3px; background: rgba(239,68,68,.16); border: 1px solid rgba(239,68,68,.5); color: #fca5a5; font-size: 9.5px; font-weight: 800; letter-spacing: .6px; }
.dsp-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: dhBlink 1s ease-in-out infinite; }
.dsp-esc { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; background: var(--danger-soft); color: var(--danger-strong); font-size: 9.5px; font-weight: 800; letter-spacing: .5px; }
.dsp-pursuit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 16px 0; padding: 10px 12px; border-radius: var(--radius); background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.4); }
.dsp-pursuit-bar.ended { background: var(--bg-1); border-color: var(--border); }
.dsp-pursuit-stats { display: flex; gap: 16px; flex: 1; min-width: 0; }
.dsp-pursuit-stat .l { font-size: 9px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }
.dsp-pursuit-stat .v { font-size: 15px; font-weight: 800; color: var(--text-0); font-family: var(--font-mono); }
.dsp-photo { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: zoom-in; }
.dsp-pursuit-stats { flex: 1 1 200px; gap: 18px; }
.dsp-pursuit-stat .v { white-space: nowrap; }
.dsp-pursuit-bar .btn { flex: none; }

/* ---------------- v1.7: fires, ETA / nearest, partners ---------------- */
.dsp-fire { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; background: var(--warn-soft); color: var(--warn-strong); }
.dsp-fire.s-large, .dsp-fire.s-major { background: var(--danger-soft); color: var(--danger-strong); }
.dsp-fire.out { background: var(--good-soft); color: var(--good-strong); }
.dsp-near-hint { margin-left: auto; font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.dsp-near-hint b { color: var(--text-0); font-weight: 700; }
.dsp-near-hint.none { color: var(--text-3); }
.dsp-call-units { display: flex; align-items: center; gap: 4px; }

.dsp-pair { color: var(--text-2); font-weight: 500; }
.dsp-partner-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 2px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 11.5px; color: var(--text-2); flex: none; }
.dsp-partner-bar svg { width: 14px; height: 14px; flex: none; }
.dsp-partner-bar .dsp-pb-text { flex: 1; min-width: 0; }
.dsp-partner-bar.on { border-style: solid; border-color: var(--accent-border); background: var(--accent-soft); color: var(--text-1); }
.dsp-partner-bar b { color: var(--text-0); }

.dsp-eta { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--info-strong); background: var(--info-soft); border-radius: 3px; padding: 1px 6px; white-space: nowrap; }
.dsp-sec-sub { font-weight: 600; letter-spacing: .3px; text-transform: none; color: var(--text-3); font-size: 10px; }
.dsp-near { display: flex; flex-direction: column; gap: 4px; }
.dsp-near-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; background: var(--bg-3); border: 1px solid var(--border-soft); border-left: 3px solid var(--uc, #8a93ad); border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; }
.dsp-near-row:hover { border-color: var(--border-strong); }
.dsp-near-row.busy { opacity: .6; }
.dsp-near-rank { width: 16px; text-align: center; font-size: 10px; font-weight: 800; color: var(--text-3); }
.dsp-near-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.dsp-near-dist { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.dsp-near-eta { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--text-0); min-width: 44px; text-align: right; white-space: nowrap; }
.dsp-near-row .btn.xs { height: 22px; }

.mw-unit.pair .mw-dot { box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 3.5px var(--uc, #8a93ad); }

.dh-row-fire, .dh-row-fire .dh-ico { color: #fdba74; }
.dh-row-out, .dh-row-out .dh-ico { color: #86efac; }

/* ---------------- v1.7: shift stats view ---------------- */
.dsp-view-seg button { min-width: 64px; }
.dsp-stats { height: calc(var(--mdt-h) - var(--topbar-h) - var(--statusbar-h) - 140px); min-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dst-bar { display: flex; align-items: center; gap: 14px; font-size: 11.5px; flex: none; }
.dst-loading { padding: 60px; text-align: center; color: var(--text-2); }
.dst-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.dst-grid.solo { grid-template-columns: minmax(0, 760px); }
.dst-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dst-col > .panel { padding: 14px 16px 16px; }
.dst-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dst-head h3 { margin: 2px 0 0; font-size: 17px; font-weight: 700; color: var(--text-0); }
.dst-head .badge svg { width: 12px; height: 12px; }
.dst-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dst-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dst-tile { background: var(--bg-3); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.dst-tile-l { font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); }
.dst-tile-v { font-size: 22px; font-weight: 700; color: var(--text-0); font-variant-numeric: tabular-nums; margin-top: 3px; white-space: nowrap; }
.dst-tile-s { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.dst-tile.p1 { border-top: 2px solid var(--priority-1); }
.dst-tile.p2 { border-top: 2px solid var(--priority-2); }
.dst-tile.p3 { border-top: 2px solid var(--priority-3); }
.dst-split-label, .dst-sub-title { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); margin: 14px 0 7px; }
.dst-split { display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; background: var(--bg-1); }
.dst-seg { min-width: 3px; }
.st-good { background: var(--good); } .st-info { background: var(--info); } .st-warn { background: var(--warn); }
.st-muted { background: var(--priority-3); } .st-danger { background: var(--danger); }
.dst-split-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--text-1); }
.dst-split-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.dst-split-legend b { color: var(--text-0); font-variant-numeric: tabular-nums; margin-left: 2px; }
.dst-live.off .dsp-muted { padding: 4px 0 2px; }
.dst-shifts { display: flex; flex-direction: column; }
.dst-shift { display: grid; grid-template-columns: minmax(150px, 1.4fr) 70px 70px 90px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--border-soft); font-size: 12px; color: var(--text-1); }
.dst-shift:last-child { border-bottom: 0; }
.dst-shift-day { color: var(--text-0); font-weight: 600; }
.dst-shift-p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dst-table-wrap { overflow-x: auto; }
.dst-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dst-table th { text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); padding: 0 8px 8px; border-bottom: 1px solid var(--border); }
.dst-table td { padding: 8px; border-bottom: 1px solid var(--border-soft); color: var(--text-1); white-space: nowrap; }
.dst-table .r { text-align: right; }
.dst-table tr.me td { background: var(--accent-soft); color: var(--text-0); }
.dst-table tr.me td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.dst-cs { color: var(--text-0); font-weight: 700; margin-right: 4px; }
.dst-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-left: 4px; vertical-align: 1px; }
.dst-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 96px; align-items: end; border-bottom: 1px solid var(--border); }
.dst-hbar { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.dst-hbar span { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.dst-hbar:hover span { opacity: 1; background: var(--accent-strong); }
.dst-hours-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-top: 4px; }
.dst-top { display: flex; flex-wrap: wrap; gap: 6px; }
.dst-top-item { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--bg-3); border: 1px solid var(--border-soft); font-size: 12px; color: var(--text-1); }
.dst-top-item b { color: var(--text-0); font-variant-numeric: tabular-nums; }
.dsp-unit.disp .dsp-unit-actions { flex-wrap: wrap; row-gap: 5px; }
.dsp-partner-bar, .dsp-partner-bar span { text-align: left; }

/* ---------------- v1.8: unit types ---------------- */
.dsp-utag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-right: 6px; border-radius: 3px; vertical-align: 1px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; letter-spacing: .4px;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); }
.dsp-uchip i { font-style: normal; font-size: 9px; font-weight: 800; color: var(--text-2); margin-left: 4px; letter-spacing: .3px; }
.dsp-req { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .4px;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px dashed color-mix(in srgb, var(--tc) 55%, transparent); }
.dsp-req-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border-soft); flex: none; }
.dsp-req-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 12px; font-size: 11px; font-weight: 700;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); border: 1px dashed color-mix(in srgb, var(--tc) 55%, transparent); }
.dsp-req-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.dsp-req-x:hover { background: rgba(255,255,255,.08); }
.dsp-req-x svg { width: 11px; height: 11px; }
.dsp-req-ctl { display: flex; gap: 6px; margin-left: auto; }
.dsp-req-ctl select.input { height: 30px; min-height: 30px; font-size: 12px; width: 160px; }
.dsp-near-send { display: flex; gap: 0; }
.dsp-near-send .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.dsp-near-send select.input.dsp-near-type { width: 128px; min-width: 0; height: auto; min-height: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; font-size: 12px; }
select.input.dsp-type-select { width: 118px; min-width: 118px; height: 24px; min-height: 24px; font-size: 11px; padding-top: 0; padding-bottom: 0; }
.dsp-type-bar select.input.dsp-type-select { width: 150px; height: 26px; }
.mw-utag { font-style: normal; font-size: 8.5px; font-weight: 800; color: var(--tc); margin-left: 2px; }
.dh-call .dh-requested { color: #d8b4fe; }
.dsp-near-row.has-btn .dsp-near-dist, .dsp-near-row.has-btn .dsp-unit-st .mono { display: none; }

/* ---------------- v1.9: two-way 911 chat, spoken alerts ---------------- */
.dsp-note.from-caller::before { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.dsp-note.from-caller .dsp-note-text { color: var(--text-0); }
.dsp-note.to-caller::before { background: var(--accent-strong); }
.dsp-note-tag { display: inline-flex; align-items: center; gap: 4px; height: 17px; padding: 0 6px; margin-right: 6px; border-radius: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--info-strong); background: var(--info-soft); }
.dsp-note-tag.out { color: var(--accent-strong); background: var(--accent-soft); }
.dsp-note-tag svg { width: 10px; height: 10px; }
.dsp-note-where { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11px; color: var(--text-2); }
.dsp-note-where svg { width: 11px; height: 11px; }
.dsp-compose-mode { display: flex; margin-bottom: 7px; }
.dsp-compose-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.dsp-compose-mode svg { width: 12px; height: 12px; }
.dsp-range { width: 100%; accent-color: var(--accent); margin-top: 8px; }
#vc-mode { display: flex; }
#vc-mode button { flex: 1; }
.dh-hint { margin-top: 6px; font-size: 11.5px; color: #9aa3b8; }
.dh-hint b { color: #e2e5ee; font-weight: 700; }
.dh-callermsg .dh-rail { background: #4a86e8; }
.dh-callermsg .dh-code { background: rgba(74,134,232,.18); border-color: rgba(74,134,232,.5); color: #a9c6f5; }
.dsp-voice-paused { margin: -4px 0 12px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--info-strong); font-size: 12px; }
.dsp-lookup { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: inherit; color: var(--info-strong); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(117,164,240,.4); text-underline-offset: 3px; }
.dsp-lookup:hover { color: var(--text-0); }
.dsp-lookup .btn-ico svg { width: 11px; height: 11px; }

/* ---------------- v1.10: unit editor (Dispatcher Mode) ---------------- */
.dsp-remarks { display: block; margin-top: 2px; font-size: 11px; font-style: italic; color: var(--warn-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-unit.disp .dsp-unit-row { cursor: pointer; }
.ue-head { border-top: 3px solid var(--uc, var(--accent)); }
.ue-id { display: flex; align-items: center; gap: 14px; }
.ue-cs { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 44px; padding: 0 10px; border-radius: 8px; font-size: 17px; font-weight: 800; color: var(--text-0); background: color-mix(in srgb, var(--uc, #8a93ad) 18%, var(--bg-1)); border: 1px solid color-mix(in srgb, var(--uc, #8a93ad) 50%, transparent); }
.ue-id h3 { margin: 0; font-size: 17px; }
.ue-sub { margin-top: 3px; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ue-body .field { margin-bottom: 14px; }
.ue-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ue-status button { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); background: var(--bg-3); color: var(--text-1); font: inherit; font-size: 11px; cursor: pointer; text-align: left; }
.ue-status button b { font-size: 12px; color: var(--text-0); }
.ue-status button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ue-status button:hover { border-color: var(--border-strong); }
.ue-status button.active { border-color: var(--accent-border); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-border); }
.ue-assign { display: flex; flex-direction: column; gap: 8px; }
.ue-cur { font-size: 12.5px; color: var(--text-1); }
.ue-cur b { color: var(--text-0); }
.ue-assign-row, .ue-inline { display: flex; gap: 6px; align-items: center; }
.ue-assign-row select, .ue-inline input { flex: 1; min-width: 0; }
.ue-partner { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bg-3); border: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-1); }
.ue-partner span:not(.btn-ico) { flex: 1; }
.ue-partner .btn-ico svg { width: 14px; height: 14px; }
@media (max-width: 760px) { .ue-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
