/* EnviroServ Tools - the same frame and palette as the EnviroServ RIG POB app: white canvas, one green accent,
   status = dot + word + colour, pill buttons. Light only (site laptops, daylight).
   Sized for a 1366 x 768 laptop at 100 %: 13.5px text, 34px controls, a work screen fits without zooming out. */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../lib/fonts/atkinson_hyperlegible_next.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --canvas: #ffffff;
  --sunken: #f2f5f0;
  --page: #f7f9f6;
  --line: #e3e8e0;
  --line-strong: #7a8478;
  --ink: #121813;
  --ink-2: #4a5449;
  --ink-3: #5a6458;
  --ink-off: #a2aa9f;
  --brand: #679047;
  --accent: #4d7334;
  --accent-hover: #3f6029;
  --on-accent: #ffffff;
  --accent-soft: #e2eed8;
  --on-accent-soft: #2a4719;
  --ok: #356f25; --ok-soft: #e2efda; --on-ok-soft: #244e18;
  --warn: #865000; --warn-soft: #fceed3; --on-warn-soft: #633b00;
  --info: #0a58a8; --info-soft: #dceafa; --on-info-soft: #073f78;
  --neutral: #555d6a; --neutral-soft: #eceef1; --on-neutral-soft: #373e48;
  --bad: #b0221a; --bad-soft: #fce2df; --on-bad-soft: #861812;
  --focus: #4d7334;
  --r-card: 10px; --r-input: 7px;
  --font: "Atkinson Hyperlegible Next", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page); color: var(--ink); font: 13.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum"; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 20px; line-height: 26px; font-weight: 600; }
h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
h3 { font-size: 13.5px; line-height: 18px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.meta { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.sec { font-size: 12.5px; line-height: 18px; color: var(--ink-2); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.row { display: flex; align-items: center; gap: 8px; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 6px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- frame: top bar with tabs, one page ---------- */
.top { height: 52px; border-bottom: 1px solid var(--line); background: var(--canvas); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo img { height: 26px; width: auto; display: block; }
.logo .rig { font-size: 12.5px; color: var(--ink-2); line-height: 1.2; padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap; }
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs a { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.tabs a:hover { background: var(--sunken); color: var(--ink); }
.tabs a.on { background: var(--accent-soft); color: var(--on-accent-soft); }
.tabs svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.me .av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--on-accent-soft); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }
.me .nm { font-size: 12.5px; line-height: 1.2; text-align: right; }
.me .nm small { display: block; color: var(--ink-3); font-size: 11px; }
.page { max-width: 1280px; margin: 0 auto; padding: 18px 24px 64px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; min-height: 34px; }
.page-head .sub { color: var(--ink-2); margin-top: 2px; font-size: 12.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cols { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.wide { grid-template-columns: 400px minmax(0, 1fr); }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.sticky { position: sticky; top: 66px; }
.banner { background: var(--warn-soft); color: var(--on-warn-soft); border-bottom: 1px solid #f0d9a6; }
.banner .top-in { height: 42px; gap: 12px; font-size: 13px; }
.banner .btn { margin-left: auto; }

/* ---------- surfaces ---------- */
.card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-card); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); min-height: 42px; }
.card-head h2 { font-size: 13.5px; font-weight: 600; }
.card-head .meta { margin-left: auto; }
.card-body { padding: 14px 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.sunk { background: var(--sunken); border-radius: var(--r-card); padding: 12px 16px; }
.label-sec { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 46px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .t { font-weight: 500; }
.list .d { font-size: 12.5px; color: var(--ink-2); }
.list .end { margin-left: auto; text-align: right; }
.ico { width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; flex: none; }
.ico svg { width: 16px; height: 16px; stroke: var(--ink-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); line-height: 16px; }
.field .hint { font-size: 11.5px; line-height: 15px; color: var(--ink-3); }
.list.card > li:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
.input, select.input, textarea.input { width: 100%; height: 34px; padding: 6px 10px; background: var(--canvas); border: 1px solid var(--line-strong); border-radius: var(--r-input); outline: none; }
select.input { padding-right: 30px; appearance: none; background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5449' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 14px; }
textarea.input { height: auto; min-height: 80px; resize: vertical; line-height: 1.4; padding: 8px 10px; }
.input.mono, textarea.input.mono { font-family: var(--mono); font-size: 12.5px; }
.input:hover { border-color: var(--ink-2); }
.input:focus, .btn:focus-visible, .tabs a:focus-visible, .seg label:focus-within, .drop:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.input[readonly], .input:disabled { background: var(--sunken); color: var(--ink-3); border-color: var(--line); }
.input.short { width: 100px; }
.input.num { width: 80px; text-align: right; }
.input.bad { border-color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; line-height: 18px; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; gap: 2px; background: var(--canvas); }
.seg label { padding: 0 12px; height: 26px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg label.on { background: var(--accent-soft); color: var(--on-accent-soft); }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--canvas); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pill:hover { background: var(--sunken); }
.pill.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--on-accent-soft); }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--canvas); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.btn:hover { background: var(--sunken); }
.btn:disabled { opacity: 0.45; cursor: default; background: var(--canvas); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.lg { height: 40px; padding: 0 22px; font-size: 14px; }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm svg { width: 14px; height: 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; font-size: inherit; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- action bar at the foot of a screen ---------- */
.actbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--canvas); border-top: 1px solid var(--line); }
.actbar-in { max-width: 1280px; margin: 0 auto; padding: 9px 24px; display: flex; align-items: center; gap: 12px; }
.actbar .lead { font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actbar .lead b { color: var(--ink); font-weight: 600; }
.actbar .btn.primary { margin-left: auto; }

/* ---------- status: dot + word ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st.ok { color: var(--ok); } .st.warn { color: var(--warn); } .st.bad { color: var(--bad); } .st.info { color: var(--info); } .st.off { color: var(--neutral); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--on-ok-soft); } .chip.warn { background: var(--warn-soft); color: var(--on-warn-soft); }
.chip.bad { background: var(--bad-soft); color: var(--on-bad-soft); } .chip.info { background: var(--info-soft); color: var(--on-info-soft); } .chip.off { background: var(--neutral-soft); color: var(--on-neutral-soft); }

/* ---------- notes (facts the app found) ---------- */
.note { display: flex; gap: 9px; padding: 9px 12px; border-radius: 8px; background: var(--sunken); font-size: 13px; color: var(--ink-2); line-height: 18px; }
.note b { color: var(--ink); font-weight: 600; }
.note.warn { background: var(--warn-soft); color: var(--on-warn-soft); } .note.warn b { color: inherit; }
.note.bad { background: var(--bad-soft); color: var(--on-bad-soft); } .note.bad b { color: inherit; }
.note.good { background: var(--ok-soft); color: var(--on-ok-soft); } .note.good b { color: inherit; }
.note .mark { flex: none; width: 16px; height: 18px; display: grid; place-items: center; font-weight: 700; }
.note + .note { margin-top: 6px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table.tight td, .table.tight th { padding: 5px 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* ---------- WTN trucks ---------- */
.truck { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--canvas); }
.truck + .truck { margin-top: 10px; }
.truck-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.truck-head .n { width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.truck-head .reg { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.truck-head .sec { white-space: nowrap; }
.truck-body { padding: 0 16px 14px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.truck.skip .truck-body { display: none; }
.truck.skip { background: var(--sunken); border-color: transparent; }
.truck.skip .reg, .truck.skip .sec { color: var(--ink-3); }
.mrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 34px; flex-wrap: wrap; }
.mrow:last-child { border-bottom: 0; }
.mrow .wt { font-weight: 500; width: 110px; flex: none; }
.mrow .mn { font-family: var(--mono); font-size: 13px; }
.ck { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.ck.y { color: var(--ok); } .ck.n { color: var(--bad); }
.ck::before { font-weight: 700; }
.ck.y::before { content: "\2713"; } .ck.n::before { content: "\2715"; }
.checks { display: inline-flex; flex-wrap: wrap; gap: 3px 10px; }
.loads { display: flex; flex-direction: column; gap: 5px; }
.load { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.load .id { font-family: var(--mono); font-size: 12px; width: 100px; flex: none; }
.load .sec { flex: 1; }
.load .input.num { width: 64px; height: 30px; }
.qty { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: pre-line; background: var(--sunken); border-radius: 7px; padding: 8px 10px; line-height: 1.4; }

/* ---------- DW ---------- */
.storage { width: 100%; border-collapse: collapse; }
.storage td { padding: 3px 0; font-size: 13px; }
.storage td + td { padding-left: 10px; width: 84px; }
.storage .input.num { width: 84px; height: 30px; }
.storage th { text-align: right; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 0 0 4px 10px; }
.storage th:first-child { text-align: left; padding-left: 0; }
.ask { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ask:last-child { border-bottom: 0; }
.ask .t { font-weight: 600; }
.ask .d { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ask .row { margin-top: 8px; }

/* ---------- setup ---------- */
.wizard { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--sunken); }
.wiz { width: 100%; max-width: 820px; display: grid; grid-template-columns: 210px 1fr; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wiz-steps { border-right: 1px solid var(--line); padding: 22px 18px; }
.wiz-steps ol { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: s; }
.wiz-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; padding: 6px 0; color: var(--ink-3); font-size: 13px; }
.wiz-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }
.wiz-steps li.on { color: var(--ink); font-weight: 600; }
.wiz-steps li.on::before { background: var(--accent); color: #fff; border-color: var(--accent); }
.wiz-steps li.done::before { content: "\2713"; background: var(--accent-soft); color: var(--on-accent-soft); border-color: var(--accent-soft); }
.wiz-body { padding: 24px 26px; display: flex; flex-direction: column; min-height: 420px; }
.wiz-body .lead { color: var(--ink-2); margin: 4px 0 16px; max-width: 520px; }
.wiz-foot { margin-top: auto; padding-top: 18px; display: flex; gap: 8px; }
.wiz-foot .btn.primary { margin-left: auto; }
.brand-mark { display: flex; gap: 10px; align-items: center; }
.brand-sq { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.brand-name { font-weight: 600; }
.brand-rig { font-size: 12px; color: var(--ink-3); }
.folder { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.folder .path { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.folder > svg { width: 18px; height: 18px; flex: none; stroke: var(--ink-3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.folder .btn { margin-left: auto; }
.found { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.found li { display: flex; gap: 8px; padding: 2px 0; }

/* ---------- misc ---------- */
.drop { display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1px dashed var(--line-strong); border-radius: 8px; min-height: 40px; padding: 8px 12px; color: var(--ink-2); font-size: 12.5px; background: var(--canvas); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--on-accent-soft); }
.drop svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty { padding: 32px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; padding: 10px 0; }
.toast { position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 20; max-width: 560px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }
.tag { font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; line-height: 18px; }
details.more > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::before { content: "\25B8"; color: var(--ink-3); }
details.more[open] > summary::before { content: "\25BE"; }

/* ---------- Today ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-grid + .dash-grid { margin-top: 16px; }
.dash-col > * + * { margin-top: 16px; }
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.job { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; }
.job + .job { border-left: 1px solid var(--line); }
.job-top { display: flex; align-items: center; gap: 10px; }
.job-top .ico { width: 28px; height: 28px; background: var(--accent-soft); }
.job-top .ico svg { stroke: var(--on-accent-soft); width: 15px; height: 15px; }
.job-top h3 { font-size: 13.5px; }
.job-top .st { margin-left: auto; }
.job .file { font-family: var(--mono); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .d { font-size: 12px; color: var(--ink-3); min-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .btn { align-self: flex-start; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.kpi { padding: 12px 16px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .k { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.kpi .v { font-size: 22px; line-height: 28px; font-weight: 600; margin-top: 2px; }
.kpi .v small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.chart { padding: 14px 16px 12px; }
.bars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; height: 132px; border-bottom: 1px solid var(--line-strong); margin-right: 22px; }
.bars .col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.bars .bar { width: calc(100% - 3px); max-width: 18px; background: var(--accent); border-radius: 3px 3px 0 0; }
.bars .col:hover .bar { background: var(--accent-hover); }
.bars .col.today .bar { background: var(--brand); }
.bars .tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; line-height: 16px; padding: 4px 7px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 2; }
.bars .col:hover .tip, .bars .col:focus .tip { opacity: 1; }
.bars .col:focus { outline: none; }
.bars .col:focus .bar { outline: 2px solid var(--focus); outline-offset: 2px; }
.bars-x { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-top: 5px; margin-right: 22px; font-size: 10.5px; color: var(--ink-3); text-align: center; font-family: var(--mono); }
.gridline { position: absolute; left: 0; right: -22px; border-top: 1px dashed var(--line); pointer-events: none; }
.gridline span { position: absolute; right: 0; top: -8px; font-size: 10.5px; color: var(--ink-3); background: var(--canvas); padding-left: 4px; }
.chart-empty { height: 150px; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 12.5px; background: var(--sunken); border-radius: 8px; }
.hbars { padding: 6px 16px 12px; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; }
.hbar .track { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.hbar .val { text-align: right; font-weight: 600; }
.hbar .val small { font-weight: 400; color: var(--ink-3); }
.folder-warn { margin-bottom: 16px; }
.folder-warn .row { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
@media (max-width: 1100px) { .cols, .cols.wide, .cols-even, .dash-grid { grid-template-columns: 1fr; } .sticky { position: static; } .truck-body { grid-template-columns: 1fr; } .tabs a { padding: 0 9px; } .logo .rig { display: none; } }
@media (max-width: 760px) { .top { height: auto; } .top-in { flex-wrap: wrap; padding: 8px 16px; gap: 8px; } .tabs { order: 3; width: 100%; overflow-x: auto; } .page { padding: 14px 16px 84px; } .wiz { grid-template-columns: 1fr; } .wiz-steps { display: none; } .grid3, .grid4, .kpis { grid-template-columns: 1fr 1fr; } .jobs { grid-template-columns: 1fr; } .job + .job { border-left: 0; border-top: 1px solid var(--line); } }
.storage td { padding: 2px 0; }
.storage .input.num { height: 28px; }

/* ======================= DASHBOARD (fits 1366x768 without scrolling; charts fill the height) ======================= */
.page.wide { max-width: 1600px; padding: 10px 16px 12px; }
.dash { display: flex; flex-direction: column; gap: 8px; }
.dash-load { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--ink-2); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex: none; }
.dash-bar { display: flex; align-items: center; gap: 6px 10px; padding: 6px 10px; position: relative; z-index: 5; min-height: 42px; }
.dash-bar .sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.dash-bar select.input { height: 28px; width: auto; max-width: 230px; padding: 2px 8px; font-size: 12.5px; }
.dash-bar .dates { display: inline-flex; align-items: center; gap: 4px; }
.dash-bar input.date { height: 28px; width: 124px; padding: 2px 6px; font-size: 12px; }
.dash-bar .facts { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-align: right; }
.dash-bar .grow { flex: 1; min-width: 0; }
.dash-bar .seg label { height: 24px; }
.pick-wrap { position: relative; }
.btn.pick { max-width: 170px; gap: 6px; }
.btn.pick span:first-child { overflow: hidden; text-overflow: ellipsis; }
.btn .car { font-size: 10px; color: var(--ink-3); }
.pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(18, 24, 19, 0.14); padding: 8px 10px 10px; min-width: 230px; }
.pop-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pop-head b { flex: 1; font-size: 12.5px; }
.pop-list { display: grid; gap: 5px 14px; max-height: 330px; overflow: auto; padding: 2px; }
.pop-list.cols { grid-template-columns: repeat(3, minmax(110px, 1fr)); min-width: 430px; }
.pop-list .check { font-size: 12.5px; }
.fchip { border: 0; cursor: pointer; font: inherit; font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.kstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: hidden; }
.kstrip .kpi { padding: 6px 12px; text-align: left; background: none; border: 0; border-left: 1px solid var(--line); font: inherit; color: inherit; min-width: 0; }
.kstrip .kpi:first-child { border-left: 0; }
.kstrip .kpi .v { font-size: 18px; line-height: 24px; margin-top: 0; white-space: nowrap; }
.kpi .k { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
button.kpi { cursor: pointer; }
button.kpi:hover { background: var(--sunken); }
button.kpi:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.kpi.off .v, .kpi.off .k, .kpi.off .v small { color: var(--ink-off); }
.kpi.off .k i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--ink-off); }
.drows { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; height: calc(100vh - 192px); min-height: 430px; }
.drow { display: grid; gap: 8px; min-height: 0; }
.drow.r75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.drow.r57 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.drow.r1 { grid-template-columns: minmax(0, 1fr); }
.dcard { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dcard .card-head { min-height: 34px; padding: 3px 8px 3px 12px; }
.dcard .ctl { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.dcard .seg label { height: 22px; padding: 0 9px; font-size: 11.5px; }
.dcard .ch { flex: 1; min-height: 0; padding: 6px 10px; position: relative; }
.dcard .ch.tbl, .dcard .ch .tblwrap { overflow: auto; height: 100%; }
.dcard .ch .chart-empty { height: 100%; }
.dcard .table th, .dcard .table td { padding: 4px 8px; font-size: 12px; }
.dcard .table tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.dcard tr.sel td { background: var(--accent-soft); }
.tsub { margin: 12px 8px 4px; font-size: 12.5px; }
.tt { display: flex; align-items: center; gap: 6px; min-width: 170px; font-size: 12px; line-height: 18px; }
.tt i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.tt b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.tt.tot { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; color: var(--ink-3); }
.tt.hl { font-weight: 700; background: var(--bg-2, #f1f4ee); border-radius: 4px; margin: 0 -4px; padding: 0 4px; }
.dprev { margin-bottom: 16px; }
.dprev .pv-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); cursor: pointer; border-radius: 0 0 var(--r-card) var(--r-card); }
.dprev .pv-body:hover { background: #fbfcfa; }
.dprev .pv-body:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pv-kpis { display: grid; grid-template-columns: 1fr 1fr; border-right: 1px solid var(--line); }
.pv-kpis .kpi { border-left: 0; }
.pv-kpis .kpi:nth-child(even) { border-left: 1px solid var(--line); }
.pv-kpis .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
.pv-ch { height: 150px; padding: 6px 12px; min-width: 0; }
.pv-ch .chart-empty { height: 100%; }
@media (max-width: 1100px) {
  .drow.r75, .drow.r57 { grid-template-columns: minmax(0, 1fr); }
  .drows { height: auto; grid-template-rows: none; }
  .dcard .ch { height: 300px; flex: none; }
  .kstrip { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .dash-bar { flex-wrap: wrap; }
  .dprev .pv-body { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  header.top, .banner, .dash-bar .btn, .dcard .ctl .btn { display: none !important; }
  .drows { height: auto; grid-template-rows: none; }
  .dcard .ch { height: 300px; flex: none; }
}
/* export menu on a dashboard card */
.pop.menu { left: auto; right: 0; min-width: 150px; padding: 4px; }
.pop.menu .mi { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.pop.menu .mi:hover, .pop.menu .mi:focus-visible { background: var(--accent-soft); outline: none; }
/* sign-in gate and the admin panel (website only) */
.gate { max-width: 420px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.gate-logo { height: 64px; margin-bottom: 18px; }
.gate .card-body { display: grid; gap: 10px; justify-items: center; }
.gate h2 { margin: 0; font-size: 18px; }
.gate p { margin: 0; color: var(--ink-2); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr); gap: 14px; align-items: start; }
.admin .table td { padding: 4px 6px; vertical-align: middle; }
.admin .table .input { height: 30px; font-size: 12.5px; width: 100%; min-width: 0; }
.admin .table .input.short { width: 70px; }
.admin .table td.c, .admin .table th.c { text-align: center; }
.rigchecks { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rigchecks .check { font-size: 12px; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }
