:root {
  --nav: #16243a; --nav2: #1f3350; --nav-text: #c9d4e5; --accent: #1e6fd9; --accent-d: #1558b0;
  --bg: #eef1f5; --card: #fff; --line: #d9dfe7; --text: #1d2733; --muted: #6a7686;
  --ok: #1f8f4e; --warn: #c77800; --danger: #c62f2f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* layout */
.shell { display: grid; grid-template-columns: 210px 1fr; height: 100vh; }
.side { background: var(--nav); color: var(--nav-text); overflow-y: auto; display: flex; flex-direction: column; }
.brand { padding: 14px 16px; font-weight: 700; font-size: 15px; color: #fff; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #0006; }
.brand img { max-height: 28px; max-width: 60px; background: #fff; border-radius: 3px; }
.brand .logo { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; font-size: 12px; }
.side nav { padding: 6px 0 20px; }
.side .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7f8fa8; padding: 14px 16px 4px; }
.side a { display: flex; align-items: center; gap: 9px; padding: 7px 16px; color: var(--nav-text); border-left: 3px solid transparent; }
.side a:hover { background: var(--nav2); text-decoration: none; color: #fff; }
.side a.on { background: var(--nav2); border-left-color: var(--accent); color: #fff; }
.side a .ic { width: 16px; text-align: center; opacity: .8; }
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.top { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 18px; display: flex; align-items: center; gap: 12px; }
.top .search { flex: 1; max-width: 420px; }
.top .who { margin-left: auto; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.content { padding: 16px 18px 40px; overflow-y: auto; flex: 1; }
.pagehead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pagehead .sp { flex: 1; }
.menu-btn { display: none; }

/* controls */
input, select, textarea { font: inherit; color: inherit; border: 1px solid #c5ced9; border-radius: 4px; padding: 5px 7px; background: #fff; width: 100%; min-height: 30px; }
textarea { min-height: 60px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #1e6fd955; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
input[readonly] { background: #f4f6f9; }
button, .btn { font: inherit; cursor: pointer; border: 1px solid #c5ced9; background: #fff; color: var(--text); border-radius: 4px; padding: 5px 12px; min-height: 30px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: #f3f6fa; text-decoration: none; }
button.pri, .btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
button.pri:hover { background: var(--accent-d); }
button.danger { color: var(--danger); border-color: #e6b3b3; }
button.danger:hover { background: #fdf0f0; }
button.sm { padding: 2px 8px; min-height: 24px; font-size: 12px; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; min-height: 0; }
button:disabled { opacity: .5; cursor: default; }
label.f { display: block; }
label.f > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; font-weight: 500; }
label.f.req > span::after { content: " *"; color: var(--danger); }
label.chk { display: flex; align-items: center; gap: 6px; padding-top: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.w2 { grid-column: span 2; } .w3 { grid-column: span 3; } .wf { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.muted { color: var(--muted); } .small { font-size: 11.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .danger-t { color: var(--danger); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 12px 14px 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: block; color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi .l { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 22px; font-weight: 600; margin-top: 2px; }
.kpi .s { color: var(--muted); font-size: 12px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th { text-align: left; font-weight: 600; font-size: 11.5px; color: #4a5666; background: #f5f7fa; border-bottom: 1px solid var(--line); padding: 7px 8px; white-space: nowrap; position: sticky; top: 0; cursor: default; }
table.t th.sortable { cursor: pointer; }
table.t th.sortable:hover { color: var(--accent); }
table.t td { border-bottom: 1px solid #edf0f4; padding: 6px 8px; vertical-align: top; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #f3f8ff; }
table.t tfoot td { font-weight: 600; background: #f5f7fa; border-top: 1px solid var(--line); padding: 7px 8px; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
table.t.edit td { padding: 3px 4px; vertical-align: middle; }
table.t.edit input, table.t.edit select { min-height: 28px; padding: 3px 5px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
/* calendar */
.cal-wrap { overflow-x: auto; }
.cal { display: grid; min-width: 900px; }
.cal .ch { position: sticky; top: 0; background: #f5f7fa; border-bottom: 1px solid var(--line); padding: 7px 8px; font-weight: 600; font-size: 12px; z-index: 2; }
.cal .ch.today { background: #e3efff; color: var(--accent); }
.crow { border-bottom: 1px solid var(--line); min-height: 44px; grid-auto-rows: minmax(34px, auto); }
.crow .cname { grid-column: 1; padding: 6px 8px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.crow .cday { border-left: 1px solid #eef1f4; } .crow .cday.today { background: #f3f8ff; }
.cblk { margin: 3px 3px; padding: 3px 7px; border-radius: 5px; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: inherit; z-index: 1; border-left: 4px solid #0002; align-self: start; }
.cblk:hover { text-decoration: none; filter: brightness(.95); }
.cblk span { margin-left: 4px; }
.ccrow { display: flex; align-items: center; gap: 6px; padding: 5px 4px; border-bottom: 1px solid var(--line); background: #fff; }
.ccrow .grip { cursor: grab; color: var(--muted); }
pre.mailbody { white-space: pre-wrap; font: 13px/1.45 inherit; background: #f7f9fb; border: 1px solid var(--line); border-radius: 5px; padding: 10px; max-height: 340px; overflow: auto; margin-top: 8px; font-family: inherit; }
.chg-auto { font-size: 10px; background: #e8eefb; color: #2451a6; border-radius: 3px; padding: 0 4px; margin-left: 4px; }
.lcard.compact .lane, .lcard.compact .meta { display: none; }
table.t tr.dirty td { background: #fff8e1; }
table.t tr.gone td { background: #fdeeee; opacity: .55; text-decoration: line-through; }
table.grid-edit td { padding: 2px 3px; }
table.grid-edit input, table.grid-edit select { min-height: 28px; padding: 3px 5px; border-color: transparent; background: transparent; }
table.grid-edit input:hover, table.grid-edit select:hover { border-color: #c5ced9; background: #fff; }
table.grid-edit input:focus, table.grid-edit select:focus { background: #fff; }

/* status pills */
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: #e6eaf0; color: #3c4858; white-space: nowrap; }
.st-Open { background: #e8eefb; color: #2451a6; }
.st-Dispatched { background: #fff1d6; color: #8a5a00; }
.st-In-Transit { background: #e3f4ff; color: #0a6aa1; }
.st-Delivered { background: #e2f6e9; color: #1b7a43; }
.st-Invoiced { background: #efe6fb; color: #6331a8; }
.st-Paid { background: #d9f2e2; color: #0f5a2f; }
.st-Cancelled, .st-Void { background: #f1e3e3; color: #983030; }
.st-Active { background: #e2f6e9; color: #1b7a43; } .st-Inactive { background: #eee; color: #777; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* alerts */
.alert { padding: 7px 10px; border-radius: 4px; margin-bottom: 6px; display: block; color: inherit; border-left: 4px solid; }
.alert:hover { text-decoration: none; filter: brightness(.97); }
.alert.warn { background: #fff7e6; border-color: var(--warn); }
.alert.danger { background: #fdeeee; border-color: var(--danger); }
.alert.info { background: #eaf2fd; border-color: var(--accent); }

/* dispatch board */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.col { background: #e3e8ef; border-radius: 6px; padding: 8px; min-height: 300px; }
.col.over { background: #d3e3fa; outline: 2px dashed var(--accent); }
.col h3 { display: flex; justify-content: space-between; margin: 2px 4px 8px; }
.lcard { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 8px 9px; margin-bottom: 7px; cursor: grab; box-shadow: 0 1px 2px #0000000d; }
.lcard:hover { border-color: var(--accent); }
.lcard .h { display: flex; justify-content: space-between; font-weight: 600; }
.lcard .lane { margin: 3px 0; }
.lcard .meta { color: var(--muted); font-size: 11.5px; }
.lcard select { margin-top: 6px; min-height: 26px; padding: 2px 4px; font-size: 12px; }
.lcard.hot { border-left: 3px solid var(--danger); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: #0f1a2a88; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 760px; box-shadow: 0 10px 40px #0005; }
.modal.wide { max-width: 1000px; } .modal.narrow { max-width: 440px; }
.modal .mh { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal .mh h2 { margin: 0; }
.modal .mb { padding: 16px; }
.modal .mf { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fafbfc; border-radius: 0 0 8px 8px; }
.modal .mf .left { margin-right: auto; }
.x { border: 0; background: none; font-size: 20px; color: var(--muted); padding: 0 4px; min-height: 0; }

#toast { position: fixed; bottom: 20px; right: 20px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
#toast div { background: #1d2733; color: #fff; padding: 10px 16px; border-radius: 5px; box-shadow: 0 4px 16px #0004; max-width: 380px; }
#toast div.err { background: var(--danger); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #16243a, #1e6fd9); padding: 16px; }
.login form { background: #fff; padding: 28px; border-radius: 8px; width: 100%; max-width: 360px; box-shadow: 0 10px 40px #0005; }
.login h1 { margin-bottom: 4px; }
.login form > * + * { margin-top: 12px; }

/* load editor */
.sec { margin-bottom: 14px; }
.stop { border: 1px solid var(--line); border-radius: 5px; padding: 10px; margin-bottom: 8px; background: #fbfcfd; }
.stop .sh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stop .num { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.stop.del .num { background: var(--ok); }
.totals { display: flex; justify-content: flex-end; gap: 22px; padding: 8px 4px 0; font-weight: 600; }
.sticky-actions { position: sticky; top: -16px; z-index: 5; background: var(--bg); padding: 8px 0; margin-top: -8px; }
.doclist a { display: block; padding: 3px 0; }
.hist { font-size: 12px; color: var(--muted); }
.hist div { padding: 2px 0; }

/* driver app */
body.driver-mode { font-size: 15px; background: #e9edf2; }
.dtop { position: sticky; top: 0; z-index: 10; background: var(--nav); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.dtop .dco { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtop .dsync { font-size: 12px; color: #c9d4e5; text-align: right; }
.dtop .dsync .ok { color: #6ee7a0; } .dtop .dsync .warn { color: #ffc861; } .dtop .dsync b { color: #fff; }
.dtop .dmenu { background: none; border: 1px solid #ffffff44; color: #fff; font-size: 18px; min-height: 36px; }
.dtabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 9; }
.dtabs button { flex: 1; border: 0; border-radius: 0; min-height: 44px; font-size: 15px; background: none; border-bottom: 3px solid transparent; justify-content: center; }
.dtabs button.on { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.drv { max-width: 640px; margin: 0 auto; padding: 12px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.drv .dcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.drv .dcard.click { cursor: pointer; }
.drv details.dcard summary { cursor: pointer; }
.big { width: 100%; justify-content: center; min-height: 50px; font-size: 16px; margin-top: 8px; border-radius: 8px; }
.big.go { background: var(--ok); border-color: var(--ok); }
.dstack { display: flex; flex-direction: column; gap: 10px; }
.dstack input { min-height: 44px; font-size: 17px; }
.deq { display: flex; gap: 8px; align-items: center; background: #f4f6f9; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.deq > div { flex: 1; min-width: 0; } .deq span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.deq b { font-size: 13px; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; letter-spacing: -.02em; }
.dwarn { background: #fdeeee; color: var(--danger); border-radius: 6px; padding: 8px 10px; font-weight: 600; margin: 6px 0; }
.dnote { background: #fff8e1; border-radius: 6px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.dstops { margin-top: 10px; }
.dstop { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.dstop .dnum { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #d5dbe3; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.dstop.cur .dnum { background: var(--accent); color: #fff; } .dstop.done .dnum { background: var(--ok); color: #fff; } .dstop.done { opacity: .7; }
.dstop a { display: inline-block; padding: 3px 0; }
.ddocs { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.stopline { padding: 6px 0; border-top: 1px dashed var(--line); }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 10.5px; color: var(--muted); }
.bar-chart .b i { display: block; width: 100%; max-width: 38px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-chart .b span { margin-top: 3px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px #0006; }
  .menu-btn { display: inline-flex; }
  .grid, .grid.g4, .grid.g6 { grid-template-columns: 1fr 1fr; }
  .cols2, .cols-main { grid-template-columns: 1fr; }
  .w3 { grid-column: span 2; }
  .top .who .nm { display: none; }
  .content { padding: 12px; }
}
@media print {
  .side, .top, .pagehead button, .noprint { display: none !important; }
  .shell { display: block; } .content { overflow: visible; }
  body { background: #fff; }
}
.dpin { background: #e3f4ff; border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-size: 15px; }
.legbar { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 5px 10px; background: #eef3fb; border-radius: 5px; }
.stop.drop { border-left: 4px solid var(--warn); }
.pill.kind-Yard { background: #fff1d6; color: #8a5a00; } .pill.kind-Rail { background: #efe6fb; color: #6331a8; }
.pill.kind-Customer { background: #e8eefb; color: #2451a6; } .pill.kind-Port { background: #e3f4ff; color: #0a6aa1; } .pill.kind-Warehouse { background: #e2f6e9; color: #1b7a43; }

td.pm { text-align: center; font-size: 12px; font-weight: 600; } td.pm.good { background: #e2f6e9; color: #1b7a43; } td.pm.soon { background: #fff1d6; color: #8a5a00; }
td.pm.bad { background: #fdeeee; color: #c62f2f; } td.pm.miss { color: #aab; }

table.ssl th.c, table.ssl td.c { text-align: center; } table.ssl td.c input { width: 18px; height: 18px; }

.progress { height: 8px; background: #e6eaf0; border-radius: 4px; overflow: hidden; margin: 8px 0 10px; } .progress i { display: block; height: 100%; background: var(--ok); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.ckrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.ckrow .ckic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: #e6eaf0; }
.ckrow.good .ckic { background: var(--ok); color: #fff; } .ckrow.soon .ckic { background: #f0a020; color: #fff; } .ckrow.bad .ckic { background: var(--danger); color: #fff; }
.ckrow.bad, .ckrow.miss { border-color: #efc4c4; } .ckrow.soon { border-color: #f1d49a; }

.acts { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; } .act { border-left: 3px solid var(--line); padding: 4px 10px; } .act.email { border-left-color: var(--accent); } .act.note { border-left-color: var(--warn); }

/* universal export menu */
.exp-menu { position: fixed; z-index: 60; background: var(--card, #fff); border: 1px solid var(--line, #d0d7e2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 10px; width: 250px; display: flex; flex-direction: column; gap: 6px; }
.exp-menu button { text-align: left; }
.exp-menu select { width: 100%; }
@media print { .exp-btn { display: none; } }

/* Google address search dropdown */
.places-box { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 280px; overflow: auto; }
.places-box .pl { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #f0f2f5; }
.places-box .pl.on, .places-box .pl:hover { background: #eef4ff; }
.places-box .pl-by { text-align: right; padding: 3px 8px; }

[hidden] { display: none !important; }

/* loads board */
.board-tabs a .cnt { background: #e6ebf2; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 3px; }
.board-tabs a.on .cnt { background: var(--accent); color: #fff; }
.daystrip { display: flex; align-items: center; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.daystrip a { display: flex; flex-direction: column; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--text); font-size: 11px; min-width: 46px; }
.daystrip a.today b { color: #d43; } .daystrip a.on { background: var(--accent); color: #fff; border-color: var(--accent); } .daystrip a.on b { color: #fff; }
.filterrow { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.filterrow input { min-height: 28px; font-size: 12.5px; }
.bdg { display: inline-block; font-size: 10.5px; padding: 0 5px; border-radius: 3px; margin-top: 2px; white-space: nowrap; }
.bdg.warn { background: #fff1e0; color: #b35c00; } .bdg.info { background: #e3efff; color: #1d5bbf; }
.trk { display: inline-block; font-size: 11.5px; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.trk-y { background: #fbe7a7; color: #7a5a00; } .trk-b { background: #e3efff; color: #1d5bbf; } .trk-r { background: #fde2e2; color: #b42318; } .trk-g { background: #e7f6ec; color: #16713a; }
.chip-appt { color: #1d5bbf; font-size: 11px; }
tr.row-yard td { background: #fffbea; } tr.row-prog td { background: #fff6ef; }
#lt input.qn { width: 120px; border: 1px solid transparent; background: transparent; padding: 2px 4px; min-height: 24px; }
#lt input.qn:hover, #lt input.qn:focus { border-color: var(--line); background: #fff; }
#lt.compact td { padding-top: 2px; padding-bottom: 2px; } #lt.compact td .small { display: none; }

.yardpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 12px; }
.yardpick a { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 3px 10px; color: var(--text); font-size: 12.5px; }
.yardpick a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.yardpick a .cnt { background: #e6ebf2; color: var(--text); border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 3px; }

/* ---- phones (2026-09-19): nothing may push the page wider than the screen; wide things scroll in their own box */
.cols2 > *, .cols-main > *, .grid > * { min-width: 0; }
@media (max-width: 700px) {
  .cols2, .cols-main { grid-template-columns: minmax(0, 1fr); }
  .grid, .grid.g4, .grid.g6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card { overflow-x: auto; max-width: 100%; }
  .card.flush { overflow-x: auto; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex: 0 0 auto; }
  .board { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 84vw; scroll-snap-type: x mandatory; }
  .board > .col { scroll-snap-align: start; }
  .pagehead h1 { font-size: 18px; }
  .pagehead input, .pagehead select { max-width: 100%; }
  .modal-bg { padding: 8px 6px; }
  .modal .mb { padding: 12px; }
  .modal .mf { flex-wrap: wrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi .v { font-size: 19px; }
  input, select, textarea { font-size: 16px; }   /* stops iPhone zooming in on every tap */
  .top { padding: 8px 10px; gap: 8px; }
  img, canvas, svg { max-width: 100%; }
}
.only-phone { display: none; }
@media (max-width: 700px) {
  .only-phone { display: inline-flex; }
  #lflt { display: none; margin-top: 6px; }
  #lflt.open { display: flex; }
  #lflt input { flex: 1 1 45%; }
  .daystrip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .daystrip::-webkit-scrollbar { display: none; }
  .daystrip a { flex: 0 0 auto; }
  .daystrip > span { display: none; }
}
/* warehouse job photos & documents */
.whdocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.whdoc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); display: block; }
.whdoc .whfile { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: 5px; padding: 6px; text-align: center; word-break: break-all; font-size: 12px; }
label.btn { cursor: pointer; }
/* dock schedule */
.dkwrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.dkgrid { display: grid; min-width: min-content; }
.dkh { position: sticky; top: 0; background: #f5f7fa; border-bottom: 1px solid var(--line); padding: 6px 8px; font-weight: 600; z-index: 2; }
.dkt { font-size: 11px; color: var(--muted); padding: 2px 6px; border-top: 1px solid #edf0f4; text-align: right; }
.dkc { border-top: 1px solid #edf0f4; border-left: 1px solid #edf0f4; cursor: pointer; }
.dkc:hover { background: #f3f8ff; } .dkc.off { background: repeating-linear-gradient(135deg, #f7f8fa, #f7f8fa 6px, #eef1f5 6px, #eef1f5 12px); }
.dka { margin: 2px 3px; border-radius: 5px; padding: 3px 6px; font-size: 11.5px; overflow: hidden; cursor: pointer; z-index: 1; border-left: 4px solid var(--accent); background: #e8f1fd; }
.dka.out { border-left-color: #7a4bd1; background: #f1ebfc; } .dka.a { background: #fff4d6; } .dka.d { background: #e3f4ea; opacity: .8; } .dka.n { background: #fbe4e4; text-decoration: line-through; }
/* warehouse floor (phone / tablet) */
.floor { min-height: 100%; background: var(--bg); }
.flhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 5; }
.flhead .sp, .flbar .sp { flex: 1; }
.flbody { padding: 10px; max-width: 720px; margin: 0 auto; }
.flbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; } .flbar select { width: auto; flex: 1; }
.flcard { display: block; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; color: var(--text); }
.flcard:hover { text-decoration: none; } .flcard.a { border-left-color: var(--warn); } .flcard.d { border-left-color: var(--ok); opacity: .75; } .flcard.n { border-left-color: var(--danger); opacity: .6; }
.flcard .row { gap: 8px; } .fltime { font-size: 18px; font-weight: 700; } .flbig { font-size: 17px; font-weight: 600; margin: 4px 0; }
button.big, .btn.big { font-size: 16px; padding: 12px 16px; min-height: 48px; } .block { display: block; width: 100%; }
.floor input, .floor select, .floor textarea { font-size: 16px; min-height: 42px; }
.dcard.dnew { border: 2px solid var(--accent); box-shadow: 0 0 0 4px #1e6fd922; }
.bdg.danger { background: #fde8e8; color: var(--danger); } .bdg.ok { background: #e3f4ea; color: var(--ok); }
