/* Admin / dispatcher layout: side menu on a computer, slide-in menu on a phone */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 12px; z-index: 950; }
.sidenav .logo { padding: 2px 8px 16px; border-bottom: 1px solid var(--line); }
.sidenav nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.sidenav nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s; }
.sidenav nav a:hover { background: var(--beige); text-decoration: none; }
.sidenav nav a.on { background: var(--ink); color: #fff; }
.sidenav nav a.on .cnt { background: rgba(255, 255, 255, .18); color: #fff; }
.sidenav nav .cnt { margin-left: auto; background: var(--warn-soft); color: var(--warn); border-radius: 999px; font-size: 11.5px; padding: 1px 8px; font-weight: 800; }
.sidenav nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.ic { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidenav .me { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.sidenav .me .who { font-weight: 700; font-size: 14px; padding: 0 8px; }
.sidenav .me .who small { display: block; font-weight: 600; }
.sidenav .me .row { padding: 0 2px; }
.content { min-width: 0; }
.mbar { display: none; }
.scrim { display: none; }
main.page { padding: 22px 26px 56px; max-width: 1560px; margin: 0 auto; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { position: fixed; left: 0; top: 0; bottom: 0; width: 276px; transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .shell.open .sidenav { transform: none; }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(43, 38, 34, .32); z-index: 940; }
  .mbar { display: flex; position: sticky; top: 0; z-index: 900; align-items: center; gap: 10px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 8px 12px; height: 56px; }
  .mbar .logo-mark { width: 30px; height: 30px; }
  .mbar b { font-size: 16px; }
  .mbar .burger { width: 42px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
  main.page { padding: 14px 12px 48px; }
}

/* page head + toolbars */
.ph { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ph h1 { margin: 0; font-size: 23px; }
.ph .sub { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=date] { width: auto; }
.toolbar input[type=search] { width: 240px; }
.daypick { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; overflow: hidden; }
.daypick button { border: 0; background: transparent; min-height: 38px; padding: 0 11px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.daypick button:hover { background: var(--beige); }
.daypick .dlabel { min-width: 150px; text-align: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 8px 13px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-2); min-height: 38px; }
.seg button:hover { background: var(--beige); }
.seg button.on { background: var(--ink); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); font-family: inherit; }
.chip:hover { border-color: var(--sand); }
.chip.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; color: var(--ink); }
.chip b { font-size: 14px; color: var(--ink); }
.chip:disabled { cursor: default; }
.bulk { position: sticky; top: 8px; z-index: 50; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; box-shadow: var(--shadow-lg); }
.bulk select { width: auto; min-width: 190px; color: var(--ink); }
@media (max-width: 980px) { .bulk { top: 64px; } }
.ord td { cursor: pointer; }
.ord td.sel, .ord td.drv { cursor: default; }
.ord .oname { font-weight: 800; }
.ord .sub { color: var(--muted); font-size: 13px; }
.ord select { min-height: 34px; padding: 5px 8px; font-size: 14px; max-width: 190px; }
.flag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--warn); }
.note-pay { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); }
.note-cash { display: inline-block; font-size: 12px; font-weight: 800; color: #7a5200; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; font-size: 14px; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 600; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv > div:nth-child(even) { margin-bottom: 8px; } }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.timeline li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; }
.timeline li span:first-child { color: var(--muted); width: 92px; flex: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; }
#map { border-radius: var(--r); border: 1px solid var(--line); height: 100%; min-height: 420px; background: #eef0ec; }
.pin { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.pin.stale { background: #9a9087; }
.pin.br { border-radius: 9px; background: #fff; border: 2px solid var(--ink); }
.opin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.help { background: var(--beige); border: 1px solid var(--beige-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.section { margin-top: 24px; }
@media (max-width: 900px) { .ord .hide-sm { display: none; } }
tr.grp td { background: var(--beige); font-weight: 800; font-size: 14.5px; color: var(--ink); border-top: 1px solid var(--beige-2); cursor: default !important; letter-spacing: .01em; }
.ord .chip { margin-top: 6px; padding: 3px 9px; font-size: 12px; }

/* dispatch board: jobs to give out | map | drivers */
.kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px; min-width: 104px; box-shadow: var(--shadow); font-family: inherit; text-align: left; cursor: default; }
.kpi b { display: block; font-size: 20px; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dsp { display: grid; grid-template-columns: 370px minmax(0, 1fr) 330px; gap: 14px; height: calc(100vh - 168px); min-height: 560px; }
.dsp-col { display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.dsp-col > .hd { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dsp-col > .hd h2 { margin: 0; font-size: 15.5px; }
.dsp-col > .bd { overflow-y: auto; padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.dsp-col.mapc { padding: 0; overflow: hidden; }
.dsp-col.mapc #map { border: 0; border-radius: var(--r); min-height: 0; }
.jobc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.jobc:hover { border-color: var(--sand); }
.jobc.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.jobc .t { display: flex; align-items: center; gap: 8px; }
.jobc .t b { cursor: pointer; }
.jobc .t input { width: 17px; height: 17px; min-height: 0; flex: none; }
.jobc .t .when { margin-left: auto; font-weight: 700; font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.jobc .s { color: var(--muted); font-size: 13px; line-height: 1.4; }
.jobc .s.who { color: var(--ink); font-weight: 600; font-size: 14px; margin-top: 2px; }
.jobc .a { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.jobc .a select { min-height: 32px; padding: 4px 8px; font-size: 13px; flex: 1; }
.jobc .pr { font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--grey-soft); color: var(--muted); white-space: nowrap; }
.jobc .pr.ready { background: var(--ok-soft); color: var(--ok); }
.jobc .pr.preparing { background: var(--warn-soft); color: var(--warn); }
.drvc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.drvc.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.drvc .t { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.drvc .t .n { cursor: pointer; }
.drvc .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.drvc .jobs { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.drvc .jobs button { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); background: var(--beige); border: 0; border-radius: 9px; padding: 5px 8px; text-align: left; font-family: inherit; cursor: pointer; }
.drvc .jobs button span.grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drvc .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.off-list summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 2px; }
@media (max-width: 1280px) {
  .dsp { grid-template-columns: 360px minmax(0, 1fr); height: auto; }
  .dsp .give { height: 70vh; }
  .dsp-col.mapc { height: 70vh; }
  .dsp .drivers { grid-column: 1 / -1; }
  .dsp .drivers .bd { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); align-items: start; }
}
@media (max-width: 860px) {
  .dsp { grid-template-columns: 1fr; }
  .dsp .give { height: auto; max-height: none; }
  .dsp .give .bd { max-height: 65vh; }
  .dsp-col.mapc { height: 58vh; }
}

/* month calendar with a dot on days that have deliveries */
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.cal-h b { font-size: 16px; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-g .wd { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 4px 0; letter-spacing: .05em; }
.cal-d { border: 1px solid transparent; background: #fff; border-radius: 11px; min-height: 56px; padding: 6px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; color: var(--ink); }
.cal-d:hover { background: var(--beige); }
.cal-d.other { opacity: .35; }
.cal-d.today { border-color: var(--sand); }
.cal-d.on { background: var(--ink); color: #fff; }
.cal-d .n { font-weight: 700; font-size: 14px; }
.cal-d .dots { display: flex; gap: 4px; align-items: center; font-size: 11px; font-weight: 800; color: var(--accent); min-height: 14px; }
.cal-d .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cal-d .dots i.done { background: var(--ok); }
.cal-d.on .dots { color: #fff; }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; background: var(--accent); }
.cal-legend i.done { background: var(--ok); }

/* order details */
.pay-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.related { display: flex; gap: 6px; flex-wrap: wrap; }
.split-items label { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14.5px; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.split-items input[type=checkbox] { width: 18px; height: 18px; min-height: 0; flex: none; }
.split-items input.q { width: 70px; min-height: 32px; padding: 4px 8px; margin-left: auto; }
.warnbox { background: var(--warn-soft); border: 1px solid #f0dcb8; color: #6d4a12; border-radius: 12px; padding: 12px 14px; }
.warnbox b { color: var(--ink); }

/* car log */
.tag-old { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--grey-soft); border-radius: 999px; padding: 1px 8px; }
.still { font-weight: 800; color: var(--violet); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.filters label { font-size: 12px; }
.filters input, .filters select { width: auto; min-width: 140px; }

/* place search, team & roles */
.place-find, .map-find { position: relative; }
.pf-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(43, 38, 34, .16); max-height: 300px; overflow-y: auto; margin-top: 4px; }
.map-find .pf-list { z-index: 1200; }
.pf-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 9px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.pf-item:hover { background: var(--beige); }
.pf-item:last-child { border-bottom: 0; }
.pf-item small { color: var(--muted); }
.pf-ic { font-size: 18px; line-height: 1.2; }
.pf-picked { margin-top: 6px; background: var(--ok-soft); color: var(--ok); border-radius: 9px; padding: 7px 11px; font-size: 13px; }
.pf-picked .check { color: var(--ink); font-size: 13px; }
.card.off { opacity: .6; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.role-card { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.role-card small { color: var(--muted); }
.role-card.on { border-color: var(--ink); background: var(--beige); }
.role-card.add { border-style: dashed; color: var(--muted); justify-content: center; }
.perm { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; font-weight: 500; font-size: 15px; color: var(--ink); margin: 0 0 4px; background: #fbf9f5; }
.perm input { width: 18px; height: 18px; min-height: 0; }
.role-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.role-checks .check { font-size: 14px; }
table.matrix th.c, table.matrix td.c { text-align: center; white-space: nowrap; }
table.matrix td.c input { width: 18px; height: 18px; min-height: 0; }
table.matrix tr.grp td { background: var(--beige); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--muted); }
.small-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
/* add from Shopify */
.shop-list { border: 1px solid var(--line); border-radius: 12px; max-height: 340px; overflow-y: auto; margin-top: 6px; }
.shop-list > .muted, .shop-list > .err { padding: 10px 12px; }
.shop-item { align-items: center; }
.shop-item .grow { flex: 1; min-width: 0; }
.shop-item .shop-act { flex: none; font-weight: 700; color: var(--ink); white-space: nowrap; }
.shop-item[disabled] { opacity: .55; cursor: default; }
p.ok { color: var(--ok); }
.dsp-col.mapc { position: relative; }
.mapc .map-find { position: absolute; top: 10px; left: 54px; right: 10px; z-index: 1000; max-width: 360px; }
.mapc .map-find input { box-shadow: var(--shadow); }

/* deliveries list on a phone: each row becomes a small card */
@media (max-width: 700px) {
  .ord thead { display: none; }
  .ord, .ord tbody { display: block; }
  .ord tr.grp, .ord tr.grp td { display: block; }
  .ord tr[data-id] { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 5px; padding: 12px; border-bottom: 1px solid var(--line); }
  .ord tr[data-id] td { display: block; padding: 0; border: 0; background: none !important; }
  .ord td.sel { grid-column: 1; grid-row: 1 / span 4; padding-top: 2px; }
  .ord tr[data-id] td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .ord tr[data-id] td:nth-child(8) { grid-column: 3; grid-row: 1; text-align: right; }
  .ord tr[data-id] td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .ord tr[data-id] td:nth-child(3) { grid-column: 3; grid-row: 2; text-align: right; }
  .ord tr[data-id] td:nth-child(5) { display: none; }
  .ord tr[data-id] td:nth-child(6) { display: block !important; grid-column: 2 / span 2; grid-row: 3; }
  .ord tr[data-id] td.drv { grid-column: 2 / span 2; grid-row: 4; }
  .ord td.drv select { max-width: none; width: 100%; }
  .ord tr[data-id]:last-child { border-bottom: 0; }
}
.ord select { min-width: 140px; }

/* deliveries: view switch, filters, order cards, board, big calendar */
.vsw button { display: inline-flex; align-items: center; gap: 7px; }
.vsw .ic { width: 17px; height: 17px; }
.gsel { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.gsel select { width: auto; min-width: 140px; min-height: 38px; padding: 6px 10px; color: var(--ink); font-weight: 600; }
.fbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fbar select { width: auto; min-width: 150px; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.seg.sm button { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.hint { margin: 0 0 8px; font-size: 13px; }
.ocard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sand); border-radius: 12px; padding: 9px 11px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.ocard:hover { border-color: var(--sand); box-shadow: 0 4px 14px rgba(43, 38, 34, .09); }
.ocard[data-st="new"] { border-left-color: var(--warn); }
.ocard[data-st="assigned"] { border-left-color: var(--info); }
.ocard[data-st="picked_up"] { border-left-color: var(--teal); }
.ocard[data-st="on_the_way"] { border-left-color: var(--violet); }
.ocard[data-st="delivered"] { border-left-color: var(--ok); }
.ocard[data-st="failed"] { border-left-color: var(--bad); }
.ocard[data-st="cancelled"] { border-left-color: #c9bfb2; opacity: .65; }
.ocard[draggable="true"] { cursor: grab; }
.ocard.dragging { opacity: .4; }
.oc-t { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.oc-t b { font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.oc-t .badge { font-size: 10.5px; padding: 1px 7px; }
.oc-br { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.oc-who { font-weight: 800; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-s, .oc-i { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-i { font-size: 12px; }
.oc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 2px 0 1px; }
.pill { font-size: 11.5px; font-weight: 700; background: var(--beige); color: var(--ink-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pill.soft { color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.cash { background: #fbf0d0; color: #7a5200; }
.oc-d { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.ocard.compact { padding: 8px 9px; }
.ocard.compact .oc-who { font-size: 14px; }
.board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 10px; scroll-snap-type: x proximity; }
.bcol { flex: 0 0 292px; background: var(--beige); border: 1px solid var(--beige-2); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 140px; scroll-snap-align: start; transition: box-shadow .12s, border-color .12s; }
.bcol.over { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.bcol-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 11px 13px 9px; font-size: 15px; }
.bcol-h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcol-h .cnt, .wk-h .cnt { margin-left: auto; background: #fff; border-radius: 999px; padding: 1px 9px; font-weight: 800; font-size: 12.5px; color: var(--ink-2); }
.bcol-h small { flex-basis: 100%; color: var(--muted); font-size: 12px; font-weight: 600; }
.bcol-b { overflow-y: auto; padding: 2px 10px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.bempty { color: var(--muted); text-align: center; padding: 16px 0; font-size: 13px; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(148px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.wk-col { background: var(--beige); border: 1px solid var(--beige-2); border-radius: 16px; display: flex; flex-direction: column; min-height: 300px; min-width: 0; }
.wk-col.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.wk-col.past .wk-h { opacity: .7; }
.wk-col.today .wk-h .wd, .wk-col.today .wk-h b { color: var(--accent); }
.wk-h { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--beige-2); background: transparent; font: inherit; cursor: pointer; text-align: left; color: var(--ink); border-radius: 16px 16px 0 0; }
.wk-h:hover { background: rgba(255, 255, 255, .5); }
.wk-h .wd { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.wk-h b { font-size: 21px; line-height: 1; }
.tdy { background: var(--accent); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 2px 8px; text-transform: uppercase; letter-spacing: .04em; }
.wk-b { padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.mo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mo-wd { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.mo-d { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 132px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mo-d.other { background: #fbf9f6; }
.mo-d.other > * { opacity: .55; }
.mo-d.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mo-n { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; cursor: pointer; padding: 2px 5px; border-radius: 8px; color: var(--ink); width: 100%; }
.mo-n:hover { background: var(--beige); }
.mo-n .cnt { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 7px; }
.mo-n .cnt.done { background: var(--ok); }
.mo-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mo-o { display: flex; align-items: center; gap: 5px; width: 100%; border: 0; background: var(--beige); border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; color: var(--ink); min-width: 0; }
.mo-o:hover { background: var(--beige-2); }
.mo-o i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--sand); }
.mo-o[data-st="new"] i { background: var(--warn); } .mo-o[data-st="assigned"] i { background: var(--info); } .mo-o[data-st="picked_up"] i { background: var(--teal); }
.mo-o[data-st="on_the_way"] i { background: var(--violet); } .mo-o[data-st="delivered"] i { background: var(--ok); } .mo-o[data-st="failed"] i { background: var(--bad); }
.mo-o span { font-weight: 800; white-space: nowrap; }
.mo-o small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 11.5px; }
.mo-more { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; padding: 2px 6px; }
.daypick .calt { display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; min-height: 38px; min-width: 190px; }
@media (max-width: 900px) {
  .wk { grid-template-columns: repeat(7, 80vw); scroll-snap-type: x mandatory; }
  .wk-col { scroll-snap-align: start; }
}
@media (max-width: 700px) {
  .bcol { flex-basis: 85vw; max-height: none; }
  .vsw button span { display: none; }
  .mo { gap: 3px; }
  .mo-d { min-height: 58px; padding: 4px 2px; }
  .mo-l { display: none; }
  .mo-n { flex-direction: column; gap: 3px; padding: 2px; }
  .mo-n .cnt { margin: 0; }
  .toolbar input[type=search] { width: 100%; }
  .fbar, .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .fbar::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .fbar > *, .chips > * { flex: none; }
  .fbar select { min-width: 0; max-width: 46vw; }
}

/* reports */
.showing { margin: 0 0 14px; }
.kcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 14px 16px; text-align: center; box-shadow: var(--shadow); }
.kc .n { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.kc .l { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 6px; }
.kc.ok .n { color: var(--ok); }
.kc.bad .n { color: var(--bad); }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rgrid .card { padding: 18px 20px; border-radius: 18px; }
.rgrid h3 { font-size: 17px; margin-bottom: 12px; }
.hb { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 12px; align-items: center; margin: 9px 0; }
.hb-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.hb-t { background: #efe9e0; border-radius: 999px; height: 12px; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 999px; }
.hb-v { min-width: 34px; text-align: right; font-size: 15px; white-space: nowrap; }
tr.click td { cursor: pointer; }
tr.click:hover td { background: var(--beige) !important; }
.dday { margin-bottom: 16px; }
.dday-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 4px 4px 8px; font-size: 15px; }
.drow { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.drow > summary { list-style: none; display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(110px, 1fr) repeat(5, minmax(70px, .7fr)); gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.drow > summary::-webkit-details-marker { display: none; }
.drow[open] > summary { border-bottom: 1px solid var(--line); }
.drow .who small { display: block; margin-top: 2px; }
.drow .when { font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.drow .nums { text-align: right; }
.drow .nums b { display: block; font-size: 16px; }
.drow .nums b.bad { color: var(--bad); }
.drow .nums small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.djobs { padding: 6px 14px 12px; }
.dj { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.dj:last-child { border-bottom: 0; }
.dj .t { font-weight: 700; color: var(--muted); width: 44px; flex: none; }
.dj .grow { min-width: 0; }
#rv .toolbar select { width: auto; min-width: 210px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--sand); text-underline-offset: 3px; }
@media (max-width: 900px) {
  .rgrid { grid-template-columns: 1fr; }
  .drow > summary { grid-template-columns: 1fr 1fr 1fr; }
  .drow .who { grid-column: 1 / -1; }
  .drow .when { grid-column: 1 / -1; }
  .drow .nums { text-align: left; }
}
@media (max-width: 600px) {
  .kcs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kc { padding: 14px 8px 12px; border-radius: 14px; }
  .kc .n { font-size: 24px; }
  .kc .l { font-size: 12.5px; }
  #pre { flex-wrap: wrap; border-radius: 11px; }
  .hb { grid-template-columns: minmax(70px, 34%) 1fr auto; gap: 8px; }
}
