/* A-Class Control Room — one screen for the office.
   Concrete-grey base, ink text, A-Class cyan as the only brand colour.
   Status colours are the same ones the crew already knows from the apps. */

:root {
  --concrete: #e4e6e2;      /* page */
  --slab: #f5f6f3;          /* panels */
  --white: #ffffff;
  --ink: #1d232a;
  --ink-2: #4b535c;
  --muted: #7b838b;
  --line: #cfd2cc;
  --line-soft: #e2e4df;
  --cyan: #0b97a8;          /* A-Class */
  --cyan-soft: #d7eff1;

  --s-send: #9aa3ad;        /* to send / sent, not opened */
  --s-open: #6c7ae0;        /* opened */
  --s-route: #3d8fd6;       /* on the way */
  --s-site: #ec7a12;        /* on site */
  --s-left: #c2410c;        /* left site, not done */
  --s-pay: #7fb03a;         /* waiting payment */
  --s-done: #2f8f5b;        /* done */
  --alert: #c4362c;

  --radius-lg: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(29,35,42,.06), 0 8px 24px -14px rgba(29,35,42,.35);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
a.btn, a.item { text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Header ───────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: rgba(228,230,226,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark-badge {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-stretch: 75%; font-size: 19px; letter-spacing: 0; white-space: nowrap;
}
.mark-badge i { color: var(--cyan); font-style: normal; }
.mark-name { font-weight: 700; font-stretch: 80%; font-size: 18px; letter-spacing: -.01em; line-height: 1; }
.mark-name small { display: block; font-weight: 500; font-stretch: 100%; font-size: 11.5px; color: var(--muted); margin-top: 3px; letter-spacing: 0; }

.day {
  display: flex; align-items: center; gap: 2px;
  background: var(--slab); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.day button { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; color: var(--ink-2); }
.day button:hover { background: var(--line-soft); }
.day .day-label { font-weight: 700; color: var(--ink); min-width: 150px; text-align: center; position: relative; }
.day .day-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.day .today-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

.search {
  flex: 1; max-width: 420px; position: relative;
}
.search input {
  width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--white);
}
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--slab); }

.spacer { flex: 1; }
.live { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s-done); box-shadow: 0 0 0 0 rgba(47,143,91,.5); }
.live.syncing .live-dot { animation: ping 1s ease-out; }
.live.stale .live-dot { background: var(--alert); }
@keyframes ping { from { box-shadow: 0 0 0 0 rgba(47,143,91,.55); } to { box-shadow: 0 0 0 9px rgba(47,143,91,0); } }

.btn {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-soft); }
.me { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--cyan); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* ── Pulse: the day in numbers (each one filters the board) ── */
.pulse {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
  margin: 16px 20px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.pulse button {
  border: 0; background: var(--slab); text-align: left; padding: 12px 16px 13px; display: flex; flex-direction: column; gap: 2px; position: relative;
}
.pulse button:hover { background: var(--white); }
.pulse button[aria-pressed="true"] { background: var(--white); box-shadow: inset 0 -3px 0 var(--cyan); }
.pulse .n { font-size: 30px; font-weight: 800; font-stretch: 72%; letter-spacing: -.02em; line-height: 1; }
.pulse .l { color: var(--ink-2); font-size: 12.5px; }
.pulse .sub { color: var(--muted); font-size: 11.5px; }
.pulse .n.warn { color: var(--alert); }
.pulse .swatch { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 3px; }

/* ── Main grid ───────────────────────────────────────── */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; padding: 16px 20px 40px; align-items: start; }
.main > * { min-width: 0; }
.panel-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 10px; }
.panel-head h2 { margin: 0; font-size: 20px; font-weight: 800; font-stretch: 78%; letter-spacing: -.01em; }
.panel-head .count { color: var(--muted); font-weight: 600; }
.panel-head .spacer { flex: 1; }

/* To send tray */
.tray {
  background: var(--white); border: 1.5px dashed #b9bdb6; border-radius: var(--radius-lg); padding: 12px; margin-bottom: 18px;
}
.tray-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scroll-snap-type: x proximity; }
.tray .empty { color: var(--muted); padding: 6px 4px; }

/* Free now */
.free { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 2px 14px; }
.free .lbl { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--slab); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.chip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--s-done); }
.chip.noapp { color: var(--muted); }

/* ── Crew lanes: the one bold thing ── */
.lanes { display: flex; flex-direction: column; gap: 10px; }
.lane {
  display: grid; grid-template-columns: 188px minmax(0, 1fr); align-items: stretch;
  background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  border-left: 6px solid var(--lane, var(--s-send));
}
.lane-who { padding: 12px 14px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.lane-name { font-size: 22px; font-weight: 800; font-stretch: 72%; letter-spacing: -.01em; line-height: 1; }
.lane-off { color: var(--ink-2); font-size: 12.5px; }
.lane-now { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--lane); }
.lane-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lane-now.pulse-now::before { animation: ping-o 1.6s ease-out infinite; }
@keyframes ping-o { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }
.noapp-tag { font-size: 11px; color: var(--muted); }
.lane-track {
  position: relative; display: flex; gap: 10px; padding: 12px; overflow-x: auto; align-items: stretch;
  background-image: linear-gradient(var(--line-soft), var(--line-soft));
  background-size: 100% 2px; background-position: 0 50%; background-repeat: no-repeat;
}

/* Job ticket */
.ticket {
  position: relative; flex: 0 0 248px; scroll-snap-align: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px 10px 14px;
  text-align: left; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.ticket::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--st, var(--s-send)); }
.ticket:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.ticket.dim { box-shadow: none; }
.ticket.hidden { display: none; }
.t-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.t-num { font-weight: 700; color: var(--ink-2); }
.t-stage { margin-left: auto; font-weight: 700; color: var(--st); white-space: nowrap; }
.t-client { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-addr { color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-work { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.flag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2); }
.flag.red { background: #f8dcd8; color: var(--alert); }
.flag.cyan { background: var(--cyan-soft); color: #06707c; }
.flag.green { background: #dcefe3; color: var(--s-done); }

/* ── Needs you ───────────────────────────────────────── */
.inbox { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 92px); overflow-y: auto; padding-right: 2px; }
.box { background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.box-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 700; }
.box-head .n { margin-left: auto; min-width: 24px; text-align: center; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.box-head .ic { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--ink)); }
.item { display: flex; gap: 10px; align-items: flex-start; width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: transparent; padding: 10px 14px; text-align: left; }
.item:hover { background: var(--white); }
.item .what { font-weight: 600; }
.item .why { color: var(--ink-2); font-size: 12.5px; }
.item .when { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; padding-top: 2px; }
.item .amt { margin-left: auto; font-weight: 700; white-space: nowrap; }
.all-clear { text-align: center; color: var(--ink-2); padding: 28px 16px; background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.all-clear b { display: block; font-size: 22px; font-weight: 800; font-stretch: 75%; color: var(--s-done); margin-bottom: 4px; }

/* ── Drawer ──────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(29,35,42,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .18s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 41; background: var(--white);
  transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
  box-shadow: -20px 0 40px -20px rgba(0,0,0,.35);
}
.drawer.on { transform: none; }
.d-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft); border-top: 6px solid var(--st, var(--s-send)); }
.d-head .row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.d-head h3 { margin: 6px 0 2px; font-size: 26px; font-weight: 800; font-stretch: 75%; letter-spacing: -.01em; line-height: 1.05; }
.d-head .addr { color: var(--ink-2); }
.d-close { margin-left: auto; border: 0; background: var(--line-soft); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; }
.d-body { padding: 16px 20px 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.d-sec h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; color: var(--muted); }
.steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); justify-self: center; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); }
.steps li time { font-weight: 600; color: var(--ink-2); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.photos a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line-soft); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lines { margin: 0; padding-left: 18px; }
.note { background: var(--slab); border-radius: var(--radius-sm); padding: 10px 12px; white-space: pre-wrap; }

/* ── New job ─────────────────────────────────────────── */
.modal { position: fixed; z-index: 42; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--white); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; }
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal form { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.modal h3 { grid-column: 1 / -1; margin: 0; font-size: 24px; font-weight: 800; font-stretch: 75%; }
.modal p.hint { grid-column: 1 / -1; margin: -6px 0 2px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--white); }
.field textarea { min-height: 70px; resize: vertical; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.form-error { grid-column: 1 / -1; color: var(--alert); font-weight: 600; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; opacity: 0; transition: .2s; z-index: 60; font-weight: 600; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Banner (sign-in / errors) */
.banner { margin: 16px 20px 0; padding: 12px 16px; border-radius: 12px; background: #fbe7e4; color: #7c1d16; font-weight: 600; display: none; }
.banner.on { display: block; }
.demo-banner { background: var(--cyan-soft); color: #05606a; }

/* Loading skeleton */
.skeleton { height: 86px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--slab), #eceee9, var(--slab)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Login ───────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); }
.login-word { font-size: clamp(54px, 11vw, 92px); font-weight: 800; font-stretch: 62%; line-height: .86; letter-spacing: -.03em; margin: 18px 0 14px; }
.login-word span { display: block; color: var(--cyan); }
.login p { color: var(--ink-2); margin: 0 0 22px; max-width: 34ch; }
.g-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; font-size: 15px; }
.g-btn:hover { border-color: var(--ink); }
.login .err { margin-top: 16px; color: var(--alert); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; }
  .inbox { position: static; max-height: none; }
  .main > aside { order: -1; }
  .pulse { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .mark-name small, .live span, .search kbd { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .day .day-label { min-width: 0; }
  .pulse { margin: 12px 14px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 12px 14px 32px; }
  .lane { grid-template-columns: 1fr; }
  .lane-who { border-right: 0; border-bottom: 1px solid var(--line-soft); flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
  .lane-track { flex-direction: column; background-image: none; }
  .ticket { flex: none; }
  .tray .ticket { flex: 0 0 82%; }
  body { overflow-x: hidden; }
  .modal form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Docket sheet: see + adjust (16/10/2026) ── */
.see-docket { align-self: flex-start; margin-top: 6px; border: 1px solid var(--cyan); color: #06707c; background: var(--cyan-soft); border-radius: 999px; padding: 4px 11px; font-weight: 700; font-size: 12px; }
.see-docket:hover { background: var(--cyan); color: #fff; }
.ticket { cursor: pointer; }
.ticket.dim .see-docket { opacity: 1; }
.ticket.dim { opacity: 1; }
.ticket.dim > :not(.see-docket) { opacity: .6; }
.sheet { position: fixed; z-index: 43; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98); width: min(780px, calc(100vw - 20px)); max-height: calc(100vh - 32px);
  background: var(--white); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; display: flex; flex-direction: column; overflow: hidden; }
.sheet.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.sh-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-soft); border-top: 6px solid var(--cyan); }
.sh-head .row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.sh-head h3 { margin: 6px 0 2px; font-size: 28px; font-weight: 800; font-stretch: 75%; line-height: 1.05; }
.sh-head .addr { color: var(--ink-2); }
.sh-head .who { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sh-body { padding: 16px 22px; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px 22px; align-items: start; }
.sh-body > section:not(.dk-totals) { grid-column: 1; }
.sh-body h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.dk-lines { list-style: none; margin: 0; padding: 0; counter-reset: ln; }
.dk-lines > li { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); counter-increment: ln; }
.dk-lines > li::before { content: counter(ln); font-weight: 800; font-stretch: 75%; color: var(--muted); font-size: 17px; }
.dk-lines ul { margin: 4px 0 0; padding-left: 16px; color: var(--ink-2); font-size: 13px; }
.dk-price { font-weight: 700; white-space: nowrap; }
.dk-totals { grid-column: 2; grid-row: 1 / span 3; background: var(--slab); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; position: sticky; top: 0; }
.dk-totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.dk-totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 18px; }
.dk-totals .grand b { font-weight: 800; }
.dk-totals .by { color: var(--muted); font-size: 12px; }
.dk-time { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px !important; color: var(--ink-2); }
.sig { max-width: 260px; max-height: 120px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.sh-foot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line-soft); background: var(--slab); }
.sh-foot .spacer { flex: 1; }
.sh-foot .form-error { flex: 1; }
.dk-edit { display: flex; flex-direction: column; gap: 12px; }
.dk-eline { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.dk-eline textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; line-height: 1.4; resize: vertical; }
.dk-eprice { display: flex; flex-direction: column; gap: 6px; }
.dk-eprice label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.money-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; }
.money-in span { color: var(--muted); }
.money-in input { border: 0; padding: 8px 6px; width: 100%; outline: none; font-weight: 700; }
.money-in.small { width: 110px; }
.dk-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.chk select, .tiny { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.tiny { width: 52px; text-align: center; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.warn-line { margin: 0; color: #8a4b00; background: #fdf0dc; border-radius: 10px; padding: 9px 12px; font-weight: 600; }
.btn.danger { color: #fff; background: var(--alert); border-color: var(--alert); }
@media (max-width: 720px) {
  .sh-body { grid-template-columns: 1fr; }
  .dk-totals { grid-column: 1; grid-row: auto; position: static; }
  .dk-eline { grid-template-columns: 1fr; }
}

/* Send to Xero (16/10/2026) */
.btn.xero-btn, .btn.primary.xero-btn { background: #13b5ea; border-color: #13b5ea; color: #fff; }
.btn.xero-btn:hover { background: #0e9fcf; }
.xero-btn[disabled] { opacity: .5; cursor: not-allowed; }
.sh-body:has(.xform) { grid-template-columns: 1fr; }
.xform h4 { margin: 6px 0 0; }
.xgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.xgrid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.xgrid small { font-weight: 400; color: var(--muted); }
.xgrid input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--ink); }
.xlines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.xlines li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 12px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.xlines li:first-child { border-top: 0; }
.xlines span { white-space: pre-wrap; }
.xlines b { white-space: nowrap; }
.xlines .xdate { background: var(--slab); color: var(--ink-2); }
.xtotal { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding: 2px 4px; }
.warn-line.bad { color: #9b1c1c; background: #fde4e4; }
@media (max-width: 720px) { .xgrid { grid-template-columns: 1fr; } }

/* Ready for Xero: baby blue (16/10/2026) */
:root { --baby: #89cff0; --baby-soft: #e3f4fc; --baby-ink: #135f80; }
.ticket.xready { background: var(--baby-soft); border: 2px solid var(--baby); }
.ticket.xready.dim > :not(.see-docket) { opacity: 1; }
.ticket.xready:hover { border-color: var(--baby-ink); }
.flag.xr { background: var(--baby); color: var(--baby-ink); }
#box-invoice .item { background: var(--baby-soft); }
#box-invoice .item:hover { background: #d2edfa; }

/* ── 16/10/2026: price list, add-on boxes, folding Needs-you, smaller cards ── */
.ao-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid #f0b46a; border-radius: 9px; padding: 6px 8px; }
.ao-l { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.ao-c { display: flex; align-items: center; gap: 6px; }
.ao-c button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: #c46a00; font-weight: 800; line-height: 1; padding: 0; }
.ao-c button[disabled] { opacity: .35; }
.ao-c .ao-chk { color: #fff; font-size: 13px; }
.ao-c .ao-chk.on { background: #e8870e; border-color: #e8870e; }
.ao-c b { min-width: 36px; text-align: center; font-size: 13px; }
.ao-c b.chg { color: #c46a00; }
.pl-reset { border: 0; background: none; padding: 0; color: #06707c; font-size: 12px; font-weight: 700; text-align: left; text-decoration: underline; }
.dk-price { display: flex; flex-direction: column; align-items: flex-end; }
.ao-note { font-weight: 600; font-size: 11px; color: #c46a00; }
.dk-totals .worked { color: #8a4b00; font-weight: 600; }
.est { color: var(--ink-2); font-weight: 700; }

/* Needs you: own scrolling column that stays beside the board, each box folds */
.main { grid-template-columns: minmax(0, 1fr) 320px; }
.inbox { position: sticky; top: 70px; max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain; gap: 10px; scrollbar-width: thin; }
.box-head { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; font-weight: 700; cursor: pointer; padding: 9px 12px; }
.box-head:hover { background: var(--white); }
.box-head .chev { color: var(--muted); font-size: 18px; line-height: 1; transform: rotate(90deg); transition: transform .15s; }
.box.folded .box-head .chev { transform: rotate(0deg); }
.box.folded .box-list { display: none; }
.box-list { max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.item { padding: 8px 12px; gap: 8px; }
.item .what { font-size: 13.5px; }
.item .why { font-size: 12px; }

/* Smaller, calmer cards */
.ticket { flex: 0 0 206px; padding: 7px 9px 7px 12px; gap: 1px; border-radius: 9px; }
.ticket::before { top: 8px; bottom: 8px; width: 3px; }
.t-top { font-size: 10.5px; }
.t-client { font-size: 13.5px; }
.t-addr { font-size: 11.5px; }
.t-work { font-size: 11px; }
.t-flags { gap: 3px; margin-top: 2px; }
.flag { font-size: 10px; padding: 1px 6px; }
.see-docket { font-size: 11px; padding: 3px 9px; margin-top: 4px; }
.lane { grid-template-columns: 140px minmax(0, 1fr); }
.lane-who { padding: 9px 11px; gap: 3px; }
.lane-name { font-size: 18px; }
.lane-off, .lane-now { font-size: 11.5px; }
.lane-track { gap: 8px; padding: 9px; }
.lanes { gap: 8px; }
.tray { padding: 10px; margin-bottom: 14px; }
.ticket.xready { border-width: 1.5px; }

@media (max-width: 1100px) {
  .main { grid-template-columns: minmax(0, 1fr) 280px; }
  .main > aside { order: 0; }
  .inbox { position: sticky; max-height: calc(100vh - 84px); }
}
@media (max-width: 820px) {
  .main { grid-template-columns: 1fr; }
  .main > aside { order: -1; }
  .inbox { position: static; max-height: none; }
  .box-list { max-height: 220px; }
}
@media (max-width: 720px) { .ticket { flex: none; } .lane { grid-template-columns: 1fr; } }

/* Check before Xero (16/10/2026) */
:root { --chk: #e8870e; }
.pulse { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pulse { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck-ic { vertical-align: -1px; flex: none; }
.flag.ck0 { background: #fdeccd; color: #8a4b00; }
.flag.ck { background: #fff3c4; color: #7a5a00; }
.t-acts { display: flex; gap: 5px; flex-wrap: wrap; }
.ck-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; border: 1px solid var(--chk); background: #fff4e3; color: #9a5400; border-radius: 999px; padding: 3px 9px; font-weight: 700; font-size: 11px; white-space: nowrap; }
.ck-btn:hover { background: var(--chk); color: #fff; }
.ck-btn.mine { background: var(--chk); color: #fff; }
.btn.ck-big { display: inline-flex; align-items: center; gap: 6px; background: var(--chk); border-color: var(--chk); color: #fff; }
.btn.ck-big:hover { background: #c96f00; }
.btn.ck-big[disabled] { opacity: .5; }
.ck-row { align-items: center; padding: 0 10px 0 0; }
.ck-row .ck-btn { margin: 0; }
.ck-open { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: 8px 12px; font: inherit; }
.ck-row:hover { background: var(--white); }
.item.mine { background: #fff7e8; }
.ckform h4 { margin: 0; }
.ck-who { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-pick { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.ck-pick.on { border-color: var(--chk); background: #fff4e3; }
.ck-pick input { accent-color: var(--chk); }
.ck-note { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ck-note textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px; }
.sh-body:has(.ckform) { grid-template-columns: 1fr; }
.flag.xr .ck-ic { margin-right: 2px; }

/* ── 16/10/2026 (2): Invoice app card theme, Ready for check, TO DO folding ── */
:root {
  --s-next: #d9a400; --s-unopen: #e03131; --s-open: #0fb0c4; --s-route: #3fa9f5;
  --s-site: #f08c00; --s-left: #f08c00; --s-pay: #4cc265; --s-done: #2f9e44; --s-send: #d9a400;
  --chk: #f39a2b; --chk-soft: #fff1df; --chk-line: #ffc27a;
}
/* Live jobs: half-card glow in the stage colour from the left (like the app), done: faint green wash */
.ticket.th-glow { background: linear-gradient(90deg, color-mix(in srgb, var(--st) 26%, #fff) 0%, #fff 55%); border-color: color-mix(in srgb, var(--st) 45%, var(--line)); }
.ticket.th-wash { background: color-mix(in srgb, var(--s-done) 9%, #fff); }
.ticket.th-plain::before { display: none; }
.ticket.th-plain { padding-left: 10px; }
.ticket .t-stage { display: inline-flex; align-items: center; gap: 5px; }
.ticket .t-stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.ticket.th-glow .t-stage::before { animation: ping-o 1.6s ease-out infinite; color: var(--st); }
/* Ready for check: light orange · Ready for Xero: baby blue (these win over the stage look) */
.ticket.ckready { background: var(--chk-soft); border: 1.5px solid var(--chk-line); }
.ticket.ckready.dim > :not(.t-acts) { opacity: 1; }
.ticket.xready { background: var(--baby-soft); border: 1.5px solid var(--baby); }
.flag.ck0 { background: var(--chk-line); color: #7a3f00; }
#box-tocheck .item, #box-tocheck .ck-row { background: var(--chk-soft); }
/* TO DO */
.todo-head h2 { letter-spacing: .02em; }
.todo-n { background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 800; }
.todo-n:empty { display: none; }
.todo-toggle { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 12px; color: var(--ink-2); }
.todo-toggle:hover { border-color: var(--ink); color: var(--ink); }
.todo-rail { display: none; }
body.todo-folded .main { grid-template-columns: minmax(0, 1fr) 46px; }
body.todo-folded .main > aside .todo-head, body.todo-folded .main > aside .inbox { display: none; }
body.todo-folded .todo-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 70px; width: 46px; padding: 12px 0;
  border: 1px solid var(--line); background: var(--slab); border-radius: 14px; font-weight: 800; color: var(--ink); }
body.todo-folded .todo-rail:hover { background: var(--white); }
.todo-rail-t { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .12em; font-size: 13px; }
.todo-rail-n { background: var(--chk); color: #fff; border-radius: 999px; min-width: 24px; padding: 2px 6px; font-size: 12px; text-align: center; }
.todo-rail-n:empty { display: none; }
@media (max-width: 820px) {
  body.todo-folded .main { grid-template-columns: 1fr; }
  body.todo-folded .todo-rail { flex-direction: row; width: 100%; position: static; justify-content: center; }
  body.todo-folded .todo-rail-t { writing-mode: initial; transform: none; }
}

.ticket.dim > .t-acts { opacity: 1; }

/* Top counts: compact (16/10/2026) — number beside its name, half the height */
.pulse { margin-top: 10px; border-radius: 12px; }
.pulse button { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; row-gap: 0; align-items: center; padding: 7px 12px; }
.pulse .n { grid-row: 1 / span 2; font-size: 23px; min-width: 18px; }
.pulse .l { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse .sub { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse .swatch { top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 2px; }

/* New job — same fields as the Invoice app (16/10/2026) */
.modal { width: min(660px, calc(100vw - 24px)); }
.field label small { font-weight: 500; color: var(--muted); }
.nj-late { grid-column: 1 / -1; margin: -4px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff3e0; border: 1px solid #ffd19a; color: #9a5400; font-weight: 600; font-size: 13px; }
.nj-rel { position: relative; }
.nj-sugg { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.35); overflow: hidden; }
.nj-sugg button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: none; padding: 8px 12px; text-align: left; }
.nj-sugg button:first-child { border-top: 0; }
.nj-sugg button:hover { background: var(--cyan-soft); }
.nj-sugg b { color: #6b3fa0; font-size: 13px; }
.nj-sugg span { color: var(--ink-2); font-size: 12px; }
.nj-auto { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: #0f766e; background: #d5f3ef; border-radius: 999px; padding: 1px 7px; }
.nj-note { color: var(--muted); font-size: 11.5px; }
.nj-note.warn { color: #b45309; }
.nj-pills, .nj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nj-pills button, .nj-chips button { border: 1px solid var(--line); background: var(--slab); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.nj-pills button.on, .nj-chips button.on { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.nj-pills button.urgent.on { background: var(--alert); border-color: var(--alert); }
.nj-chips button small { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.nj-chips button.on small { background: rgba(255,255,255,.25); }
.nj-chips button i { font-style: normal; font-size: 10px; font-weight: 600; color: var(--muted); }
.nj-chips button.on i { color: #e0f7f9; }
.nj-toggles { justify-content: flex-end; gap: 8px; }
.nj-tog { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--slab); flex-wrap: wrap; }
.nj-tog input { accent-color: var(--chk); width: 16px; height: 16px; }
.nj-tog.wide { grid-column: 1 / -1; }
.nj-sendnow input { accent-color: var(--cyan); }
.nj-sendnow.off { opacity: .55; }
.nj-clear { margin-left: 8px; border: 0; background: none; color: #c46a00; font-weight: 700; font-size: 12px; padding: 0; }

/* GPS auto status switch (18/10/2026) */
.gps-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.gps-pill .gps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.gps-pill.live .gps-dot { background: var(--s-done); box-shadow: 0 0 0 3px rgba(47,158,68,.18); }
.gps-pill.stale { border-color: #ffc27a; background: #fff4e3; color: #9a5400; }
.gps-pill.stale .gps-dot { background: var(--chk); }
.gps-pill.off { background: var(--slab); color: var(--muted); }
.gps-pill.off .gps-dot { background: #c9ccc6; }
@media (max-width: 720px) { .gps-pill { order: 4; } }

/* To send: Available crew + drag to plan / reorder (18/10/2026) */
.tray-head { flex-wrap: wrap; align-items: center; row-gap: 6px; }
.avail { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-left: 14px; }
.avail-l { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-right: 2px; }
.avail-none { font-size: 12px; color: var(--muted); }
.avail-chip { border: 1px solid #b7e4c4; background: #e8f7ed; color: #1d6b3a; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 12px; cursor: grab; }
.avail-chip:hover { background: #d3f0dc; }
.avail-chip.picked { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.avail-chip:active { cursor: grabbing; }
#tray .ticket[draggable="true"] { cursor: grab; }
#tray .ticket.dragging { opacity: .45; }
#tray .ticket.drop-on { outline: 3px solid var(--cyan); outline-offset: 2px; }
#tray .ticket.drop-before { box-shadow: -5px 0 0 0 var(--cyan); }
/* 19/10/2026: easier ordering — drop marker on either side, card numbers, no text grabbing */
#tray .ticket.drop-after { box-shadow: 5px 0 0 0 var(--cyan); }
#tray .ticket[draggable="true"] { -webkit-user-select: none; user-select: none; -webkit-user-drag: element; }
#tray .ticket[draggable="true"]:active { cursor: grabbing; }
#tray .ticket.dragging { outline: 2px dashed var(--cyan); outline-offset: 2px; }
#tray { scroll-snap-type: none; min-height: 60px; }
.t-num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; margin-right: 6px; border-radius: 999px; background: var(--ink, #222); color: #fff; font-size: 11.5px; font-weight: 800; flex: none; }
.flag.plan { display: inline-flex; align-items: center; gap: 4px; background: #e6f4f6; color: #06707c; }
.unplan { border: 0; background: none; color: inherit; font-weight: 800; padding: 0 0 0 2px; line-height: 1; cursor: pointer; }
.unplan:hover { color: var(--alert); }

/* ── + New invoice and Dockets (18/10/2026, Main admin) ───────────────── */
body.pulse-8 .pulse { grid-template-columns: repeat(9, minmax(0, 1fr)); }
@media (max-width: 1500px) { body.pulse-8 .pulse { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1300px) { body.pulse-8 .pulse { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { body.pulse-8 .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pulse button.plus .n { color: #0e8fbd; font-size: 28px; font-weight: 800; }
.pulse button.plus { background: linear-gradient(180deg, #f2fbfe, transparent); }

.drawer { z-index: 42; }
.panel { position: fixed; z-index: 41; inset: 16px; background: var(--slab); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
  display: none; flex-direction: column; overflow: hidden; outline: none; }
.panel.on { display: flex; }
body.panel-open { overflow: hidden; }
.pn-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.pn-head h2 { margin: 0; font-size: 24px; font-weight: 800; font-stretch: 75%; letter-spacing: -.01em; }
.pn-sub { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pn-head .d-close { position: static; }
.pn-loading { padding: 30px 20px; color: var(--muted); }
.spacer { flex: 1; }
.btn.big { width: 100%; padding: 13px 16px; font-size: 16px; font-weight: 800; justify-content: center; text-align: center; display: inline-flex; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.danger-t { color: var(--alert) !important; }
.warn-line.bad { border-color: #f1b3ab; background: #fdecea; color: var(--alert); }

/* invoice */
.iv-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; padding: 18px 20px 30px; align-items: start; }
.iv-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.iv-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.iv-sec { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.iv-sec h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.iv-sec .field span { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.iv-sec .field input { width: 100%; }
.iv-sec .field input:disabled { background: var(--slab); color: var(--ink-2); }
.iv-lines { list-style: none; margin: 0; padding: 0; counter-reset: ivl; }
.iv-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.iv-line:last-child { border-bottom: 0; }
.iv-l-text { border: 0; background: none; text-align: left; padding: 4px 6px; border-radius: 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.iv-l-text:not([disabled]):hover { background: var(--cyan-soft); }
.iv-l-text span { white-space: pre-wrap; color: var(--ink-2); font-size: 12.5px; }
.iv-l-text span.warn { color: #c46a00; }
.iv-l-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.iv-price { border: 0; background: none; font-weight: 800; font-size: 15px; padding: 4px 10px; border-radius: 8px; }
.iv-price.on { color: #c46a00; background: #fff1e0; }
.iv-price.on:hover { background: #ffe2bf; }
.iv-l-right .adj { color: #c46a00; font-weight: 700; font-size: 11px; }
.iv-l-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.iv-l-acts button { border: 1px solid var(--line); background: var(--slab); border-radius: 999px; font-size: 11.5px; padding: 3px 9px; color: var(--ink-2); }
.iv-l-acts button:hover { border-color: var(--ink-2); color: var(--ink); }
.iv-empty { color: var(--muted); padding: 8px 0; }
.iv-add { display: flex; gap: 8px; flex-wrap: wrap; }
.iv-opts { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.iv-totals { position: static; }
.iv-totals .mn { color: #c46a00; }
.iv-actions { display: flex; flex-direction: column; gap: 8px; }
.iv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iv-two .btn { justify-content: center; }
.iv-saved { padding: 14px 20px 0; }
.iv-saved h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.iv-saved-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.iv-saved-card { flex: 0 0 240px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; }
.iv-saved-card > button:first-child { border: 0; background: none; text-align: left; padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.iv-saved-card > button:first-child:hover b { color: var(--cyan); }
.iv-saved-card span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-del { border: 0; border-top: 1px solid var(--line-soft); background: none; font-size: 11.5px; color: var(--muted); padding: 5px 12px; text-align: left; }
.iv-del:hover { color: var(--alert); }

/* Add work — big tiles like A-Class Go */
.ow-layer, .iv-dlg-wrap { position: absolute; inset: 0; background: rgba(29,35,42,.4); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 5; }
.ow-layer.on, .iv-dlg-wrap.on { display: flex; }
.ow-card { background: var(--slab); border-radius: 18px; width: min(720px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.ow-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 12px; background: var(--white); }
.ow-head > :last-child { justify-self: end; }
.ow-head b { font-size: 15px; }
.ow-prog { height: 4px; background: var(--line-soft); } .ow-prog i { display: block; height: 100%; background: var(--cyan); transition: width .2s; }
.ow-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ow-body h3 { margin: 0; font-size: 26px; font-weight: 800; font-stretch: 80%; }
.ow-body h4 { margin: 6px 0 0; font-size: 17px; }
.ow-grid { display: grid; gap: 10px; }
.ow-grid.g2 { grid-template-columns: repeat(2, 1fr); } .ow-grid.g3 { grid-template-columns: repeat(3, 1fr); } .ow-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.ow-tile { min-height: 62px; border: 0; border-radius: 16px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 15px; padding: 8px; line-height: 1.2; }
.ow-tile:hover { box-shadow: inset 0 0 0 2px var(--cyan); }
.ow-tile.on { background: var(--cyan); color: #fff; box-shadow: none; }
.ow-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; background: var(--white); border-radius: 18px; padding: 14px; }
.ow-stepper > button { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--cyan-soft); color: #06707c; font-size: 30px; font-weight: 800; }
.ow-stepper > button:hover { background: #bfe6ea; }
.ow-num { display: flex; flex-direction: column; align-items: center; }
.ow-num input { width: 150px; text-align: center; border: 0; border-bottom: 2px solid var(--line); font-size: 44px; font-weight: 800; font-stretch: 80%; background: none; outline: none; padding: 0; }
.ow-num input:focus { border-color: var(--cyan); }
.ow-num span { color: var(--muted); font-weight: 600; }
.ow-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ow-quick button { min-width: 54px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; }
.ow-quick button.on { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.ow-typed { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ow-typed b { font-size: 22px; } .ow-typed.sm b { font-size: 14px; min-width: 120px; }
.ow-typed input { width: 110px; font-size: 22px; font-weight: 700; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ow-typed.sm input { width: 80px; font-size: 16px; }
.ow-typed span { color: var(--muted); }
.ow-text { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: var(--white); }
.ow-next { align-self: flex-start; }
.ow-fixed { font-size: 15px; font-weight: 600; }
.ow-times { display: flex; gap: 14px; background: var(--white); border-radius: 14px; padding: 12px; }
.ow-times label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; color: var(--ink-2); }
.ow-times input { font-size: 20px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.ow-hrs { font-weight: 800; font-size: 17px; margin: 0; } .ow-hrs.ok { color: var(--s-done); } .ow-hrs.bad { color: var(--alert); }
.ow-foot { border-top: 1px solid var(--line); background: var(--white); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.ow-sum { display: flex; justify-content: space-between; gap: 12px; background: var(--slab); border-radius: 12px; padding: 8px 12px; }
.ow-sum pre { margin: 0; font: 12.5px/1.4 var(--font); color: var(--ink-2); white-space: pre-wrap; max-height: 90px; overflow-y: auto; }
.ow-sum b { color: var(--s-done); white-space: nowrap; }
.btn.go { background: var(--s-done); border-color: var(--s-done); color: #fff; }
.btn.go:hover { background: #24774a; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* pop-ups inside the invoice */
.iv-dlg { background: var(--white); border-radius: 16px; width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.iv-dlg.wide { width: min(760px, 100%); background: #eceeef; }
.iv-dlg h3 { margin: 0; font-size: 20px; font-weight: 800; font-stretch: 80%; }
.iv-dlg h4 { margin: 4px 0 0; }
.iv-dlg p { margin: 0; }
.iv-dlg .pre { white-space: pre-wrap; max-height: 120px; overflow-y: auto; }
.iv-dlg .field span { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.iv-dlg textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; resize: vertical; }
.dl-acts { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

/* invoice preview (laid out like the Xero invoice) */
.inv-paper { background: #fff; color: #1f2128; border-radius: 10px; padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); }
.ip-top, .ip-bill { display: flex; justify-content: space-between; gap: 16px; }
.ip-h { font-size: 24px; font-weight: 900; } .ip-s { color: #737782; font-size: 12px; }
.ip-r { text-align: right; font-size: 12.5px; }
.ip-draft { display: inline-block; margin-top: 6px; background: #fff1e0; color: #c46a00; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.ip-lab { font-size: 10px; font-weight: 800; color: #737782; text-transform: uppercase; letter-spacing: .05em; }
.ip-lines { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ip-lines th { text-align: left; font-size: 10px; text-transform: uppercase; color: #737782; border-bottom: 1px solid #1f2128; padding: 6px 0; }
.ip-lines th:last-child, .ip-lines td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; vertical-align: top; }
.ip-lines td { padding: 8px 0; border-bottom: 1px solid #e1e2e6; }
.ip-tot { margin-left: auto; width: 280px; font-size: 12.5px; }
.ip-tot div { display: flex; justify-content: space-between; padding: 3px 0; }
.ip-tot .g { border-top: 1px solid #1f2128; font-weight: 900; font-size: 14px; margin-top: 4px; padding-top: 6px; }
.print-body { background: #fff; padding: 20px; } .print-body .inv-paper { box-shadow: none; }

/* dockets */
.dk-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 20px 8px; }
.dk-filters label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.dk-filters input, .dk-filters select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: var(--white); }
.dk-filters input[type=search] { min-width: 220px; flex: 1; max-width: 340px; }
.dk-presets { display: flex; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.dk-presets button { border: 0; background: none; border-radius: 999px; padding: 5px 11px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.dk-presets button.on { background: var(--ink); color: #fff; }
.dk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 20px 12px; border-bottom: 1px solid var(--line); }
.dk-list { flex: 1; overflow: auto; padding: 0 20px 24px; }
.dk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.dk-table th { position: sticky; top: 0; background: var(--slab); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.dk-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; background: var(--white); }
.dk-table tr.sel td { background: var(--cyan-soft); }
.dk-table .r { text-align: right; }
.dk-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--cyan); }
.dk-num { border: 0; background: none; font-weight: 800; color: var(--cyan); padding: 0; }
.dk-cl { border: 0; background: none; text-align: left; padding: 0; display: flex; flex-direction: column; }
.dk-cl:hover b { color: var(--cyan); }
.dk-cl span { color: var(--muted); font-size: 12px; }
.dk-table .flag { margin-right: 4px; }
.dk-pr { white-space: nowrap; } .dk-pr b, .dk-pr .est { display: block; } .dk-pr small { color: var(--muted); font-size: 11px; }
.dk-acts { white-space: nowrap; } .dk-acts .btn + .btn { margin-left: 4px; }

@media (max-width: 960px) {
  .panel { inset: 0; border-radius: 0; }
  .iv-body { grid-template-columns: 1fr; }
  .iv-side { position: static; }
  .iv-grid { grid-template-columns: 1fr; }
  .ow-grid.g4 { grid-template-columns: repeat(3, 1fr); } .ow-grid.g3 { grid-template-columns: repeat(2, 1fr); }
  .dk-table th:nth-child(3), .dk-table td:nth-child(3), .dk-table th:nth-child(7), .dk-table td:nth-child(7) { display: none; }
}

/* Dockets → Delete (19/10/2026) */
.btn.del-o { color: var(--alert); border-color: #e9b4ae; background: var(--white); }
.btn.del-o:not(:disabled):hover { background: #fdf0ee; }
.dk-del-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.dk-del-list li { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); line-height: 1.6; }
.dk-del-list li:last-child { border-bottom: 0; }
.dk-del-list li.keep { opacity: .7; }
.dk-del-list .mut { color: var(--muted); }
.dk-del input#dk-del-type { width: 100%; border: 2px solid #e9b4ae; border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.dk-del input#dk-del-type:focus { outline: none; border-color: var(--alert); }
.dk-del-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Docket photos + photo viewer (19/10/2026) */
.sh-photos .photos { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.photos .ph { display: block; aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--line-soft); cursor: zoom-in; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph .skeleton { display: block; height: 100%; }
.photos .ph:hover, .photos a:hover { outline: 3px solid var(--cyan); outline-offset: 1px; }
.photos a { cursor: zoom-in; }
.pv { position: fixed; inset: 0; z-index: 55; background: rgba(12,15,18,.94); display: none; flex-direction: column; color: #fff; }
.pv.on { display: flex; }
.pv-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.pv-top span:not(.spacer) { color: #b9c0c6; }
.pv-top .spacer { flex: 1; }
.pv-top .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.pv-x { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.pv-x:hover { background: rgba(255,255,255,.25); }
.pv-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px; }
.pv-img { max-width: calc(100% - 140px); max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #222; }
.pv-nav { flex: none; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 54px; height: 54px; border-radius: 50%; font-size: 34px; line-height: 1; cursor: pointer; }
.pv-nav:hover { background: rgba(255,255,255,.28); }
.pv-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 14px; justify-content: safe center; }
.pv-strip button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #222; cursor: pointer; opacity: .6; }
.pv-strip button.on { border-color: var(--cyan); opacity: 1; }
.pv-strip button:hover { opacity: 1; }
.pv-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .pv-img { max-width: 100%; } .pv-nav { position: absolute; bottom: 96px; } .pv-nav[data-pvgo="-1"] { left: 16px; } .pv-nav[data-pvgo="1"] { right: 16px; } }
/* The client card (right side) and the docket never cover each other: with both open, the docket moves left. */
/* 19/10/2026: the client card is about half as wide as before (520 → 280px) on a computer; full width on a phone. */
@media (min-width: 641px) {
  .drawer { width: 280px; }
  .drawer .d-head { padding: 14px 14px 12px; }
  .drawer .d-head h3 { font-size: 21px; }
  .drawer .photos { grid-template-columns: repeat(3, 1fr); }
  .drawer .d-actions { flex-wrap: wrap; }
  .drawer .d-body { padding: 12px 14px 24px; gap: 14px; }
  .drawer .kv { grid-template-columns: 76px 1fr; gap: 5px 8px; font-size: 13.5px; } .drawer .kv dd { overflow-wrap: anywhere; }
}
@media (min-width: 900px) {
  body:has(#drawer.on) .sheet.on { left: calc((100vw - 280px) / 2); width: min(780px, calc(100vw - 316px)); }
}

/* Send to Xero: attach docket / photos (19/10/2026) */
.x-att { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--slab); }
.x-att .chk.sub { margin-left: 26px; }
.x-att input:disabled + * , .x-att label:has(input:disabled) { color: var(--muted); }
.dk-table .xero-btn.sm { white-space: nowrap; }

/* Client owing + collapsible timeline (19/10/2026) */
.owe-box { border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.owe-box.bad { border-color: #efb9b2; background: #fff6f4; }
.owe-box.ok { border-color: #b7e4c4; background: #f1faf3; }
.owe-sum { display: flex; align-items: center; gap: 10px; padding: 10px 12px; list-style: none; cursor: default; }
details.owe-box > summary { cursor: pointer; }
.owe-sum::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.owe-t { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.owe-amt { color: var(--alert); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.owe-n { color: var(--alert); font-weight: 600; font-size: 12.5px; flex: 1; }
.owe-ok { color: #1d6b3a; font-weight: 700; }
.owe-box .hint { flex: 1; }
.owe-chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .15s; flex: none; }
details[open] > summary .owe-chev { transform: rotate(-135deg); margin-top: 4px; }
.owe-list { list-style: none; margin: 0; padding: 0 12px 8px; }
.owe-list li { padding: 8px 0; border-top: 1px solid #f3d6d1; }
.owe-r1 { display: flex; align-items: center; gap: 8px; }
.owe-r1 a { color: inherit; }
.owe-a { margin-left: auto; font-variant-numeric: tabular-nums; }
.owe-st { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #fde6cf; color: #9a5400; }
.owe-st.od { background: #f8dcd8; color: var(--alert); }
.owe-r2 { color: var(--ink-2); font-size: 12.5px; }
.sh-owe { margin-bottom: -4px; }
.fold > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.fold > summary h4 { margin: 0 !important; }
.fold-now { color: var(--muted); font-size: 12.5px; }
.fold[open] > summary { margin-bottom: 8px; }

/* Owing in the docket header, top right beside × (19/10/2026) — kept apart from this docket's work */
.sh-head3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 360px) auto; gap: 16px; align-items: start; }
.sh-head3 > .d-close { margin: 0; }
.sh-oweh .owe-box { font-size: 13.5px; }
.sh-oweh .owe-sum { padding: 8px 12px; }
.sh-oweh .owe-amt { font-size: 17px; }
.sh-oweh .owe-list { max-height: 220px; overflow-y: auto; }
@media (max-width: 760px) {
  .sh-head3 { grid-template-columns: minmax(0, 1fr) auto; }
  .sh-head3 .sh-oweh { grid-column: 1 / -1; grid-row: 2; }
}

/* Docket books (19/10/2026) */
.bk-body { padding: 4px 20px 24px; overflow-y: auto; flex: 1; }
.bk-h { margin: 18px 0 8px; font-size: 15px; font-weight: 800; }
.bk-h small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.bk-rows { display: flex; flex-direction: column; gap: 6px; }
.bk-row { display: grid; grid-template-columns: 110px 150px 100px 120px 80px 1fr auto auto; gap: 10px; align-items: center; text-align: left;
  border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 10px 14px; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.bk-row:hover { border-color: var(--cyan); }
.bk-op { font-size: 16px; }
.bk-book { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bk-up { font-variant-numeric: tabular-nums; }
.bk-bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bk-bar i { display: block; height: 100%; background: #6b4fbb; }
.bk-cnt { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bk-who { grid-column: span 3; color: var(--ink-2); font-size: 13px; }
.bk-st { font-weight: 700; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.bk-st.ok { background: #e3f5e8; color: #1d6b3a; }
.bk-st.bad { background: #f8dcd8; color: var(--alert); }
.bk-st.mid { background: var(--line-soft); color: var(--ink-2); }
.bk-st.void { background: #ece6f8; color: #5a3fa8; }
.bk-nd { display: flex; flex-direction: column; gap: 4px; }
.bk-ndrow { display: grid; grid-template-columns: 1.2fr 1.5fr .8fr auto; gap: 10px; text-align: left; border: 1px solid #efb9b2; background: #fff6f4; border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; }
.bk-allok { color: #1d6b3a; font-weight: 700; margin: 4px 0; }
.bk-table tr.bk-p.bad td { background: #fff6f4; }
.bk-page { color: #6b4fbb; font-weight: 700; }
@media (max-width: 900px) { .bk-row { grid-template-columns: 1fr 1fr; } .bk-bar, .bk-cnt { display: none; } }

/* Operator day total on the board (20/10/2026) */
.lane-money { margin-top: 6px; font-weight: 800; font-size: 17px; color: #1d8a3e; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pulse .day-money { color: #1d8a3e; font-weight: 800; }
/* Crew cost (20/10/2026) */
.lane-cost { margin-top: 2px; font-weight: 800; font-size: 14px; color: #d9730d; font-variant-numeric: tabular-nums; }
.lane-cost.miss { font-weight: 600; font-size: 12px; }
.pulse .day-cost { color: #d9730d; font-weight: 800; }

/* Invoice from a done job with no docket + Hours sheet (20/10/2026) */
.see-docket.inv-new { border-color: #13b5ea; color: #0b7fa6; background: #e7f6fc; }
.see-docket.inv-new:hover { background: #13b5ea; color: #fff; }
.see-docket.inv-draft { border-color: #e8a33b; color: #9a5400; background: #fff4e3; }
.see-docket.inv-sent { border-color: #b7e4c4; color: #1d6b3a; background: #e8f7ed; }
.hours-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.hours-btn:hover { border-color: #d9730d; color: #d9730d; }
@media (max-width: 720px) { .hours-btn { order: 4; } }
.hrs-panel { max-width: 1100px; margin: 0 auto; }
.hrs-body { padding: 4px 20px 20px; overflow-y: auto; flex: 1; }
.hrs-table input[type="time"] { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-variant-numeric: tabular-nums; }
.hrs-cost { color: #d9730d; font-weight: 800; }
.hrs-gps { white-space: nowrap; }
.hrs-gps .btn { margin-right: 4px; }

/* offsiders in the Hours sheet (20/10/2026) */
.hrs-offs{font-size:12px;font-weight:600;opacity:.85}
.lane-cost.with{opacity:.7;font-style:italic}

/* Backups panel (21/10/2026) */
.drv-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 14px 16px; margin-top: 14px; }
.drv-card.on { border-color: #7fd3dc; }
.drv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.drv-n { font-weight: 800; font-size: 13px; background: var(--slab); border-radius: 8px; padding: 6px 9px; }
.drv-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 10px; }
.drv-rows > div { background: var(--slab); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.drv-rows span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.drv-rows b.ok { color: #1f8a4c; }
.drv-rows small { color: var(--muted); font-size: 12px; }
.drv-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.drive-btn:hover { border-color: #0a8f9c; color: #0a8f9c; }
@media (max-width: 600px) { .drv-rows { grid-template-columns: 1fr; } }
.drv-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 600; line-height: 1.45; }
.drv-note.ok { background: #e3f6ea; color: #17643a; }
.drv-note.bad { background: #fbe6e3; color: #9b2a1c; }
.drv-steps { margin: 4px 0 12px 18px; padding: 0; line-height: 1.6; }
.drv-mirror { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.drv-mirror > div { flex: 1; }
.drv-prog { margin-top: 6px; font-weight: 600; font-size: 13px; }
@media (max-width: 600px) { .drv-mirror { flex-direction: column; align-items: stretch; } }

/* Inventory (21/10/2026) */
.inv-btn:hover { border-color: #6b5bd6; color: #6b5bd6; }
.iv2-search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; min-width: 220px; font: inherit; }
.iv2-wrap { display: grid; grid-template-columns: 240px 1fr; flex: 1; min-height: 0; }
.iv2-places { border-right: 1px solid var(--line); padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; background: var(--slab); }
.iv2-place { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.iv2-place:hover { background: var(--white); }
.iv2-place.on { background: var(--white); border-color: var(--line); font-weight: 700; }
.iv2-pn small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.iv2-pc { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.iv2-main { padding: 12px 20px 24px; overflow-y: auto; }
.iv2-head { display: flex; align-items: baseline; gap: 10px; }
.iv2-head h3 { margin: 4px 0 8px; font-size: 20px; }
.iv2-cat { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.iv2-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.iv2-name:hover { text-decoration: underline; }
.iv2-acts { white-space: nowrap; }
.iv2-acts .btn + .btn { margin-left: 6px; }
.iv2-form { max-width: 760px; }
.iv2-kind { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.iv2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.iv2-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.iv2-grid .wide { grid-column: 1 / -1; }
.iv2-grid input, .iv2-grid select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 500; background: var(--white); }
.iv2-foot { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.iv2-hist { padding-left: 18px; line-height: 1.6; }
.btn.bad { color: var(--alert); }
#inv2-panel { display: none; flex-direction: column; }
#inv2-panel.on { display: flex; }
@media (max-width: 760px) { .iv2-wrap { grid-template-columns: 1fr; } .iv2-places { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } .iv2-place { min-width: 150px; } .iv2-grid { grid-template-columns: 1fr; } .iv2-search { min-width: 0; width: 140px; } }

/* Staff (21/10/2026) */
.staff-btn:hover { border-color: #0a8f9c; color: #0a8f9c; }
.st-table th.c, .st-table td.c { text-align: center; }
.st-table input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.iv2-skip td { opacity: .45; text-decoration: line-through; }

/* ⋮ side menu + Teams (22/10/2026) */
.search { flex: 0 0 280px; width: 280px; max-width: none; }
.iv2-search, .tm-search { flex: 0 0 260px; width: 260px; min-width: 260px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font: inherit; background: var(--white); }
@media (max-width: 720px) { .search { flex: 1 1 100%; width: auto; } .iv2-search, .tm-search { flex: 1 1 100%; width: auto; min-width: 0; } }
.dots-btn { border: 0; background: transparent; width: 30px; height: 34px; border-radius: 8px; font-size: 20px; font-weight: 800; line-height: 1; color: var(--ink-2); cursor: pointer; margin-right: -4px; }
.dots-btn:hover, .dots-btn[aria-expanded="true"] { background: var(--line-soft); color: var(--ink); }
.rail { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: 220px; background: var(--white); border-right: 1px solid var(--line); box-shadow: 12px 0 40px -18px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; transform: translateX(-104%); transition: transform .18s ease; }
.rail.on { transform: none; }
.rail-h { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 8px; }
.rail .hours-btn { width: 100%; justify-content: flex-start; border-radius: 9px; border-color: transparent; padding: 9px 10px; font-size: 13.5px; order: 0; }
.rail .hours-btn[hidden] { display: none; }
.rail .hours-btn:hover { background: var(--slab); }
.rail-scrim { position: fixed; inset: 0; z-index: 59; display: none; }
.rail-scrim.on { display: block; }
.rail-foot { margin-top: auto; padding: 10px 10px 2px; border-top: 1px solid var(--line-soft); }
.rail-foot[hidden] { display: none; }
.mini-tog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.mini-tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.mini-tog .sw { width: 28px; height: 16px; border-radius: 999px; background: #cfd2cc; position: relative; transition: background .15s; }
.mini-tog .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mini-tog input:checked + .sw { background: #13b5ea; }
.mini-tog input:checked + .sw::after { transform: translateX(12px); }
.mini-tog input:focus-visible + .sw { outline: 2px solid var(--ink); outline-offset: 2px; }
.teams-btn:hover { border-color: #2f6fd6; color: #2f6fd6; }
#teams-panel { display: none; flex-direction: column; }
#teams-panel.on { display: flex; }
.tm-mode, .tm-nav { display: flex; align-items: center; gap: 2px; background: var(--slab); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tm-mode button, .tm-nav button { border: 0; background: transparent; border-radius: 999px; padding: 5px 11px; font: inherit; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tm-mode button.on { background: var(--ink); color: #fff; }
.tm-nav span { font-weight: 700; min-width: 190px; text-align: center; font-size: 13px; }
.tm-bar { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--white); flex-wrap: wrap; }
.tm-chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; }
.tm-chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.tm-chip b { color: var(--muted); font-weight: 700; margin-left: 3px; }
.tm-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); } .tm-chip.on b { color: #cfd2cc; }
.tm-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.tm-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tm-card > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--slab); }
.tm-card > header small { color: var(--muted); font-weight: 600; }
.tm-n { color: var(--muted); font-size: 12px; font-weight: 600; }
.tm-card ul { list-style: none; margin: 0; padding: 0; }
.tm-day { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 14px 2px; }
.tm-row { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) auto auto 22px; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.tm-row.on { background: #eef4ff; }
.tm-tick input { width: 17px; height: 17px; cursor: pointer; }
.tm-no { font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-addr { min-width: 0; } .tm-addr b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tm-addr small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-st { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: var(--slab); color: var(--ink-2); }
.tm-st.ok { background: #e8f7ed; color: #1d6b3a; } .tm-st.warn { background: #fff4e3; color: #9a5400; } .tm-st.bad { background: #fde8e6; color: #b3261e; }
.tm-st.void { background: #eee; color: #777; text-decoration: line-through; } .tm-st.go { background: #e7f0ff; color: #2f5fb3; }
.tm-tot { font-weight: 800; color: var(--s-done); font-variant-numeric: tabular-nums; white-space: nowrap; } .tm-tot small { color: var(--muted); font-weight: 600; }
.tm-open { border: 0; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; } .tm-open:hover { color: var(--ink); }
.tm-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.tm-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--white); flex-wrap: wrap; }
.tm-prices { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) { .tm-grid { grid-template-columns: 1fr; } .tm-row { grid-template-columns: 22px 48px minmax(0, 1fr) auto; } .tm-tot, .tm-open { display: none; } .tm-nav span { min-width: 0; } }

/* Night mode switch row (22/10/2026) */
.rail-row { padding: 10px 10px 4px; margin-top: auto; border-top: 1px solid var(--line-soft); }
.rail-row + .rail-foot { margin-top: 0; border-top: 0; }
.mini-tog.night { font-size: 13.5px; color: var(--ink-2); }

html[data-theme="dark"] .top { background: rgba(18,21,25,.92); }
html[data-theme="dark"] .rail { box-shadow: 12px 0 40px -18px rgba(0,0,0,.9); }
html[data-theme="dark"] .mini-tog .sw { background: #3a4048; }
html[data-theme="dark"] .mini-tog input:checked + .sw { background: #13b5ea; }
html[data-theme="dark"] .tm-row.on { background: #1d2a3d; }

html[data-theme="dark"] { --baby-soft: #15303c; --baby-ink: #a9dcf3; --chk-soft: #36281a; --chk-line: #7a5520; }
html[data-theme="dark"] .ticket.th-glow { background: linear-gradient(90deg, color-mix(in srgb, var(--st) 30%, var(--white)) 0%, var(--white) 55%); }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--slab), #252a31, var(--slab)); background-size: 200% 100%; }
html[data-theme="dark"] .pulse button.plus { background: linear-gradient(180deg, #15303c, transparent); }
/* Invoiced marks (22/10/2026): draft = amber, approved / paid = green */
.inv-mark { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.inv-mark.done { background: #e3f5e9; color: #1d6b3a; }
.inv-mark.draft { background: #fff1d6; color: #9a5a00; }
.inv-mark.priced { background: #e7f0ff; color: #2f5fb3; }
.inv-mark.none { background: var(--slab); color: var(--muted); border: 1px solid var(--line-soft); }
.inv-no { font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.inv-no.done { color: #1d8a47; } .inv-no.draft { color: #c27400; }
a.inv-no:hover { text-decoration: underline; }
.tm-row { grid-template-columns: 22px 56px minmax(0, 1fr) auto auto 22px; }
.tm-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tm-grid { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.tm-bar .btn { padding-left: 10px; padding-right: 10px; }
.tm-row.clk { cursor: pointer; } .tm-row.clk:hover { background: var(--slab); } .tm-row.clk.on:hover { background: #e3edff; }
.tm-inv { display: inline-flex; gap: 6px; align-items: center; }
.tm-ni { color: var(--ink-2); font-size: 12.5px; } .tm-ni b { color: var(--muted); }
.sh-inv { display: inline-flex; gap: 6px; align-items: center; margin-right: 6px; }
@media (max-width: 760px) { .tm-grid { grid-template-columns: 1fr; } .tm-row { grid-template-columns: 22px 48px minmax(0, 1fr) auto; } }
html[data-theme="dark"] .inv-mark.done { background: #183a26; color: #8ce4ac; }
html[data-theme="dark"] .inv-mark.draft { background: #3d2c12; color: #ffc46b; }
html[data-theme="dark"] .inv-mark.priced { background: #1a2b45; color: #9cbcf2; }
html[data-theme="dark"] .inv-no.done { color: #6fd795; } html[data-theme="dark"] .inv-no.draft { color: #ffb547; }
html[data-theme="dark"] .tm-row.clk.on:hover { background: #22324a; }

/* Even cards (22/10/2026): every card the same size; amount top right; docket # bottom left, invoice # bottom right */
.lane-track, #tray .tray-row { align-items: flex-start; }
.ticket { height: 124px; overflow: hidden; }
.ticket .t-flags { flex-wrap: nowrap; overflow: hidden; min-height: 0; }
.ticket .t-flags .flag { white-space: nowrap; }
.ticket .t-acts { margin-top: auto; align-items: center; flex-wrap: nowrap; }
.ticket .t-acts .see-docket { margin-top: 0; font-variant-numeric: tabular-nums; }
.ticket .t-top { min-height: 18px; }
.t-amt { margin-left: auto; border: 0; background: none; padding: 0 2px; font: 800 13px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.2; }
button.t-amt { cursor: pointer; border-radius: 6px; } button.t-amt:hover { text-decoration: underline; }
.t-amt.chk { color: #e8780c; }
.t-amt.adj { color: #2b9fd9; }
.t-amt.fixed { color: var(--ink); cursor: default; }
.t-inv { display: inline-flex; align-items: center; }
.t-inv .inv-no { font-size: 12px; }
.ticket.dim > .t-top .t-amt { opacity: 1; }
html[data-theme="dark"] .t-amt.chk { color: #ffa24d; } html[data-theme="dark"] .t-amt.adj { color: #7cc8f2; }

/* Private clients (23/10/2026) */
#private-panel { max-width: 760px; margin: 0 auto; }
.pc-sec { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.pc-sec h3 { margin: 0 0 4px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.pc-sec h3 .n { font-size: 11.5px; background: var(--slab); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.pc-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pc-list li { display: inline-flex; align-items: center; gap: 6px; background: var(--slab); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; text-transform: capitalize; }
.pc-list li.hint { text-transform: none; border: 0; background: none; padding: 0; }
.pc-x { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.pc-x:hover { background: #fde8e6; color: var(--alert); }
.pc-add { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-add input { flex: 1 1 200px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; background: var(--white); }
.private-btn:hover { border-color: var(--alert); color: var(--alert); }

/* Private clients — pick list (23/10/2026) */
.pc-rows { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-rows li { display: flex; align-items: center; gap: 10px; background: var(--slab); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .pc-main b { text-transform: uppercase; letter-spacing: .03em; }
.pc-pick { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pc-pick > input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: var(--white); }
.pc-results { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.pc-results li.hint { padding: 10px 12px; }
.pc-res { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); background: var(--white); padding: 8px 12px; cursor: pointer; font: inherit; }
.pc-res:hover { background: var(--slab); } .pc-res b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-res span { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
.pc-res em { font-style: normal; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pc-res.on { cursor: default; opacity: .6; }
.pc-chosen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fff4e3; border: 1px solid #ffd18a; border-radius: 10px; padding: 10px 12px; }
.pc-chosen > div { flex: 1 1 220px; display: flex; flex-direction: column; } .pc-chosen .hint { font-variant-numeric: tabular-nums; }
.pc-keyl { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.pc-keyl input { width: 170px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; }
html[data-theme="dark"] .pc-chosen { background: #3a2b14; border-color: #6b4f2e; }

.pc-src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; } .pc-src .hint { flex: 1; }

/* ==== NIGHT MODE (generated) ==== */
html[data-theme="dark"] {
  color-scheme: dark;
  --concrete: #121519; --slab: #191d22; --white: #20252b; --ink: #e7e9eb; --ink-2: #b6bcc3; --muted: #8a929a;
  --line: #343a42; --line-soft: #292e35; --cyan: #2bb7c8; --cyan-soft: #12393e;
  --s-done: #46b37a; --alert: #ef6a5f;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.8);
}
html[data-theme="dark"] img:not(.keep-light) { filter: none; }
html[data-theme="dark"] ::placeholder { color: #6f7780; }
html[data-theme="dark"] .mark-badge { color: #14181d; }
html[data-theme="dark"] .day .today-btn[aria-pressed="true"] { color: #14181d; }
html[data-theme="dark"] .btn.primary { color: #14181d; }
html[data-theme="dark"] .tray { border: 1.5px dashed #4c5049; }
html[data-theme="dark"] .flag.red { background: #46201b; }
html[data-theme="dark"] .flag.cyan { color: #76ecf9; }
html[data-theme="dark"] .flag.green { background: #1e422c; }
html[data-theme="dark"] .box-head .n { color: #14181d; }
html[data-theme="dark"] .toast { color: #14181d; }
html[data-theme="dark"] .banner { background: #46201b; color: #ec8b84; }
html[data-theme="dark"] .demo-banner { color: #76ecf9; }
html[data-theme="dark"] .see-docket { color: #76ecf9; }
html[data-theme="dark"] .money-in { background: var(--white); }
html[data-theme="dark"] .warn-line { color: #ffbe70; background: #46351b; }
html[data-theme="dark"] .warn-line.bad { color: #eb8484; background: #461b1b; }
html[data-theme="dark"] #box-invoice .item:hover { background: #1b3846; }
html[data-theme="dark"] .ao-c button { background: var(--white); color: #ffbd70; }
html[data-theme="dark"] .ao-c b.chg { color: #ffbd70; }
html[data-theme="dark"] .pl-reset { color: #76ecf9; }
html[data-theme="dark"] .ao-note { color: #ffbd70; }
html[data-theme="dark"] .dk-totals .worked { color: #ffbe70; }
html[data-theme="dark"] .flag.ck0 { background: #46371b; color: #ffbe70; }
html[data-theme="dark"] .flag.ck { background: #463d1b; color: #ffda70; }
html[data-theme="dark"] .ck-btn { background: #46351b; color: #ffbe70; }
html[data-theme="dark"] .item.mine { background: #46371b; }
html[data-theme="dark"] .ck-pick.on { background: #46351b; }
html[data-theme="dark"] .ticket.th-wash { background: color-mix(in srgb, var(--s-done) 9%, var(--white)); }
html[data-theme="dark"] .flag.ck0 { color: #ffba70; }
html[data-theme="dark"] .todo-n { color: #14181d; }
html[data-theme="dark"] .nj-late { background: #46351b; border: 1px solid #6b4f2e; color: #ffbe70; }
html[data-theme="dark"] .nj-auto { color: #7ff1e8; background: #1b4640; }
html[data-theme="dark"] .nj-note.warn { color: #f9af76; }
html[data-theme="dark"] .nj-clear { color: #ffbd70; }
html[data-theme="dark"] .gps-pill.stale { border-color: #6b4f2e; background: #46351b; color: #ffbe70; }
html[data-theme="dark"] .gps-pill.off .gps-dot { background: #292b26; }
html[data-theme="dark"] .avail-chip { border: 1px solid #2e6b40; background: #1b4629; color: #8ce4ac; }
html[data-theme="dark"] .avail-chip:hover { background: #1b4628; }
html[data-theme="dark"] .flag.plan { background: #1b4146; color: #76ecf9; }
html[data-theme="dark"] .pulse button.plus .n { color: #79d5f6; }
html[data-theme="dark"] .warn-line.bad { border-color: #6b352e; background: #461f1b; }
html[data-theme="dark"] .iv-l-text span.warn { color: #ffbd70; }
html[data-theme="dark"] .iv-price.on { color: #ffbd70; background: #46331b; }
html[data-theme="dark"] .iv-price.on:hover { background: #46321b; }
html[data-theme="dark"] .iv-l-right .adj { color: #ffbd70; }
html[data-theme="dark"] .iv-totals .mn { color: #ffbd70; }
html[data-theme="dark"] .ow-stepper > button { color: #76ecf9; }
html[data-theme="dark"] .ow-stepper > button:hover { background: #1b4246; }
html[data-theme="dark"] .iv-dlg.wide { background: #262a2b; }
html[data-theme="dark"] .ip-draft { background: #46331b; color: #ffbd70; }
html[data-theme="dark"] .ip-lines td { border-bottom: 1px solid #464853; }
html[data-theme="dark"] .dk-presets button.on { color: #14181d; }
html[data-theme="dark"] .btn.del-o { border-color: #6b342e; }
html[data-theme="dark"] .btn.del-o:not(:disabled):hover { background: #46201b; }
html[data-theme="dark"] .dk-del input#dk-del-type { border: 2px solid #6b342e; }
html[data-theme="dark"] .owe-box.bad { border-color: #6b352e; background: #46231b; }
html[data-theme="dark"] .owe-box.ok { border-color: #2e6b40; background: #1b4624; }
html[data-theme="dark"] .owe-ok { color: #8ce4ac; }
html[data-theme="dark"] .owe-list li { border-top: 1px solid #6b372e; }
html[data-theme="dark"] .owe-st { background: #46301b; color: #ffbe70; }
html[data-theme="dark"] .owe-st.od { background: #46201b; }
html[data-theme="dark"] .bk-st.ok { background: #1b4627; color: #8ce4ac; }
html[data-theme="dark"] .bk-st.bad { background: #46201b; }
html[data-theme="dark"] .bk-st.void { background: #291b46; }
html[data-theme="dark"] .bk-ndrow { border: 1px solid #6b352e; background: #46231b; }
html[data-theme="dark"] .bk-allok { color: #8ce4ac; }
html[data-theme="dark"] .bk-table tr.bk-p.bad td { background: #46231b; }
html[data-theme="dark"] .lane-money { color: #87e9a4; }
html[data-theme="dark"] .pulse .day-money { color: #87e9a4; }
html[data-theme="dark"] .see-docket.inv-new { color: #78d7f7; background: #1b3a46; }
html[data-theme="dark"] .see-docket.inv-draft { color: #ffbe70; background: #46351b; }
html[data-theme="dark"] .see-docket.inv-sent { border-color: #2e6b40; color: #8ce4ac; background: #1b4629; }
html[data-theme="dark"] .drv-rows b.ok { color: #88e7b0; }
html[data-theme="dark"] .drive-btn:hover { color: #78ecf7; }
html[data-theme="dark"] .drv-note.ok { background: #1b462b; color: #88e7b3; }
html[data-theme="dark"] .drv-note.bad { background: #46201b; color: #eb8f84; }
html[data-theme="dark"] .staff-btn:hover { color: #78ecf7; }
html[data-theme="dark"] .mini-tog .sw { background: #292b26; }
html[data-theme="dark"] .mini-tog .sw::after { background: var(--white); }
html[data-theme="dark"] .tm-mode button.on { color: #14181d; }
html[data-theme="dark"] .tm-chip.on { color: #14181d; }
html[data-theme="dark"] .tm-row.on { background: #1b2a46; }
html[data-theme="dark"] .tm-st.ok { background: #1b4629; color: #8ce4ac; }
html[data-theme="dark"] .tm-st.warn { background: #46351b; color: #ffbe70; }
html[data-theme="dark"] .tm-st.bad { background: #461e1b; color: #ed8883; }
html[data-theme="dark"] .tm-st.void { background: #2b2626; }
html[data-theme="dark"] .tm-st.go { background: #1b2b46; }
/* ==== END NIGHT MODE ==== */

/* ==== Quotes (23/10/2026) — js/quotes.js ==== */
.quotes-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.qt-table td { vertical-align: middle; }
.qt-row { cursor: pointer; } .qt-row:hover td { background: var(--cyan-soft); } .qt-row:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.qt-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.qt-addr { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-empty { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 48px 16px; color: var(--ink-2); }
.qt-empty span { color: var(--muted); max-width: 46ch; }
.qt-body { grid-template-columns: minmax(0, 1fr) 360px; }

.qo-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qo-top h3 { min-width: 150px; }
.qo-top .spacer { flex: 1; }
.qo-qty { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.qo-qty input { width: 52px; text-align: center; }
.qo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qo-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qo-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qo-row3 .field input { width: 100%; font-variant-numeric: tabular-nums; font-weight: 700; }
.qo-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.qo-chips .tm-chip { padding: 3px 10px; font-size: 12px; }
.qo-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qo-line .lbl, .qt-track .lbl { font-weight: 600; font-size: 12.5px; color: var(--ink-2); min-width: 118px; }
.qo-line select { max-width: 100%; }
.qo-togs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding-top: 2px; }
.qo-togs .chk { font-size: 13px; }
.tm-mode button:disabled { opacity: .45; cursor: default; }

.qo-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qd { width: 100%; height: auto; max-height: 340px; background: var(--slab); border: 1px solid var(--line-soft); border-radius: 12px; display: block; }
.qd-fill { fill: color-mix(in srgb, var(--cyan) 9%, var(--white)); }
.qd-edge { fill: none; stroke: var(--ink); }
.qd-slice { stroke: var(--cyan); }
.qd-n { fill: var(--muted); font-family: var(--font); font-weight: 700; }
.qd-dim { fill: var(--ink-2); font-family: var(--font); font-weight: 700; }
.qd-core { fill: var(--white); stroke: var(--ink); stroke-width: 6; }
.qo-nodraw { display: grid; place-items: center; aspect-ratio: 4 / 3; max-height: 260px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.qo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.qo-stats > div { background: var(--slab); border: 1px solid var(--line-soft); border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qo-stats b { font-size: 16px; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qo-stats span { color: var(--muted); font-size: 11.5px; }
.qo-cuts { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.qo-cuts td { padding: 4px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.qo-cuts td:nth-child(2) { padding: 4px 8px; }
.qo-cuts .r { text-align: right; white-space: nowrap; }
.qo-cuts tr.tot td { border-bottom: 0; color: var(--ink); font-weight: 700; padding-top: 6px; }

.qt-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.qt-track { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qt-days { width: 64px; text-align: center; }
.qt-other { display: flex; gap: 8px; align-items: center; }
.qt-other > input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; font: inherit; background: var(--white); }
.qt-totals { position: static; }
.qt-totals .qt-sum { color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.qt-totals .qt-l > span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.qt-totals .qt-l small { color: var(--muted); font-size: 11.5px; }
.qt-totals .mn { color: #c46a00; }
.qt-totals .warn-line { margin-top: 8px; font-size: 12.5px; }
.qt-del { color: var(--muted); } .qt-del:hover { color: var(--alert); }
.btn.big { padding: 11px 16px; font-size: 15px; justify-content: center; }
@media (max-width: 560px) { .qo-row3 { grid-template-columns: 1fr 1fr; } .qo-stats { grid-template-columns: 1fr 1fr; } .qo-togs { grid-template-columns: 1fr; } }

/* printed quote / cut plan — always white, black & white */
.qp-body { background: #fff; color: #111; filter: grayscale(1); print-color-adjust: economy; -webkit-print-color-adjust: economy; }
.qp { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; font-family: var(--font); color: #111; }
.qp-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 10px; }
.qp-logo { height: 54px; }
.qp-h { font-size: 26px; font-weight: 800; letter-spacing: .04em; }
.qp-no { font-size: 15px; font-weight: 700; }
.qp-r { text-align: right; }
.qp-bill { display: flex; justify-content: space-between; gap: 24px; font-size: 13px; line-height: 1.45; }
.qp-lab { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #555; font-weight: 700; }
.qp-op { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; border: 1px solid #bbb; border-radius: 8px; padding: 12px; break-inside: avoid; }
.qp-op h3 { margin: 0 0 6px; font-size: 15px; }
.qp-op table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.qp-op td { padding: 3px 0; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.qp-op td:first-child { color: #555; width: 110px; }
.qp-draw .qd { background: #fff; border-color: #ccc; max-height: 300px; }
.qd-print .qd-fill { fill: #f2f2f2; } .qd-print .qd-edge { stroke: #111; } .qd-print .qd-slice { stroke: #333; }
.qd-print .qd-n { fill: #555; } .qd-print .qd-dim { fill: #111; } .qd-print .qd-core { fill: #fff; stroke: #111; }
.qp-lines { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qp-lines th { text-align: left; border-bottom: 2px solid #111; padding: 6px 0; } .qp-lines th:last-child, .qp-lines td:last-child { text-align: right; white-space: nowrap; }
.qp-lines td { border-bottom: 1px solid #ddd; padding: 7px 0; vertical-align: top; line-height: 1.4; }
.qp-tot { margin-left: auto; width: 280px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.qp-tot > div { display: flex; justify-content: space-between; } .qp-tot .g { border-top: 2px solid #111; padding-top: 6px; font-size: 16px; font-weight: 800; }
.qp-notes { font-size: 12.5px; line-height: 1.45; border-top: 1px solid #ddd; padding-top: 10px; }
.qp-small { font-size: 11px; color: #555; margin: 0; }
@media print { .qp-body { padding: 0; } .qp-op { break-inside: avoid; } }
html[data-theme="dark"] .qd-fill { fill: color-mix(in srgb, var(--cyan) 14%, var(--white)); }
html[data-theme="dark"] .qd-core { fill: var(--slab); }
.qo-line select.tiny { flex: 1 1 220px; width: auto; min-width: 0; max-width: 320px; padding: 7px 9px; font: inherit; background: var(--white); }
/* Quotes layout fix (23/10/2026, evening): drawing stays beside the measurements on a laptop; price column down to 900px; bottom bar below that */
.qo-card { container-type: inline-size; }
@container (max-width: 560px) { .qo-grid { grid-template-columns: 1fr; } }
@media (max-width: 1280px) { .qt-body { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 900px) { .qt-body { grid-template-columns: 1fr; } }
.qt-mbar { display: none; }
@media (max-width: 900px) {
  .qt-mbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--white); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
  .qt-mbar b { color: var(--ink); font-size: 16px; margin-left: auto; white-space: nowrap; }
  .qt-mbar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ==== Quotes v2 (24/10/2026): kinds with icons, empty mm boxes, steps, legend, plain summary, editable rates, 3D ==== */
.qk-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.qk { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink-2); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.qk:hover:not(:disabled) { border-color: var(--ink-2); color: var(--ink); }
.qk.on { border-color: var(--cyan); background: var(--cyan-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--cyan); }
.qk:disabled { cursor: default; }
.qo-step { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.qo-step .hint { text-transform: none; letter-spacing: 0; }
.qo-size > span { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.qo-mm { position: relative; display: flex; align-items: center; }
.qo-mm input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 40px 10px 12px; font: inherit; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--white); color: var(--ink); }
.qo-mm input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.qo-mm input:disabled { background: var(--slab); }
.qo-mm em { position: absolute; right: 11px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); pointer-events: none; }
.qo-row3 .field input { font-weight: 800; }
.qo-chips { align-items: center; margin-top: -2px; }
.qo-whole { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: end; }
.qo-whole .hint { padding-bottom: 10px; }
.qo-mat, .qo-kg { flex-wrap: wrap; border-radius: 14px; }
.qo-kg button, .qo-mat button { flex: 1 1 auto; }
.qo-bsize { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qo-bsize .qo-mm { width: 120px; }
.qo-bsize > span:not(.hint) { font-weight: 800; color: var(--muted); }
.qo-edges { display: flex; flex-direction: column; gap: 8px; }
.qo-flushnote { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); background: #fff4e8; border: 1px solid #f6cfa4; border-radius: 10px; padding: 8px 10px; }
.qo-more { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.qo-more summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: 13px; padding: 4px 0; }
.qo-more[open] summary { margin-bottom: 8px; }
.qo-more .qo-line { margin-bottom: 8px; }
.qo-need { font-weight: 600; color: var(--ink-2); }
.qo-nodraw { display: flex; flex-direction: column; gap: 8px; }
.qo-nodraw-ic { color: var(--line); } .qo-nodraw-ic svg { width: 44px; height: 44px; }

.qd-wrap { position: relative; }
.q3-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; box-shadow: var(--shadow); }
.qd-wall { fill: color-mix(in srgb, var(--ink) 9%, var(--white)); }
.qd-floor { fill: color-mix(in srgb, var(--ink) 18%, var(--white)); }
.qd-floorline { stroke: var(--ink-2); }
.qd-tag { fill: var(--muted); font-family: var(--font); font-weight: 800; letter-spacing: .08em; }
.qd-cut { stroke: var(--ink); }
.qd-flush { stroke: #ec7a12; }
.qd-nocut { stroke: var(--muted); }
.qd-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.qd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-cut, .lg-flush, .lg-slice, .lg-nocut, .lg-core { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--ink); flex: none; vertical-align: middle; margin-right: 6px; }
.lg-flush { border-top: 4px solid #ec7a12; }
.lg-slice { border-top: 2px dashed var(--cyan); }
.lg-nocut { border-top: 2px dotted var(--muted); }
.lg-core { width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 50%; }
.qd-legend i { margin-right: 0; }
.qo-sum { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--slab); border: 1px solid var(--line-soft); border-left: 4px solid var(--cyan); border-radius: 10px; padding: 10px 12px; }
.qo-stats > div.bad { border-color: #f1b8b3; background: #fde4e4; } .qo-stats > div.bad b { color: #9b1c1c; }
.qo-cuts td:first-child { display: flex; align-items: center; }

.qt-totals .qt-rate { display: flex; flex-direction: row; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; font-weight: 600; }
.qt-rate em { font-style: normal; color: #c46a00; }
.qt-totals .tiny-money { display: inline-flex; flex-direction: row; align-items: center; padding: 0 6px; border-radius: 7px; width: 92px; background: var(--white); }
.tiny-money input { padding: 3px 4px; font-size: 12.5px; text-align: right; }
.tiny-money:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-soft); }
.qt-totals .qt-was { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 11.5px; color: #c46a00; font-weight: 700; margin-top: 2px; }
.qt-reset { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 0 7px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.qt-reset:hover { border-color: var(--ink-2); }
.qt-ratehint { margin-top: 8px; }
.qt-totals .qt-l { align-items: flex-start; }

.q3-layer { position: absolute; inset: 0; z-index: 8; background: rgba(29,35,42,.45); display: flex; padding: 14px; }
.q3-layer[hidden] { display: none; }
.q3 { flex: 1; display: flex; flex-direction: column; background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.q3-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.q3-head > div:first-child { display: flex; flex-direction: column; } .q3-head b { font-size: 18px; } .q3-head span { color: var(--muted); font-size: 12.5px; }
.q3-head .spacer { flex: 1; }
.q3-stage { flex: 1; position: relative; min-height: 260px; }
.q3-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.q3-stage canvas:active { cursor: grabbing; }
.q3-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.q3-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.q3-slider { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; color: var(--ink-2); flex: 1 1 280px; }
.q3-slider input { flex: 1; accent-color: var(--cyan); }
#quotes-panel { position: fixed; }
@media (max-width: 720px) { .qk-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); } .q3-layer { padding: 0; } .q3 { border-radius: 0; } .q3-help { display: none; } }
@media print { .q3-btn { display: none; } }
.qp-sum { font-size: 12.5px; line-height: 1.45; margin: 0 0 8px; }
.qp-draw .qd-legend { margin-top: 6px; font-size: 10.5px; }
.qd-print .qd-wall { fill: #ececec; } .qd-print .qd-floor { fill: #d6d6d6; } .qd-print .qd-cut { stroke: #111; } .qd-print .qd-flush { stroke: #111; stroke-dasharray: none; }
.qp-body .lg-flush { border-top-color: #111; border-top-width: 5px; } .qp-body .lg-slice { border-top-color: #333; }
html[data-theme="dark"] .qo-flushnote { background: #3a2a17; border-color: #6b4a26; }
html[data-theme="dark"] .qo-stats > div.bad { background: #461b1b; border-color: #6b2b2b; } html[data-theme="dark"] .qo-stats > div.bad b { color: #eb8484; }
html[data-theme="dark"] .qk.on { color: var(--ink); }

/* ==== Teams in horizontal lanes (24/10/2026) — one team per row, jobs run left → right ==== */
.tm-body { overflow: auto; }
.tm-lanes { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.tm-lanes.tm-lw { min-width: min-content; }
.tm-lane { display: grid; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tm-lane.tm-dy { grid-template-columns: 220px minmax(0, 1fr); }
.tm-lane.tm-wk { grid-template-columns: 170px repeat(7, minmax(165px, 1fr)); }
.tm-lh { position: sticky; left: 0; z-index: 2; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--slab); border-right: 1px solid var(--line); }
.tm-lh b { display: block; font-size: 14.5px; }
.tm-lh small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; margin-top: 2px; }
.tm-lh .tm-n { display: block; margin-top: 6px; }
.tm-strip { display: flex; gap: 10px; padding: 10px 12px; overflow-x: auto; align-items: stretch; }
.tm-strip .tm-job { flex: 0 0 250px; }
.tm-dayhead { position: sticky; top: -16px; z-index: 3; background: var(--white); }
.tm-dayhead .tm-corner { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); align-items: center; }
.tm-dh { padding: 9px 12px; font-weight: 800; font-size: 13px; border-left: 1px solid var(--line-soft); }
.tm-dh span { color: var(--muted); font-weight: 600; }
.tm-dh.today, .tm-cell.today { background: #f2f7ff; }
.tm-dh.today { color: #2f5fb3; }
.tm-cell { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-left: 1px solid var(--line-soft); min-width: 0; }
.tm-none { color: var(--line); text-align: center; padding: 10px 0; }
.tm-job { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 10px 9px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; background: var(--white); font-size: 13px; }
.tm-job.st-ok { border-left-color: #2e9e57; } .tm-job.st-go { border-left-color: #2f6fd6; } .tm-job.st-bad { border-left-color: #d0453b; }
.tm-job.st-void { border-left-color: #aaa; opacity: .7; }
.tm-job.clk { cursor: pointer; } .tm-job.clk:hover { border-color: #9db6e0; }
.tm-job.on { background: #eef4ff; border-color: #9db6e0; }
.tm-jt { display: flex; align-items: center; gap: 6px; }
.tm-jt .tm-no { white-space: nowrap; } .tm-wk .tm-job { padding: 7px 8px 8px; font-size: 12.5px; } .tm-wk .tm-jt .tm-st { font-size: 10.5px; padding: 1px 6px; }
.tm-ja { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-js { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-jb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.tm-job .tm-tot { font-size: 13px; }
@media (max-width: 760px) {
  .tm-lane.tm-dy { grid-template-columns: 1fr; }
  .tm-lane.tm-dy .tm-lh { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .tm-strip .tm-job { flex-basis: 230px; }
  .tm-lane.tm-wk { grid-template-columns: 130px repeat(7, 170px); }
}
html[data-theme="dark"] .tm-dh.today, html[data-theme="dark"] .tm-cell.today { background: #18222f; }
html[data-theme="dark"] .tm-dh.today { color: #9cbcf2; }
html[data-theme="dark"] .tm-job.on { background: #1b2a46; border-color: #3a5a8a; }
html[data-theme="dark"] .tm-job.clk:hover { border-color: #3a5a8a; }

/* ==== Teams: fold-up lanes + totals (24/10/2026) ==== */
.tm-sum { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 2px 2px 12px; font-size: 13px; color: var(--ink-2); }
.tm-big { display: inline-flex; flex-direction: column; line-height: 1.15; }
.tm-big i { font-style: normal; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tm-big b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-big b small { font-size: 11px; color: var(--muted); font-weight: 600; }
.tm-big b.g { color: var(--s-done); } .tm-big b.o { color: #d9730d; }
.tm-lh[data-tmfold] { cursor: pointer; user-select: none; }
.tm-lh[data-tmfold]:hover { background: #ebece8; }
.tm-who { flex: 1; min-width: 0; }
.tm-chev { color: var(--muted); font-size: 13px; margin-left: auto; padding-top: 1px; }
.tm-money { display: flex; gap: 14px; margin-top: 7px; }
.tm-money span { display: inline-flex; flex-direction: column; line-height: 1.15; }
.tm-money i { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tm-money span:first-child { font-weight: 800; color: var(--s-done); font-variant-numeric: tabular-nums; }
.tm-money span small { color: var(--muted); font-weight: 600; font-size: 11px; }
.tm-cost { font-weight: 800; color: #d9730d; font-variant-numeric: tabular-nums; }
.tm-cost.with, .tm-cost.none, .tm-cost.miss { color: var(--muted); font-weight: 600; font-size: 12px; }
.tm-lane.shut .tm-lh { border-right-color: var(--line-soft); }
.tm-shut { align-items: center; cursor: pointer; gap: 12px; }
.tm-shut:hover { background: var(--slab); }
.tm-hint { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.tm-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--slab); border: 1px solid var(--line-soft); border-left: 3px solid var(--line); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.tm-pill.st-ok { border-left-color: #2e9e57; } .tm-pill.st-go { border-left-color: #2f6fd6; } .tm-pill.st-bad { border-left-color: #d0453b; } .tm-pill.st-void { text-decoration: line-through; color: var(--muted); }
.tm-lane.shut .tm-cell { cursor: pointer; gap: 4px; padding: 10px; }
.tm-lane.shut .tm-cell:hover { background: var(--slab); }
.tm-cnt { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tm-cm { font-size: 13px; font-weight: 800; color: var(--s-done); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .tm-lh[data-tmfold]:hover { background: #262b31; }
html[data-theme="dark"] .tm-big b.o, html[data-theme="dark"] .tm-cost { color: #ffa65c; }
html[data-theme="dark"] .tm-cost.with, html[data-theme="dark"] .tm-cost.none, html[data-theme="dark"] .tm-cost.miss { color: var(--muted); }
.tm-money span, .tm-big b { white-space: nowrap; }
.tm-lane.tm-dy.shut { grid-template-columns: 460px minmax(0, 1fr); }
.tm-lane.tm-dy.shut .tm-lh { align-items: center; padding: 9px 14px; }
.tm-lane.tm-dy.shut .tm-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.tm-lane.tm-dy.shut .tm-who small, .tm-lane.tm-dy.shut .tm-who .tm-n { margin: 0; display: inline; }
.tm-lane.tm-dy.shut .tm-money { margin: 0 0 0 auto; }
.tm-lane.tm-dy.shut .tm-strip { padding: 8px 12px; }
@media (max-width: 760px) { .tm-lane.tm-dy.shut { grid-template-columns: 1fr; } }
.tm-money b.tm-v { font-weight: 800; white-space: nowrap; }
.tm-lh .tm-money small { display: inline; margin: 0; }
/* Teams compact (24/10/2026, Mate): one line per job — client, amount, invoiced dot; totals stay in the operator box */
.tm-lane.tm-wk { grid-template-columns: 196px repeat(7, minmax(160px, 1fr)); }
.tm-lane.tm-dy, .tm-lane.tm-dy.shut { grid-template-columns: 250px minmax(0, 1fr); }
.tm-lh, .tm-lane.tm-dy.shut .tm-lh { padding: 9px 12px; gap: 8px; align-items: flex-start; min-width: 0; }
.tm-lane.tm-dy.shut .tm-who { display: block; }
.tm-who { min-width: 0; }
.tm-nm { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.tm-nm b { display: inline; font-size: 14px; white-space: nowrap; }
.tm-lh .tm-nm small, .tm-lane.tm-dy.shut .tm-who small { display: inline; margin: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tm-nm .tm-chev { margin-left: auto; padding: 0; font-size: 11px; }
.tm-lh .tm-n, .tm-lane.tm-dy.shut .tm-who .tm-n { display: block; margin: 2px 0 0; font-size: 11.5px; white-space: nowrap; }
.tm-money, .tm-lane.tm-dy.shut .tm-money { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 5px 0 0; }
.tm-money > span { display: contents; }
.tm-money i { align-self: center; font-size: 9.5px; }
.tm-money b.tm-v, .tm-money .tm-cost { font-size: 13px; text-align: right; white-space: nowrap; }
.tm-lane.shut .tm-cell { padding: 6px; gap: 2px; }
.tm-line { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 1.25; min-width: 0; border-left: 3px solid transparent; }
.tm-line.st-bad { border-left-color: #d0453b; } .tm-line.st-go { border-left-color: #2f6fd6; } .tm-line.st-void { text-decoration: line-through; color: var(--muted); }
.tm-line.clk { cursor: pointer; } .tm-line.clk:hover { background: #e9f0fb; }
.tm-cl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tm-am { font-weight: 800; color: var(--s-done); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tm-dot.inv { background: #2e9e57; } .tm-dot.draft { background: #f0a020; }
.tm-dot.not { background: transparent; border: 2px solid #d0453b; width: 9px; height: 9px; box-sizing: border-box; }
.tm-dot.nod { background: var(--line); }
.tm-shut { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; align-content: center; }
.tm-shut .tm-line { flex: 0 1 auto; max-width: 280px; }
.tm-legend { display: inline-flex; gap: 12px; font-size: 11.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.tm-legend > span { display: inline-flex; align-items: center; gap: 5px; }
/* open cards: smaller */
.tm-job { padding: 6px 8px 7px; gap: 2px; font-size: 12px; border-radius: 8px; }
.tm-strip .tm-job { flex-basis: 210px; }
.tm-job .tm-ja { font-size: 12.5px; -webkit-line-clamp: 1; }
.tm-job .tm-jt .tm-st { font-size: 10.5px; padding: 1px 6px; }
.tm-job .tm-tot { font-size: 12.5px; }
html[data-theme="dark"] .tm-line.clk:hover { background: #22324a; }
.tm-money .tm-cost { display: block; }
.tm-money { gap: 0 8px; margin-top: 4px; }
.tm-lh .tm-n { margin-top: 1px; }

/* Invoice colours (24/10/2026, Mate): Invoiced = blue, Draft = yellow, Not invoiced = red, Cash = orange */
.tm-dot.inv { background: #2f6fd6; } .tm-dot.draft { background: #f2c200; } .tm-dot.cash { background: #f07a10; }
.inv-mark.done { background: #e4eeff; color: #2457b3; }
.inv-mark.draft { background: #fff6c7; color: #8a6d00; }
.inv-mark.cash { background: #ffe9d6; color: #b4530a; }
.inv-mark.priced { background: #eef0f3; color: #4a5568; }
.inv-no.done { color: #2457b3; } .inv-no.draft { color: #a07f00; }
.cash-btn { border-color: #f0a060; color: #b4530a; }
.cash-btn:hover { background: #fff3e8; }
.cash-btn.on { background: #f07a10; border-color: #f07a10; color: #fff; }
html[data-theme="dark"] .inv-mark.done { background: #1a2b45; color: #9cbcf2; }
html[data-theme="dark"] .inv-mark.draft { background: #3d3512; color: #ffe37a; }
html[data-theme="dark"] .inv-mark.cash { background: #3d2512; color: #ffb070; }
html[data-theme="dark"] .inv-mark.priced { background: #2a2f36; color: #b8c0cc; }
html[data-theme="dark"] .inv-no.done { color: #9cbcf2; } html[data-theme="dark"] .inv-no.draft { color: #ffe37a; }

/* Delete job (24/10/2026) */
.del-job { border-top: 1px dashed var(--line); padding-top: 12px; }
.del-btn { border-color: #e3a19b; color: #b3261e; background: transparent; }
.del-btn:hover { background: #fdecea; }
.del-btn.go:not(:disabled) { background: #b3261e; border-color: #b3261e; color: #fff; }
.del-btn:disabled { opacity: .5; cursor: default; }
.del-ask { border: 1px solid #f0c2bd; background: #fff6f5; border-radius: 12px; padding: 12px 14px; }
.del-ask p { margin: 4px 0 10px; color: var(--ink-2); font-size: 13px; }
.del-ask label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.del-ask input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; max-width: 220px; }
.del-ask code { background: #fde3e0; padding: 0 5px; border-radius: 4px; }
html[data-theme="dark"] .del-ask { background: #2e1c1a; border-color: #5a2b26; }
html[data-theme="dark"] .del-ask code { background: #4a2420; }

/* week columns follow the days shown (Sunday drops out when nobody worked) — 24/10/2026 */
.tm-lane.tm-wk { grid-template-columns: 196px repeat(var(--tm-days, 7), minmax(160px, 1fr)); }
@media (max-width: 760px) { .tm-lane.tm-wk { grid-template-columns: 130px repeat(var(--tm-days, 7), 170px); } }

/* Cash on a job with no docket (24/10/2026) */
.job-cash .jc-on { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.job-cash .jc-on b { font-size: 17px; font-variant-numeric: tabular-nums; }
.jc-form { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.jc-dollar { font-weight: 800; color: var(--muted); }
.jc-form input { width: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-variant-numeric: tabular-nums; }

.tm-del { border: 0; background: transparent; cursor: pointer; font-size: 12px; padding: 0 2px; opacity: .45; line-height: 1; }
.tm-del:hover { opacity: 1; }
.del-btn.go:disabled { background: #f3d4d1; border-color: #f3d4d1; color: #b3261e; opacity: .7; }
/* Docket footer (24/10/2026): buttons wrap onto a second line instead of Adjust being cut off */
.sh-foot { flex-wrap: wrap; row-gap: 8px; }
.sh-foot .btn { flex: 0 0 auto; white-space: nowrap; }
.sh-foot .spacer { flex: 1 1 0; min-width: 0; }

/* Quotes: scope of work as numbered steps + "How the weight is worked out" (24/10/2026) */
.qo-sum, .qp-sum { white-space: pre-line; }
.qw { margin-top: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--white); padding: 10px 12px; }
.qw-h { font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.qw ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qw li b { font-size: 12.5px; }
.qw-math { font-variant-numeric: tabular-nums; font-size: 13.5px; margin: 2px 0 1px; padding: 6px 9px; background: var(--slab); border-radius: 7px; }
.qw-math b { font-size: 13.5px; }
.qw .hint { font-size: 12px; }

/* Corner cores stand out (24/10/2026) */
.qd-core { fill: #efe7ff; stroke: #6b3fd4; }
.qd-core-c { fill: #6b3fd4; }
.qd-print .qd-core { fill: #fff; stroke: #111; } .qd-print .qd-core-c { fill: #111; }
html[data-theme="dark"] .qd-core { fill: #2a2140; stroke: #a58bf0; } html[data-theme="dark"] .qd-core-c { fill: #a58bf0; }
.lg-core { border-color: #6b3fd4 !important; }

/* ==== Quotes: Crane / my own cuts (24/10/2026) ==== */
.qcr-go { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; text-align: left; border: 1.5px dashed #d98a2b; background: #fff8ef; color: #8a4b05; border-radius: 12px; padding: 9px 12px; font: inherit; cursor: pointer; }
.qcr-go span { display: flex; flex-direction: column; } .qcr-go small { color: #a5682a; font-size: 12px; }
.qcr-go:hover { background: #fff1de; }
.qcr-go.on { border-style: solid; background: #f07a10; border-color: #f07a10; color: #fff; } .qcr-go.on small { color: #ffe7d1; }
.qcr { margin-top: 10px; border: 1px solid #f3c99b; background: #fffaf3; border-radius: 12px; padding: 10px 12px; display: grid; gap: 9px; }
.qcr .qo-line { margin: 0; }
.qcr-cap button { font-size: 12.5px; }
.qcr-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qcr-tools .lbl { width: 100%; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qcr-tools button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.qcr-tools button.on { border-color: #f07a10; background: #f07a10; color: #fff; }
.qcr-ix, .qcr-iy, .qcr-ic { display: inline-block; flex: none; }
.qcr-ix { width: 3px; height: 14px; background: #d9480f; border-radius: 2px; }
.qcr-iy { width: 14px; height: 3px; background: #d9480f; border-radius: 2px; }
.qcr-ic { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid #6b3fd4; }
.qcr-tools button.on .qcr-ix, .qcr-tools button.on .qcr-iy { background: #fff; } .qcr-tools button.on .qcr-ic { border-color: #fff; }
.qcr-quick { display: flex; flex-wrap: wrap; gap: 6px; } .qcr-quick .btn { padding: 6px 10px; font-size: 12.5px; }
.qcr-list { display: flex; flex-wrap: wrap; gap: 6px; }
.qcr-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 3px 4px 3px 9px; font-size: 12.5px; }
.qcr-pill input.tiny { width: 58px; padding: 3px 5px; text-align: right; font-variant-numeric: tabular-nums; }
.qcr-pill em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.qcr-pill .pc-x { width: 22px; height: 22px; font-size: 14px; }
.qcr-none { margin: 0; }
/* the drawing in crane mode */
svg.qd-edit { cursor: crosshair; touch-action: none; user-select: none; }
.qd-hand { fill: #dff3e5; } .qd-crane { fill: #ffe6c7; } .qd-over { fill: #ffd2cc; }
.qd-pn { font-weight: 800; fill: var(--ink); } .qd-pk { fill: #8a4b05; font-weight: 700; }
.qd-ccut { stroke: #d9480f; }
.qd-hit { stroke: transparent; fill: transparent; }
.qd-grab { cursor: grab; } .qd-grab:active { cursor: grabbing; }
.qd-knob { fill: #d9480f; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.qd-kl { fill: #d9480f; font-weight: 800; }
.qd-grab:hover .qd-ccut { stroke: #f07a10; }
/* pieces table */
.qcr-pcs { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.qcr-pcs th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.qcr-pcs td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.qcr-pcs .r { text-align: right; } .qcr-pcs tr.tot td { border-bottom: 0; font-weight: 700; }
.qcr-b { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.qcr-b.qcr-hand { background: #dff3e5; color: #1d6b3a; } .qcr-b.qcr-crane { background: #ffe6c7; color: #8a4b05; } .qcr-b.qcr-over { background: #ffd2cc; color: #b3261e; }
.qd-print .qd-hand, .qd-print .qd-crane, .qd-print .qd-over { fill: #fff; } .qd-print .qd-pk { fill: #111; }
html[data-theme="dark"] .qcr, html[data-theme="dark"] .qcr-go:not(.on) { background: #2a2016; border-color: #6b4a22; color: #ffc48a; }
html[data-theme="dark"] .qd-hand { fill: #1d3a28; } html[data-theme="dark"] .qd-crane { fill: #4a3218; } html[data-theme="dark"] .qd-over { fill: #4a2220; }
html[data-theme="dark"] .qd-pk { fill: #ffc48a; }
.lg-hand, .lg-crane, .lg-over { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.lg-hand { background: #dff3e5; } .lg-crane { background: #ffe6c7; } .lg-over { background: #ffd2cc; }

/* 3D: pieces list beside the model + Play (24/10/2026) */
.q3-main { flex: 1; display: flex; min-height: 0; }
.q3-main .q3-stage { flex: 1; }
.q3-side { width: 270px; border-left: 1px solid var(--line); overflow-y: auto; background: var(--white); }
.q3-sh { position: sticky; top: 0; background: var(--white); padding: 10px 12px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.q3-sh span { color: var(--muted); font-size: 12px; }
.q3-side ol { list-style: none; margin: 0; padding: 4px 0; }
.q3-side li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 6px 12px; font-size: 12.5px; cursor: default; border-bottom: 1px solid var(--line-soft); }
.q3-side li b { grid-row: 1 / 3; font-size: 15px; align-self: center; }
.q3-side li em { font-style: normal; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.q3-side li .qcr-b { grid-column: 3; justify-self: end; font-style: normal; font-size: 10.5px; }
.q3-side li span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.q3-side li.on { background: #efe7ff; }
.q3-play { min-width: 92px; }
@media (max-width: 720px) { .q3-main { flex-direction: column; } .q3-side { width: auto; max-height: 30vh; border-left: 0; border-top: 1px solid var(--line); } }

/* Planter: the walls laid out (24/10/2026) */
.qd-walls { margin-top: 8px; }
.qd-fill2 { fill: color-mix(in srgb, var(--cyan) 18%, var(--white)); }
.qd-print .qd-fill2 { fill: #e6e6e6; }
html[data-theme="dark"] .qd-fill2 { fill: color-mix(in srgb, var(--cyan) 22%, var(--white)); }
.qo-sub { margin-left: 26px; }
.q3-wall { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--muted); }

/* a size box still to fill (24/10/2026) */

.qo-miss > span { color: #c0392b; font-weight: 800; }
.qo-need { margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; background: #fff1e6; color: #a04a00; font-weight: 700; font-size: 13.5px; border: 1px solid #f6c79c; }
.qo-size.qo-miss .qo-mm input { border-color: #e0574b !important; box-shadow: 0 0 0 3px #fde3e0 !important; background: #fff8f7; }
.field.qo-size.qo-miss > span { color: #c0392b !important; font-weight: 800; }
.qo-size.qo-miss .qo-mm { box-shadow: none; }

/* Crew board switched off for this person in Staff (25/10/2026): board hidden, TO DO takes the full width */
body.no-board .main { grid-template-columns: 1fr; }
body.no-board .main > section { display: none; }
body.no-board #todo-toggle, body.no-board #todo-rail { display: none; }

/* Storage gauge (25/10/2026) — js/storage.js */
.storage-pc { font-weight: 800; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.storage-pc:empty { display: none; }
.storage-btn[data-lvl="amber"] .storage-pc { background: #ffe8cc; color: #b35000; }
.storage-btn[data-lvl="red"] .storage-pc { background: #ffe3e3; color: #b3261e; }
.sg-body { max-width: 900px; }
.sg-tell { padding: 12px 14px; border-radius: 12px; margin: 4px 0 16px; font-size: 14px; border: 1px solid var(--line); background: var(--white); }
.sg-tell.green { border-color: #b2f2bb; background: #ebfbee; }
.sg-tell.amber { border-color: #ffd8a8; background: #fff4e6; }
.sg-tell.red { border-color: #ffc9c9; background: #fff5f5; }
.sg-bar { margin: 0 0 14px; }
.sg-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.sg-track { position: relative; height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sg-track span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #2f9e44; }
.sg-bar.amber .sg-track span { background: #e8590c; }
.sg-bar.red .sg-track span { background: #c92a2a; }
.sg-track i { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,.25); }
.sg-key { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.sg-dot.green { background: #2f9e44; } .sg-dot.amber { background: #e8590c; } .sg-dot.red { background: #c92a2a; }
.sg-table td.r, .sg-table th.r { text-align: right; }
.sg-table td.c, .sg-table th.c { text-align: center; width: 36px; }
.sg-go { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.sg-go .spacer { flex: 1; }
.bk-h.bad { color: #b3261e; }
.sg-foot { margin-top: 18px; }
html[data-theme="dark"] .sg-tell.green { background: #12301b; border-color: #2b5a37; }
html[data-theme="dark"] .sg-tell.amber { background: #3a2410; border-color: #6b4317; }
html[data-theme="dark"] .sg-tell.red { background: #3a1416; border-color: #6b2a2e; }

/* ── Quotes changes 25/10/2026 (Mate): client form at save, client strip, collapsible description, Clear ── */
.qt-client-in { display: flex; gap: 14px 28px; align-items: flex-start; flex-wrap: wrap; }
.qt-client-in > div { display: flex; flex-direction: column; gap: 2px; min-width: 180px; flex: 1; font-size: 13px; }
.qt-client-in .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; }
.qt-client-in b { font-size: 14px; }
.qt-client-in span:not(.lbl) { color: var(--ink-2); }
.qt-ask-layer { position: absolute; inset: 0; z-index: 9; background: rgba(29,35,42,.45); display: flex; align-items: center; justify-content: center; padding: 14px; }
.qt-ask { background: var(--white); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); width: min(680px, 100%); max-height: 100%; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.qt-ask header { display: flex; align-items: center; gap: 10px; }
.qt-ask header h3 { margin: 0; font-size: 16px; flex: 1; }
.qt-est { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--slab); }
.qt-ask-tot { margin: 0; font-size: 14px; }
.qt-ask-btns { display: flex; justify-content: flex-end; gap: 8px; }
.qt-esthint { margin: 2px 0 4px; font-size: 12px; }
.qo-clear { padding: 4px 12px; font-size: 12.5px; }
.qo-sumd > summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: 13px; padding: 4px 0; }
.qo-sumd[open] > summary { margin-bottom: 6px; }
@media (max-width: 720px) { .qt-ask-layer { padding: 0; align-items: stretch; } .qt-ask { border-radius: 0; } }

/* ── Stitch drilling (26/10/2026, Mate) ── */
.qd-hole { fill: color-mix(in srgb, #6b3fd4 22%, var(--white)); stroke: #6b3fd4; }
.qd-line { stroke: #ec7a12; }
.qd-print .qd-hole { fill: #e6e6e6; stroke: #111; } .qd-print .qd-line { stroke: #111; }
.lg-line, .lg-hole, .lg-plug { display: inline-block; flex: none; vertical-align: middle; margin-right: 6px; }
.lg-line { width: 18px; height: 0; border-top: 3px dashed #ec7a12; }
.lg-hole { width: 11px; height: 11px; border: 2px solid #6b3fd4; border-radius: 50%; background: color-mix(in srgb, #6b3fd4 22%, var(--white)); }
.lg-plug { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, var(--cyan) 9%, var(--white)); border: 1px solid var(--line); }
.qst th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); }
.qst th.r, .qst td.r { text-align: right; padding-right: 10px; }
.qst tbody tr { cursor: pointer; }
.qst tbody tr:hover td { background: var(--slab); }
.qst tbody tr.on td { background: color-mix(in srgb, #6b3fd4 12%, var(--white)); color: var(--ink); font-weight: 700; }
.qd-hole2 { fill: color-mix(in srgb, #6b3fd4 45%, var(--white)); }
.qd-print .qd-hole2 { fill: #bdbdbd; }
.lg-hole2 { background: color-mix(in srgb, #6b3fd4 45%, var(--white)); }
.qso { border: 1px solid var(--line); border-left: 4px solid #6b3fd4; border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: var(--white); font-size: 13px; }
.qso-h { font-weight: 800; margin-bottom: 4px; }
.qso ol { margin: 0; padding-left: 18px; } .qso li { margin: 2px 0; }
.qso-t { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.qso-t th, .qso-t td { padding: 2px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; } .qso-t .r { text-align: right; }
.qd-gap { fill: rgba(220, 38, 38, .18); stroke: #dc2626; }
.lg-gap { display: inline-block; width: 11px; height: 11px; border: 2px solid #dc2626; border-radius: 50%; background: rgba(220,38,38,.18); vertical-align: middle; margin-right: 6px; }
.qsc .qcr-pill b { min-width: 16px; display: inline-block; }
.qd-edit .qd-line, .qd-edit text, .qd-edit .qd-gap, .qd-edit .qd-cut, .qd-edit .qd-fill { pointer-events: none; }
.qd-edit [data-shole] { cursor: grab; }

/* 27/10/2026 (Mate): Quotes → Slab → Trench, any shape (drawn on a grid, then every leg's length typed) */
.qd-trench.qd-edit { max-height: 460px; }
.qd-grid { stroke: color-mix(in srgb, var(--ink) 9%, transparent); }
.qd-grid2 { stroke: color-mix(in srgb, var(--ink) 17%, transparent); }
.qd-centre { stroke: var(--cyan); }
.qd-tpt { fill: var(--cyan); }
.qd-tend { fill: #ec7a12; }
.qd-tring { fill: none; stroke: #ec7a12; opacity: .55; }
.qd-halo { paint-order: stroke; stroke: color-mix(in srgb, var(--ink) 9%, var(--white)); stroke-linejoin: round; }
.qd-q { fill: #c0392b; }
.qd-edit .qd-slice, .qd-edit .qd-centre, .qd-edit polygon, .qd-edit polyline, .qd-edit circle, .qd-edit .qd-grid { pointer-events: none; }
.qtr-how b { color: var(--ink); }
.qtr-legs { display: grid; gap: 6px; margin-top: 4px; }
.qtr-hd, .qtr-leg { display: grid; grid-template-columns: 30px minmax(0, 1.25fr) minmax(0, 1fr) 30px; gap: 8px; align-items: end; }
.qtr-hd { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 0 2px; }
.qtr-hd em { font-style: normal; font-weight: 600; }
.qtr-n { width: 30px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--cyan-soft); color: #06707c; font-size: 16px; }
.qtr-leg .qo-size { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.qtr-dir { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.qtr-w .qo-mm input { font-weight: 600; }
.qtr-leg .pc-x { align-self: center; }
.qd-print .qd-grid, .qd-print .qd-tring { display: none; }
.qd-print .qd-halo { stroke: #fff; } .qd-print .qd-q { fill: #111; }
html[data-theme="dark"] .qd-halo { stroke: var(--slab); }
/* 27/10/2026: overcut — the saw runs past the line until it's at full depth */
.qd-oc { stroke: #d6336c; }
.lg-oc { display: inline-block; width: 18px; height: 0; border-top: 3px solid #d6336c; flex: none; vertical-align: middle; }
.qd-print .qd-oc { stroke: #777; } .qp-body .lg-oc { border-top-color: #777; }

/* 27/10/2026 (Mate): the A-Class logo (gold) in the top-left badge instead of the letter A */
.mark-badge.mark-logo, html[data-theme="dark"] .mark-badge.mark-logo { background: none; border-radius: 0; }   /* no square — just the logo */
.mark-logo svg { width: 34px; height: 34px; display: block; }
.mark-logo path { fill: #885b00; }
html[data-theme="dark"] .mark-logo path { fill: #d9a640; }
/* 27/10/2026 (Mate): Share with the operator — facts card on the 3D, the share button and its message */
.q3-sharebtn { right: auto; left: 8px; }
.q3-share { display: inline-flex; align-items: center; gap: 7px; background: #14181d; color: #fff; border-color: #14181d; font-weight: 800; }
.q3-share:hover { background: #262c33; }
.q3-share.busy { opacity: .7; cursor: progress; }
.q3-share.ready { background: #e8b04b; border-color: #e8b04b; color: #14181d !important; animation: q3pulse 1.4s ease-in-out 3; }
@keyframes q3pulse { 50% { box-shadow: 0 0 0 6px rgba(232, 176, 75, .35); } }
.q3-sharemsg { padding: 8px 14px; font-size: 13px; background: #fff8e8; border-bottom: 1px solid #f0dcae; color: #5b4310; }
.q3-sharemsg a { color: #8a5a00; font-weight: 700; }
.q3-sharemsg .bad { color: #c0392b; font-weight: 700; }
.q3-card { position: absolute; top: 12px; left: 12px; z-index: 2; pointer-events: none; background: rgba(20, 24, 29, .86); color: #dfe3e7; border-radius: 14px; padding: 12px 16px 12px 20px; max-width: min(78%, 420px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); border-left: 5px solid #e8b04b; }
.q3-card-big { font-size: 30px; font-weight: 800; color: #fff; line-height: 1.05; letter-spacing: -.01em; }
.q3-card-sub { font-size: 14px; font-weight: 700; color: #e8b04b; margin-top: 3px; }
.q3-card ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.q3-card li::before { content: "•  "; color: #e8b04b; }
@media (max-width: 720px) { .q3-card { transform: scale(.82); transform-origin: top left; } .q3-share span { display: none; } }
.q3-head .q3-share span { color: inherit; font-size: 13px; }

/* 📊 Excel page (27/10/2026) — js/excel.js. The sheet opens as its own full page; ← Back returns. */
.btn.xl-btn[aria-pressed="true"] { background: #1f7a45; border-color: #1f7a45; color: #fff; }
.xl-pane { display: none; }
body.xl-on { overflow: hidden; }
body.xl-on .xl-pane { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 50; background: var(--white); }
.xl-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--slab); flex-wrap: wrap; }
.xl-bar b { font-size: 17px; }
.xl-bar .spacer { flex: 1; }
.xl-back { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.xl-bar a.btn { text-decoration: none; color: inherit; }
.xl-dl { background: #1f7a45 !important; border-color: #1f7a45 !important; color: #fff !important; }
.xl-frame { flex: 1; width: 100%; border: 0; background: #fff; min-height: 0; }
.xl-tip { font-size: 11px; color: var(--muted); padding: 4px 16px; border-top: 1px solid var(--line-soft); }
.xl-setup { padding: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; overflow-y: auto; }
.xl-setup h3 { margin: 0; }
.xl-setup ol { margin: 0; padding-left: 20px; line-height: 1.6; color: var(--ink-2); }
.xl-setup input { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: inherit; }
.xl-setup .btn { align-self: flex-start; }
.xl-err { color: var(--alert); font-weight: 600; min-height: 1em; }
@media (max-width: 900px) { .xl-btn { display: none; } }
html[data-theme="dark"] .xl-pane { background: #15191e; }
.btn.xl-btn { padding: 7px 11px; font-size: 17px; line-height: 1; }

/* GPS pill, small (27/10/2026): orange = on, faded = off, hover = tracker line */
.gps-pill { position: relative; padding: 3px 9px; font-size: 11px; gap: 5px; border-color: #ec7a12; background: #ec7a12; color: #fff; }
.gps-pill .gps-dot { width: 6px; height: 6px; background: #fff !important; box-shadow: none !important; }
.gps-pill.live, .gps-pill.stale { border-color: #ec7a12; background: #ec7a12; color: #fff; }
.gps-pill.stale .gps-dot { background: #7a2e00 !important; }
.gps-pill.off { background: transparent; border-color: var(--line); color: var(--muted); opacity: .55; }
.gps-pill.off .gps-dot { background: #c9ccc6 !important; }
.gps-pill[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.4); pointer-events: none; }
html[data-theme="dark"] .gps-pill.stale { border-color: #ec7a12; background: #ec7a12; color: #fff; }
/* tracker label: always black text on white, readable in day and night mode (27/10/2026) */
.gps-pill[data-tip]:hover::after { background: #fff; color: #000; border: 1px solid #cfd2cc; }
/* Storage: Xero invoice + photos on invoice (27/10/2026) */
.sg-inv { font-weight: 700; color: var(--cyan); text-decoration: none; white-space: nowrap; }
.sg-inv:hover { text-decoration: underline; }
.sg-xs { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2); white-space: nowrap; }
.sg-xs.draft { background: #fff3bf; color: #8a6d00; }
.sg-xs.ok { background: #d0ebff; color: #1864ab; }
.sg-xs.paid { background: #d3f9d8; color: #2b8a3e; }
.sg-xs.cash { background: #ffe8cc; color: #c2410c; }
.sg-xs.bad { background: #ffe3e3; color: #c92a2a; }
.sg-pix { font-weight: 700; white-space: nowrap; }
.sg-pix.yes { color: #2f9e44; }
.sg-pix.no { color: #c92a2a; }
.sg-table tr.sg-warn td { background: #fff5f5; }
.sg-chk { font-size: 12.5px; padding: 4px 10px; margin-left: 4px; }
.sg-body { max-width: 1100px; }
html[data-theme="dark"] .sg-table tr.sg-warn td { background: #3a1f1f; }
html[data-theme="dark"] .sg-xs.draft { background: #4a3d00; color: #ffe066; }
html[data-theme="dark"] .sg-xs.ok { background: #12324d; color: #74c0fc; }
html[data-theme="dark"] .sg-xs.paid { background: #1b3b22; color: #8ce99a; }
html[data-theme="dark"] .sg-xs.cash { background: #4a2a0c; color: #ffa94d; }
html[data-theme="dark"] .sg-xs.bad { background: #4a1f1f; color: #ff8787; }
html[data-theme="dark"] .sg-pix.yes { color: #8ce99a; }
html[data-theme="dark"] .sg-pix.no { color: #ff8787; }
.sg-who b { display: block; font-weight: 700; }
.sg-addr { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
/* the Storage table keeps every column on a narrow screen (the general table hides columns 3 and 7); only Size goes */
@media (max-width: 960px) {
  .dk-table.sg-table th:nth-child(3), .dk-table.sg-table td:nth-child(3), .dk-table.sg-table th:nth-child(7), .dk-table.sg-table td:nth-child(7) { display: table-cell; }
  .dk-table.sg-table th:last-child, .dk-table.sg-table td:last-child { display: none; }
}
.sg-fromxero { color: #3bb3e6 !important; }   /* client name taken from Xero */
/* ⏸ On Hold under To send (28/10/2026) */
.hold-wrap { margin-top: 10px; }
.hold-btn { border: 1px solid #f5c08a; background: #fff4e6; color: #b45309; border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.hold-btn b { color: #000; }
.hold-btn.old { border-color: #ec7a12; background: #ec7a12; color: #fff; }
.hold-btn.old b { color: #fff; }
.hold-old { font-weight: 600; }
.hold-wrap .tray-row { margin-top: 8px; }
.flag.hold-flag { background: #fff4e6; color: #b45309; }
.flag.hold-old-flag { background: #ec7a12; color: #fff; }
html[data-theme="dark"] .hold-btn { background: #3b2a17; border-color: #6b4f2e; color: #ffbe70; }
html[data-theme="dark"] .hold-btn b { color: #fff; }
html[data-theme="dark"] .hold-btn.old { background: #ec7a12; color: #fff; }
html[data-theme="dark"] .flag.hold-flag { background: #3b2a17; color: #ffbe70; }
/* 28/10/2026 (Mate): hollow hob — the side cut (horizontal, under the top, all round) */
.qd-side { stroke: #1d232a; stroke-dasharray: none; }
.qd-tag-line { stroke: var(--muted); }
.lg-side { display: inline-block; width: 18px; height: 0; border-top: 4px double #1d232a; flex: none; vertical-align: middle; }
html[data-theme="dark"] .qd-side { stroke: #e7e9eb; } html[data-theme="dark"] .lg-side { border-top-color: #e7e9eb; }
/* Inventory 28/10/2026: van not checked yet */
.iv2-pn small.iv2-unchecked { color: #8a4b00; }

/* 29/10/2026 (Mate): Check invoices — result line + "Check these" (nearly-matching Xero invoices) on Teams */
.tm-res { margin: 10px 20px 0; padding: 10px 14px; border: 1px solid #b9dcc4; background: #eef8f1; border-radius: 10px; font-size: 13px; color: #1d4d2e; }
.tm-res-top { display: flex; align-items: center; gap: 8px; }
.tm-res-x { border: 0; background: transparent; font-size: 18px; line-height: 1; color: #1d4d2e; cursor: pointer; padding: 0 4px; }
.tm-res-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: #2c5a3c; }
.tm-poss { margin: 10px 20px 0; border: 1px solid #f0c98a; background: #fff8ec; border-radius: 10px; overflow: hidden; }
.tm-poss-h { padding: 9px 14px; font-size: 13px; color: #7a4a00; border-bottom: 1px solid #f3dcb3; }
.tm-poss-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid #f6e6c8; background: var(--white); }
.tm-poss-row:first-of-type { border-top: 0; }
.tm-poss-side { display: flex; flex-direction: column; min-width: 0; }
.tm-poss-side small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tm-poss-side b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-poss-side span { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-poss-miss { font-size: 12px; font-weight: 700; color: #9a5a00; background: #fff1d6; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tm-poss-acts { display: flex; gap: 6px; }
@media (max-width: 760px) { .tm-poss-row { grid-template-columns: 1fr; } }

/* 29/10/2026 (Mate): no-docket jobs — "+ Invoice" makes a New invoice linked to the job; invoice marks link to Xero */
.tm-plus { border: 1px dashed #2f5fb3; background: #eef4ff; color: #2f5fb3; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.tm-plus:hover { background: #2f5fb3; color: #fff; border-style: solid; }
.tm-jinv { border: 0; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tm-jinv.draft { background: #fff1d6; color: #9a5a00; }
a.inv-mark { text-decoration: none; }
html[data-theme="dark"] .tm-plus { background: #16233a; color: #9cc0ff; border-color: #5d86c9; }

/* 29/10/2026 (Mate): Paid = light green card + "Paid" */
.inv-mark.paid { background: #dff3e4; color: #17663a; }
.tm-dot.paid { background: #22a356; border-color: #22a356; }
.tm-job.paid { background: #eefaf1; border-color: #9fd9b2; }
.ticket.paid { background: #eefaf1 !important; }
.t-paid { font-size: 11px; font-weight: 800; color: #17663a; background: #dff3e4; border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.see-docket.inv-paid { background: #dff3e4; color: #17663a; }
html[data-theme="dark"] .tm-job.paid, html[data-theme="dark"] .ticket.paid { background: #13301f !important; border-color: #2c6b45; }
html[data-theme="dark"] .inv-mark.paid, html[data-theme="dark"] .t-paid, html[data-theme="dark"] .see-docket.inv-paid { background: #1d4a2e; color: #b8f0c9; }

/* 29/10/2026 (Mate): Week summary */
.ws-btn { font-weight: 800; }
.ws-body { background: var(--slab); }
.ws { max-width: 1320px; margin: 0 auto; display: grid; gap: 14px; }
.ws-top { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ws-top .ws-kpi { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ws-kpi i { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ws-kpi b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ws-kpi small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ws-kpi.made b { color: #17663a; } .ws-kpi.cost b { color: #b45309; } .ws-kpi.left b { color: #1f3f8a; } .ws-kpi.neg b { color: #b42318; }
.ws-op { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ws-oh { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-who { min-width: 180px; } .ws-who h3 { margin: 0; font-size: 17px; } .ws-who span { font-size: 12.5px; color: var(--muted); }
.ws-nums { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 4px 16px; flex: 1; }
.ws-nums .ws-kpi b { font-size: 15px; }
.ws-two { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 2fr); }
.ws-two > * { margin: 0; }
.ws-crew, .ws-jobs { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ws-crew { border-right: 1px solid var(--line-soft); }
.ws-crew th, .ws-jobs th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 800; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); background: var(--slab); }
.ws-crew td, .ws-jobs td { padding: 6px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-variant-numeric: tabular-nums; }
.ws-crew .r, .ws-jobs .r { text-align: right; white-space: nowrap; }
.ws-jobs td small, .ws-crew td small { display: block; color: var(--muted); font-size: 11px; }
.ws-jobs .ws-d { white-space: nowrap; color: var(--ink-2); } .ws-jobs .ws-a { color: var(--ink-2); }
.ws-sub td { font-weight: 800; background: var(--slab); border-bottom: 0; }
.ws-st { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ws-st.paid { background: #dff3e4; color: #17663a; } .ws-st.inv { background: #e3ecff; color: #1f4fae; } .ws-st.draft { background: #fff1d6; color: #9a5a00; }
.ws-st.cash { background: #ffe7d1; color: #b45309; } .ws-st.not { background: #fde4e1; color: #b42318; } .ws-st.nod { background: var(--slab); color: var(--muted); }
.ws-warn { color: #b42318; font-weight: 700; } .ws-pad { margin: 8px 16px; font-size: 12.5px; }
.ws-none { padding: 12px; color: var(--muted); font-size: 12.5px; border-right: 1px solid var(--line-soft); }
.ws-note { font-size: 11.5px; color: var(--muted); margin: 0 4px; }
@media (max-width: 1100px) { .ws-top { grid-template-columns: repeat(3, 1fr); } .ws-nums { grid-template-columns: repeat(4, minmax(80px, 1fr)); } .ws-two { grid-template-columns: 1fr; } .ws-crew { border-right: 0; } }
html[data-theme="dark"] .ws-kpi.made b { color: #7ee2a2; } html[data-theme="dark"] .ws-kpi.left b { color: #9cc0ff; } html[data-theme="dark"] .ws-kpi.cost b { color: #f6b26b; }
.ws-none0 { color: var(--muted); font-style: italic; }

/* 29/10/2026 (Mate): Week summary — operators fold up */
.ws-oh[data-wsfold] { cursor: pointer; user-select: none; }
.ws-oh[data-wsfold]:hover { background: var(--slab); }
.ws-op.shut .ws-oh { border-bottom: 0; }
.ws-chev { display: inline-block; width: 16px; color: var(--muted); font-size: 13px; }
.ws-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 4px; }

/* 29/10/2026 (Mate): Week summary — hours by day, changeable */
.ws-hours { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.ws-hours table { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ws-hours th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 800; padding: 4px 10px; }
.ws-hours td { padding: 3px 10px; white-space: nowrap; }
.ws-hours td:first-child { font-weight: 700; color: var(--ink-2); }
.ws-hours .r { text-align: right; }
.ws-hours .ws-sub td { background: var(--slab); font-weight: 800; }
.ws-hours small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.ws-time { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; background: var(--white); color: inherit; width: 118px; }
.ws-time:focus { outline: 2px solid #2f5fb3; outline-offset: 1px; }
.ws-set { color: #9a5a00; font-weight: 800; }
.ws-reset { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 2px; }
.ws-reset:hover { color: #b42318; }

/* 29/10/2026 (Mate): Week summary — clients open their card */
.ws-cl { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: #1f4fae; cursor: pointer; text-align: left; }
.ws-cl:hover { text-decoration: underline; }
html[data-theme="dark"] .ws-cl { color: #9cc0ff; }

/* 29/10/2026 (Mate): Week summary — six days always shown */
.ws-hours th small { display: block; font-size: 9.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--muted); }
.ws-hours th.ws-off { color: #9aa1a8; }
.ws-with { font-size: 11.5px; color: var(--muted); font-style: italic; }
.ws-focus { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; color: var(--ink-2); font-size: 13px; }

/* 01/11/2026 (Mate): Mark paid on cash jobs — green button, asked again before it's marked */
.btn.paid-btn { background: #dff3e4; color: #17663a; border-color: #9fd9b2; font-weight: 600; }
.btn.paid-btn.go { background: #22a356; color: #fff; border-color: #22a356; }
.btn.paid-btn:hover { filter: brightness(.96); }
.del-ask.pay-ask { border-color: #9fd9b2; background: #eefaf1; }
.sh-foot .pay-q { font-size: 13px; color: #17663a; margin-right: 4px; }
.job-cash .jc-on .inv-mark + .inv-mark { margin-left: -4px; }
html[data-theme="dark"] .btn.paid-btn { background: #13301f; color: #8fe0ab; border-color: #2c6b45; }
html[data-theme="dark"] .del-ask.pay-ask { background: #13301f; border-color: #2c6b45; }
html[data-theme="dark"] .sh-foot .pay-q { color: #8fe0ab; }

/* 01/11/2026 (Mate): invoice number by hand — right-click box */
.inv-ov { position: fixed; z-index: 400; width: 270px; background: var(--white); color: var(--ink); border: 1px solid var(--line, #dfe3e8); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.18); padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.inv-ov .iov-h { font-size: 14px; }
.inv-ov label { display: grid; gap: 3px; }
.inv-ov label > span { font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7280); }
.inv-ov input, .inv-ov select { font: inherit; padding: 7px 9px; border: 1px solid var(--line, #dfe3e8); border-radius: 9px; background: var(--white); color: var(--ink); }
.inv-ov #iov-no { font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.inv-ov .iov-st { display: flex; gap: 6px; }
.inv-ov .iov-s { flex: 1; border: 1px solid var(--line, #dfe3e8); background: transparent; border-radius: 999px; padding: 5px 0; font: 600 12px var(--font); cursor: pointer; color: var(--ink); }
.inv-ov .iov-s.invoiced.on { background: #e4eeff; color: #2457b3; border-color: #9fbbe8; }
.inv-ov .iov-s.draft.on { background: #fff4e3; color: #9a5400; border-color: #e8a33b; }
.inv-ov .iov-s.paid.on { background: #dff3e4; color: #17663a; border-color: #9fd9b2; }
.inv-ov .hint { margin: 0; font-size: 11.5px; }
.inv-ov .iov-acts { display: flex; gap: 6px; align-items: center; }
.inv-ov .iov-rm { color: #b3261e; }
html[data-theme="dark"] .inv-ov { box-shadow: 0 14px 40px rgba(0,0,0,.5); }

/* 02/11/2026 (Mate): ✓ under the bin on Teams cards = fully invoiced; card notes (a bit shows, hover = full note) */
.tm-job { position: relative; }
.tm-ok { position: absolute; right: 8px; top: 28px; width: 18px; height: 18px; border-radius: 50%; background: #1f8a4c; color: #fff; font-size: 11px; font-weight: 900; line-height: 18px; text-align: center; pointer-events: none; }
.tm-job.inv-ok .tm-ja, .tm-job.inv-ok .tm-js { padding-right: 22px; }
.t-note, .tm-note { font-size: 11.5px; color: #6b5300; background: #fff8dc; border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; cursor: help; }
.ticket .t-note { flex: none; margin-top: 2px; }
html[data-theme="dark"] .t-note, html[data-theme="dark"] .tm-note { background: #3a3215; color: #f3dc8a; }
html[data-theme="dark"] .tm-ok { background: #2fa565; }
.inv-ov textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line, #dfe3e8); border-radius: 9px; background: var(--white); color: var(--ink); resize: vertical; min-height: 56px; }
.ticket:has(> .t-note) { height: 142px; }

/* 02/11/2026 (Mate): right-click Cash; rename client on the job card */
.inv-ov.is-cash .iov-noinv { display: none; }
.d-rename { border: 0; background: transparent; cursor: pointer; font-size: 16px; opacity: .45; vertical-align: middle; padding: 0 4px; }
.d-rename:hover { opacity: 1; }
.d-ren { display: flex; gap: 6px; align-items: center; }
.d-ren input { flex: 1; min-width: 0; font: 700 18px var(--font); padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); }

.tm-addcl, .t-addcl { display: inline-block; border: 1px dashed #c9a227; background: #fffbea; color: #7a5d00; border-radius: 999px; padding: 1px 9px; font: 700 11.5px var(--font); cursor: pointer; margin: 2px 0; }
.tm-addcl:hover, .t-addcl:hover { background: #fff3c4; }
html[data-theme="dark"] .tm-addcl, html[data-theme="dark"] .t-addcl { background: #3a3215; color: #f3dc8a; border-color: #8a7420; }

/* 04/11/2026 (Mate): 📌 Freeze operators — the operator column stays on the left while the days / cards scroll.
   overflow:hidden on a lane stopped the sticky column; clip keeps the round corners without that. */
.tm-body.tm-frz .tm-lane { overflow: visible; overflow: clip; }
.tm-body.tm-frz .tm-lh { position: sticky; left: -20px; /* the body has 20px side padding — pin to the real edge */ z-index: 2; box-shadow: 4px 0 6px -4px rgba(0,0,0,.18); }
.tm-body.tm-frz .tm-dayhead { z-index: 4; }
.tm-body.tm-frz .tm-dayhead .tm-corner { z-index: 5; }
.tm-body:not(.tm-frz) .tm-lh { position: static; }
@media (max-width: 760px) {
  .tm-body.tm-frz .tm-lane.tm-dy, .tm-body.tm-frz .tm-lane.tm-dy.shut { grid-template-columns: 130px minmax(0, 1fr); }
  .tm-body.tm-frz .tm-lane.tm-dy .tm-lh { border-right: 1px solid var(--line); border-bottom: 0; }
  .tm-body.tm-frz .tm-lane.tm-dy .tm-money { grid-template-columns: 1fr; }
}
html[data-theme="dark"] .tm-body.tm-frz .tm-lh { box-shadow: 4px 0 6px -4px rgba(0,0,0,.5); }

/* 04/11/2026 (Mate): ⧉ next to the address on the work card — one click copies it */
.d-copy { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-2); opacity: .55; vertical-align: middle; padding: 2px 4px; border-radius: 6px; }
.d-copy:hover { opacity: 1; background: var(--slab); }

/* 04/11/2026 (Mate): whichever of the docket sheet / client card was opened last sits on top */
.drawer.on.top, .sheet.on.top { z-index: 44; }

/* ── Search → every visit (07/11/2026, Mate) ── all the cards for a client / address, every day */
.hist { background: var(--slab); border: 1px solid var(--line); border-left: 6px solid var(--cyan); border-radius: var(--radius-lg); padding: 12px; margin-bottom: 18px; }
.hist[hidden] { display: none; }
.hist-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 6px; }
.hist-head h2 { margin: 0; font-size: 18px; font-weight: 800; font-stretch: 78%; }
.hist-head .count { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-head .spacer { flex: 1; }
.hist-sum { margin: 0 2px 10px; color: var(--ink-2); font-size: 13.5px; }
.hist-sum b { color: var(--ink); }
.hist-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.hchip { border: 1px solid var(--line); background: var(--white); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; font: 600 12.5px var(--font); cursor: pointer; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hchip.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.hist-grid .skeleton { height: 118px; }
.hist-empty { color: var(--muted); padding: 6px 4px; }
.hcard { position: relative; cursor: pointer; background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px 9px 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; min-width: 0; }
.hcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--st, var(--s-done)); }
.hcard:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.hcard.paid { background: #eefaf1; }
.hcard.h-todo { border-style: dashed; }
.h-top { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.h-top b { font-weight: 800; }
.h-st { font-weight: 700; color: var(--st); white-space: nowrap; font-size: 11.5px; }
.h-work { color: var(--ink-2); font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; }
.h-foot .spacer { flex: 1; }
.h-op { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.h-noinv { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #fde2df; color: #b42318; white-space: nowrap; }
.h-shared { color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.h-top .h-shared { margin-left: auto; }
html[data-theme="dark"] .hcard.paid { background: #13301f; border-color: #2c6b45; }
html[data-theme="dark"] .h-noinv { background: #4a1d1a; color: #ffb4ab; }

/* ── ⧉ Combine visits into one docket (07/11/2026, Mate) ── */
.h-tick { width: 16px; height: 16px; margin: 0 2px 0 0; accent-color: var(--cyan); cursor: pointer; flex: none; }
.hcard.ticked { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset, var(--shadow); }
.btn.hcomb { font-weight: 700; } .btn.hcomb:not(:disabled) { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn.hcomb:disabled { opacity: .55; cursor: not-allowed; }
.cb-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(20,24,28,.45); display: none; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow-y: auto; }
.cb-wrap.on { display: flex; }
.cb-box { background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-lg); width: min(720px, 100%); padding: 14px 16px 16px; box-shadow: var(--shadow); }
.cb-h { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.cb-h b { font-size: 18px; } .cb-h .mut { color: var(--ink-2); font-size: 13px; }
.cb-sum { margin: 8px 0; color: var(--ink-2); }
.cb-list { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--white); max-height: 280px; overflow-y: auto; }
.cb-list li { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.cb-list li:first-child { border-top: 0; }
.cb-list .mut { color: var(--muted); }
.cb-w { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-a { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.cb-lbl { width: 170px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.cb-x { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cb-x h4 { margin: 4px 0 8px; }
.cb-x .warn-line.ok { color: #17663a; }
@media (max-width: 560px) { .cb-lbl { width: 100%; } }
/* ✎ Adjust + 💵 Cash on the combined docket (07/11/2026) */
.cb-ed { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cbe-v { background: var(--white); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; }
.cbe-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.cbe-h .spacer { flex: 1; } .cbe-h .mut { color: var(--muted); font-weight: 500; }
.cbe-vt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cbe-ls { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cbe-l { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto; gap: 8px; align-items: center; }
.cbe-l textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; resize: vertical; background: var(--white); color: var(--ink); }
.cbe-d { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbe-tag { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-right: 6px; }
.cbe-tag.on { color: #fff; background: var(--cyan); border-color: var(--cyan); }
.cbe-l .money-in.small input { padding: 6px 4px; font-size: 13px; }
.cbe-btns { display: flex; gap: 4px; } .btn.sm { padding: 4px 9px; font-size: 12px; }
.cbe-l small.adj { color: #2b9fd9; font-weight: 700; }
.cbe-add { display: flex; gap: 6px; }
.cbe-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--slab); padding: 8px 0 2px; }
.cbe-foot .spacer { flex: 1; }
.cb-ow { position: fixed !important; z-index: 70 !important; }
.cb-cash .chk { margin-right: 6px; }
.cb-ask { font-weight: 700; }
@media (max-width: 560px) { .cbe-l { grid-template-columns: minmax(0, 1fr) 96px; } .cbe-l small.adj, .cbe-btns { grid-column: 1 / -1; } }
/* ⧉ Combined docket = a normal docket card (07/11/2026, later) */
.cb-scrim { z-index: 46 !important; }
.sheet.cb-sheet { z-index: 47; width: min(860px, calc(100vw - 20px)); }
.cb-sheet .sh-head .row .d-close { position: static; }
.cb-day { margin-bottom: 14px; }
.cb-day > h4 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 2px; padding: 6px 0 4px; border-bottom: 2px solid var(--ink); color: var(--ink); font-size: 14px; }
.cb-day > h4 b { font-weight: 800; }
.cb-day > h4 span { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.cb-day > h4 .cb-dt { margin-left: auto; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.cb-day .dk-lines > li.cb-off .dk-price { color: var(--muted); font-style: italic; }
.cb-note { margin-top: 6px; font-size: 13px; }
.cb-estl { display: flex; align-items: center; gap: 6px; padding: 9px 0; }
.cb-vlist { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.cb-vlist li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: var(--ink-2); }
.cb-sheet .dk-edit .cb-day .dk-opts { margin-top: 8px; }
.cb-sheet .ao-add { display: flex; flex-wrap: wrap; gap: 4px; }
.cb-sheet .dk-price .ao-note { display: block; text-align: right; }
/* Teams: the two Not invoiced switches under each other (08/11/2026) */
.tm-ni-stack { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* 09/11/2026 — combined docket → View (dummy invoice: Qty × Unit price, move / merge / remove lines) */
.vw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.vw-bar .spacer { flex: 1; }
.vw-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.vw-row { display: grid; grid-template-columns: 78px minmax(0,1fr) 26px; gap: 8px; align-items: start; padding: 10px 8px; border-top: 1px solid var(--line-soft); background: #fff; }
.vw-row:first-child { border-top: 0; }
.vw-row.on { background: #fffbe6; }
.vw-row.vw-head { background: var(--slab); }
.vw-row.vw-dragging { opacity: .45; }
.vw-row.vw-before { box-shadow: inset 0 3px 0 #111; }
.vw-row.vw-after { box-shadow: inset 0 -3px 0 #111; }
.vw-grip { display: flex; align-items: center; gap: 4px; padding-top: 4px; }
.vw-grip input { width: 16px; height: 16px; margin: 0; }
.vw-ck { width: 16px; }
.vw-h { cursor: grab; user-select: none; font-size: 16px; color: var(--muted); padding: 0 2px; }
.vw-h:active { cursor: grabbing; }
.vw-ud { display: flex; flex-direction: column; gap: 2px; }
.vw-ud button { border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 11px; line-height: 1; padding: 2px 5px; cursor: pointer; }
.vw-ud button:disabled { opacity: .35; cursor: default; }
.vw-main { min-width: 0; }
.vw-main textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 13px; line-height: 1.35; resize: vertical; }
.vw-head textarea { font-weight: 700; }
.vw-calc { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; margin-top: 6px; }
.vw-calc label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; }
.vw-q { width: 70px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px; font: inherit; font-weight: 700; text-align: center; color: var(--ink, #111); }
.vw-u { width: 130px; } .vw-u input { padding: 7px 4px; color: var(--ink, #111); }
.vw-op { color: var(--muted); font-weight: 700; padding-bottom: 8px; }
.vw-amt { margin-left: auto; padding-bottom: 8px; white-space: nowrap; font-size: 15px; }
.vw-txt { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.vw-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 0; }
.vw-x:hover { color: #c0392b; }
.vw-empty { padding: 14px; color: var(--muted); }
.vw-tot .chg { color: #b45309; }
.vw-tot .hint { margin: 6px 0 0; font-size: 11px; }
.xlines .vw-qx { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.tm-ni-pause { display: block; font-size: 11px; color: #b45309; font-weight: 600; margin-top: 2px; }

/* 09/11/2026 — how the price was worked out (same as the Invoice app: numbers only, orange outline, total in bold) */
.pw { display: inline-block; margin-top: 6px; padding: 4px 9px; border: 1px solid rgba(245,158,11,.6); border-radius: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pw .pw-tot { font-weight: 700; }
.dk-ewrap { min-width: 0; } .dk-ewrap textarea { width: 100%; }

/* 09/11/2026 — combined docket: add an already-invoiced visit again (duplicate work) */
.cb-inc { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 8px; padding: 7px 10px; border: 1px dashed var(--line); border-radius: 9px; font-size: 12.5px; color: var(--ink-2, #333); cursor: pointer; }
.cb-inc input { margin-top: 2px; }
.cb-inc.on { border: 1px solid #f59e0b; background: #fff7e6; }
.dup-warn { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #f59e0b; background: #fff7e6; border-radius: 10px; font-size: 13px; line-height: 1.45; }

/* 09/11/2026 — the unit rate in the working box (Adjust): highlighted, type a new rate */
.pw.pw-ed { white-space: normal; }
.pw-in { display: inline-flex; align-items: center; gap: 1px; background: #fff3d6; border: 1.5px solid #f59e0b; border-radius: 6px; padding: 0 4px; margin: 0 1px; color: #92400e; font-weight: 700; }
.pw-in input { width: 58px; border: 0; background: transparent; font: inherit; font-weight: 700; color: #92400e; padding: 2px 0; outline: none; text-align: left; }
.pw-in:focus-within { box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
/* 11/11/2026 — same job as another team: the copy card is "Covered" (grey, no invoice, no amount) */
.inv-mark.cov { background: #eceef1; color: #5b6472; }
html[data-theme="dark"] .inv-mark.cov { background: #2a2f36; color: #aab3bf; }
.tm-dot.cov { background: #b8bec7; box-shadow: inset 0 0 0 2px #fff; outline: 1px solid #b8bec7; }
.tm-st.cov { background: #eceef1; color: #5b6472; }
html[data-theme="dark"] .tm-st.cov { background: #2a2f36; color: #aab3bf; }
.tm-job.st-cov { border-left-color: #b8bec7; }
.cov-of { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tm-job.st-cov .tm-st.cov { background: #eceef1; color: #5b6472; }
.ws-st.cov { color: #5b6472; }
.job-cov .jcv-on { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.jcv-list { display: grid; gap: 6px; margin: 8px 0; }
.jcv-pick { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--white); cursor: pointer; display: grid; gap: 2px; font: inherit; color: inherit; }
.jcv-pick small { color: var(--ink-2); }
.jcv-pick.has-dk { border-color: #2e9e57; }
.jcv-pick:hover { background: var(--slab); }
.inv-ov .iov-cov { width: 100%; margin-bottom: 8px; font-size: 13px; }
/* 11/11/2026 — Combine visits from the right-click */
.cmb-chip { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #5b3fb3; background: #efe9ff; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
html[data-theme="dark"] .cmb-chip { background: #2d2547; color: #c7b6ff; }
.cmb-pick { position: fixed; inset: 0; z-index: 90; background: rgba(20,24,28,.35); display: grid; place-items: center; padding: 16px; }
.cmb-in { width: min(640px, 100%); max-height: 86vh; display: flex; flex-direction: column; gap: 8px; background: var(--white); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.cmb-h { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.cmb-list { overflow: auto; display: grid; gap: 6px; padding-right: 2px; }
.cmb-g { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
.cmb-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "t d m" "t a m"; gap: 0 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.cmb-row input { grid-area: t; width: 18px; height: 18px; }
.cmb-row .cmb-d { grid-area: d; } .cmb-row .cmb-a { grid-area: a; font-size: 12.5px; color: var(--muted); } .cmb-row .cmb-m { grid-area: m; }
.cmb-row.me { background: var(--slab); border-color: #8f7be0; }
.cmb-row.busy { opacity: .55; cursor: default; }
.inv-ov .iov-cmb { display: grid; gap: 6px; margin-bottom: 8px; }
.inv-ov .iov-cmb .cmb-chip { margin-left: 0; white-space: normal; }
.iov-cmb-b { display: flex; gap: 6px; flex-wrap: wrap; }
.t-acts .cmb-chip { margin-left: 4px; }
/* 11/11/2026 — Lump sum in the combined docket's Adjust */
.cb-lumpbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.cb-lump { border: 1.5px solid #8f7be0; background: #f6f3ff; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: grid; gap: 8px; }
html[data-theme="dark"] .cb-lump { background: #221d36; }
.cb-lump h4 { margin: 0; }
.cb-lump-v { display: grid; gap: 4px; }
.cb-lump-f { display: grid; grid-template-columns: 1fr 160px; gap: 10px; }
.cb-lump-f label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.cb-lump-f input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }

/* Days worked (days.js, 12/11/2026 — rebuilt: summary table + person calendar) */
.dw-body { padding-top: 6px; }
.dw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 14px; }
.dw-in { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.dw-body input[type=date], .dw-body select, .dw-body input[data-dw-f], .dw-body input[data-dw-in] { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.dw-lab { font-size: 13px; }
.dw-src { color: var(--muted); font-weight: 500; }
.dw-flag { color: var(--alert); font-weight: 800; }
.dw-nr { color: var(--alert); font-weight: 800; }
.dw-note { margin-top: 10px; }
.dw-h3 { margin: 22px 0 6px; font-size: 15px; }
.dw-h3:first-child { margin-top: 4px; }

/* summary table */
.dw-table td.r, .dw-table th.r { text-align: right; }
.dw-table th.c { text-align: center; }
.dw-grp th { border-bottom: 0 !important; padding-bottom: 0 !important; font-size: 11px; letter-spacing: .06em; }
.dw-table .dw-offh { border-left: 2px solid var(--line); }
.dw-row { cursor: pointer; }
.dw-row:hover td { background: var(--cyan-soft); }
.dw-row.on td { background: var(--cyan-soft); box-shadow: inset 0 2px 0 var(--cyan), inset 0 -2px 0 var(--cyan); }
.dw-zero td { color: var(--muted); }
.dw-tot td { font-weight: 800; border-top: 2px solid var(--ink); }

/* names that don't match */
.dw-names { border: 1px solid #f1b8b3; background: #fff6f5; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 13px; }
.dw-nm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.dw-nraw { font-weight: 800; }

/* one person */
.dw-person { border: 2px solid var(--cyan); border-radius: 14px; background: var(--white); padding: 14px 16px 16px; margin: 0 0 18px; scroll-margin-top: 10px; }
.dw-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.dw-ph h3 { margin: 0; font-size: 19px; }
.dw-kpi { font-size: 13px; color: var(--ink-2); } .dw-kpi b { font-size: 17px; color: var(--ink); }
.dw-kpi.off b { color: var(--alert); }
.dw-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dw-legend .dw-c { min-height: 0; padding: 3px 9px; font-size: 11.5px; font-weight: 700; cursor: default; }
.dw-cal { display: grid; gap: 6px; }
.dw-cal-h, .dw-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dw-cal-h span { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding-left: 4px; }
.dw-c { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 62px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--slab); font: inherit; text-align: left; cursor: pointer; color: var(--ink); overflow: hidden; }
.dw-c i { font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.dw-c b { font-size: 13px; }
.dw-c small { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dw-c.blank { visibility: hidden; }
.dw-c.work { background: #e7f6ec; border-color: #9ad3ad; }
.dw-c.work b { color: #1e7a43; }
.dw-c.work.added { background: #e8f1fd; border-color: #9cc0ee; } .dw-c.work.added b { color: #1d4ed8; }
.dw-c.off { background: #fff1ef; border-color: #f3c2bc; } .dw-c.off b { color: #b3261e; }
.dw-c.off.none { background: #ffe2de; border: 2px solid var(--alert); }
.dw-c.hol { background: #f1f1f4; border-style: dashed; } .dw-c.hol b { color: #555; }
.dw-c.rest, .dw-c.out, .dw-c.future { background: transparent; border-style: dashed; color: var(--muted); }
.dw-c.today { border: 2px dashed var(--cyan); background: transparent; }
.dw-c:hover:not(.blank) { outline: 2px solid var(--cyan); outline-offset: 1px; }
.dw-c.sel { outline: 3px solid var(--ink); outline-offset: 1px; }

/* the picked day */
.dw-pick { margin: 12px 0 0; color: var(--ink-2); font-size: 13px; }
.dw-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--slab); padding: 12px 14px; scroll-margin-bottom: 20px; }
.dw-box-h { display: flex; align-items: center; gap: 10px; }
.dw-box-h h3 { margin: 0; font-size: 15px; flex: 1; }
.dw-box p { margin: 8px 0; font-size: 13.5px; }
.dw-jobs { margin: 4px 0 8px 18px; padding: 0; font-size: 13px; }
.dw-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.dw-form h4 { flex-basis: 100%; margin: 0; font-size: 13px; }
.dw-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.dw-form label.grow { flex: 1; min-width: 180px; } .dw-form label.grow input { width: 100%; box-sizing: border-box; }
.dw-reasons { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.dw-rb { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.dw-rb:hover { border-color: var(--ink); }
.dw-rb.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dw-rs { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--white); }
.dw-rs.none { color: var(--alert); border-color: #f1b8b3; }

.dw-exp > td { padding: 6px 0 16px !important; background: transparent !important; border: 0 !important; }
.dw-exp .dw-person { margin: 0; }

.dw-ord { white-space: nowrap; width: 60px; }
.dw-grab { cursor: grab; color: var(--muted); font-size: 18px; padding: 0 6px; user-select: none; }
.dw-drag:hover .dw-grab { color: var(--ink); }
.dw-num { font-weight: 800; color: var(--ink-2); }
.dw-drag.dw-dragging td { opacity: .4; }
.dw-drag.dw-drop-b td { box-shadow: inset 0 3px 0 var(--cyan); }
.dw-drag.dw-drop-a td { box-shadow: inset 0 -3px 0 var(--cyan); }

/* ── Totals (Staff → Totals, 13/11/2026) ── colours follow the cards: invoiced blue, draft yellow, not invoiced red, cash orange, paid green */
.tt-panel { --tt-paid: #2f9e44; --tt-paid-soft: #e3f5e6; --tt-inv: #1c6fd1; --tt-inv-soft: #e3eefc; --tt-draft: #d9a400; --tt-draft-soft: #fff6d6;
  --tt-not: #d63a2f; --tt-not-soft: #fde7e5; --tt-cash: #ec7a12; --tt-cash-soft: #fff0e1; --tt-cpaid: #7cc28a; }
.tt-body { padding-top: 12px; }
.tt-bar { position: sticky; top: -4px; z-index: 3; background: var(--slab); padding: 8px 0; margin: 0 0 8px; }
.tt-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.tt-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px; box-shadow: var(--shadow); overflow: hidden; }
.tt-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--ink); }
.tt-card.jobs::before { background: var(--cyan); } .tt-card.invd::before { background: var(--tt-inv); } .tt-card.paid::before { background: var(--tt-paid); } .tt-card.owed::before { background: var(--tt-cash); }
.tt-card i { display: block; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tt-card b { display: block; font-size: 32px; line-height: 1.1; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; margin: 6px 0 6px; letter-spacing: -.01em; }
.tt-card.paid b { color: #17663a; } .tt-card.invd b { color: #154d93; } .tt-card.owed b { color: #a8520a; }
.tt-card small { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.tt-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin: 1px 0; }
.tt-pill.inv { background: var(--tt-inv-soft); color: #154d93; } .tt-pill.cash { background: var(--tt-cash-soft); color: #a8520a; } .tt-pill.draft { background: var(--tt-draft-soft); color: #7a5c00; }
.tt-dim { color: var(--muted); font-size: 12px; font-weight: 500; }
.tt-warn { color: #b45309; font-weight: 700; }
.tt-note { margin: -4px 0 12px; color: var(--ink-2); font-size: 12.5px; }
.tt-sec { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 16px; margin: 0 0 14px; }
.tt-sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; width: 100%; }
.tt-sec-h h3 { margin: 0; font-size: 16px; font-weight: 800; }
.tt-sec-h .tt-dim { margin-left: auto; }
button.tt-fold { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
button.tt-fold[aria-expanded="false"] { margin: 0; }
/* where the money is */
.tt-flow { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: var(--line-soft); gap: 2px; }
.tt-flow span { min-width: 4px; } .tt-flow span.empty { flex: 1; }
.tt-flow .paid, .tt-legend i.paid { background: var(--tt-paid); } .tt-flow .cpaid, .tt-legend i.cpaid { background: var(--tt-cpaid); }
.tt-flow .inv, .tt-legend i.inv { background: var(--tt-inv); } .tt-flow .cash, .tt-legend i.cash { background: var(--tt-cash); }
.tt-flow .draft, .tt-legend i.draft { background: var(--tt-draft); } .tt-flow .not, .tt-legend i.not { background: var(--tt-not); }
.tt-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; margin-top: 12px; }
.tt-legend div { display: grid; grid-template-columns: 12px 1fr auto 42px; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.tt-legend div.zero { opacity: .45; }
.tt-legend i { width: 12px; height: 12px; border-radius: 3px; }
.tt-legend b { font-variant-numeric: tabular-nums; } .tt-legend small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tt-sec .tt-note { margin: 10px 0 0; }
/* chart */
.tt-chart { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 2px; }
.tt-col { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tt-col-v { font-size: 11.5px; font-weight: 700; color: var(--ink-2); height: 16px; font-variant-numeric: tabular-nums; }
.tt-col-bar { position: relative; width: 100%; max-width: 64px; height: 150px; background: linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 25%; border-bottom: 2px solid var(--line); }
.tt-col-bar span { position: absolute; bottom: 0; border-radius: 6px 6px 0 0; }
.tt-col-bar .w { left: 8%; right: 8%; background: var(--cyan-soft); border: 1.5px solid var(--cyan); border-bottom: 0; }
.tt-col-bar .p { left: 30%; right: 30%; background: var(--tt-paid); }
.tt-col-n { margin-top: 6px; line-height: 1.1; } .tt-col-n b { font-size: 17px; display: block; } .tt-col-n small { font-size: 10.5px; color: var(--muted); font-weight: 700; } .tt-col-n small.c { color: #a8520a; }
.tt-col-l { margin-top: 4px; font-size: 12px; font-weight: 800; } .tt-col-l small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.tt-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-left: 8px; }
.tt-key.work { background: var(--cyan-soft); border: 1.5px solid var(--cyan); } .tt-key.paid { background: var(--tt-paid); }
/* costs */
.tt-costs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; }
.tt-cost { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.tt-cost span { font-weight: 700; } .tt-cost small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tt-cost b { font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.tt-cost.total { border-bottom: 2px solid var(--ink); font-size: 15px; } .tt-cost.total b { color: #b45309; font-size: 17px; }
.tt-cost.left { border: 0; margin-top: 6px; background: var(--cyan-soft); border-radius: 10px; padding: 10px 12px; }
.tt-cost.left b { font-size: 22px; color: #1f3f8a; } .tt-cost.left.neg b { color: #b42318; }
.tt-cost-add h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tt-form { display: grid; grid-template-columns: 140px 110px minmax(0, 1fr) 110px auto; gap: 8px; align-items: end; }
.tt-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.tt-form input, .tt-form select { font: inherit; font-size: 13.5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); min-width: 0; }
.tt-form .btn { height: 36px; }
.tt-ctable { margin-top: 12px; } .tt-ctable td { padding: 6px 8px; } .tt-ctable td.d { white-space: nowrap; color: var(--ink-2); width: 96px; }
.tt-ck { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--line-soft); }
.tt-ck.fuel { background: #fde7e5; color: #8f2219; } .tt-ck.tools { background: #e6ecf7; color: #2a4a86; } .tt-ck.other { background: var(--line-soft); }
.tt-x { border: 0; background: transparent; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 2px 7px; }
.tt-x:hover { background: var(--tt-not-soft); color: var(--tt-not); }
.tt-empty { margin: 12px 0 0; }
/* tables */
.tt-scroll { overflow-x: auto; }
.tt-otable td, .tt-jtable td { font-variant-numeric: tabular-nums; }
.tt-otable .tt-g { color: #17663a; font-weight: 700; } .tt-otable .tt-r { color: #b42318; }
.tt-otable tr.tt-tot td { font-weight: 800; border-top: 2px solid var(--ink); background: var(--slab); }
.tt-jtable td.d { white-space: nowrap; }
.tt-jtable tr.copy td { background: repeating-linear-gradient(135deg, var(--white) 0 8px, var(--line-soft) 8px 9px); color: var(--muted); }
.tt-st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.tt-st.paid { background: var(--tt-paid-soft); color: #17663a; } .tt-st.inv { background: var(--tt-inv-soft); color: #154d93; }
.tt-st.draft { background: var(--tt-draft-soft); color: #7a5c00; } .tt-st.not { background: var(--tt-not-soft); color: #a3241b; }
.tt-st.cash { background: var(--tt-cash-soft); color: #a8520a; } .tt-st.copy { background: var(--line-soft); color: var(--ink-2); }
.tt-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tt-link:hover { color: var(--cyan); text-decoration-color: var(--cyan); }
.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.tt-chip { border: 1px solid var(--line); background: var(--slab); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tt-chip small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.tt-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; } .tt-chip.on small { color: #cfd6dc; }
.tt-sum { font-variant-numeric: tabular-nums; }
.tt-foot { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin: 4px 2px 0; }
.tt-loading { padding: 70px 0; text-align: center; color: var(--muted); font-weight: 700; font-size: 15px; }
.tt-busy { position: sticky; top: 46px; z-index: 4; margin: 0 auto 8px; width: max-content; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.st-totals-btn { font-weight: 800; }
@media (max-width: 1000px) { .tt-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tt-costs { grid-template-columns: 1fr; } .tt-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tt-hero { grid-template-columns: 1fr; } .tt-legend { grid-template-columns: 1fr; } .tt-form { grid-template-columns: 1fr 1fr; } .tt-form .wide { grid-column: 1 / -1; } .tt-card b { font-size: 28px; } }
html[data-theme="dark"] .tt-card.paid b, html[data-theme="dark"] .tt-otable .tt-g { color: #7ee2a2; } html[data-theme="dark"] .tt-card.invd b { color: #8fbaf5; } html[data-theme="dark"] .tt-card.owed b { color: #f6b26b; }
html[data-theme="dark"] .tt-cost.left b { color: #9cc0ff; } html[data-theme="dark"] .tt-cost.total b { color: #f6b26b; }
html[data-theme="dark"] .tt-st.paid, html[data-theme="dark"] .tt-pill.inv, html[data-theme="dark"] .tt-st.inv, html[data-theme="dark"] .tt-st.draft, html[data-theme="dark"] .tt-st.not, html[data-theme="dark"] .tt-st.cash, html[data-theme="dark"] .tt-pill.cash, html[data-theme="dark"] .tt-pill.draft, html[data-theme="dark"] .tt-ck.fuel, html[data-theme="dark"] .tt-ck.tools { filter: brightness(.82) saturate(1.1); }
html[data-theme="dark"] .tt-chip.on { color: #14181d; background: var(--ink); } html[data-theme="dark"] .tt-busy { color: #14181d; }
@media (max-width: 640px) { #totals-panel .pn-head { flex-wrap: wrap; gap: 6px; padding: 10px 12px; } #totals-panel .pn-sub { display: none; } #totals-panel .pn-head .btn { padding: 6px 10px; font-size: 13px; } }
/* ── Totals strip on the main page (13/11/2026) — people with Totals ── */
.tt-strip { display: flex; align-items: stretch; margin: 10px 20px 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.tt-strip[hidden] { display: none; }
.tts-h { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 8px 14px; background: var(--slab); border-right: 1px solid var(--line); min-width: 190px; }
.tts-mode { display: flex; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 2px; width: max-content; }
.tts-mode button { border: 0; background: transparent; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tts-mode button.on { background: var(--ink); color: #fff; }
.tts-when { font-size: 12px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.tts-t { flex: 1; min-width: 0; padding: 9px 16px; border-right: 1px solid var(--line-soft); position: relative; }
.tts-t::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.tts-t.jobs::after { background: var(--cyan); } .tts-t.invd::after { background: #1c6fd1; } .tts-t.paid::after { background: #2f9e44; } .tts-t.owed::after { background: #ec7a12; } .tts-t.not::after { background: #d63a2f; }
.tts-t i { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tts-t b { display: block; font-size: 22px; font-weight: 800; font-stretch: 80%; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tts-t small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tts-t.paid b { color: #17663a; } .tts-t.invd b { color: #154d93; } .tts-t.owed b { color: #a8520a; } .tts-t.not b { color: #b42318; }
.tts-t.wait { display: flex; align-items: center; color: var(--muted); font-weight: 700; font-size: 13px; }
.tts-open { border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 800; font-size: 13px; padding: 0 18px; cursor: pointer; white-space: nowrap; }
.tts-open:hover { background: var(--cyan); }
html[data-theme="dark"] .tts-mode button.on, html[data-theme="dark"] .tts-open { color: #14181d; }
html[data-theme="dark"] .tts-t.paid b { color: #7ee2a2; } html[data-theme="dark"] .tts-t.invd b { color: #8fbaf5; } html[data-theme="dark"] .tts-t.owed b { color: #f6b26b; } html[data-theme="dark"] .tts-t.not b { color: #ff9a90; }
@media (max-width: 1100px) { .tt-strip { flex-wrap: wrap; } .tts-h { flex-direction: row; align-items: center; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); } .tts-t { flex: 1 1 30%; } .tts-open { flex: 1 1 100%; padding: 9px; } }
@media (max-width: 760px) { .tt-strip { margin: 10px 14px 0; } .tts-t { flex: 1 1 45%; } }
/* Totals — wages fixed by hand + bonuses (13/11/2026) */
.tt-fix { display: block; font-size: 10.5px; color: #7a5c00; font-weight: 700; }
.tt-bonus { color: #6b3fa0; }
.tt-wbtn { white-space: nowrap; }
.tt-otable tr.tt-wrow td { background: var(--slab); padding: 0; }
.tt-wbox { display: grid; grid-template-columns: minmax(220px, 1.2fr) 150px 130px minmax(0, 1.5fr) auto; gap: 10px 12px; align-items: end; padding: 12px 14px; border-left: 4px solid var(--cyan); }
.tt-wbox label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.tt-wbox input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); min-width: 0; }
.tt-wcalc i { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tt-wcalc b { display: block; font-size: 18px; } .tt-wcalc small { display: block; font-size: 11px; color: var(--muted); }
.tt-wact { display: flex; gap: 6px; }
.tt-wbox .tt-dim { grid-column: 1 / -1; margin: 0; }
@media (max-width: 900px) { .tt-wbox { grid-template-columns: 1fr 1fr; } .tt-wbox .wide, .tt-wcalc { grid-column: 1 / -1; } }
html[data-theme="dark"] .tt-bonus { color: #c9a6f5; } html[data-theme="dark"] .tt-fix { color: #e8c75a; }
/* Totals strip — fold into one slim line (13/11/2026) */
.tt-strip.folded { box-shadow: none; background: var(--slab); }
.tts-fold { flex: 1; display: flex; align-items: center; gap: 14px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink-2); padding: 6px 14px; cursor: pointer; text-align: left; min-width: 0; overflow: hidden; white-space: nowrap; }
.tts-fold:hover { background: var(--white); }
.tts-fold b { color: var(--ink); }
.tts-fold span { font-variant-numeric: tabular-nums; font-weight: 600; }
.tts-fold .invd { color: #154d93; } .tts-fold .paid { color: #17663a; } .tts-fold .owed { color: #a8520a; } .tts-fold .not { color: #b42318; }
.tts-fold i { font-style: normal; margin-left: auto; color: var(--muted); font-size: 12px; }
.tts-sig { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--ink); color: #fff !important; font-weight: 800; font-size: 12px; }
.tts-go { border: 0; border-left: 1px solid var(--line); background: transparent; font: inherit; font-weight: 800; font-size: 12.5px; padding: 0 14px; cursor: pointer; color: var(--ink); white-space: nowrap; }
.tts-go:hover { background: var(--ink); color: #fff; }
.tts-side { display: flex; flex-direction: column; }
.tts-side .tts-open { flex: 1; }
.tts-hide { border: 0; border-top: 1px solid rgba(255,255,255,.15); background: var(--ink); color: #cfd6dc; font: inherit; font-size: 11px; font-weight: 700; padding: 4px 12px; cursor: pointer; }
.tts-hide:hover { color: #fff; }
html[data-theme="dark"] .tts-sig { color: #14181d !important; } html[data-theme="dark"] .tts-hide { color: #3a4048; }
html[data-theme="dark"] .tts-fold .invd { color: #8fbaf5; } html[data-theme="dark"] .tts-fold .paid { color: #7ee2a2; } html[data-theme="dark"] .tts-fold .owed { color: #f6b26b; } html[data-theme="dark"] .tts-fold .not { color: #ff9a90; }
@media (max-width: 1100px) { .tts-side { flex-direction: row; flex: 1 1 100%; } .tts-side .tts-open { padding: 9px; } .tts-hide { border-top: 0; padding: 9px 14px; } }
@media (max-width: 760px) { .tts-fold span:nth-of-type(n+4) { display: none; } }

/* Totals → By operator: sort arrows on Jobs / Work done (15/11/2026) */
.tt-otable th .tt-sort { margin-left: 4px; padding: 0 6px; border: 1px solid var(--line, #ccc); border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; opacity: .55; line-height: 1.4; }
.tt-otable th .tt-sort:hover { opacity: 1; }
.tt-otable th .tt-sort.on { opacity: 1; background: var(--ink, #111); color: #fff; border-color: var(--ink, #111); }
@media print { .tt-sort { display: none; } }

/* 20/11/2026 — Storage: delete photos of dockets not in Xero yet (with warning) */
.sg-xwarn { color: #c92a2a; }
.sg-xask { color: #c92a2a; }
html[data-theme="dark"] .sg-xwarn, html[data-theme="dark"] .sg-xask { color: #ff8787; }

/* Combine work (23/11/2026) — box in the combined docket's View */
.cw-box { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #93c5fd; background: #eff6ff; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.cw-box .cw-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cw-box .cw-h .btn { margin-left: auto; }
.cw-box ul { margin: 6px 0 0; padding-left: 18px; }
.cw-box p { margin: 6px 0 0; }

/* Print → Priced / Not priced (23/11/2026) */
.ask-pr { position: fixed; z-index: 10000; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card, #fff); color: var(--ink, #111);
  border: 1px solid rgba(0,0,0,.15); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22); font-size: 14px; }
.ask-pr b { margin-right: 4px; }

/* 01/12/2026 — 3D → Edit card (what the operator sees on the card) */
.q3-main { position: relative; }
.q3-editbtn.on { background: var(--ink, #14181d); color: #fff; }
.q3-edit { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 100%); z-index: 5; background: var(--white, #fff); border-left: 1px solid var(--line); box-shadow: -12px 0 30px -18px rgba(0,0,0,.45); overflow-y: auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.q3-edit[hidden] { display: none; }
.q3e-head { display: flex; align-items: center; justify-content: space-between; } .q3e-head b { font-size: 16px; }
.q3e-hint { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; }
.q3e-lab { margin-top: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.q3e-row { display: flex; align-items: center; gap: 8px; }
.q3e-row input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: #e8b04b; }
.q3e-row input[type=text] { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg, #fff); color: inherit; }
.q3e-row.off input[type=text] { opacity: .45; text-decoration: line-through; }
.q3e-del { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #c92a2a; font-size: 20px; cursor: pointer; }
.q3e-del:hover { background: rgba(201,42,42,.1); }
.q3e-add { align-self: flex-start; margin-top: 4px; }
.q3e-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
