/* ============================================================================
   super-dispatch.css — Super Dispatch (REMOVABLE FEATURE)
   Settings → Super Dispatch (js/sd-connect.js). Same look as the Central
   Dispatch and Payments cards. Uses the Settings tokens (--sx-*). Flat, no
   gradients, no blur.
   ========================================================================== */

/* ── Settings → Super Dispatch ── */
#sx-pane-loadboards .sdc-msg { margin: 0; font-size: 13px; color: var(--sx-ink2, #54607a); }
#sx-pane-loadboards .sdc-tile { border: 1px solid var(--sx-border, #e4e9f1); border-radius: 10px; background: var(--sx-surface, #fff); overflow: hidden; margin-bottom: 18px; }
#sx-pane-loadboards .sdc-tile.is-ended { border-color: #f1c4c4; }
#sx-pane-loadboards .sdc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
#sx-pane-loadboards .sdc-mark { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--sx-border, #e3e8f0); color: var(--sx-brand, #0a2540); }
#sx-pane-loadboards .sdc-tile.is-empty .sdc-mark { color: var(--sx-faint, #8a94a6); }
#sx-pane-loadboards .sdc-who { flex: 1 1 auto; min-width: 0; }
#sx-pane-loadboards .sdc-who b { display: block; font-size: 15px; font-weight: 700; color: var(--sx-ink, #101a2b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sx-pane-loadboards .sdc-who span { display: block; margin-top: 1px; font-size: 12.5px; color: var(--sx-ink2, #54607a); }
#sx-pane-loadboards .sdc-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
#sx-pane-loadboards .sdc-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#sx-pane-loadboards .sdc-pill.is-ok { background: #e9f7ef; color: #15803d; }
#sx-pane-loadboards .sdc-pill.is-bad { background: #fdecec; color: #b91c1c; }
#sx-pane-loadboards .sdc-pill.is-wait { background: #eef3ff; color: #2f5bd3; }
#sx-pane-loadboards .sdc-pill.is-off { background: var(--sx-surface3, #eef2f8); color: var(--sx-ink2, #54607a); }
#sx-pane-loadboards .sdc-rows { margin: 0; padding: 4px 16px 6px; border-top: 1px solid var(--sx-border, #e4e9f1); background: var(--sx-surface2, #f6f8fc); }
#sx-pane-loadboards .sdc-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; font-size: 13px; }
#sx-pane-loadboards .sdc-row + .sdc-row { border-top: 1px solid var(--sx-border, #e4e9f1); }
#sx-pane-loadboards .sdc-row dt { margin: 0; color: var(--sx-ink2, #54607a); }
#sx-pane-loadboards .sdc-row dd { margin: 0; color: var(--sx-ink, #101a2b); font-weight: 600; }
#sx-pane-loadboards .sdc-sub { color: var(--sx-faint, #8a94a6); font-weight: 400; }
#sx-pane-loadboards .sdc-result { margin: 0; padding: 10px 16px; font-size: 12.5px; border-top: 1px solid var(--sx-border, #e4e9f1); }
#sx-pane-loadboards .sdc-result.is-ok { color: #15803d; background: #f3fbf6; }
#sx-pane-loadboards .sdc-result.is-bad { color: #b91c1c; background: #fef6f6; }

#sx-pane-loadboards .sdc-form { display: flex; flex-direction: column; gap: 16px; }
#sx-pane-loadboards .sdc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#sx-pane-loadboards .sdc-seg-opt { position: relative; display: block; cursor: pointer; }
#sx-pane-loadboards .sdc-seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
#sx-pane-loadboards .sdc-seg-opt span { display: block; padding: 10px 12px; border: 1px solid var(--sx-border2, #d7deea); border-radius: 9px; background: var(--sx-surface, #fff); }
#sx-pane-loadboards .sdc-seg-opt b { display: block; font-size: 13.5px; color: var(--sx-ink, #101a2b); }
#sx-pane-loadboards .sdc-seg-opt small { display: block; font-size: 12px; color: var(--sx-ink2, #54607a); margin-top: 1px; }
#sx-pane-loadboards .sdc-seg-opt input:checked + span { border-color: var(--sx-black, #111318); box-shadow: inset 0 0 0 1px var(--sx-black, #111318); }
#sx-pane-loadboards .sdc-seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 107, 255, .2); }
#sx-pane-loadboards .sdc-err { margin: 0; padding: 9px 12px; border-radius: 8px; background: #fef6f6; color: #b91c1c; font-size: 12.5px; }
#sx-pane-loadboards .sdc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#sx-pane-loadboards .sdc-danger { color: #b91c1c; }
#sx-pane-loadboards .sdc-help { margin-top: 18px; border-top: 1px solid var(--sx-border, #e4e9f1); padding-top: 14px; font-size: 13px; color: var(--sx-ink2, #54607a); }
#sx-pane-loadboards .sdc-help summary { cursor: pointer; font-weight: 600; color: var(--sx-ink, #101a2b); }
#sx-pane-loadboards .sdc-help ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
@media (max-width: 600px) {
  #sx-pane-loadboards .sdc-seg { grid-template-columns: 1fr; }
  #sx-pane-loadboards .sdc-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ── The order's SD panel + the Post chooser (js/sd-listing.js). Built on the
   Central Dispatch panel styles (css/cd-listing.css, .cdl-*) so both boards
   look the same. Dim backdrop only: no blur. ── */
#sdlOverlay, #sdxChoose { background: rgba(15, 23, 42, .5); }
.sdl-modal .cdl-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sdl-modal .sdl-pay { margin-top: 10px; }
.sdl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 6px; }

/* ── Super Dispatch look (2026-11-01): same layout and buttons as the Central
   Dispatch panel, its own face: white header with the SD mark and a thin
   line in SD's coral (#FF484B, their logo), a progress line, a carrier card.
   Flat colours only. ── */
.sdl-modal { --sdl-coral: #FF484B; border-top: 3px solid var(--sdl-coral); }
.sdl-modal .cdl-head { background: #fff; color: var(--cdl-ink); border-bottom: 1px solid var(--cdl-line); padding: 12px 14px 12px 16px; }
.sdl-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sdl-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #f6d5d6; border-radius: 4px; background: #fff6f6; }
.sdl-modal .cdl-eyebrow { color: var(--cdl-soft); }
.sdl-modal .cdl-head h3 { color: var(--cdl-ink); }
.sdl-modal .cdl-x { border-color: #d5dbe4; color: #4a5565; }
.sdl-modal .cdl-x:hover { background: #f1f4f8; }

/* progress: Posted → Booked → Picked up → Delivered */
.sdl-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 12px 10px 10px; list-style: none; background: #fff; border-bottom: 1px solid var(--cdl-line); }
.sdl-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--cdl-faint); text-align: center; }
.sdl-step::before { content: ""; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--cdl-line); }
.sdl-step:first-child::before { display: none; }
.sdl-step.is-done::before { background: var(--sdl-coral); }
.sdl-dot { position: relative; z-index: 1; box-sizing: border-box; width: 12px; height: 12px; border: 2px solid #cfd6e1; border-radius: 50%; background: #fff; }
.sdl-step.is-done { color: #374151; }
.sdl-step.is-done .sdl-dot { border-color: var(--sdl-coral); background: var(--sdl-coral); }
.sdl-step.is-now { color: var(--cdl-ink); font-weight: 700; }
.sdl-step.is-now .sdl-dot { box-shadow: 0 0 0 4px rgba(255, 72, 75, .16); }

/* carrier + driver card */
.sdl-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 8px; border: 1px solid var(--cdl-line); border-radius: 4px; background: #fff; }
.sdl-person { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 10px 12px; font-size: 12.5px; }
.sdl-person + .sdl-person { border-left: 1px solid var(--cdl-line); }
.sdl-person-k { font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--cdl-faint); }
.sdl-person b { font-size: 13.5px; color: var(--cdl-ink); overflow-wrap: anywhere; }
.sdl-contact { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--cdl-accent); text-decoration: none; overflow-wrap: anywhere; }
.sdl-contact:hover { text-decoration: underline; }
.sdl-contact svg { flex: none; width: 12px; height: 12px; color: var(--cdl-faint); }
.sdl-none { color: var(--cdl-faint); }

.sdx-modal { max-width: 520px; }
.sdx-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.sdx-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e3e8ef; border-radius: 4px; background: #fff; }
.sdx-row.is-off { background: #f8fafc; }
.sdx-logo { flex: none; width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid #e3e8ef; border-radius: 4px; background: #fff; color: #1f3a5f; }
.sdx-row.is-off .sdx-logo { color: #8b93a1; }
.sdx-row.is-off .sdx-logo img { filter: grayscale(1); opacity: .6; }
.sdx-txt { flex: 1 1 auto; min-width: 0; }
.sdx-txt b { display: block; font-size: 13.5px; color: #111827; }
.sdx-txt span { display: block; margin-top: 1px; font-size: 12px; color: #5b6675; }
.sdx-row .cdl-btn { flex: none; }
.sdx-note { margin-top: 2px; }
@media (max-width: 600px) {
  .sdl-modal .cdl-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .sdx-row { flex-wrap: wrap; }
  .sdl-people { grid-template-columns: minmax(0, 1fr); }
  .sdl-person + .sdl-person { border-left: 0; border-top: 1px solid var(--cdl-line); }
  .sdl-step { font-size: 10.5px; }
}
