/* Dispatch organizer: empty areas stay folded; native summaries remain keyboard accessible. */
.dispatch-organizer { display:grid; gap:10px; margin:12px 0 18px; }
.dispatch-area, .dispatch-company-card { border:1px solid var(--line); border-radius:12px; background:var(--dispatch-surface,#ffffffc9); min-width:0; }
.dispatch-area > summary, .dispatch-company-card > summary, .dispatch-milk-card > summary { display:flex; align-items:center; gap:9px; min-height:46px; list-style:none; margin:0; border:0; background:transparent; }
.dispatch-area > summary::-webkit-details-marker, .dispatch-company-card > summary::-webkit-details-marker, .dispatch-milk-card > summary::-webkit-details-marker { display:none; }
.dispatch-chevron { display:inline-block; transition:transform .15s; font-size:24px; line-height:1; }
details[open] > summary > .dispatch-chevron { transform:rotate(90deg); }
.dispatch-area > .help, .dispatch-area > button { margin:8px 12px; }
#applyPoolRanges { font-size:11px; line-height:1.2; padding:4px 8px; min-height:28px; margin:0 10px 6px; border-radius:7px; }
@media(max-width:600px) { #applyPoolRanges { min-height:32px; } }
.dispatch-company-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr)); gap:4px 8px; padding:0 10px 10px; align-items:start; }
.dispatch-company-card { border-left:4px solid var(--dsp-color); border-radius:9px; overflow:hidden; }
.dispatch-company-card > summary { flex-wrap:wrap; min-height:28px; gap:5px; font-size:12px; padding:4px 8px; cursor:grab; }
.dispatch-company-card > summary > strong { margin-right:auto; }
.dispatch-company-card > summary > small { color:var(--muted); }
.dispatch-company-body { padding:0 8px; }
.dispatch-company-actions { padding:8px; display:flex; }
.dispatch-company-actions button { width:100%; }
body[data-view="dispatch"] .dispatch-organizer .column { min-height:0; padding:6px; border:0; background:transparent; overflow:visible; max-height:none; }
body[data-view="dispatch"] .dispatch-organizer .column h2 { font-size:12px; }
body[data-view="dispatch"] .dispatch-organizer .chip { min-width:0; flex-wrap:wrap; gap:5px; }
body[data-view="dispatch"] .dispatch-organizer .btr-grid { display:grid; grid-template-columns:1fr; }
body[data-view="dispatch"] .dispatch-pool .pool .btr-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr)); max-width:none; margin:0; gap:4px 8px; }
body[data-view="dispatch"] .dispatch-pool .column.pool { min-height:0; margin:0; padding:0 10px 10px; }
body[data-view="dispatch"] .dispatch-pool .drop-hint { grid-column:1/-1; min-height:0; margin:0; padding:8px; }
.pool-return-selected { margin-bottom:6px; }
.milk-compact-stop[draggable="true"], .milk-compact-stop .drag-handle { cursor:grab; }
.milk-compact-stop.selected { outline:2px solid #11a996; outline-offset:-2px; border-radius:6px; }
body[data-view="dispatch"] details.dispatch-milk-card { align-self:start; min-height:0; }
.dispatch-milk-card > summary { padding:4px; flex-wrap:wrap; }
.dispatch-milk-card > summary > strong { flex:1; overflow-wrap:anywhere; }
.dispatch-milk-body { padding-top:6px; }
.dispatch-drop-active { outline:3px solid #11a996; outline-offset:3px; }
.dispatch-organizer button:disabled, .milk-company-manage:disabled { cursor:default; }
html[data-dc-theme="dark"] { --dispatch-surface:#20364e; }
@media(max-width:600px) {
 .dispatch-company-grid { grid-template-columns:1fr; }
 .dispatch-organizer summary, .dispatch-organizer button { min-height:44px; }
 .milk-board-heading .actions { flex-wrap:wrap; }
 .dispatch-milk-card .route-controls { flex-wrap:wrap; }
}
/* Dispatch density: smaller headers, paired organization panels and scrollable lists. */
body[data-view="dispatch"] .dispatch-organizer { gap:6px; margin:6px 0 8px; align-items:start; }
body[data-view="dispatch"] .dispatch-area > summary { min-height:28px; padding:4px 8px; gap:6px; font-size:13px; }
body[data-view="dispatch"] .dispatch-chevron { font-size:18px; }
body[data-view="dispatch"] .dispatch-company-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,130px),1fr)); gap:4px 6px; padding:0 6px 6px; max-height:150px; overflow:auto; }
body[data-view="dispatch"] .dispatch-company-card > summary { min-height:26px; padding:3px 5px; font-size:11px; }
body[data-view="dispatch"] .dispatch-pool .column.pool { padding:0 6px 6px; }
body[data-view="dispatch"] .dispatch-pool .pool .btr-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,130px),1fr)); gap:4px 6px; max-height:150px; overflow:auto; }
body[data-view="dispatch"] .dispatch-area > .drop-hint { min-height:0; margin:0; padding:6px 8px; }
body[data-view="dispatch"] details.dispatch-milk-card { padding:5px; }
body[data-view="dispatch"] .dispatch-milk-card > summary { min-height:24px; padding:2px 3px; gap:5px; font-size:13px; }
body[data-view="dispatch"] .dispatch-milk-body { padding-top:2px; display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:6px; align-items:center; }
body[data-view="dispatch"] .dispatch-milk-body > .route-meta:first-child { grid-column:1/-1; }
body[data-view="dispatch"] .dispatch-milk-body:has(> .help) > .route-meta:first-child { grid-column:2; grid-row:1; }
body[data-view="dispatch"] .dispatch-milk-body > .help { grid-column:1; grid-row:1; }
body[data-view="dispatch"] .dispatch-milk-body > progress { grid-column:1; }
body[data-view="dispatch"] .dispatch-milk-body > .route-meta:nth-of-type(2) { grid-column:2; }
body[data-view="dispatch"] .dispatch-milk-body > :is(.route-controls,.route-pending,.milk-companies) { grid-column:1/-1; min-width:0; }
body[data-view="dispatch"] .dispatch-milk-body > .route-meta { margin:2px 0; gap:4px; font-size:11px; }
body[data-view="dispatch"] .dispatch-milk-body > .help { margin:2px 0; font-size:11px; line-height:1.25; overflow-wrap:anywhere; }
body[data-view="dispatch"] .dispatch-milk-body > progress { display:block; height:3px; margin:3px 0; }
body[data-view="dispatch"] .dispatch-milk-body > .route-controls { gap:4px; margin:3px 0; }
body[data-view="dispatch"] .dispatch-milk-body > .route-controls button { min-height:24px; padding:3px 5px; font-size:10px; }
body[data-view="dispatch"] .dispatch-milk-body > .route-pending { padding:3px 5px; margin:3px 0; font-size:10px; line-height:1.2; }
body[data-view="dispatch"] .dispatch-milk-body > .milk-companies { max-height:max(120px,calc(100dvh - 700px)); overflow:auto; padding:2px; overscroll-behavior:contain; }
body[data-view="dispatch"] .dispatch-routes { gap:8px; }
@media(min-width:1000px) { body[data-view="dispatch"] .dispatch-organizer { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 body[data-view="dispatch"] .dispatch-area > summary, body[data-view="dispatch"] .dispatch-company-card > summary, body[data-view="dispatch"] .dispatch-milk-card > summary { min-height:44px; }
 body[data-view="dispatch"] .dispatch-milk-body > .route-controls button { min-height:36px; }
 body[data-view="dispatch"] .dispatch-milk-body > .milk-companies { max-height:60dvh; }
}
:root {
  color-scheme: light;
  --ink: #103b40;
  --muted: #627a7d;
  --line: #d3e4df;
  --green: #087c6c;
  --bg: #eff6f2;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
[hidden] { display: none !important; }
.history-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:8px 12px; margin-bottom:8px; border:1px solid var(--line); border-radius:10px; background:#ffffffd9; }
.history-controls { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.history-controls input { width:150px; min-height:36px; padding:5px 8px; }
.history-controls button { min-height:36px; padding:5px 12px; }
.history-note { font-size:12px; padding:10px 12px; border-radius:8px; border:1px solid #eed49a; background:#fff5de; color:#835508; }
.keep-location { margin-top:12px; }
body {
  margin: 0;
  background: linear-gradient(110deg, #e1efe7, #f8faf9);
  min-height: 100vh;
}
button,
input,
select,
summary {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
.button,
summary {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #e4f4ed;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary,
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
:focus-visible {
  outline: 3px solid #2aa5da;
  outline-offset: 3px;
}
input,
select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.workspace {
  width: 100%;
  padding: 12px;
  max-width: none;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 15px;
  background: linear-gradient(105deg, #0b5048, #25826b 55%, #d7ebdf);
  min-height: 66px;
  color: white;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 800;
  margin: 0 0 4px;
}
.driver-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #7db5aa;
  border-radius: 10px;
  background: #134a46;
  color: #f7fffd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.banner:has(.portal-logout) > div {
  min-width: 0;
}
.portal-logout {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 40px;
  white-space: nowrap;
}
h1 {
  font-size: 23px;
  line-height: 1.15;
  margin: 0;
}
h2 {
  font-size: 16px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
.tools {
  position: relative;
  color: var(--ink);
}
.tools summary {
  list-style: none;
}
.tools nav {
  position: absolute;
  right: 0;
  top: 45px;
  z-index: 5;
  width: 220px;
  border: 1px solid var(--line);
  padding: 6px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 35px #143c3426;
}
.tools a,
.tools nav button {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 10px;
  border: 0;
  width: 100%;
  text-align: left;
  border-radius: 7px;
}
.tools a:hover {
  background: #e9f5ef;
}
.message {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
  margin: 9px 3px;
}
.message.error {
  color: #aa293e;
}
.message.milk-entry-success,
.last-btr.milk-entry-success {
  color: #14532d !important;
  background: #dcfce7 !important;
  border: 2px solid #16a34a !important;
  border-radius: 10px;
  padding: 10px 12px;
}
.message.milk-entry-error,
.last-btr.milk-entry-error {
  color: #7f1d1d !important;
  background: #fee2e2 !important;
  border: 2px solid #dc2626 !important;
  border-radius: 10px;
  padding: 10px 12px;
}
#btrNumber.milk-entry-success { border: 2px solid #16a34a !important; }
#btrNumber.milk-entry-error { border: 2px solid #dc2626 !important; }
.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffffeb;
  margin-bottom: 12px;
  overflow: hidden;
}
.panel-head {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #edf6f2;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 14px;
}
.row,
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row input:not([type="checkbox"]) {
  flex: 1;
}
.numeric {
  font-size: 24px;
  letter-spacing: 2px;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
small,
.muted {
  color: var(--muted);
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.metric strong {
  font-size: 24px;
}
.list {
  display: grid;
  gap: 6px;
}
.stop {
  display: grid;
  grid-template-columns: 25px minmax(80px, 1fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  min-height: 44px;
}
.stop.selected,
.chip.selected {
  background: #def4e8;
  border-color: #0d957c;
}
.stop strong {
  font-variant-numeric: tabular-nums;
}
.badge {
  font-size: 10px;
  border-radius: 20px;
  padding: 5px 8px;
  background: #e5f3ed;
  color: #116b57;
  white-space: nowrap;
}
.badge.progress-completed { background:#145c42; color:#fff; }
.badge.progress-en-route { background:#dbeafe; color:#174b95; }
.badge.truck-ready { background:#dcfce7; color:#166534; }
.badge.truck-relocate { background:#ffedd5; color:#9a3412; }
.truck-status-controls { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.chip .badge { font-size:9px; padding:3px 5px; }
.dsp-heading { display:flex; align-items:center; justify-content:space-between; margin:12px 2px 8px; }
.dsp-heading h2 { font-size:14px; margin:0; }
.dsp-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:5px; align-items:start; }
.dsp-card { background:#ffffffdc; border:1px solid #dce9e5; border-radius:14px; padding:12px 14px; box-shadow:0 2px 7px #24574a04; min-width:0; }
.dsp-card-top,.dsp-card-bottom,.dsp-actions,.dsp-progress { display:flex; align-items:center; gap:8px; }
.dsp-card-top,.dsp-card-bottom { justify-content:space-between; }
.dsp-card h3 { margin:0; font-size:15px; letter-spacing:.1px; }
.dsp-card .badge { font-size:11px; line-height:16px; padding:4px 8px; text-align:center; }
.dsp-workspace .dsp-card { border-left:4px solid var(--dsp-color,#9aada6); border-radius:9px; box-shadow:none; }
.dsp-workspace .dsp-card:hover { background:#f5faf8; }
.truck-open { cursor:pointer; }
.truck-open:focus-visible { outline:2px solid #168b7b; outline-offset:2px; }
.truck-open-hint { text-align:right; color:#647e75; font-size:12px; }
.progress-skipped { background:#f2eaf9; color:#765396; }
.badge.truck-departed { background:#e5e7eb; color:#374151; }
.truck-modal-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-bottom:8px; }
.truck-modal-actions button { min-height:40px; padding:7px; }
@media (max-width:480px) { .truck-modal-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.truck-action-confirm { padding:12px; border:1px solid #eadbbd; background:#fff9eb; border-radius:10px; margin-bottom:10px; }
.truck-action-confirm[hidden] { display:none; }
body[data-view="amzl"] #content .chip { border-left:3px solid var(--dsp-color,#9aada6); border-radius:7px; }
body[data-view="amzl"] #content .column:not(.pool) h2 { border-left:3px solid var(--dsp-color,#9aada6); padding-left:8px; }
.milk-companies .milk-company { border-left:3px solid var(--dsp-color,#9aada6); background:#fff; border-radius:8px; }
.dsp-address { margin:6px 0; font-size:14px; line-height:1.35; color:#506a63; overflow-wrap:anywhere; }
.dsp-progress { flex-wrap:wrap; min-width:0; }
.dsp-progress small { font-size:12px; line-height:1.3; color:#607873; text-align:center; }
.dsp-actions { flex-shrink:0; }
.dsp-actions button { padding:5px 9px; min-height:32px; border-radius:8px; font-size:12px; background:#f6faf8; }
.dsp-card-top { display:grid; grid-template-columns:minmax(60px,1fr) 150px; gap:8px; align-items:center; }
.dsp-card-top > .badge { justify-self:center; }
.dsp-progress { justify-content:center; }
@media(min-width:901px) {
 .dsp-card { display:grid; grid-template-columns:230px minmax(0,1fr) 310px; align-items:center; gap:12px; min-height:48px; padding:5px 12px; border-radius:9px; }
 .dsp-address { margin:0; }
 .dsp-card-bottom { display:grid; grid-template-columns:145px 155px; gap:10px; align-items:center; }
 .dsp-actions { justify-content:flex-end; }
}
.danger-soft { color:#ad4550; background:#fff6f6 !important; border-color:#efd7d9; }
body:is([data-view="amzl"],[data-view="dsp"]) .banner { min-height:46px; padding:8px 14px; border-radius:14px; }
body:is([data-view="amzl"],[data-view="dsp"]) .banner h1 { font-size:20px; }
body:is([data-view="amzl"],[data-view="dsp"]) .metric { padding:7px 12px; min-height:36px; border-color:#dce9e5; border-radius:12px; }
body[data-view="amzl"] #content .history-bar { padding:5px 8px; margin:6px 0; border-radius:12px; gap:8px; }
body[data-view="amzl"] .history-controls { padding:0; margin:0; }
body[data-view="amzl"] #content .column { min-height:78px; }
body[data-view="amzl"] #content .pool { min-height:0; }
body[data-view="amzl"] .pool .drop-hint { padding:8px; margin:0; }
body[data-view="amzl"] .column { background:#ffffffc9; border-color:#dce9e5; border-radius:12px; }
body[data-view="amzl"] .column h2 { background:#f1f7f4; border-radius:7px; }
body[data-view="amzl"] .chip { border-color:#d8e7e1; border-radius:8px; background:#fff; }
@media(max-width:650px) {
 .dsp-card { padding:10px 12px; }
 .dsp-actions button { min-height:38px; }
 .dsp-card-bottom { align-items:flex-start; }
}
.badge.warn {
  background: #fff1d4;
  color: #9b6605;
}
.board {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: stretch;
}
.column {
  flex: 1 0 225px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f2f7f4;
  padding: 10px;
}
.column h2 {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin: 3px 0 12px;
}
.column.pool {
  background: #e5eeea;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 10px;
  margin-bottom: 7px;
  cursor: grab;
}
.chip strong {
  flex: 1;
}
.chip button {
  padding: 5px 7px;
}
/* AMZL 6.1: dense desktop board without shrinking mobile touch targets. */
body:is([data-view="amzl"], [data-view="dispatch"]) .board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  overflow-x: visible;
  align-items: start;
  gap: 8px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .column {
  min-width: 0;
  min-height: 94px;
  max-height: max(240px, calc(100dvh - 310px));
  overflow-y: auto;
  padding: 7px;
  border-radius: 10px;
  background: #fff;
  scrollbar-width: thin;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .column.pool {
  min-height: 100px;
  max-height: 42dvh;
  background: #ffffff80;
  margin-bottom: 12px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .column h2 {
  align-items: center;
  margin: 0 0 6px;
  padding: 7px;
  background: linear-gradient(105deg, #e5f4ee, #f1f8f6);
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .assigned-count {
  font-size: 10px;
  font-weight: 600;
  color: #087263;
  background: #d9f2e9;
  padding: 2px 6px;
  border-radius: 12px;
  white-space: nowrap;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .column-move {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  font-size: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .pool .btr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 4px 8px;
  max-width: 1120px;
  margin: 8px auto;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .pool .chip {
  margin: 0;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .board-heading h2 {
  font-size: 13px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .board-heading button {
  padding: 5px 10px;
  font-size: 11px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .drop-hint {
  padding: 20px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .pool .drop-hint {
  grid-column: 1/-1;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .drag-handle {
  color: #99b7ad;
  font-size: 14px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .chip {
  min-height: 28px;
  gap: 5px;
  padding: 1px 6px;
  margin-bottom: 4px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 18px;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .chip:last-child {
  margin-bottom: 0;
}
body:is([data-view="amzl"], [data-view="dispatch"]) .chip button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 5px;
  line-height: 1;
  flex: 0 0 24px;
}
@media (pointer: coarse), (max-width: 650px) {
body:is([data-view="amzl"], [data-view="dispatch"]) .column {
    flex-basis: min(240px, 75vw);
  }
body:is([data-view="amzl"], [data-view="dispatch"]) .chip {
    min-height: 44px;
  }
body:is([data-view="amzl"], [data-view="dispatch"]) .chip button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
}
body[data-view="dispatch"] .banner { min-height: 36px; padding: 4px 12px; border-radius: 11px; }
body[data-view="dispatch"] .banner .eyebrow { display: none; }
body[data-view="dispatch"] .banner h1 { font-size: 18px; }
body[data-view="dispatch"] .tools > summary { padding: 4px 9px; min-height: 28px; font-size: 12px; }
body[data-view="dispatch"] .tools nav { top: 32px; }
body[data-view="dispatch"] .message { margin: 4px 2px; min-height: 14px; font-size: 11px; }
body[data-view="dispatch"] .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
body[data-view="dispatch"] .metric { padding: 3px 10px; min-height: 28px; font-size: 10px; }
body[data-view="dispatch"] .metric strong { font-size: 18px; }
.dispatch-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.dispatch-filters .search { flex: 1 1 250px; width: auto; margin: 0; }
.dispatch-filters select { flex: 0 1 170px; }
.dispatch-filters input, .dispatch-filters select, .dispatch-filters button { min-height: 30px; padding: 5px 8px; font-size: 12px; }
body[data-view="dispatch"] .board { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
body[data-view="dispatch"] .dispatch-route { min-width: 0; padding: 10px; max-height: none; overflow: visible; }
body[data-view="dispatch"] .dispatch-route .route-controls { justify-content: flex-start; gap: 8px; }
body[data-view="dispatch"] .dispatch-route .route-controls button { white-space: nowrap; font-size: 12px; padding: 7px 10px; }
body[data-view="dispatch"] .dispatch-route > p { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
body[data-view="dispatch"] .milk-company strong { font-size: 13px; }
body[data-view="dispatch"] .milk-company small, body[data-view="dispatch"] .milk-company .badge { white-space: nowrap; }
.dispatch-route h2 span { min-width: 0; overflow-wrap: anywhere; }
.route-meta, .route-controls, .stop-controls { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 7px 0; flex-wrap: wrap; }
.dispatch-route progress { width: 100%; height: 5px; accent-color: var(--green); }
.route-controls button, .stop-controls button { padding: 5px 8px; font-size: 11px; }
.dispatch-route .route-pending { padding: 7px; margin: 7px 0; font-size: 11px; }
.dispatch-stop { border: 1px solid var(--line); border-radius: 7px; padding: 7px; background: #fff; }
.dispatch-stop .row { gap: 6px; font-size: 12px; }
.stop-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 5px 0; color: var(--muted); font-size: 11px; }
.stop-controls { margin: 0; justify-content: flex-end; }
.stop-controls .badge { margin-right: 0; }
.company-stop-list .dispatch-stop { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:10px; padding:6px 9px; border-left:3px solid var(--dsp-color,#9aada6); }
.company-stop-list .dispatch-stop .row { grid-column:1; }
.company-stop-list .dispatch-stop .stop-address { grid-column:1; margin:3px 0 0; }
.company-stop-list .dispatch-stop .stop-controls { grid-column:2; grid-row:1 / 3; justify-content:flex-end; }
.completed-stop { cursor: pointer; }
.completed-stop:hover { border-color: #1b9b81; background: #f1fbf6; }
.milk-board-heading { margin: 6px 0; }
.milk-company { display: flex; align-items: center; gap: 6px; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; min-height: 34px; background: #f0f8f4; text-align: left; }
.milk-company:hover { background: #e2f2e9; border-color: var(--green); }
.milk-slack-shell { min-width:0; }
.milk-slack-eyebrow { color:var(--muted); font-size:10px; letter-spacing:.1em; font-weight:800; margin:0 0 12px; }
.milk-slack-controls { display:flex; flex-wrap:wrap; align-items:end; gap:8px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.milk-slack-controls label { display:grid; gap:4px; font-size:12px; }
.milk-slack-controls input { width:145px; max-width:100%; }
.milk-slack-controls button { min-height:38px; font-size:12px; padding:8px 10px; }
.milk-slack-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:12px 0; }
.milk-slack-counts span { padding:8px; border:1px solid var(--line); border-radius:8px; font-size:10px; color:var(--muted); }
.milk-slack-counts strong { display:block; font-size:19px; color:var(--ink); }
.milk-slack-shell #slackLocationsStatus { font-size:12px; line-height:1.5; }
.milk-slack-list { display:grid; gap:4px; }
.milk-slack-entry { min-width:0; border:1px solid var(--line); border-radius:7px; }
.milk-slack-row { display:grid; grid-template-columns:20px 58px minmax(0,1fr) auto; align-items:center; gap:6px; min-height:38px; padding:5px 8px; cursor:pointer; list-style:none; font-size:11px; }
.milk-slack-row input[type="checkbox"] { width:18px; height:18px; min-width:18px; padding:0; margin:0; accent-color:var(--green); }
.milk-slack-row::-webkit-details-marker { display:none; }
.milk-slack-row .milk-slack-address { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.milk-slack-detail { padding:0 8px 8px; font-size:12px; }
.milk-slack-detail p { margin:7px 0; }
.milk-slack-detail button { min-height:36px; font-size:12px; }
.milk-slack-preview { overflow-wrap:anywhere; }
.milk-slack-preview .confirm { align-items:center; font-size:12px; margin:8px 0; }
.milk-slack-preview .confirm input { flex:0 0 20px; min-width:20px; width:20px; height:20px; }
.milk-slack-confirm { border:1px solid var(--line); border-radius:10px; padding:12px; margin:12px 0; background:color-mix(in srgb,var(--green) 5%,transparent); font-size:12px; }
.milk-slack-confirm h3 { margin:0 0 9px; font-size:14px; }
.milk-slack-confirm pre { font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; max-height:35dvh; overflow:auto; line-height:1.65; border:1px solid var(--line); padding:10px; border-radius:7px; }
.milk-slack-confirm ul { margin:6px 0 12px; padding-left:17px; max-height:25dvh; overflow:auto; overflow-wrap:anywhere; }
.milk-slack-confirm li { padding:4px 0; }
.milk-slack-confirm .confirm { display:flex; align-items:center; gap:9px; min-height:44px; }
.milk-slack-confirm input[type="checkbox"] { width:20px; min-width:20px; height:20px; margin:0; }
.milk-slack-confirm-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:10px; }
.milk-slack-footer { position:sticky; bottom:-18px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 0; border-top:1px solid var(--line); margin-top:10px; background:var(--bg); z-index:1; }
.milk-slack-footer small { font-size:11px; }
.milk-slack-empty { padding:22px 12px; text-align:center; border:1px dashed var(--line); border-radius:10px; font-size:12px; }
.milk-slack-empty p { color:var(--muted); line-height:1.6; }
.milk-slack-row small { display:block; font-size:10px; margin-top:4px; }
.milk-slack-verdict { white-space:nowrap; font-weight:600; }
.milk-slack-verdict[data-result="matched"] { color:#18745c; }
.milk-slack-verdict[data-result="manual"] { color:#a34c10; }
html[data-dc-theme="dark"] .milk-slack-verdict[data-result="matched"] { color:#83dfb8; }
html[data-dc-theme="dark"] .milk-slack-verdict[data-result="manual"] { color:#ffc075; }
.milk-slack-review { font-weight:600; }
.milk-slack-address { overflow-wrap:anywhere; }
.milk-slack-source { display:flex; justify-content:space-between; gap:5px; font-size:10px; margin-top:8px; }
@media(pointer:coarse),(max-width:600px){ .milk-slack-row { min-height:44px; grid-template-columns:20px 48px minmax(0,1fr) auto; gap:4px; padding:5px; } .milk-slack-controls button,.milk-slack-controls input,.milk-slack-detail button,.milk-slack-confirm button,.milk-slack-footer button { min-height:44px; } .milk-slack-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; } .milk-slack-controls input { width:100%; } .milk-slack-controls button { white-space:normal; } .milk-slack-footer { bottom:-12px; } }
/* Compact Dispatch lists: retain status colors and full touch targets. */
body[data-view="dispatch"] .dispatch-route { padding:8px; }
body[data-view="dispatch"] .dispatch-route h2 { margin:0 0 5px; font-size:14px; }
body[data-view="dispatch"] .dispatch-route .route-controls { gap:4px; margin:5px 0; }
body[data-view="dispatch"] .dispatch-route .route-controls button { padding:5px 7px; font-size:11px; }
body[data-view="dispatch"] .dispatch-route .milk-companies { gap:4px; }
body[data-view="dispatch"] .company-stop-list .dispatch-stop { padding:5px 7px; font-size:11px; }
@media(pointer:coarse),(max-width:650px){body[data-view="dispatch"] .route-controls button,body[data-view="dispatch"] .milk-company,body[data-view="dispatch"] .stop-controls button { min-height:44px; }}
.milk-company-group { min-width:0; border-left:3px solid var(--dsp-color); border-radius:8px; }
.milk-company-group summary { cursor:pointer; list-style:none; }
.milk-company-group summary::-webkit-details-marker { display:none; }
.milk-company-group[open] .milk-expand-icon { transform:rotate(90deg); }
.milk-compact-list { padding:4px 5px 6px; }
.milk-compact-stop { display:grid; grid-template-columns:18px auto minmax(0,1fr) auto; align-items:center; gap:5px; min-height:36px; padding:5px 4px; border-bottom:1px solid var(--line); cursor:pointer; font-size:11px; }
.milk-stop-address { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.milk-compact-stop .badge { font-size:9px; padding:3px 4px; }
.milk-company-manage { font-size:11px; padding:5px 8px; margin-top:5px; }
.milk-swap-target { display:grid; gap:6px; margin:14px 0; }
@media(max-width:600px){ .milk-compact-stop { min-height:44px; grid-template-columns:16px auto minmax(0,1fr); } .milk-compact-stop .badge { grid-column:2 / -1; justify-self:start; } .milk-company-manage { min-height:44px; } }
.milk-company strong { font-size: 12px; margin-right: auto; }
.milk-company small { font-size: 10px; }
.milk-company .badge { font-size: 9px; padding: 3px 6px; }
.company-stop-list { max-height: 60dvh; overflow-y: auto; }
.notebook-source { margin: 4px 0 8px; }
.dispatch-filters input[type="date"] { flex: 0 1 170px; width: 170px; }
.company-picker { max-height: 35dvh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
#editorBody .company-choice { display: flex; align-items: center; padding: 8px; gap: 8px; }
.company-choice small { margin-left: auto; }
.proof-meta { font-size: 13px; padding: 10px; background: #eef8f3; border-radius: 8px; }
.proof-gallery figure { margin: 12px 0; }
.proof-gallery .photo { display: block; max-height: 40dvh; border-radius: 8px; }
.proof-gallery figcaption { color: var(--muted); font-size: 12px; margin-top: 5px; }
.route {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.route:first-child {
  border: 0;
}
.route-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
  gap: 8px;
  flex-wrap: wrap;
}
.route progress {
  accent-color: var(--green);
  width: 100%;
  height: 5px;
}
.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.split {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 2fr;
  gap: 12px;
}
.help {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 20px 80px #14352b44;
}
dialog::backdrop {
  background: #082b3199;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #e8f3ed;
}
#editorBody {
  padding: 16px;
}
#editorBody form {
  display: grid;
  gap: 12px;
}
#editorBody label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.map {
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
}
.places-host {
  position: relative;
  min-width: 0;
}
.places-host .pac-container {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 0 0 9px 9px;
}
.places-host .pac-item {
  padding: 8px;
  cursor: pointer;
}
.location-error {
  color: #aa293e;
  margin: 0;
}
.location-error:empty {
  display: none;
}
#dspLogin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.photo {
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}
.search {
  width: 100%;
  margin: 0 0 10px;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar input {
  flex: 1;
  min-width: 140px;
}
.driver-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.driver-steps span {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #ffffffb3;
}
.driver-steps [aria-current="step"] {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-weight: 700;
}
.last-btr {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #e2f2e9;
  font-size: 14px;
}
.last-btr strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.draft-review .list {
  max-height: 42dvh;
  overflow-y: auto;
}
.draft-review .step-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}
.draft-review button {
  min-height: 44px;
}
#draftError:empty {
  display: none;
}
.route-pending {
  padding: 12px;
  border: 1px solid #eed49a;
  border-radius: 9px;
  background: #fff5de;
  color: #835508;
  font-weight: 700;
}
.route-pending small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.btr-range-row { display:grid;grid-template-columns:minmax(90px,1.4fr) minmax(60px,1fr) minmax(60px,1fr) 40px;gap:8px;align-items:end;padding:8px 10px;margin-bottom:8px;border:1px solid #d7e6e1;border-left:4px solid #369889;border-radius:10px;background:#f6faf8; }
.btr-range-row label { min-width:0;display:grid;gap:4px;font-size:11px;color:#45645d; }
.btr-range-row input,.btr-range-row select { width:100%;min-width:0;box-sizing:border-box;min-height:44px; }
.btr-range-row button { min-height:44px; }
#btrRangeRows { max-height:38dvh;overflow-y:auto;overscroll-behavior:contain;padding-right:2px; }
@media (max-width: 650px) {
  .history-controls button, .history-controls input { min-height:44px; }
  #dspLogin {
    grid-template-columns: 1fr;
  }
  #shortCode {
    font-size: 16px;
  }
  .workspace {
    padding: 8px;
  }
  .banner {
    padding: 12px;
    min-height: 60px;
  }
  body[data-view="dispatch"] .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-view="dispatch"] .banner { min-height: 48px; }
  body[data-view="dispatch"] .tools > summary { min-height: 40px; display: flex; align-items: center; }
  body[data-view="dispatch"] .tools nav { top: 44px; }
  .dispatch-filters input, .dispatch-filters select, .dispatch-filters button { min-height: 44px; }
  body[data-view="dispatch"] .dispatch-route { flex-basis: min(320px, 85vw); }
  .milk-company { min-height: 44px; }
  .dispatch-filters select { flex: 1 1 120px; }
  .route-controls button, .stop-controls button { min-height: 36px; }
  .portal-logout {
    min-height: 44px;
  }
  h1 {
    font-size: 21px;
  }
  .split {
    display: block;
  }
  .stop {
    grid-template-columns: 22px minmax(65px, 1fr) auto;
    gap: 7px;
  }
  .stop .address {
    grid-column: 2/-1;
    grid-row: 2;
  }
  .metrics {
    gap: 5px;
  }
  .metric {
    padding: 9px;
    font-size: 10px;
  }
  .metric strong {
    font-size: 20px;
  }
  .column {
    flex-basis: 85vw;
  }
  .actions button {
    min-height: 40px;
  }
  .numeric {
    font-size: 24px;
  }
  .tools nav {
    top: 43px;
  }
}

.intake-remove {margin-left:auto;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;font-size:22px;line-height:1;color:#b91c1c;}
