/* Samast Polymer — Orders & Tasks — styles
   Mobile first: most of the people using this are on a phone, standing up.

   22 Sep 2026 redesign, at Alin's request: "more minimal, and colour-coded".
   The chrome is deliberately monochrome — ink on paper — so that colour is
   left free to MEAN something. Colour appears in three places only:
     · the order stage        (blue → amber → green → grey)
     · a vehicle's approval    (red = do not load, green = approved)
     · the department on a task
   Anything else coloured is a bug. */

:root {
  --ink: #17181a;
  --ink-2: #3a3c40;
  --muted: #6b6e73;
  --line: #e6e5e0;
  --line-2: #d8d7d1;
  --bg: #f6f6f3;
  --card: #ffffff;
  --radius: 10px;

  /* order stages */
  --s-placed: #2f6feb;           --s-placed-bg: #eaf1fe;
  --s-reached: #c77700;          --s-reached-bg: #fdf3e2;
  --s-invoiced: #12925a;         --s-invoiced-bg: #e6f5ee;
  --s-closed: #85888d;           --s-closed-bg: #efefed;
  --s-cancelled: #b3261e;        --s-cancelled-bg: #fcebea;

  /* vehicle approval */
  --v-ok: #12925a;   --v-ok-bg: #e6f5ee;
  --v-wait: #c2410c; --v-wait-bg: #fff0e6;
  --v-no: #b3261e;   --v-no-bg: #fcebea;

  /* departments */
  --d-accounts: #6d4fd1;  --d-accounts-bg: #f0ecfc;
  --d-sales: #2f6feb;     --d-sales-bg: #eaf1fe;
  --d-stores: #a15c07;    --d-stores-bg: #fbf0e1;
  --d-purchase: #0f8a80;  --d-purchase-bg: #e3f4f2;
  --d-none: #6b6e73;      --d-none-bg: #efefed;

  /* semantic, for tasks */
  --urgent: #b3261e;
  --late: #c2410c;
  --soon: #9a6a00;
  --ok: #12925a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.005em; text-wrap: balance; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
a { color: var(--ink); }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.right { text-align: right; }
.req { color: var(--urgent); }
.num { font-variant-numeric: tabular-nums; }
.warn-text { color: var(--v-wait); font-weight: 600; margin: .35rem 0 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ------------------------------------------------------------------ chrome */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  display: flex; align-items: center; gap: .4rem 1.2rem; flex-wrap: wrap;
  padding: .55rem .9rem 0; max-width: 1240px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; padding-bottom: .55rem; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--ink); position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff;
}
.brand-text { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.topbar-right {
  display: flex; align-items: center; gap: .4rem; margin-left: auto; padding-bottom: .55rem;
}

.chip {
  font-size: .72rem; padding: .16rem .5rem; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.chip-warn { background: #fff4d6; color: #6b4e00; border-color: #f3e2ad; font-weight: 600; }
@media (max-width: 760px) { .chip-centre { display: none; } }

.tabs {
  display: flex; gap: .1rem; overflow-x: auto; scrollbar-width: none;
  order: 3; flex-basis: 100%;
}
@media (min-width: 900px) { .tabs { order: 0; flex-basis: auto; } }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: .45rem .6rem .6rem; font-size: .9rem; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.tabs a[hidden] { display: none; }

.view { max-width: 1240px; margin: 0 auto; padding: 1rem .9rem 3rem; }
.loading { padding: 2rem; text-align: center; color: var(--muted); }

/* How many of your own tasks are still open, on the tab itself. */
.tab-badge {
  display: inline-block; min-width: 1.15rem; margin-left: .35rem; padding: 0 .3rem;
  border-radius: 999px; background: #c0392b; color: #fff;
  font-size: .66rem; font-weight: 700; line-height: 1.15rem; text-align: center;
  vertical-align: text-top; font-variant-numeric: tabular-nums;
}
.tabs a.on .tab-badge { background: #17181a; }

/* The finance board is a framed page of its own; give it the room it needs and
   no border, so it reads as part of this app rather than a page inside a page. */
.finance-frame {
  display: block; width: 100%; height: calc(100vh - 7.5rem);
  min-height: 34rem; border: 0; border-radius: 12px; background: #eef1f5;
}
@media (max-width: 760px) { .finance-frame { height: calc(100vh - 9rem); } }

/* ------------------------------------------------------------------- bits */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem;
}
.card.narrow { max-width: 680px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.banner {
  background: #fff4d6; border: 1px solid #f3e2ad; color: #6b4e00;
  padding: .7rem .8rem; border-radius: var(--radius); margin-bottom: .8rem;
}
.empty { color: var(--muted); font-size: .88rem; padding: .4rem 0; margin: 0; }
.count {
  display: inline-block; min-width: 1.4em; text-align: center;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
  border-radius: 999px; padding: 0 .4rem; font-size: .76rem; font-weight: 600;
  font-variant-numeric: tabular-nums; vertical-align: 1px;
}

.btn {
  font: inherit; font-size: .88rem; font-weight: 550; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: .5rem .85rem; background: var(--card); color: var(--ink);
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-ok { background: var(--v-ok); border-color: var(--v-ok); color: #fff; }
.btn-ok:hover { background: #0e7c4c; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .3rem .62rem; font-size: .82rem; }
.btn-block { display: flex; width: 100%; margin-top: .6rem; }
.btn.danger { color: var(--urgent); }

/* ----------------------------------------------------- colour vocabulary */

.sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; margin-right: .4rem; vertical-align: 1px; background: var(--line-2); }
.sdot.s-placed { background: var(--s-placed); }
.sdot.s-vehicle_reached { background: var(--s-reached); }
.sdot.s-invoice_prepared { background: var(--s-invoiced); }
.sdot.s-closed { background: var(--s-closed); }
.sdot.s-cancelled { background: var(--s-cancelled); }
/* task statuses */
.sdot.t-open { background: #9a9da2; }
.sdot.t-in_progress { background: var(--s-placed); }
.sdot.t-blocked { background: var(--urgent); }
.sdot.t-done { background: var(--ok); }

.stag {
  display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600;
  padding: .12rem .5rem; border-radius: 999px; white-space: nowrap;
}
.stag .sdot { width: 6px; height: 6px; margin-right: .35rem; }
.stag.s-placed { background: var(--s-placed-bg); color: var(--s-placed); }
.stag.s-vehicle_reached { background: var(--s-reached-bg); color: var(--s-reached); }
.stag.s-invoice_prepared { background: var(--s-invoiced-bg); color: var(--s-invoiced); }
.stag.s-closed { background: var(--s-closed-bg); color: var(--ink-2); }
.stag.s-cancelled { background: var(--s-cancelled-bg); color: var(--s-cancelled); }

/* ---------------------------------------------------------------- orders */

.vsearch { display: flex; gap: .5rem; margin-bottom: .9rem; }
.vsearch input {
  flex: 1; font-size: 1rem; letter-spacing: .03em; text-transform: uppercase;
  padding: .65rem .8rem;
}
.vsearch input::placeholder { text-transform: none; letter-spacing: 0; }

.stage-bar { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: .8rem; scrollbar-width: none; }
.stage-bar::-webkit-scrollbar { display: none; }
.schip {
  font: inherit; font-size: .84rem; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: .32rem .75rem;
}
.schip .n { margin-left: .35rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.schip.on { border-color: var(--ink); color: var(--ink); font-weight: 650; box-shadow: inset 0 0 0 1px var(--ink); }

.ocard { margin: 0; padding: .8rem .85rem; cursor: pointer; }
.ocard:hover { border-color: var(--line-2); background: #fcfcfb; }
.ocard-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.ono { font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; text-decoration: none; }
.oparty { font-size: 1rem; margin: 0 0 .2rem; }
.ometa { display: flex; flex-wrap: wrap; gap: .15rem .6rem; font-size: .84rem; color: var(--ink-2); margin-bottom: .55rem; }
.vrow { display: flex; flex-wrap: wrap; gap: .3rem; }

.vpill {
  display: inline-flex; align-items: center; gap: .4rem; border-radius: 6px;
  font-size: .74rem; padding: .16rem .45rem; border: 1px solid transparent;
}
.vpill b { font-weight: 700; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.vpill.v-ok { background: var(--v-ok-bg); color: var(--v-ok); }
.vpill.v-reached { background: var(--s-reached-bg); color: var(--s-reached); }
.vpill.v-wait { background: var(--v-wait-bg); color: var(--v-wait); }
.vpill.v-no { background: var(--v-no-bg); color: var(--v-no); }
.vpill.v-no b { text-decoration: line-through; }
.vpill.v-none { background: var(--bg); color: var(--muted); border-color: var(--line); }

.attention { border-color: #f5c7a9; background: #fffaf6; }
.attention h2 { color: var(--v-wait); }
.alist { display: grid; }
.arow { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem 0; border-top: 1px solid #f3e1d4; flex-wrap: wrap; }
.arow:first-child { border-top: 0; }
.amain { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.aact { display: flex; gap: .4rem; }
.vbig { font-size: 1.05rem; font-weight: 750; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

.hits { display: grid; gap: .6rem; }
.hit { display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; align-items: start; padding: .7rem 0; border-top: 1px solid var(--line); }
.hit:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 560px) { .hit { grid-template-columns: 1fr; gap: .4rem; } }
.hit-top { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: .15rem; }
.hit-body .btn { margin-top: .5rem; }
.verdict {
  border-radius: 8px; padding: .55rem .6rem; text-align: center;
  font-size: .8rem; font-weight: 800; letter-spacing: .06em;
}
.verdict.v-ok { background: var(--v-ok); color: #fff; }
.verdict.v-wait { background: var(--v-wait-bg); color: var(--v-wait); border: 1px solid #f5c7a9; }
.verdict.v-no { background: var(--v-no); color: #fff; }
section > .verdict { display: inline-block; margin-bottom: .4rem; }
.similar-h { margin-top: .9rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--v-wait); }
.similar { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.similar b { letter-spacing: .03em; font-variant-numeric: tabular-nums; }

.stepper { list-style: none; display: flex; gap: .3rem; padding: 0; margin: .6rem 0 .2rem; }
.stepper li {
  flex: 1; font-size: .7rem; color: var(--muted); padding-top: .45rem;
  border-top: 3px solid var(--line); line-height: 1.25;
}
.stepper li.done { color: var(--ink-2); border-top-color: var(--ink-2); }
.stepper li.now { color: var(--ink); font-weight: 700; }
.stepper li.now.s-placed { border-top-color: var(--s-placed); }
.stepper li.now.s-vehicle_reached { border-top-color: var(--s-reached); }
.stepper li.now.s-invoice_prepared { border-top-color: var(--s-invoiced); }
.stepper li.now.s-closed { border-top-color: var(--s-closed); }

.msec { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .9rem; }
.msec h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vline { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .35rem 0; }
.vact { display: inline-flex; gap: .35rem; margin-left: auto; }
.inline-form { display: flex; gap: .4rem; margin-top: .5rem; }
.inline-form input { flex: 1; }
.stack { display: grid; gap: .45rem; }

/* --------------------------------------------------------- centre picker */

.centre-bar { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .3rem; scrollbar-width: none; }
.centre-bar::-webkit-scrollbar { display: none; }
.centre-chip {
  font: inherit; font-size: .84rem; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 999px; padding: .32rem .75rem;
}
.centre-chip.on { border-color: var(--ink); color: var(--ink); font-weight: 650; box-shadow: inset 0 0 0 1px var(--ink); }

/* ------------------------------------------------------------------ board */

.board { display: grid; gap: .9rem; }
@media (min-width: 900px) {
  .board { grid-template-columns: repeat(4, 1fr); align-items: start; }
  .board.board-three { grid-template-columns: repeat(3, 1fr); }
  .board.board-one { grid-template-columns: minmax(0, 1fr); }
  .board.board-one .col-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

.col { padding: 0; }
.col-head {
  font-size: .8rem; font-weight: 650; letter-spacing: .02em; color: var(--ink-2);
  display: flex; align-items: center; padding: 0 .1rem .5rem; margin: 0;
}
.col-head .count { margin-left: auto; }
.col-body { display: grid; gap: .5rem; }

.task-card { margin: 0; padding: .75rem .8rem; cursor: pointer; }
.task-card:hover { border-color: var(--line-2); background: #fcfcfb; }
.task-top { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; }
.centre-tag, .cat-tag {
  font-size: .7rem; padding: .1rem .45rem; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.centre-tag { font-weight: 650; background: var(--d-none-bg); color: var(--d-none); }
.centre-tag.c-accounts { background: var(--d-accounts-bg); color: var(--d-accounts); }
.centre-tag.c-sales { background: var(--d-sales-bg); color: var(--d-sales); }
.centre-tag.c-stores { background: var(--d-stores-bg); color: var(--d-stores); }
.centre-tag.c-purchase { background: var(--d-purchase-bg); color: var(--d-purchase); }
.task-title { font-size: .95rem; font-weight: 600; margin: 0 0 .45rem; }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--muted); }
.who { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  /* inline-grid, not grid: inside a table cell a block-level avatar pushes the
     name onto its own line and the reporting tree stops reading as a tree */
  display: inline-grid; place-items: center; vertical-align: -6px;
  color: #fff; font-size: .64rem; font-weight: 700;
}
.flags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .45rem; }
.pill { font-size: .7rem; padding: .08rem .42rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pill-urgent { background: var(--v-no-bg); color: var(--urgent); font-weight: 650; }
.pill-late   { background: var(--v-wait-bg); color: var(--late); font-weight: 650; }
.pill-soon   { background: #fff6dc; color: var(--soon); }
.pill-stuck  { background: #f1eefb; color: #5b3fb8; }
.pill-private{ background: #ececea; color: var(--ink-2); }
.pill-recur  { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

/* --------------------------------------------------------------- news card */

.news-card { border-color: var(--line-2); }
.news-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.news-list { margin: 0; padding-left: 1.1rem; font-size: .9rem; }

/* ------------------------------------------------------------------ forms */

.field { margin-bottom: .75rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .25rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=file], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: .55rem .65rem;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 24, 26, .08); }
textarea { resize: vertical; }
.row2 { display: grid; gap: .75rem; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 500; }
.check input { width: auto; }
.checks { display: grid; gap: .35rem; }
@media (min-width: 480px) { .checks { grid-template-columns: 1fr 1fr; } }

.filters { display: grid; gap: .5rem; margin-bottom: .6rem; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.list { display: grid; gap: .5rem; }
@media (min-width: 760px) { .list { grid-template-columns: repeat(3, 1fr); } }

.paste-box { border: 1px dashed var(--line-2); border-radius: 8px; padding: .65rem .75rem; margin-bottom: .9rem; background: #fcfcfb; }
.paste-box summary { cursor: pointer; font-size: .88rem; font-weight: 600; }
.paste-box textarea { margin: .5rem 0; }

/* ------------------------------------------------------------------ table */

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table td.right, .table th.right { text-align: right; }
@media (max-width: 640px) { .table { display: block; overflow-x: auto; white-space: nowrap; } }

.tabsmall { display: flex; gap: .3rem; margin-bottom: .6rem; }
.tabsmall button {
  font: inherit; font-size: .84rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: 8px; padding: .32rem .7rem;
}
.tabsmall button.on { border-color: var(--ink); color: var(--ink); font-weight: 650; box-shadow: inset 0 0 0 1px var(--ink); }

/* ------------------------------------------------------------------ modal */

.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(23, 24, 26, .38);
  display: grid; place-items: end center;
  padding: 0;
}
@media (min-width: 640px) { .modal { place-items: center; padding: 1rem; } }
.modal[hidden] { display: none; }
.modal-card {
  background: var(--card); width: 100%; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  border-radius: 14px 14px 0 0;
  padding: 1.2rem 1.2rem; position: relative;
  padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
}
@media (min-width: 640px) { .modal-card { border-radius: 14px; } }
.modal-close {
  position: absolute; top: .55rem; right: .7rem;
  border: none; background: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--muted);
}
.modal-head { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .4rem; }
.modal-actions { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .9rem; margin: .7rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.photos { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.photos img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.history { margin-top: .9rem; font-size: .86rem; }
.history summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.history ul { padding-left: 1.1rem; }
.lock { max-width: 440px; margin: 2.5rem auto; text-align: center; }

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--ink); color: #fff; padding: .6rem 1rem;
  border-radius: 999px; font-size: .88rem;
  max-width: 90vw; text-align: center;
}
.toast[hidden] { display: none; }

/* the reporting tree in People */
.tree-tick { color: var(--line-2); font-weight: 400; }

/* ------------------------------------------------------- the chase list */
.chase-card .card-head h2 { display: flex; align-items: center; gap: .45rem; }
.chase-clear { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.chase-list { display: grid; gap: .1rem; margin-top: .5rem; }
.chase-row {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .6rem 0; border-top: 1px solid var(--line);
}
.chase-row:first-child { border-top: 0; }
.chase-main { min-width: 0; }
.chase-title { display: block; font-weight: 600; color: var(--ink); text-decoration: none; }
.chase-title:hover { text-decoration: underline; }
.chase-sub {
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted); margin-top: .2rem;
}
.dot-sep { color: var(--line-2); }

.modal-kicker {
  font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; margin: 0 0 .15rem; font-variant-numeric: tabular-nums;
}
.push-row {
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line);
}

/* a field the message reader had to guess at */
.chip-check {
  font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--v-wait-bg); color: var(--v-wait);
  border-radius: 999px; padding: .08rem .42rem; margin-left: .35rem;
  vertical-align: 1px;
}
.parse-warn {
  background: #fff4d6; border: 1px solid #f3e2ad; color: #6b4e00;
  border-radius: 8px; padding: .6rem .75rem; margin-bottom: .8rem; font-size: .88rem;
}

/* the parser-check report */
.report {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem; max-height: 46vh; overflow-y: auto;
}

/* ---------------------------------------------------------------- reports */
.tiles { display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); margin-bottom: .8rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .8rem; display: flex; flex-direction: column; gap: .1rem;
}
.tile-n { font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-l { font-size: .76rem; color: var(--muted); }
.tile-bad  .tile-n { color: var(--late); }
.tile-warn .tile-n { color: var(--soon); }
.tile-good .tile-n { color: var(--ok); }

.report-h { font-size: .95rem; margin-bottom: .5rem; }
.table-scroll { overflow-x: auto; }
.table.nums td:not(:first-child), .table.nums th:not(:first-child) {
  text-align: right; font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap;
}
.table.nums td.bad  { color: var(--late); font-weight: 600; }
.table.nums td.warn { color: var(--soon); font-weight: 600; }
.table tfoot th { border-top: 2px solid var(--line); font-weight: 700; }
.export-row { display: flex; gap: .4rem; flex-wrap: wrap; }

/* --------------------------------------------------------------- comments */
.comments { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.cmt-h { font-size: .95rem; margin-bottom: .5rem; }
.cmt { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.cmt:last-of-type { border-bottom: 0; }
.cmt-meta { font-size: .78rem; color: var(--ink); display: flex; gap: .4rem; flex-wrap: wrap; align-items: baseline; }
.cmt-body { font-size: .92rem; white-space: pre-wrap; margin-top: .1rem; }
.cmt-gone .cmt-body { text-decoration: line-through; color: var(--muted); }
.cmt-form { display: grid; gap: .4rem; margin-top: .6rem; }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; font-size: .78rem;
  color: var(--muted); text-decoration: underline; cursor: pointer;
}
.linkbtn:hover { color: var(--urgent); }

/* Says plainly that a demonstration copy is not shared. Without it, two people
   on one link each get a private board and conclude it is broken. */
.demo-banner {
  display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between;
  background: #fff9e8; border: 1px solid #f3e2ad; color: #6b4e00;
  border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .9rem;
  font-size: .86rem; line-height: 1.5;
}
.demo-banner strong { display: inline; }
.demo-banner .btn { flex: none; background: #fff; border-color: #eadcaa; color: #6b4e00; }

/* ------------------------------------------------------------------- KPIs
   Semantic colour only — good/warn/bad is a judgement about the number. */
.kpis { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); margin: .3rem 0 1.2rem; }
@media (min-width: 700px)  { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .75rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0;
}
.kpi-v { font-size: 1.6rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: .95rem; font-weight: 600; }
.kpi-l { font-size: .8rem; font-weight: 600; }
.kpi-r { font-size: .72rem; color: var(--muted); line-height: 1.35; }
.kpi-good .kpi-v { color: var(--ok); }
.kpi-warn .kpi-v { color: var(--soon); }
.kpi-bad  .kpi-v { color: var(--late); }

/* raised against finished, by week */
.flow { display: flex; gap: .5rem; align-items: flex-end; height: 120px; margin: .5rem 0 .4rem; }
.flow-w { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; }
.flow-bars { flex: 1; display: flex; gap: 2px; align-items: flex-end; width: 100%; justify-content: center; }
.flow-b { width: 42%; min-height: 2px; border-radius: 2px 2px 0 0; }
.flow-open { background: #cfd0cc; }
.flow-done { background: var(--ink); }
.flow-l { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow-key { font-size: .78rem; color: var(--ink); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.key-open { background: #cfd0cc; }
.key-done { background: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* product lines on a new order */
.lines-edit { display: grid; gap: .35rem; }
.line-head, .line-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 3.4rem 2rem; gap: .4rem; align-items: center; }
.line-row .og { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: var(--ink-2); }
.line-row .og input { width: auto; }
.line-hint { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); margin: -.15rem 0 .2rem; }
.alias-card summary { cursor: pointer; }
.alias-card .table { margin: .6rem 0; }
.line-head span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.line-row .lp { text-transform: uppercase; letter-spacing: .03em; }
.lines-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .45rem; }
.lines-foot select { width: auto; }
.parse-warn ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.table.lines { margin: .5rem 0 .2rem; }
.ometa b { font-weight: 700; letter-spacing: .02em; }

/* `hidden` alone loses to the display rule on .btn and .chip, so the bell and
   the tour button were showing on the signed-out screen. */
.topbar-right [hidden] { display: none !important; }

/* ---- guided tour ------------------------------------------------------
   Everything is FIXED and measured in viewport coordinates, and redrawn on
   scroll. Page coordinates look right until the ring is asked to sit around
   something sticky — the top bar — which does not move with the page. */
#tourVeil { position: fixed; inset: 0; z-index: 80; display: none; pointer-events: auto; }
#tourVeil.on { display: block; }
#tourHalo {
  position: fixed; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(12, 14, 18, .62);
  /* deliberately no transition: a paused tab timeline freezes a transition at
     its start value, and the ring then sits around the PREVIOUS step. */
}
#tourPop {
  position: fixed; z-index: 81; display: none; max-width: 330px;
  background: #fff; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
}
#tourPop.on { display: block; }
#tourPop h4 { margin: 0 0 5px; font-size: 14px; }
#tourPop p { margin: 0; font-size: 13px; line-height: 1.45; color: #39414c; }
.tour-nav { display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; gap: 8px; }
.tour-step { font-size: 11px; color: #9aa2ae; font-variant-numeric: tabular-nums; }
.tour-nav button { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 6px 12px;
  cursor: pointer; border: 1px solid #e3e6eb; background: #fff; color: inherit; }
.tour-nav .tour-next { background: #17181a; border-color: #17181a; color: #fff; }

/* ------------------------------------------- price check, debit/credit notes */
/* 16 Oct 2026: an invoice off the approved price, and the note that must follow. */
.ocard-incomplete { border-left: 3px solid var(--v-no); }
.onote { margin-top: .45rem; font-size: .76rem; font-weight: 700; color: var(--v-no); }
.inv-lines { display: grid; gap: .4rem; }
.inv-line { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; align-items: end; }
.inv-line label { display: grid; gap: .15rem; font-size: .74rem; color: var(--muted); }
@media (max-width: 560px) { .inv-line { grid-template-columns: 1fr 1fr; } .inv-line > b { grid-column: 1 / -1; } }
.fwarn { border: 1px solid var(--v-no); background: var(--v-no-bg); color: var(--ink); border-radius: 8px; padding: .65rem .75rem; font-size: .86rem; }
.fwarn ul { margin: .3rem 0; padding-left: 1.1rem; }
.fwarn p { margin: .3rem 0; }
.fwarn-h { color: var(--v-no); font-weight: 800; }
.fwarn-act { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; margin-top: .4rem; }
tr.off-price td { background: var(--v-no-bg); }
.note-row { padding: .5rem 0; border-top: 1px dashed var(--line); }
.note-row:first-of-type { border-top: 0; }
.note-row .note-form { margin-top: .45rem; }
.npill { display: inline-block; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: .1rem .45rem; margin-right: .3rem; }
.npill.n-due { background: var(--v-no-bg); color: var(--v-no); }
.npill.n-ok { background: var(--v-ok-bg); color: var(--v-ok); }
.stepper li.now.s-notes { border-top-color: var(--s-invoiced); }
.stepper li.s-notes.pending { color: var(--v-no); border-top-color: var(--v-no); }
