/* Theme controls and shared warehouse headers. */
:root { color-scheme: light; --muted: #606a82; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.theme-toggle { gap: 8px; align-self: stretch; margin-top: 8px; font-size: .8125rem; }
.theme-toggle[aria-pressed="true"] { border-color: var(--brand-light); background: var(--brand-tint); }
.warehouse-hero { align-items: center; }
.warehouse-hero h1 { margin-top: 0; font-size: clamp(1.75rem, 3.2vw, 2.375rem); }
.warehouse-date { gap: 12px; align-items: center; }
.warehouse-date .warehouse-calendar { flex: 1 1 240px; }
.warehouse-date select { flex: 1 1 170px; width: auto; min-width: 0; }
@media (max-width: 900px) {
  .theme-toggle { order: 2; align-self: center; margin: 0; min-width: 42px; padding: 9px; }
  .theme-toggle span { display: none; }
}
@media (max-width: 680px) {
  .warehouse-date { width: 100%; }
  .warehouse-date .warehouse-calendar, .warehouse-date select { flex-basis: 100%; width: 100%; min-width: 0; }
}

/* Dark surfaces and semantic colors; forms retain their native behavior. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f2fa; --ink-soft: #d2d8e8; --muted: #abb5cd;
  --surface: #1b2234; --surface-subtle: #20283d; --surface-tint: #293249; --canvas: #111624;
  --line: #38415b; --line-strong: #58627f;
  --brand: #b5afff; --brand-hover: #d3cfff; --brand-light: #aaa2ff;
  --brand-tint: #303356; --brand-ink: #d0caff;
  --focus: #b5afff; --accent: #fbbf24; --accent-dark: #fcd373;
  --danger: #ffa3b3; --danger-bg: #402332; --danger-line: #875064;
  --success: #83e5b9; --success-bg: #173a32; --success-line: #396e60;
  --warning: #ffce7a; --warning-bg: #3a3020; --warning-line: #7e653a;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 16%);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 20%);
  --shadow-md: 0 6px 20px rgb(0 0 0 / 25%);
  --shadow-lg: 0 18px 44px rgb(0 0 0 / 38%);
  --ring: 0 0 0 3px rgb(181 175 255 / 30%);
}
[data-theme="dark"] .secondary,
[data-theme="dark"] .skip-link,
[data-theme="dark"] .date-picker-trigger,
[data-theme="dark"] .date-picker-trigger:hover,
[data-theme="dark"] .date-picker-popover,
[data-theme="dark"] .date-picker-modes button.is-active,
[data-theme="dark"] .flow-step i,
[data-theme="dark"] .attention-list,
[data-theme="dark"] .agent-result,
[data-theme="dark"] .warehouse-summary > div,
[data-theme="dark"] .order-table tr,
[data-theme="dark"] .agent-example-buttons button:hover { background: var(--surface); }
[data-theme="dark"] .skip-link { color: var(--ink); }
[data-theme="dark"] tbody tr:hover { background: var(--surface-tint); }
[data-theme="dark"] .draft,
[data-theme="dark"] .dispatch-none { background: var(--surface-tint); color: var(--ink-soft); border-color: var(--line); }
[data-theme="dark"] .approved,
[data-theme="dark"] .agent-message-answer,
[data-theme="dark"] .agent-badge-ai { background: var(--brand-tint); color: var(--brand-ink); border-color: var(--line-strong); }
[data-theme="dark"] .message { color: var(--success); }
[data-theme="dark"] .message.error,
[data-theme="dark"] .agent-error,
[data-theme="dark"] .analytics-metrics .metric.delta strong,
[data-theme="dark"] .analytics-metrics .metric.delta.negative strong { color: var(--danger); }
[data-theme="dark"] .danger-button:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
[data-theme="dark"] .warehouse-shortage-list a { background: var(--danger-bg); }
[data-theme="dark"] .warehouse-entry input { background: var(--surface); }
[data-theme="dark"] .customer-bars i { background: var(--surface-tint); }
[data-theme="dark"] .attention-panel, [data-theme="dark"] .attention-list a,
[data-theme="dark"] .action-main { border-color: var(--line); }
[data-theme="dark"] .date-picker-day.is-preview,
[data-theme="dark"] .date-picker-day.is-in-range { background: var(--brand-tint); }
[data-theme="dark"] .date-picker-day.is-outside { color: var(--muted); }
[data-theme="dark"] .date-picker-trigger > span:last-child,
[data-theme="dark"] .date-picker-trigger .date-chevron { border-color: var(--brand); }
[data-theme="dark"] .primary { background: var(--action-bg); border-color: var(--action-bg); color: var(--action-text); }
[data-theme="dark"] .primary:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--action-text); }
[data-theme="dark"] .mark,
[data-theme="dark"] .flow-step.done i,
[data-theme="dark"] .date-picker-day.is-start,
[data-theme="dark"] .date-picker-day.is-end,
[data-theme="dark"] .date-picker-day.is-selected { background: var(--action-bg); border-color: var(--action-bg); color: var(--action-text); }
[data-theme="dark"] .switch-control input:checked + .switch-track { background: var(--action-bg); border-color: var(--action-bg); }
[data-theme="dark"] .save-bar .primary { background: var(--action-bg); border-color: var(--action-bg); color: var(--action-text); }
[data-theme="dark"] .save-bar .primary:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--action-text); }
[data-theme="dark"] .agent-example-group-fast,
[data-theme="dark"] .quick-period-tabs,
[data-theme="dark"] .agent-badge-fast { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
[data-theme="dark"] .quick-period-field,
[data-theme="dark"] .quick-period-tabs button,
[data-theme="dark"] .quick-period-tabs button.is-active,
[data-theme="dark"] .quick-report-buttons button,
[data-theme="dark"] .quick-report-buttons button small,
[data-theme="dark"] .quick-range-dash { color: var(--warning); }
[data-theme="dark"] .quick-period-tabs button:hover,
[data-theme="dark"] .quick-period-tabs button.is-active,
[data-theme="dark"] .quick-period-field input,
[data-theme="dark"] .quick-report-buttons button,
[data-theme="dark"] .quick-report-buttons button:hover { background: var(--surface); }
[data-theme="dark"] select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23d0caff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
}
@media print {
  .theme-toggle { display: none !important; }
  html[data-theme="dark"] { color-scheme: light; --ink: #121726; --ink-soft: #394056; --muted: #667089; --surface: #fff; --surface-subtle: #fafbfe; --surface-tint: #f1f3fb; --canvas: #fff; --brand: #4f46e5; --brand-ink: #3730a3; --brand-tint: #eef0ff; --line: #e6e8f1; }
}

[data-theme="dark"] .agent-example-buttons button { background: var(--surface); color: var(--ink-soft); }
[data-theme="dark"] td, [data-theme="dark"] th { border-color: var(--line); }

/* Equal hero actions; the warehouse date has one visible frame. */
.hero-actions .button { min-height: 46px; padding-block: 11px; }
.warehouse-hero .warehouse-date { padding: 0; border: 0; background: transparent; border-radius: 0; }
.form-date-picker { position: relative; min-width: 0; max-width: none; width: 100%; }
.form-date-picker input.form-native-date {
  position: absolute; width: 1px !important; min-height: 0 !important; height: 1px;
  padding: 0 !important; margin: 0; border: 0; opacity: 0; pointer-events: none;
}
.form-date-picker .date-picker-trigger[aria-invalid="true"] { border-color: var(--danger); }
.form-date-picker .date-picker-popover { z-index: 35; }
@supports (appearance: base-select) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]),
  [data-theme="dark"] select:not([multiple]):not([size]) {
    display: flex; flex-flow: row nowrap; min-width: 0; white-space: nowrap;
    background-image: none; padding-right: 12px; align-items: center; gap: 12px;
    color: var(--ink); background-color: var(--surface);
  }
  select:not([multiple]):not([size])::picker(select) {
    color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); padding: 6px; box-shadow: var(--shadow-lg);
    max-height: min(360px, 50dvh); overflow-y: auto;
    font: inherit; margin-block: 4px;
  }
  select:not([multiple]):not([size])::picker-icon { color: var(--brand-ink); margin-left: auto; }
  select:not([multiple]):not([size]):open::picker-icon { rotate: none; }
  select:not([multiple]):not([size]) option {
    min-height: 38px; padding: 9px 12px; border: 0; border-radius: 6px;
    color: var(--ink); background: var(--surface); white-space: normal;
  }
  select:not([multiple]):not([size]) option:hover,
  select:not([multiple]):not([size]) option:focus { background: var(--surface-tint); }
  select:not([multiple]):not([size]) option:checked { background: var(--brand-tint); color: var(--brand-ink); }
  select:not([multiple]):not([size]) option:disabled { color: var(--muted); opacity: .65; }
}

/* Keep long selected addresses inside their field, with an independent arrow. */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]) > .native-select-display {
    all: unset; display: flex; flex: 1 1 0; min-width: 0; max-width: 100%;
    align-items: center; color: inherit; font: inherit;
  }
  .native-select-display selectedcontent {
    display: block; min-width: 0; width: 100%; overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis;
  }
  select:not([multiple]):not([size])::picker-icon {
    content: ""; width: 8px; height: 8px; flex: 0 0 8px;
    margin: -4px 4px 0 0; border-right: 2px solid var(--brand-ink);
    border-bottom: 2px solid var(--brand-ink); transform: rotate(45deg);
    rotate: none; transition: none; animation: none;
  }
}
.warehouse-hero .warehouse-date {
  width: 280px; flex: 0 0 280px; max-width: 100%;
}
.warehouse-hero .warehouse-date .warehouse-calendar,
.warehouse-hero .warehouse-date select {
  flex: 0 0 100%; width: 100%; min-width: 0; max-width: none;
}
.packing-return { display: inline-flex; margin-bottom: 12px; }
@media (max-width: 680px) {
  .warehouse-hero .warehouse-date { width: 100%; flex-basis: auto; }
}

/* Disclosure arrows stay still when controls open and close. */
.date-picker-trigger > span:last-child,
.date-picker-trigger .date-chevron { transition: none; animation: none; rotate: none; }

/* Opening a calendar must not move its trigger or the surrounding page. */
html { scrollbar-gutter: stable; }
.date-picker-trigger, .date-picker-popover button { transition: none; }
.date-picker-trigger:active, .date-picker-popover button:active { transform: none; }

/* Searchable reference choices retain the original select for form submission. */
.search-choice { position:relative; min-width:0; width:100%; }
.search-choice-native { position:absolute; width:1px !important; height:1px !important;
  min-height:0 !important; padding:0 !important; border:0; opacity:0; pointer-events:none; }
.search-choice-input { width:100%; padding-right:30px !important; text-overflow:ellipsis; }
.search-choice:after { content:""; position:absolute; right:16px; top:18px; width:8px; height:8px;
  border-right:2px solid var(--brand-ink); border-bottom:2px solid var(--brand-ink);
  transform:rotate(45deg); pointer-events:none; }
.search-choice-list { position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px);
  max-height:min(320px,45dvh); overflow:auto; padding:6px; border:1px solid var(--line-strong);
  border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); background:var(--surface); color:var(--ink); }
.search-choice-list [role=option] { padding:9px 10px; border-radius:6px; cursor:pointer;
  font-weight:400; font-size:.875rem; overflow-wrap:anywhere; }
.search-choice-list [role=option]:hover, .search-choice-list [aria-selected=true] { background:var(--brand-tint); color:var(--brand-ink); }
.search-choice-note { padding:9px 10px; font-size:.8125rem; color:var(--muted); }
.search-choice-input[aria-invalid=true] { border-color:var(--danger); }

/* Hidden warehouse labels must not inherit the full-width form label rule. */
.warehouse-date label.visually-hidden { width:1px; min-width:0; }

/* Status badges must fit fixed-width analytics cells on desktop and mobile. */
.analytics-table td .badge { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.analytics-table td[data-label="??????"] { min-width:0; }

.badge.delivered { background:var(--success-bg); color:var(--success); border-color:var(--success-line); }
.delivery-confirmation { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-block:12px; }
.delivery-confirmation p { margin:0; }
.delivery-confirmation small { color:var(--muted); }
.delivery-close { margin-block:12px; }
.delivery-close summary.button { display:inline-flex; }
.delivery-close form { display:grid; gap:12px; padding-top:12px; }
.delivery-close .check { display:flex; align-items:center; gap:8px; }

/* Keep readable column widths; scroll only the table at intermediate widths. */
@media (min-width:761px) {
  .analytics-table { overflow-x:auto; }
  .analytics-table table { min-width:900px; }
  .analytics-table th:nth-child(1) { width:18%; }
  .analytics-table th:nth-child(2) { width:24%; }
  .analytics-table th:nth-child(3) { width:20%; }
  .analytics-table th:nth-child(4) { width:18%; }
  .analytics-table th:nth-child(5) { width:20%; }
}

/* Day overview and persistent notes */
.order-comment { white-space: pre-wrap; overflow-wrap: anywhere; }
.order-comment-field { margin-top: 1rem; }
.analytics-order { border-top: 1px solid var(--border, #d8dbea); padding: 1rem 0; }
.analytics-order summary { cursor: pointer; overflow-wrap: anywhere; }
.day-matrix { overflow: auto; max-height: 70vh; }
.day-matrix table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.day-matrix th, .day-matrix td { min-width: 125px; max-width: 220px; white-space: normal; vertical-align: top; }
.day-matrix th:first-child { position: sticky; left: 0; z-index: 1; min-width: 230px; background: var(--surface, #fff); }
.day-matrix thead th { position: sticky; top: 0; background: var(--surface, #fff); z-index: 2; }
.day-matrix thead th:first-child { z-index: 3; }
.day-matrix small { display: block; font-weight: normal; }

.day-matrix tbody th { font-size: .9rem; text-transform: none; letter-spacing: normal; }
.analytics-order summary { line-height: 1.6; }

.geography-legend { display:flex; flex-wrap:wrap; gap:.5rem 1rem; margin:1rem 0; font-size:.8rem; }
.geography-legend > span { display:flex; gap:.4rem; align-items:center; }
.geography-legend > span::before { content:""; display:block; width:.7rem; height:.7rem; border-radius:50%; background:var(--geo-color); }
.geo-initial { --geo-color:#6976db; }
.geo-correction { --geo-color:#b47714; }
.geo-approved { --geo-color:#159577; }
.geography-chart { display:grid; gap:.75rem; }
.geography-group { display:block; padding:1rem; border:1px solid var(--border, #d8dbea); border-radius:12px; color:inherit; text-decoration:none; }
.geography-group:hover { border-color:var(--brand); }
.geography-group:focus-visible { outline:3px solid #8178e5; outline-offset:3px; }
.geography-heading { display:flex; justify-content:space-between; gap:.75rem; margin-bottom:.6rem; overflow-wrap:anywhere; }
.geography-heading > span { font-size:.8rem; white-space:nowrap; }
.geography-bar { display:grid; grid-template-columns:10rem minmax(0,1fr) 5rem; align-items:center; gap:.75rem; margin:.4rem 0; font-size:.8rem; }
.geography-track { display:block; height:.65rem; background:var(--surface-muted,rgba(126,126,180,.14)); border-radius:5px; overflow:hidden; }
.geography-track > i { display:block; height:100%; background:var(--geo-color); border-radius:5px; }
.geography-bar > strong { text-align:right; font-variant-numeric:tabular-nums; }
@media(max-width:640px) {
 .geography-bar { grid-template-columns:minmax(0,1fr) 4rem; gap:.25rem .5rem; }
 .geography-stage { grid-column:1/-1; font-size:.75rem; }
 .geography-heading { flex-wrap:wrap; }
}

.delivery-time-option { margin-top:1rem; }
.delivery-time-inputs { margin-top:.75rem; }
.delivery-time-inputs[hidden], .delivery-time-range [hidden] { display:none; }
.delivery-time-modes > div { display:flex; flex-wrap:wrap; gap:.5rem 1.5rem; margin-bottom:.75rem; }
.delivery-time-modes label { display:flex; align-items:center; gap:.4rem; }
.delivery-time-modes input { width:auto; }
.delivery-time-range { display:flex; align-items:end; gap:.75rem; max-width:24rem; }
.delivery-time-range > div { flex:1; min-width:0; }
.delivery-time-range label { display:block; }
.delivery-time-range > span { padding-bottom:.75rem; }
.delivery-time-range input { font-variant-numeric:tabular-nums; }
/* Local role workflow: stable controls, wrapping history, shared theme tokens. */
.workflow-bar { margin-bottom:24px; padding:16px 20px; border:1px solid var(--line); border-radius:16px; background:var(--surface, #fff); display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.workflow-bar>div { flex:1 1 220px; }
.workflow-bar form { display:flex; flex:0 1 420px; gap:8px; align-items:center; }
.workflow-bar select { min-width:0; }
.workflow-bar nav { display:flex; flex-wrap:wrap; gap:12px; flex-basis:100%; }
.workflow-next { display:flex; flex-wrap:wrap; align-items:center; gap:20px; }
.workflow-next>div:first-child { flex:1 1 480px; }
.workflow-next h2 { font-size:1.15rem; }
.workflow-actions { display:flex; gap:10px; flex-wrap:wrap; }
.workflow-comparison { margin-top:18px; }
.workflow-comparison summary { cursor:pointer; }
.workflow-time-form { display:grid; gap:14px; padding-top:16px; }
.workflow-timeline { margin:0; padding:0; list-style:none; }
.workflow-event { padding:16px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.workflow-event:last-child { border-bottom:0; }
.workflow-event li { margin:6px 0; }
.workflow-event time { font-size:.85rem; }
@media(max-width:640px) { .workflow-bar form { flex-basis:100%; } .workflow-actions { width:100%; } .workflow-actions a { flex:1 1 170px; text-align:center; } .flow-step strong { font-size:.8rem; } }
/* Separate customer delivery deadline from the recorded warehouse departure. */
.dispatch-timings { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; margin:20px 0; }
.dispatch-delivery, .dispatch-departure { min-width:0; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface-subtle); }
.dispatch-delivery-summary { display:grid; gap:5px; }
.dispatch-delivery-value { display:block; font-size:1.15rem; line-height:1.45; font-variant-numeric:tabular-nums; margin:6px 0; overflow-wrap:anywhere; }
.dispatch-delivery-editor, .dispatch-departure-action { margin-top:14px; }
.dispatch-delivery-editor form, .dispatch-departure-action form { display:grid; gap:12px; margin-top:16px; }
.dispatch-time-modes > div { display:flex; flex-wrap:wrap; gap:12px; }
.dispatch-time-modes label { display:flex; align-items:center; gap:6px; margin:0; }
.dispatch-time-modes input[type=radio] { width:auto; margin:0; }
.dispatch-time-inputs { display:flex; align-items:end; gap:10px; max-width:24rem; }
.dispatch-time-inputs label { flex:1; min-width:0; margin:0; }
.dispatch-time-inputs>span { align-self:center; padding-top:18px; }
.dispatch-queue { margin:18px 0; color:var(--muted); }
.dispatch-queue summary { cursor:pointer; }
.dispatch-queue strong { color:var(--ink); }
@media(max-width:800px) { .dispatch-timings { grid-template-columns:minmax(0,1fr); } }
.dispatch-date-form { display:grid; gap:12px; margin-top:16px; }
.dispatch-date-form label { margin:0; }
@media(max-width:640px) {
 .flow-card { flex-direction:column; align-items:stretch; gap:10px; overflow:visible; }
 .flow-card .flow-step { min-width:0; }
 .flow-card .flow-line { display:none; }
}
.workflow-archive { margin-bottom:20px; }
.workflow-archive>summary { padding:18px 22px; border:1px solid var(--line); border-radius:14px; background:var(--surface); cursor:pointer; font-weight:600; }
.workflow-archive[open]>summary { margin-bottom:12px; }
/* Order workspace: composition, current action, optional history. */
.order-workbench { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,350px); gap:24px; align-items:start; margin-bottom:20px; }
.order-workbench>.card { margin:0; min-width:0; }
.order-workbench-main>.section-heading { margin-bottom:18px; gap:12px; }
.order-workbench h2 { margin-top:0; font-size:1.2rem; }
.order-workbench h3 { font-size:.9rem; margin:0 0 10px; }
.order-subsection { border-top:1px solid var(--line); margin-top:20px; padding-top:16px; min-width:0; }
.order-workbench summary, .order-secondary summary, .dispatch-order-compact summary { cursor:pointer; overflow-wrap:anywhere; }
.order-inline-form { display:grid; gap:12px; margin-top:14px; }
.order-inline-form button { justify-self:start; }
.order-condition { margin:18px 0 0; color:var(--ink-soft); }
.order-workbench-action>.eyebrow { display:block; margin-bottom:10px; }
.order-workbench-action>.button { display:flex; justify-content:center; width:100%; margin-top:16px; }
.order-workbench-action .dispatch-delivery, .order-workbench-action .dispatch-departure,
.dispatch-progress .dispatch-delivery, .dispatch-progress .dispatch-departure { border:0; border-radius:0; padding:0; background:transparent; }
.order-workbench-action .dispatch-delivery-summary>.eyebrow { display:none; }
.order-workbench-action .dispatch-delivery-value { font-size:1.1rem; margin:4px 0; }
.order-workbench-action .dispatch-departure { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.order-workbench-action .dispatch-departure-action>summary { display:flex; justify-content:center; }
.order-workbench-action .dispatch-delivery>details { margin-top:12px; }
.order-workbench-action .dispatch-date-form button { width:100%; }
.order-etrn>.card, .order-secondary .versions-card { border:0; box-shadow:none; padding:0; margin:0; background:transparent; }
.order-etrn form { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.order-etrn label { margin:0; }
.order-secondary>details>summary { font-weight:600; }
.order-secondary .versions-card { margin-top:18px; }
.order-secondary .versions-card .eyebrow { display:none; }
.order-secondary .versions-card h2 { font-size:1rem; }
.dispatch-order-compact .dispatch-progress { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; margin:18px 0; }
.dispatch-order-compact .dispatch-delivery { display:flex; flex-wrap:wrap; gap:14px 24px; align-items:start; }
.dispatch-order-compact .dispatch-delivery-summary { flex:1 1 220px; }
.dispatch-order-compact .dispatch-date-form { margin:0; flex:1 1 310px; grid-template-columns:minmax(0,1fr) auto; align-items:end; }
.dispatch-order-compact .dispatch-date-form>[data-date-reason], .dispatch-order-compact .dispatch-date-form>.errorlist, .dispatch-order-compact .dispatch-date-form>.check { grid-column:1/-1; }
.dispatch-order-compact .dispatch-main-actions { margin:18px 0; gap:12px; }
.dispatch-order-compact .dispatch-main-actions:empty { display:none; }
.dispatch-order-compact .dispatch-lines { border-top:1px solid var(--line); padding-top:16px; margin-top:16px; }
.dispatch-order-compact .dispatch-lines .table-wrap { margin-top:16px; }
.dispatch-order-compact .dispatch-queue { margin:16px 0; }
.dispatch-order-compact .dispatch-delivery-value { font-size:1.1rem; }
.dispatch-order-compact .dispatch-departure-action { margin:12px 0; }
@media(max-width:1100px) { .order-workbench { grid-template-columns:minmax(0,1fr); } .order-workbench-action { order:-1; } }
@media(max-width:640px) {
 .order-workbench { gap:16px; }
 .order-workbench .section-heading>.button { align-self:start; }
 .dispatch-order-compact .dispatch-date-form { grid-template-columns:minmax(0,1fr); }
 .dispatch-order-compact .dispatch-main-actions>.button { flex:1 1 100%; }
 .order-etrn form { align-items:start; }
}

/* Reference suggestions live above cards and never inherit label clipping. */
.search-choice-portal{position:fixed;z-index:200;right:auto;top:auto;box-sizing:border-box;text-transform:none;letter-spacing:normal;font-weight:400}
.half-hour-control{display:flex;align-items:center;gap:7px;min-width:0;color:var(--muted)}
.half-hour-control select{flex:1;width:auto;min-width:0;max-width:110px;margin:0;padding:9px 10px;}
.half-hour-field{min-width:0}.half-hour-field>label{display:block;margin-bottom:6px}
.half-hour-legacy{display:block}.half-hour-legacy[hidden]{display:none}

.geo-stage-switch{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.geo-stage-switch a{padding:8px 12px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:13px}.geo-stage-switch a[aria-current=page]{background:var(--brand-tint);color:var(--brand-ink);font-weight:600}
.geography-donut-layout{display:grid;grid-template-columns:minmax(220px,310px) minmax(0,1fr);gap:28px;align-items:center}
.geography-donut{position:relative;width:100%;max-width:310px;aspect-ratio:1}.geography-donut svg{display:block;width:100%;height:100%}.geography-donut svg a:focus-visible{outline:2px solid var(--brand)}
.geography-donut-total{position:absolute;inset:30%;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;text-align:center}.geography-donut-total strong{font-size:28px;color:var(--ink);font-variant-numeric:tabular-nums}.geography-donut-total span{font-size:11px;color:var(--muted)}
.geography-donut-legend{max-height:350px;overflow:auto;min-width:0}.geography-donut-item{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);font-size:14px}.geography-donut-item i{width:10px;height:10px;border-radius:50%}.geography-donut-item small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.geography-donut-item strong{text-align:right;font-variant-numeric:tabular-nums}.geography-donut-item:hover{background:var(--brand-tint)}
@media(max-width:640px){.geography-donut-layout{grid-template-columns:1fr;gap:14px}.geography-donut{max-width:260px;margin:auto}.geography-donut-item{font-size:12px}}

.search-choice-portal[popover] { margin:0; bottom:auto; }
