/* 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: 24px 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; } }
