/* Shared look for every signed-in Hub page. Colors come from the P77 logo. */
:root {
  --navy: #0B1F3A;
  --blue: #0254FE;
  --blue-dark: #0142C8;
  --sky: #03A6F5;
  --sky-bg: #E3F3FD;
  --paper: #F1F5FA;
  --steel: #5A6778;
  --line: #D3DCE6;
  --go: #1E7A46;
  --go-bg: #E4F4EA;
  --stop: #9E2A20;
  --stop-bg: #FBE9E7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--paper);
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- header ---------- */
.topbar {
  background: #fff;
  border-bottom: 4px solid var(--sky);
  padding: 10px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.topbar .brand img { height: 36px; width: auto; display: block; }
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar .wordmark { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 16px;
                    line-height: .95; color: var(--navy); text-transform: uppercase; letter-spacing: .02em; }
@media (max-width: 1240px) { .topbar .wordmark { display: none; } }
/* Who's signed in shows as an initials badge (hover for name + email), so the
   menu, Live, badge and Sign out always fit on one row of the 1200px column. */
.topbar .who { display: none; }
.topbar .avatar { width: 32px; height: 32px; border-radius: 50%; background: #E8EEFF; color: var(--blue);
                  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; cursor: default; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  white-space: nowrap;
  color: var(--steel);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-bottom: 3px solid transparent;
}
.topbar nav a:hover { color: var(--navy); }
.topbar nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--blue); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar .who { text-align: right; font-size: 13px; color: var(--steel); line-height: 1.3; }
.topbar .who b { display: block; color: var(--navy); font-weight: 500; font-size: 14px; }
.live { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--steel); }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.live.on .dot { background: var(--go); }
.live.off .dot { background: var(--stop); }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font-weight: 500;
  font-size: 14px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { background: var(--stop); border-color: var(--stop); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.small { font-size: 13px; padding: 4px 10px; }

/* ---------- page ---------- */
main { max-width: 1180px; padding: 32px clamp(16px, 4vw, 40px) 64px; }
h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 4px;
}
.lead { color: var(--steel); margin: 0 0 24px; max-width: 70ch; }

/* ---------- add form ---------- */
.add-form {
  background: #fff;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 16px;
}
.add-form h2 { grid-column: 1 / -1; font-size: 18px; font-weight: 600; margin: 0; }
.add-form .full { grid-column: 1 / -1; }
.add-form .actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--steel); margin-bottom: 4px; }
.field input, .field select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
}
.field input:focus, .field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 2px var(--sky-bg); }
.field input:disabled { background: var(--paper); color: var(--steel); }
.field .hint { font-size: 12px; color: var(--steel); margin-top: 3px; }

/* ---------- messages ---------- */
.msg { min-height: 24px; margin: 0 0 12px; font-size: 15px; }
.msg.ok { color: var(--go); }
.msg.error { color: var(--stop); }
.msg.info { color: var(--steel); }
.msg.warn { color: #8A4B00; }

/* ---------- segmented tabs ---------- */
.tabs { display: inline-flex; border: 1px solid var(--line); background: #fff; margin-bottom: 16px; }
.tabs button {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  font-weight: 500;
  color: var(--steel);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }

/* ---------- table ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.toolbar .count { color: var(--steel); font-size: 14px; }
.toolbar input[type="search"] {
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  min-width: 240px;
  background: #fff;
}
.table-wrap { overflow-x: auto; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; font-weight: 600; color: var(--steel); background: #fff; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.id { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 6px; }
tr.pending td { opacity: 0.5; }
tr.flash td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--sky-bg); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.flash td { animation: none; } }
.empty { padding: 28px 12px; color: var(--steel); text-align: center; }
.badge { display: inline-block; padding: 1px 10px; font-size: 12px; font-weight: 600; }
.badge.yes { background: var(--go-bg); color: var(--go); }
.badge.no { background: var(--stop-bg); color: var(--stop); }

/* ---------- dialogs ---------- */
dialog {
  border: 0;
  border-top: 4px solid var(--sky);
  padding: 24px;
  width: min(460px, 92vw);
  color: var(--navy);
}
dialog::backdrop { background: rgba(11, 31, 58, 0.45); }
dialog h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
dialog p { margin: 0 0 20px; color: var(--steel); }
dialog .field { margin-bottom: 12px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
dialog .dialog-error { color: var(--stop); font-size: 14px; margin: 8px 0 0; }

@media (max-width: 760px) {
  .add-form { grid-template-columns: 1fr; }
  .topbar .who { display: none; }
  .toolbar input[type="search"] { margin-left: 0; width: 100%; }
}


/* ---------- dashboard components ---------- */
.searchbar { display: flex; gap: 8px; margin: 0 0 24px; max-width: 460px; }
.searchbar input { flex: 1; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: #fff; font-size: 15px; }
.searchbar input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--sky-bg); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tile { background: #fff; padding: 16px 18px; border-left: 5px solid var(--sky); text-decoration: none; color: var(--navy); display: block; }
.tile:hover { border-left-color: var(--blue); }
.tile .num { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .lbl { font-weight: 600; margin-top: 4px; }
.tile .sub { font-size: 13px; color: var(--steel); }
.tile.warn { border-left-color: #E8A317; }
.tile.alert { border-left-color: var(--stop); }
.tile.alert .num { color: var(--stop); }

h2.section { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 2px; margin-bottom: 28px; }
.pipeline a { background: #fff; padding: 12px 14px; text-decoration: none; color: var(--navy); }
.pipeline a:hover { background: var(--sky-bg); }
.pipeline .num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pipeline .lbl { font-size: 13px; color: var(--steel); }

.badge.svc { background: #E8EEFF; color: var(--blue); }
.badge.sup { background: var(--sky-bg); color: #0B6A9E; }
.badge.urgent { background: var(--stop); color: #fff; }
.badge.p-critical { background: var(--stop-bg); color: var(--stop); }
.badge.p-high { background: #FFF1DC; color: #8A4B00; }
.badge.p-medium { background: #E8EEFF; color: var(--blue); }
.badge.p-low { background: var(--paper); color: var(--steel); }
.badge + .badge { margin-left: 4px; }

.cards { display: grid; gap: 8px; }
.rcard { display: block; background: #fff; padding: 14px 16px; text-decoration: none; color: var(--navy); border-left: 4px solid var(--line); }
.rcard:hover { border-left-color: var(--blue); }
.rcard.is-urgent { border-left-color: var(--stop); }
.rcard .row1 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rcard .station { font-weight: 600; font-size: 17px; }
.rcard .meta { font-size: 13px; color: var(--steel); white-space: nowrap; }
.rcard .meta.old { color: var(--stop); font-weight: 600; }
.rcard .desc { margin: 4px 0 8px; font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.rcard .row3 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--steel); }

.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 270px; background: #E6ECF3; }
.col h3 { margin: 0; padding: 10px 12px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; border-top: 4px solid var(--steel); background: #fff; }
.col[data-k="NEW"] h3 { border-top-color: var(--blue); }
.col[data-k="READY FOR ASSIGNMENT"] h3 { border-top-color: #7B3FE4; }
.col[data-k="ASSIGNED"] h3 { border-top-color: var(--sky); }
.col[data-k="IN PROGRESS"] h3 { border-top-color: #E8A317; }
.col[data-k="WAITING FOR PARTS"] h3 { border-top-color: #D9731E; }
.col[data-k="ON HOLD"] h3 { border-top-color: var(--steel); }
.col .items { padding: 8px; display: grid; gap: 8px; max-height: 72vh; overflow-y: auto; }
.col .empty { padding: 16px; }
.bcard { display: block; background: #fff; padding: 10px 12px; text-decoration: none; color: var(--navy); border-left: 3px solid transparent; }
.bcard:hover { border-left-color: var(--blue); }
.bcard .wo { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.bcard .wo > span:first-child { white-space: nowrap; }
.bcard .wo > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.bcard .wo .badge + .badge { margin-left: 0; }
.bcard .st { font-size: 13px; color: var(--steel); }
.bcard .ds { font-size: 13px; margin: 4px 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bcard .ft { font-size: 12px; color: var(--steel); display: flex; justify-content: space-between; gap: 6px; }

.filters { display: flex; gap: 0; border: 1px solid var(--line); background: #fff; width: max-content; margin-bottom: 14px; flex-wrap: wrap; }
.filters button { border: 0; background: transparent; padding: 8px 16px; font-weight: 500; color: var(--steel); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.box { background: #fff; padding: 18px 20px; margin-bottom: 16px; }
.box h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 15px; margin: 0; }
.kv dt { color: var(--steel); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.bigdesc { font-size: 17px; white-space: pre-wrap; margin: 0 0 14px; overflow-wrap: anywhere; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; }
.shots a { display: block; width: 120px; height: 120px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; font-size: 13px; text-align: center; color: var(--blue); }
.shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shots span { display: flex; height: 100%; align-items: center; justify-content: center; padding: 8px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.actions-row .btn { min-height: 42px; padding: 8px 18px; font-size: 15px; }
.btn.go { background: var(--go); border-color: var(--go); color: #fff; }
.btn.warnb { background: #fff; border-color: #E8A317; color: #8A4B00; }
.hint-line { font-size: 14px; color: var(--steel); margin: 10px 0 0; }
dialog .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
dialog textarea, dialog .field textarea { width: 100%; min-height: 80px; padding: 8px 10px; border: 1px solid var(--line); font-size: 15px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } .kv { grid-template-columns: 110px 1fr; } }

@media (max-width: 760px) {
  .topbar { gap: 8px 16px; padding-bottom: 0; }
  .topbar .right { order: 2; margin-left: auto; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { padding: 8px 10px; }
  main { padding-top: 20px; }
}

/* =====================================================================
   DESIGN REFRESH
   Softer surfaces, rounded corners, a navy page band on every page,
   and clearer hierarchy. Appended last so it refines the rules above
   without rewriting them.
   ===================================================================== */
:root {
  --paper: #F3F6FA;
  --card-border: #E1E8F0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .05), 0 4px 14px rgba(11, 31, 58, .05);
  --shadow-hover: 0 2px 4px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .09);
  --band-1: #0B1F3A;
  --band-2: #0F2D57;
  --band-3: #13407A;
  --amber: #E8A317;
  --amber-bg: #FFF6E0;
  --amber-ink: #7A5200;
  --c-new: #0254FE; --c-ready: #7B3FE4; --c-assigned: #03A6F5;
  --c-progress: #E8A317; --c-parts: #D9731E; --c-hold: #5A6778; --c-done: #1E7A46;
}
body { background: var(--paper); }

/* ---------- navy page band ---------- */
.pagehead {
  background: linear-gradient(135deg, var(--band-1) 0%, var(--band-2) 55%, var(--band-3) 100%);
  color: #fff;
  padding: 30px clamp(16px, 4vw, 40px) 76px;
  position: relative;
  overflow: hidden;
}
.pagehead::after {           /* the logo's slanted stripes, as a faint watermark */
  content: ""; position: absolute; right: -40px; top: -30px; width: 420px; height: 260px;
  background: repeating-linear-gradient(115deg, rgba(3,166,245,.10) 0 38px, transparent 38px 64px);
  transform: skewX(-8deg); pointer-events: none;
}
.pagehead .inner { max-width: 1180px; position: relative; z-index: 1; }
.pagehead h1 { color: #fff; font-size: clamp(30px, 4vw, 40px); margin: 0 0 6px; }
.pagehead .lead { color: #B9C8DC; margin: 0; max-width: 68ch; }
.pagehead a { color: #8FD3FF; }
.pagehead .crumbs { font-size: 14px; margin: 0 0 10px; color: #8FA5C2; }
main.lifted { margin-top: -52px; position: relative; z-index: 2; padding-top: 0; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--steel); margin: 28px 0 10px; display: flex; align-items: center; gap: 8px;
}
.eyebrow .count { background: #E3E9F2; color: var(--navy); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; }

/* ---------- surfaces ---------- */
.box, .rcard, .add-form, .table-wrap, .bcard, .panel, .req-card, .empty-mine,
.tile, .flow a, .toolbar-card, dialog {
  border-radius: var(--radius);
}
.box, .rcard, .add-form, .table-wrap, .panel, .req-card, .empty-mine, .toolbar-card {
  background: #fff; border: 1px solid var(--card-border); box-shadow: var(--shadow);
}
.table-wrap { overflow: hidden; overflow-x: auto; }
th { background: #F7F9FC; border-bottom-color: var(--card-border); }
tbody tr:hover td { background: #FAFCFF; }
tbody tr:last-child td { border-bottom: 0; }
.toolbar-card { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; }
.toolbar-card .filters, .toolbar-card .msg { margin: 0; }
.toolbar-card .count, .toolbar-card .msg { color: var(--steel); font-size: 14px; }

/* ---------- controls ---------- */
.btn { border-radius: var(--radius-sm); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn.primary:hover, .btn.go:hover, .btn.danger:hover { box-shadow: 0 2px 8px rgba(2, 84, 254, .25); }
.btn.go:hover { background: #196A3C; }
.btn.danger:hover { background: #86231B; box-shadow: 0 2px 8px rgba(158, 42, 32, .25); }
.field input, .field select, .field textarea, dialog textarea, .toolbar input[type="search"], .searchbar input,
.rq-field input, .rq-field select, .rq-field textarea {
  border-radius: var(--radius-sm);
}
/* One tab / filter style everywhere: rounded pills in a white bar (.toolbar-card).
   Selected = aria-pressed or aria-selected. A count goes in <span class="n">. */
.filters { border-radius: 999px; overflow: hidden; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
           max-width: 100%; border-color: var(--card-border); }
.filters::-webkit-scrollbar { display: none; }
.filters.many button { padding-left: 11px; padding-right: 11px; }   /* boards: 8 tabs in the 1200px column */
.filters button { padding: 7px 16px; min-height: 40px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 500; }
.filters button[aria-selected="true"] { background: var(--navy); color: #fff; }
.filters .n { background: #E3E9F2; color: var(--navy); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 18px; }
.filters button[aria-pressed="true"] .n, .filters button[aria-selected="true"] .n { background: rgba(255, 255, 255, .22); color: #fff; }
/* Back links above a page title (and the request page's crumbs): outlined pills on the navy band. */
.pagehead .back, .pagehead .crumbs a {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 5px 14px; min-height: 34px;
  border: 1px solid rgba(143, 211, 255, .45); border-radius: 999px; background: rgba(255, 255, 255, .06);
  color: #DCEFFF; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s; }
.pagehead .back:hover, .pagehead .crumbs a:hover { background: rgba(143, 211, 255, .18); border-color: #8FD3FF; color: #fff; }
.pagehead .back[hidden] { display: none; }
.pagehead .crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagehead .crumbs a { margin: 0; }
.pagehead .crumbs #crumb-other { display: contents; }
.pagehead .crumbs #crumb-other[hidden] { display: none; }
.badge { border-radius: 999px; padding: 2px 10px; letter-spacing: .02em; }
dialog { box-shadow: 0 20px 60px rgba(11, 31, 58, .35); border: 0; border-top: 4px solid var(--sky); }
dialog::backdrop { background: rgba(11, 31, 58, .55); backdrop-filter: blur(2px); }

/* ---------- top bar ---------- */
.topbar { border-bottom-width: 3px; box-shadow: 0 1px 0 rgba(11,31,58,.04); }
.topbar nav a { border-radius: 8px 8px 0 0; }
.topbar nav a:hover { background: #F3F6FA; }

/* ---------- dashboard ---------- */
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hero-date { color: #8FA5C2; font-size: 15px; margin: 0 0 4px; }
.searchbar.on-band { margin: 0; }
.searchbar.on-band input { border: 0; min-height: 44px; min-width: min(320px, 70vw); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.searchbar.on-band .btn { min-height: 44px; background: var(--sky); border-color: var(--sky); color: var(--band-1); font-weight: 600; }
.searchbar.on-band .btn:hover { background: #3BBBF7; }
.band-msg { color: #FFD6D1; font-size: 14px; margin: 8px 0 0; min-height: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi {
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--navy);
  transition: box-shadow .15s, transform .15s;
}
a.kpi:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.kpi .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: #EAF1FF; color: var(--blue); flex: none; }
.kpi .ic svg { width: 22px; height: 22px; }
.kpi .num { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 40px; font-weight: 700; line-height: .95; font-variant-numeric: tabular-nums; }
.kpi .lbl { font-weight: 600; margin-top: 4px; }
.kpi .sub { font-size: 13px; color: var(--steel); }
.kpi.warn { background: var(--amber-bg); border-color: #F3DDA4; }
.kpi.warn .ic { background: #FCE9B8; color: var(--amber-ink); }
.kpi.warn .num { color: var(--amber-ink); }
.kpi.alert { background: #FDF0EE; border-color: #F2CBC6; }
.kpi.alert .ic { background: #F9D9D4; color: var(--stop); }
.kpi.alert .num { color: var(--stop); }

.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.flow a, .flow div.stage {
  position: relative; background: #fff; border: 1px solid var(--card-border); box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 14px 16px 12px; text-decoration: none; color: var(--navy);
  border-top: 4px solid var(--c, var(--steel)); transition: box-shadow .15s, transform .15s;
}
.flow a:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.flow .num { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 32px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.flow .lbl { font-size: 13px; color: var(--steel); margin-top: 4px; }
.flow .zero .num { color: #A9B4C2; }
.flow > *:not(:last-child)::after {   /* arrow between stages */
  content: ""; position: absolute; right: -9px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-top: 2px solid #B7C3D2; border-right: 2px solid #B7C3D2; transform: rotate(45deg); z-index: 1;
}

.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mini { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mini a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; text-decoration: none; color: var(--navy); border-bottom: 1px solid #EDF1F6; }
.mini a:last-child { border-bottom: 0; }
.mini a:hover { background: #F7FAFE; }
.mini .t { font-weight: 600; font-size: 15px; }
.mini .s { font-size: 13px; color: var(--steel); }
.mini .age { font-weight: 700; color: var(--stop); white-space: nowrap; font-size: 14px; }
.mini .empty { padding: 18px 16px; color: var(--steel); font-size: 14px; }

/* ---------- request cards ---------- */
.rcard { padding: 14px 18px; border-left: 1px solid var(--card-border); position: relative; transition: box-shadow .15s, transform .15s; }
.rcard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: #CBD6E3; }
.rcard.is-urgent::before { background: var(--stop); }
.rcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); border-left-color: var(--card-border); }

/* ---------- board ---------- */
.col { background: #E8EEF6; border-radius: var(--radius); overflow: hidden; }
.col h3 { border-top-width: 4px; }
.col .items { padding: 10px; gap: 10px; }
.bcard { border: 1px solid var(--card-border); box-shadow: 0 1px 2px rgba(11,31,58,.05); border-left: 1px solid var(--card-border); transition: box-shadow .15s, transform .15s; }
.bcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); border-left-color: var(--card-border); }
.col .empty { text-align: center; color: #8A97A8; font-size: 14px; }

/* ---------- request detail ---------- */
.box { padding: 20px 22px; }
.box h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.shots a { border-radius: 10px; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pagehead { padding: 22px 16px 68px; }
  .pagehead::after { width: 220px; right: -80px; }
  main.lifted { margin-top: -48px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > *::after { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; flex-direction: column; gap: 8px; }
  .kpi .ic { width: 34px; height: 34px; }
  .kpi .num { font-size: 34px; }
}
.pagehead .msg { color: #FFD6D1; min-height: 0; margin: 8px 0 0; font-size: 14px; }
.pagehead .msg.ok { color: #BDEBCB; }
.pagehead .msg:empty { display: none; }
main.lifted > .msg:empty { display: none; }
.tabs { border-radius: 999px; overflow: hidden; border-color: var(--card-border); box-shadow: var(--shadow); }
.tabs button { padding: 9px 20px; }

/* ---------- centered layout ----------
   The top bar, band and content share one centered column, so wide
   screens have even space on both sides and everything lines up on the
   same left edge. The Service Board (body.wide) uses the full width.
   The top bar (menu) is full width on every page, like the Service Board's. */
:root { --content: 1200px; --gutter: clamp(16px, 4vw, 40px); }
body.wide { --content: 100vw; }
.topbar { padding-left: var(--gutter); padding-right: var(--gutter); }
.pagehead, main {
  padding-left: max(var(--gutter), calc((100% - var(--content)) / 2));
  padding-right: max(var(--gutter), calc((100% - var(--content)) / 2));
}
main { max-width: none; }
.pagehead .inner { max-width: none; }
.pagehead .lead { max-width: 72ch; }
/* Board columns share the available width; scroll only when they'd get narrower than 230px. */
.col { flex: 1 0 230px; min-width: 230px; }
.col[data-k="S-NEW"] h3 { border-top-color: var(--c-new); }
.col[data-k="S-APPROVED"] h3 { border-top-color: var(--c-ready); }
.col[data-k="S-PREPARED"] h3 { border-top-color: var(--c-progress); }
.col[data-k="S-DISPATCHED"] h3 { border-top-color: var(--c-assigned); }
.bcard .items-line { color: var(--steel); -webkit-line-clamp: 2; }
.items-list { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.items-list li { padding: 6px 0; border-bottom: 1px solid #EDF1F6; display: flex; justify-content: space-between; gap: 10px; }
.items-list li:last-child { border-bottom: 0; }
.items-list .q { font-weight: 600; white-space: nowrap; }
.team { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid #EDF1F6; display: grid; gap: 8px; }
.team li { display: flex; align-items: center; gap: 10px; }
.team .av { width: 34px; height: 34px; border-radius: 50%; background: #E8EEFF; color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.team .nm { font-weight: 600; line-height: 1.2; }
.team .rl { font-size: 13px; color: var(--steel); }
.team .grow { flex: 1; min-width: 0; }
.team li.cancelled { opacity: .5; }
.team li.cancelled .nm { text-decoration: line-through; }
.team .seen { color: var(--go); font-weight: 600; }
.team .unseen { color: #9A6700; font-weight: 600; }
.team-title { font-size: 13px; font-weight: 600; color: var(--steel); margin: 14px 0 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid #E1E8F0; margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; }
.timeline li.s-COMPLETED::before { background: var(--go); }
.timeline li.s-CANCELLED::before { background: var(--stop); }
.timeline li.s-WAITING\ FOR\ PARTS::before { background: var(--c-parts); }
.timeline .when { font-size: 13px; color: var(--steel); }
.timeline .what { font-weight: 600; margin: 2px 0; }
.timeline .body { font-size: 15px; margin: 2px 0 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--steel); }
.timeline .shots { margin-top: 8px; }
.timeline .shots a { width: 76px; height: 76px; }
/* Links styled as buttons look and size exactly like buttons */
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; }
a.btn:hover { text-decoration: none; }
a.btn.primary, a.btn.primary:visited { color: #fff; }
.live-start { display: inline-block; font-size: 12px; font-weight: 600; color: var(--go); background: var(--go-bg); border-radius: 999px; padding: 2px 9px; margin: 0 0 6px; }

/* ---- option buttons: one design for every "pick one" choice ---- */
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.opt {
  --tone: var(--blue); --tone-bg: #EAF1FF; --tone-ink: #0B3FB3; --tone-line: #C9D9FB;
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 10px 14px; text-align: left;
  background: var(--tone-bg); border: 1.5px solid var(--tone-line); border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--tone-ink); line-height: 1.2; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s, color .15s;
}
.opt:hover { border-color: var(--tone); }
.opt:active { transform: scale(.98); }
.opt:focus-visible { outline: 3px solid var(--sky-bg); outline-offset: 2px; }
.opt .oi { width: 32px; height: 32px; border-radius: 9px; background: #fff; color: var(--tone);
           display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.opt .oi svg { width: 18px; height: 18px; }
.opt[aria-pressed="true"] { background: var(--tone); border-color: var(--tone); color: #fff;
                             box-shadow: 0 6px 16px rgba(11,31,58,.18); }
.opt[aria-pressed="true"] .oi { background: rgba(255,255,255,.22); color: #fff; }
.opt[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--tone); font-size: 13px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--tone);
}
.opt[data-tone="green"] { --tone: var(--go); --tone-bg: #EAF7EF; --tone-ink: #145C33; --tone-line: #BFE3CC; }
.opt[data-tone="amber"] { --tone: #C98100; --tone-bg: #FFF6E0; --tone-ink: #6E4A00; --tone-line: #F2D9A0; }
.opt[data-tone="red"]   { --tone: var(--stop); --tone-bg: #FDF0EE; --tone-ink: #7F1F16; --tone-line: #F2C6C0; }
.opt[data-tone="gray"]  { --tone: #5A6778; --tone-bg: #F1F4F8; --tone-ink: #2E3A4B; --tone-line: #DCE3EC; }
/* Option groups built from <select data-options> by options.js */
.optgroup { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.optgroup .opt { min-height: 48px; padding: 8px 12px; font-size: 14px; }
.optgroup .opt .oi { width: 28px; height: 28px; border-radius: 8px; }
.optgroup .opt .oi svg { width: 16px; height: 16px; }
.optgroup.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.optgroup.big .opt { min-height: 58px; font-size: 15px; padding: 10px; gap: 8px; }
select[data-options] { display: none !important; }
.optgroup.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt > span:last-child { min-width: 0; overflow-wrap: break-word; hyphens: auto; }

/* Dropdowns built from <select data-options> by options.js: the field and the
   list show each choice's icon and color (same tones as the option buttons). */
.optmenu { position: relative; }
.optmenu-btn, .optmenu-item {
  --tone: var(--blue); --tone-bg: #EAF1FF; --tone-ink: #0B3FB3; --tone-line: #C9D9FB;
}
.optmenu-btn[data-tone="green"], .optmenu-item[data-tone="green"] { --tone: var(--go); --tone-bg: #EAF7EF; --tone-ink: #145C33; --tone-line: #BFE3CC; }
.optmenu-btn[data-tone="amber"], .optmenu-item[data-tone="amber"] { --tone: #C98100; --tone-bg: #FFF6E0; --tone-ink: #6E4A00; --tone-line: #F2D9A0; }
.optmenu-btn[data-tone="red"],   .optmenu-item[data-tone="red"]   { --tone: var(--stop); --tone-bg: #FDF0EE; --tone-ink: #7F1F16; --tone-line: #F2C6C0; }
.optmenu-btn[data-tone="gray"],  .optmenu-item[data-tone="gray"]  { --tone: #5A6778; --tone-bg: #F1F4F8; --tone-ink: #2E3A4B; --tone-line: #DCE3EC; }
.optmenu-btn {
  width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 5px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--tone);
  border-radius: var(--radius-sm); font: inherit; font-size: 15px; font-weight: 600; color: var(--tone-ink);
  transition: border-color .15s, box-shadow .15s;
}
.optmenu-btn.empty { border-left-color: var(--line); padding-left: 10px; font-weight: 400; color: var(--steel); }
.optmenu-btn:hover { border-color: var(--tone); }
.optmenu-btn.empty:hover { border-color: var(--blue); }
.optmenu-btn:focus-visible, .optmenu.open .optmenu-btn { outline: none; border-color: var(--tone); box-shadow: 0 0 0 3px var(--sky-bg); }
.optmenu-btn:disabled { background: var(--paper); color: var(--steel); cursor: default; }
.optmenu-btn .lbl, .optmenu-item .lbl { flex: 1; min-width: 0; line-height: 1.25; overflow-wrap: break-word; }
.optmenu-btn .chev { width: 18px; height: 18px; flex: none; color: var(--steel); transition: transform .15s; }
.optmenu.open .chev { transform: rotate(180deg); }
.optmenu-btn .oi, .optmenu-item .oi {
  width: 28px; height: 28px; border-radius: 7px; flex: none; display: grid; place-items: center;
  background: var(--tone-bg); color: var(--tone);
}
.optmenu-btn .oi svg, .optmenu-item .oi svg { width: 16px; height: 16px; }
.optmenu-item .oi.dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); }
.optmenu-list {
  position: fixed; z-index: 1000; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(11, 31, 58, .18);
}
.optmenu-list[hidden] { display: none; }
.optmenu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px 6px 6px;
  background: transparent; border: 0; border-radius: var(--radius-sm); text-align: left; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--navy);
}
.optmenu-item:hover, .optmenu-item:focus-visible { background: var(--tone-bg); outline: none; }
.optmenu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--tone-line); }
.optmenu-item .tick { visibility: hidden; font-weight: 800; color: var(--tone); }
.optmenu-item[aria-selected="true"] { background: var(--tone-bg); color: var(--tone-ink); font-weight: 700; }
.optmenu-item[aria-selected="true"] .tick { visibility: visible; }
.optmenu-item[aria-selected="true"] .oi { background: var(--tone); color: #fff; }
/* Phone forms (request page, My Jobs) use taller fields. */
.rq-field .optmenu-btn { min-height: 48px; font-size: 17px; border-radius: 10px; border-color: var(--card-border); border-left-color: var(--tone); }
.rq-field .optmenu-btn.empty { border-left-color: var(--card-border); }
.rq-field .optmenu-item { min-height: 48px; font-size: 16px; }

/* ---- Decision card (request detail): main action big, Hold / Cancel smaller,
   changing the request type last and quiet. ---- */
.decide { display: flex; flex-direction: column; gap: 10px; }
.decide-main { display: flex; flex-direction: column; gap: 8px; }
.decide-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.dbtn {
  --tone: var(--blue); --tone-bg: #EAF1FF; --tone-ink: #0B3FB3; --tone-line: #C9D9FB;
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
  background: #fff; border: 1.5px solid var(--tone-line); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--tone-ink); text-align: left;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.dbtn[data-tone="green"] { --tone: var(--go); --tone-bg: #EAF7EF; --tone-ink: #145C33; --tone-line: #BFE3CC; }
.dbtn[data-tone="amber"] { --tone: #C98100; --tone-bg: #FFF6E0; --tone-ink: #6E4A00; --tone-line: #F2D9A0; }
.dbtn[data-tone="red"]   { --tone: var(--stop); --tone-bg: #FDF0EE; --tone-ink: #7F1F16; --tone-line: #F2C6C0; }
.dbtn:hover { background: var(--tone-bg); border-color: var(--tone); text-decoration: none; }
.dbtn:active { transform: scale(.98); }
.dbtn:focus-visible { outline: 3px solid var(--sky-bg); outline-offset: 2px; }
.dbtn .oi { width: 26px; height: 26px; border-radius: 7px; flex: none; display: grid; place-items: center;
            background: var(--tone-bg); color: var(--tone); }
.dbtn .oi svg { width: 16px; height: 16px; }
.dbtn.big { min-height: 64px; padding: 10px 16px 10px 12px; gap: 12px; color: #fff;
            background: var(--tone); border-color: var(--tone); box-shadow: 0 4px 12px rgba(11, 31, 58, .14); }
.dbtn.big:hover { background: var(--tone); filter: brightness(.93); box-shadow: 0 6px 18px rgba(11, 31, 58, .2); }
.dbtn.big .oi { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .2); color: #fff; }
.dbtn.big .oi svg { width: 20px; height: 20px; }
.dbtn .dt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dbtn .dt b { font-size: 16px; font-weight: 700; }
.dbtn .dt small { font-size: 13px; font-weight: 400; opacity: .9; line-height: 1.3; }
.decide-alt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding-top: 10px; margin-top: 2px;
              border-top: 1px solid var(--card-border); font-size: 14px; color: var(--steel); }
.decide-alt .linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; margin-left: -6px;
                       background: none; border: 0; border-radius: 6px; font: inherit; font-weight: 600;
                       color: var(--blue); cursor: pointer; }
.decide-alt .linkbtn:hover { background: var(--sky-bg); }
.decide-alt .linkbtn .oi { width: 16px; height: 16px; display: inline-grid; place-items: center; }
.decide-alt .linkbtn .oi svg { width: 16px; height: 16px; }
.decide-none { margin: 0; color: var(--steel); }

/* ---- Progress steps (steps.js): one color per step, same stage colors as the boards ---- */
.st-new      { --sc: var(--c-new);      --sc-bg: #E8EFFF; --sc-ink: #0B3FB3; }
.st-ready    { --sc: var(--c-ready);    --sc-bg: #F1EAFD; --sc-ink: #4B1FA0; }
.st-assigned { --sc: var(--c-assigned); --sc-bg: #E3F3FD; --sc-ink: #035E8A; }
.st-progress { --sc: var(--c-progress); --sc-bg: #FFF6E0; --sc-ink: #6E4A00; }
.st-parts    { --sc: var(--c-parts);    --sc-bg: #FDEFE3; --sc-ink: #7A3A08; }
.st-hold     { --sc: var(--c-hold);     --sc-bg: #F1F4F8; --sc-ink: #2E3A4B; }
.st-done     { --sc: var(--c-done);     --sc-bg: #E4F4EA; --sc-ink: #145C33; }
.st-cancel   { --sc: var(--stop);       --sc-bg: #FBE9E7; --sc-ink: #7F1F16; }
.stepper { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
/* the line from the previous step to this one */
.stepper li + li::before {
  content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px;
  background: var(--line); border-radius: 999px; z-index: 0;
}
.stepper li.line-done + li.line-done::before { background: var(--sc); }
.stepper .dot {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: #A9B5C3;
}
.stepper .dot svg { width: 15px; height: 15px; }
.stepper li.is-done .dot, .stepper li.is-now .dot { background: var(--sc); border-color: var(--sc); color: #fff; }
.stepper li.is-now .dot { box-shadow: 0 0 0 4px var(--sc-bg); }
/* wrap only between words; the longest label word ("Technician") fits a 62px phone column */
.stepper .lbl { font-size: 11px; line-height: 1.2; text-align: center; color: var(--steel); overflow-wrap: normal; }
.stepper li.is-done .lbl { color: var(--navy); font-weight: 600; }
.stepper li.is-now .lbl { color: var(--sc-ink); font-weight: 700; }
.step-now {
  display: inline-flex; align-items: center; gap: 7px; margin: 12px 0 0; padding: 4px 11px 4px 9px;
  border-radius: 999px; background: var(--sc-bg); color: var(--sc-ink); font-size: 13px; font-weight: 700;
}
.step-now .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }

/* ---- Supply team panel (Supply board) ---- */
.team { margin-top: 28px; }
.team-lead { margin: -4px 0 0; color: var(--steel); font-size: 14px; }
.team-add { display: flex; align-items: flex-end; }
.team-add .btn { min-height: 40px; }
.badge.on { background: var(--go-bg); color: var(--go); }
.badge.off { background: var(--paper); color: var(--steel); }

/* ---- Instant search on boards and lists (Hub.searchBar) ---- */
.findbar { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; max-width: 640px; margin: 4px 0 0; }
.findbar svg { position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; color: var(--steel); pointer-events: none; }
.findbar input {
  flex: 1 1 280px; min-height: 44px; padding: 8px 14px 8px 42px; border: 0; border-radius: var(--radius-sm);
  background: #fff; font: inherit; font-size: 16px; color: var(--navy); box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.findbar input:focus { outline: none; box-shadow: 0 0 0 3px var(--sky), 0 2px 10px rgba(0,0,0,.18); }
.findcount { color: #B9C8DC; font-size: 14px; font-weight: 600; }
.findopen { background: var(--sky); border-color: var(--sky); color: var(--band-1); font-weight: 600; }
.findopen:hover { background: #3BBBF7; }
.pagehead .find { margin: 16px 0 0; }

/* App name + privacy link on the public pages (Google's OAuth branding check looks for both). */
.legal { text-align: center; font-size: 13px; color: var(--steel); padding: 8px 16px 28px; }
.legal a { color: inherit; }

/* Between phone and laptop widths the menu gets its own scrollable row
   instead of wrapping unevenly. */
@media (max-width: 1100px) {
  .topbar { gap: 8px 16px; padding-bottom: 0; }
  .topbar .right { order: 2; margin-left: auto; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .topbar nav::-webkit-scrollbar { display: none; }
}

/* ---------- Hub look for the pages with their own sign-in ----------
   /inventory, /warehouse and /jobs are phone pages for the supply team and
   technicians. When a Hub admin opens them, Hub.hubChrome() adds the Hub menu
   and body.hub-mode lines them up with the other Hub pages: same band, same
   centered column, lists as a grid of cards, forms at a readable width. */
body.hub-mode { font-size: 16px; }
body.hub-mode .rq-top, body.hub-mode .whoami { display: none !important; }
body.hub-mode .rq-band, body.hub-mode .rq-wrap {
  padding-left: max(var(--gutter), calc((100% - var(--content)) / 2));
  padding-right: max(var(--gutter), calc((100% - var(--content)) / 2));
}
body.hub-mode .rq-band { padding-top: 30px; padding-bottom: 76px; }
body.hub-mode .rq-band .inner, body.hub-mode .rq-wrap { max-width: none; margin-left: 0; margin-right: 0; }
body.hub-mode .rq-band h1 { font-size: clamp(30px, 4vw, 40px); }
body.hub-mode .rq-band .find { max-width: 640px; }
body.hub-mode .rq-wrap { padding-top: 0; padding-bottom: 64px; }
body.hub-mode .rq-wrap.lifted { margin-top: -52px; }
body.hub-mode .hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
body.hub-mode .hub-grid > * { margin-bottom: 0; }
body.hub-mode .hub-grid > .empty, body.hub-mode .hub-grid > .empty-mine { grid-column: 1 / -1; }
body.hub-mode .hub-narrow { max-width: 900px; margin-left: auto; margin-right: auto; }
.rq-wrap .msg:empty { display: none; }

/* "Signed in as … [Supply orders] [Sign out]" row on the navy band of the
   phone pages (request form, My Jobs, Warehouse, Inventory): links and the
   sign-out are outlined buttons so they're easy to spot. */
.whoami { font-size: 14px; color: #B9C8DC; margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.whoami[hidden] { display: none; }
.whoami b { color: #fff; font-weight: 600; }
.whoami > span { flex-basis: 100%; }   /* name on its own line, the buttons together under it */
.whoami a, .whoami button {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.10); color: #fff;
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.whoami a:hover, .whoami button:hover { background: rgba(255,255,255,.22); border-color: #fff; }
.whoami a:focus-visible, .whoami button:focus-visible { outline: 2px solid #8FD3FF; outline-offset: 2px; }

/* Service and Supply boards: status tabs (.toolbar-card > .filters) over one
   sortable table, like the Warehouse list. Click a header to sort, a row to open
   the request. "wide" columns hide on phones; "phone-only" bits show there. */
.qtable td { vertical-align: top; }
.qtable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.qtable th[data-sort]:hover { color: var(--navy); }
.qtable th .arrow { font-size: 11px; margin-left: 3px; color: var(--blue); }
.qtable tbody tr { cursor: pointer; }
.qtable tbody tr:hover td { background: #F3F7FF; }
.qtable td.id { white-space: nowrap; font-variant-numeric: tabular-nums; }
.qtable td.id b, .qtable td.st b { display: block; font-weight: 600; color: var(--navy); }
.qtable td small { display: block; color: var(--steel); font-size: 12px; }
.qtable td.st b { overflow-wrap: anywhere; }
.qtable td.what { max-width: 380px; }
.qtable .d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.qtable .it, .qtable .started { margin-top: 3px; font-size: 13px; color: var(--steel); }
.qtable .started { color: var(--green, #1E7B45); font-weight: 600; }
.qtable td.age { white-space: nowrap; }
.qtable td.age.old { color: #B42318; font-weight: 600; }
.qtable td a { color: var(--blue); }
.qtable .badge { margin: 0 4px 2px 0; }
.qtable .phone-only { display: none; }
.qtable + .empty, .qtable-empty { padding: 32px 12px; text-align: center; color: var(--steel); background: #fff; }
@media (max-width: 760px) {
  .qtable .wide { display: none; }
  .qtable .phone-only { display: block; }
  .qtable .d.phone-only { display: -webkit-box; font-size: 14px; margin: 2px 0; }
  .qtable th, .qtable td { padding: 9px 8px; }
}

/* Requests page: New / Pending tabs (Pending in red) with a row of smaller filters beside them. */
.filters button.pending .n { background: #FDE3E1; color: #B42318; }
.filters button.pending[aria-selected="true"] { background: #B42318; }
.filters button.pending[aria-selected="true"] .n { background: rgba(255, 255, 255, .25); color: #fff; }
.subfilters { display: flex; gap: 6px; flex-wrap: wrap; }
.subfilters button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; min-height: 34px;
  font: inherit; font-size: 14px; color: var(--steel); cursor: pointer; }
.subfilters button[aria-pressed="true"] { border-color: var(--navy); color: var(--navy); font-weight: 600; }

/* Pending reminder (hub.js remindPending) */
.remind-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.remind-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--navy); }
.remind-list a:hover { border-color: var(--blue); }
.remind-list .s { font-size: 13px; color: var(--steel); display: block; }
.remind-list .age { color: #B42318; font-weight: 600; white-space: nowrap; font-size: 14px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.subfilters .n { background: #E3E9F2; color: var(--navy); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 18px; margin-left: 2px; }
.subfilters button[aria-pressed="true"] .n { background: var(--navy); color: #fff; }

/* ---------- Dashboard, Oct 7, 2026 (owner chose the "mix" look): solid colored cards over
   the band, two charts, and request lists with station initials. ---------- */
.dash-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dcard { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 168px; box-sizing: border-box;
  padding: 18px 20px; border-radius: 18px; color: #fff; text-decoration: none; background: var(--blue);
  box-shadow: 0 10px 28px rgba(11, 31, 58, .16); transition: transform .15s ease, box-shadow .15s ease; }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11, 31, 58, .22); color: #fff; }
.dcard .top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; }
.dcard .top svg { width: 22px; height: 22px; }
.dcard .big { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 52px; font-weight: 700; line-height: .95; font-variant-numeric: tabular-nums; }
.dcard .foot { font-size: 13px; opacity: .88; margin-top: auto; }
.dcard .spark { width: 100%; height: 34px; display: block; }
.dcard.new { background: #0254FE; }
.dcard.pending { background: #F2A516; color: #3A2500; }
.dcard.pending:hover { color: #3A2500; }
.dcard.urgent { background: #C0392B; }
.dcard.done { background: #1E7A46; }
.dcard.calm { background: #fff; color: var(--navy); border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.dcard.calm:hover { color: var(--navy); }
.dcard.calm .foot { color: var(--steel); opacity: 1; }
.dcard .chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: center; }
.dcard .chips span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.dcard .split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .25); margin: 12px 0; }
.dcard .split i { display: block; height: 100%; }

.dash-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.dash-row.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpanel { background: #fff; border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.dpanel h2 { margin: 0; font-size: 18px; }
.dpanel .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dpanel .ph a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--steel); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.daybars { height: 180px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid #E3E9F2; }
.daybars .dcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; min-width: 0; }
.daybars .dcol b { display: block; border-radius: 4px 4px 0 0; }
.daybars .dcol b + b { border-radius: 0; }
.daybars .dcol span { font-size: 11px; color: var(--steel); text-align: center; line-height: 1.2; }
.daylabels { display: flex; justify-content: space-between; font-size: 12px; color: var(--steel); margin-top: 6px; }
.stagebars { display: grid; gap: 10px; }
.stagebars a { display: grid; gap: 4px; text-decoration: none; color: var(--navy); font-size: 14px; }
.stagebars a .l { display: flex; justify-content: space-between; }
.stagebars a .t { height: 8px; border-radius: 999px; background: #EDF1F6; overflow: hidden; }
.stagebars a .t i { display: block; height: 100%; border-radius: 999px; }
.stagebars a:hover .l span { color: var(--blue); }
.stagebars h3 { margin: 6px 0 0; font-size: 13px; color: var(--steel); text-transform: uppercase; letter-spacing: .04em; }
.plist { display: grid; }
.plist a { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #EDF1F6; text-decoration: none; color: var(--navy); }
.plist a:first-child { border-top: 0; }
.plist a:hover .nm { color: var(--blue); }
.plist .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px; background: #E8EEFF; color: #0142C8; }
.plist .av.red { background: #FBE9E7; color: #9E2A20; }
.plist .grow { flex: 1; min-width: 0; }
.plist .nm { font-weight: 600; }
.plist .ds { font-size: 14px; color: var(--steel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist .tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.plist .tag.urgent { background: #FBE9E7; color: #9E2A20; }
.plist .tag.svc { background: #E8EEFF; color: #0142C8; }
.plist .tag.sup { background: #E3F3FD; color: #035E8C; }
.plist .age { font-size: 13px; color: var(--steel); white-space: nowrap; min-width: 52px; text-align: right; }
.plist .age.old { color: #9E2A20; font-weight: 700; font-size: 14px; }
.plist .none { padding: 18px 0; color: var(--steel); }
.newreq-btn { background: var(--sky); color: var(--navy) !important; font-weight: 700; padding: 11px 18px; border-radius: 12px; text-decoration: none; white-space: nowrap; }
.newreq-btn:hover { filter: brightness(1.06); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 1000px) {
  .dash-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row, .dash-row.halves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dash-cards { gap: 10px; }
  .dcard { min-height: 140px; padding: 14px; border-radius: 14px; }
  .dcard .big { font-size: 42px; }
  .daybars { gap: 4px; height: 150px; }
  .plist .tag { display: none; }
}
.dash-row { align-items: start; }
.dpanel h2 .count { background: #E3E9F2; color: var(--navy); border-radius: 999px; padding: 1px 8px; font-size: 13px; vertical-align: 2px; }
.plist { grid-template-columns: minmax(0, 1fr); }
.plist a { min-width: 0; }
.plist .grow { display: block; }

/* ---------- Navy menu bar on every Hub page (Oct 7, 2026, owner chose the top of look B) ---------- */
.topbar { background: var(--navy); border-bottom: 0; box-shadow: none; }
.topbar .wordmark { color: #fff; }
.topbar .brand img { background: #fff; border-radius: 8px; padding: 3px 6px; height: 30px; }
.topbar nav { gap: 2px; }
.topbar nav a { color: #C9D6EA; border-bottom: 0; border-radius: 999px; padding: 6px 10px; }
.topbar nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topbar nav a[aria-current="page"] { color: var(--navy); background: var(--sky); font-weight: 700; }
.topbar .live { color: #C9D6EA; }
.topbar .avatar { background: #FFB020; color: var(--navy); }
.topbar .btn.small { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.topbar .btn.small:hover { background: rgba(255, 255, 255, .1); }
/* The band under it starts with a thin sky line so the two navy areas don't run together. */
.topbar + .pagehead, .topbar ~ .pagehead { border-top: 3px solid var(--sky); }

/* Dashboard: B's top, the greeting on the light background (no navy band), cards below it. */
.pagehead.dash-top { background: transparent; color: var(--navy); border-top: 0; padding-bottom: 8px; }
.pagehead.dash-top::before, .pagehead.dash-top::after { display: none; }
.pagehead.dash-top h1 { color: var(--navy); }
.pagehead.dash-top .lead { color: var(--steel); }
.pagehead.dash-top .hero-date { color: var(--steel); }
.pagehead.dash-top .searchbar input { border: 1px solid var(--line); }
.pagehead.dash-top + main.lifted { margin-top: 0; }
@media (max-width: 1400px) { .topbar .wordmark { display: none; } }
.topbar { gap: 14px; }
.topbar nav a { font-size: 15px; padding: 6px 9px; }
.topbar .right { gap: 12px; }
/* Look B menu bar: one row; the initials badge opens Sign out; Live is a dot. */
.topbar .wordmark { display: inline; }
@media (max-width: 1100px) { .topbar .wordmark { display: none; } }
.topbar { gap: 18px; }
.topbar .right { gap: 8px; }
.topbar .live > span:not(.dot) { display: none; }
.topbar .live .dot { width: 9px; height: 9px; }
.topbar .userwrap { position: relative; }
.topbar .avatar { border: 0; cursor: pointer; width: 34px; height: 34px; font: inherit; font-weight: 700; font-size: 13px; }
.topbar .avatar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.topbar .usermenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; background: #fff; color: var(--navy);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 31, 58, .25); padding: 12px; display: grid; gap: 2px; }
.topbar .usermenu .um-name { font-weight: 700; }
.topbar .usermenu .um-email { font-size: 13px; color: var(--steel); margin-bottom: 8px; overflow-wrap: anywhere; }
.topbar .usermenu #signout { background: #fff; color: var(--navy); border: 1px solid var(--line); width: 100%; }
.topbar .usermenu #signout:hover { background: #F3F6FA; }
.newreq-btn.dark { background: var(--blue); color: #fff !important; }
.topbar .userwrap { display: flex; align-items: center; gap: 8px; }
.band-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.band-row .find { flex: 1 1 360px; }
.band-row .newreq-btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.badge.pm { background: #EDE7FF; color: #5B3FD0; margin-right: 4px; }
.badge.walkin { background: #E3F4EC; color: #1F6B47; margin-right: 4px; }
/* KPI scorecard (owner's KPI sheet) under the Dashboard chart */
.dash-stack { display: grid; gap: 16px; min-width: 0; }
.kpitable { display: grid; }
.krow { display: grid; grid-template-columns: 14px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center;
  padding: 10px 0; border-top: 1px solid #EDF1F6; }
.krow:first-child { border-top: 0; }
.krow small { display: block; font-size: 12px; color: var(--steel); font-weight: 400; }
.krow .kname b { font-weight: 600; }
.krow .kval b { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 24px; font-variant-numeric: tabular-nums; }
.krow .ktarget { font-size: 13px; color: var(--navy); text-align: right; }
.krow .kdot { width: 12px; height: 12px; border-radius: 50%; background: #C9D3E0; }
.krow.good .kdot { background: var(--go); } .krow.good .kval b { color: var(--go); }
.krow.ok .kdot { background: #F2A516; } .krow.ok .kval b { color: #8A5300; }
.krow.bad .kdot { background: #C0392B; } .krow.bad .kval b { color: #9E2A20; }
/* KPI target bars (owner's choice B, Oct 11, 2026) */
.krow.kb { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 96px; row-gap: 4px; }
.krow.kb .kval { text-align: right; white-space: nowrap; }
.krow.kb .kextra { grid-column: 1 / -1; }
.kbar { position: relative; height: 22px; background: #EEF2F7; border-radius: 6px; }
.kbar.none { display: flex; align-items: center; padding: 0 10px; font-size: 12px; color: var(--steel); }
.kbar .zone { position: absolute; top: 0; bottom: 0; background: #E3F1E8; border-radius: 6px; }
.kbar .fill { position: absolute; left: 0; top: 5px; height: 12px; border-radius: 0 4px 4px 0; background: #C9D3E0; }
.krow.good .kbar .fill { background: var(--go); } .krow.ok .kbar .fill { background: #D98E04; } .krow.bad .kbar .fill { background: #C0392B; }
.kbar .last { position: absolute; top: 3px; height: 16px; width: 3px; border-radius: 2px; background: #8A94A3; }
.kbar .tgt { position: absolute; top: -3px; height: 28px; width: 3px; border-radius: 1px; background: var(--navy); }
.klegend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--steel); padding-top: 8px; }
.klegend span { display: inline-block; margin-left: 8px; }
.klegend span:first-child { margin-left: 0; }
.klegend .lg-fill { width: 14px; height: 8px; border-radius: 2px; background: var(--steel); }
.klegend .lg-tgt { width: 3px; height: 14px; background: var(--navy); }
.klegend .lg-zone { width: 14px; height: 10px; border-radius: 3px; background: #E3F1E8; }
.klegend .lg-last { width: 3px; height: 12px; border-radius: 2px; background: #8A94A3; }
@media (max-width: 560px) {
  .krow.kb { grid-template-columns: minmax(0, 1fr) auto; }
  .krow.kb .kbar { grid-column: 1 / -1; grid-row: 2; }
  .krow.kb .kname small { display: block; }
  .krow { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .krow .ktarget { grid-column: 2 / -1; text-align: left; }
  .krow .kname small { display: none; }
}
.topbar .usermenu[hidden] { display: none; }

/* ---------- Status tabs as count tiles (Oct 8, 2026, owner chose option C): Service / Supply Boards,
   Warehouse stages, Requests New / Pending. Number on top, label below, stage color on the top edge. ---------- */
.toolbar-card:has(> .filters.stat-tabs:only-child) { background: transparent; border: 0; box-shadow: none; padding: 0; }
.filters.stat-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); gap: 10px; width: auto;
  border: 0; border-radius: 0; background: transparent; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.filters.stat-tabs::-webkit-scrollbar { display: none; }
.filters.stat-tabs button { --tile: var(--steel); --tile-bg: #EEF1F5;
  display: flex; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 4px;
  min-height: 0; padding: 10px 12px 11px; border-radius: 12px; background: #fff; border: 1px solid var(--card-border);
  border-top: 4px solid var(--tile); box-shadow: var(--shadow); color: var(--steel); font-size: 13px; font-weight: 600;
  text-align: left; white-space: normal; line-height: 1.2; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.filters.stat-tabs button:hover { transform: translateY(-1px); }
.filters.stat-tabs button .n { background: none; color: var(--navy); padding: 0; border-radius: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 30px; font-weight: 700; line-height: 1; }
.filters.stat-tabs button[aria-selected="true"], .filters.stat-tabs button[aria-pressed="true"] {
  background: var(--tile-bg); color: var(--navy); border-color: var(--tile); box-shadow: inset 0 0 0 2px var(--tile); }
.filters.stat-tabs button[aria-selected="true"] .n, .filters.stat-tabs button[aria-pressed="true"] .n { background: none; color: var(--navy); }
/* stage colors */
.filters.stat-tabs [data-k="NEW"], .filters.stat-tabs [data-t="new"] { --tile: #0254FE; --tile-bg: #E8EEFF; }
.filters.stat-tabs [data-k="READY FOR ASSIGNMENT"], .filters.stat-tabs [data-k="APPROVED"], .filters.stat-tabs [data-k="prepare"] { --tile: #6E4BD8; --tile-bg: #EFEAFF; }
.filters.stat-tabs [data-k="ASSIGNED"], .filters.stat-tabs [data-k="DISPATCHED"], .filters.stat-tabs [data-k="deliver"] { --tile: #0379B8; --tile-bg: #E3F3FD; }
.filters.stat-tabs [data-k="IN PROGRESS"], .filters.stat-tabs [data-k="PREPARED"], .filters.stat-tabs [data-k="dispatch"] { --tile: #D98E04; --tile-bg: #FFF3DC; }
.filters.stat-tabs [data-k="WAITING FOR PARTS"], .filters.stat-tabs [data-t="pending"] { --tile: #C0392B; --tile-bg: #FBE9E7; }
.filters.stat-tabs [data-k="ON HOLD"] { --tile: #5A6778; --tile-bg: #EEF1F5; }
.filters.stat-tabs [data-k="COMPLETED"], .filters.stat-tabs [data-k="DELIVERED"] { --tile: #1E7A46; --tile-bg: #E4F4EA; }
.filters.stat-tabs [data-k="CANCELLED"] { --tile: #9AA4B2; --tile-bg: #F1F3F6; }
.filters.stat-tabs button.pending { background: #fff; color: var(--steel); }
.filters.stat-tabs button.pending[aria-selected="true"] { background: var(--tile-bg); color: var(--navy); }
@media (max-width: 560px) {
  .filters.stat-tabs { grid-auto-columns: minmax(104px, 1fr); gap: 8px; }
  .filters.stat-tabs button { padding: 8px 10px 9px; }
  .filters.stat-tabs button .n { font-size: 26px; }
}
.filters.stat-tabs button.pending .n, .filters.stat-tabs button.pending[aria-selected="true"] .n { background: none; color: var(--stop); }
.filters.stat-tabs { width: 100%; box-sizing: border-box; }
.filters.stat-tabs { grid-auto-columns: minmax(104px, 1fr); }

/* ---------- Colored chips (Oct 8, 2026, owner picked "option A" for the Billing tabs): each choice its own
   tinted pill, the selected one filled with its color. ---------- */
.filters.chips { display: flex; flex-wrap: wrap; gap: 6px; width: auto; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.filters.chips button { --c: #5A6778; --bg: #EEF1F5; border-radius: 999px; background: var(--bg); color: var(--c); font-weight: 600;
  padding: 7px 14px; min-height: 38px; border: 0; }
.filters.chips button:hover { filter: brightness(.97); }
.filters.chips button .n { background: #fff; color: var(--c); }
.filters.chips button[aria-pressed="true"], .filters.chips button[aria-selected="true"] { background: var(--c); color: #fff; }
.filters.chips button[aria-pressed="true"] .n, .filters.chips button[aria-selected="true"] .n { background: rgba(255, 255, 255, .25); color: #fff; }
.filters.chips [data-k="service"] { --c: #0254FE; --bg: #E8EEFF; }
.filters.chips [data-k="supply"] { --c: #0379B8; --bg: #E3F3FD; }
.filters.chips [data-v="prepare"] { --c: #6E4BD8; --bg: #EFEAFF; }
.filters.chips [data-v="statements"] { --c: #B4452D; --bg: #FBE9E7; }
.filters.chips [data-v="reports"] { --c: #1E7A46; --bg: #E4F4EA; }
.filters.chips .n:empty { display: none; }
/* Inventory list tabs as chips */
.filters.chips [data-k="all"] { --c: #0254FE; --bg: #E8EEFF; }
.filters.chips [data-k="low"] { --c: #A76A00; --bg: #FFF3DC; }
.filters.chips [data-k="out"] { --c: #B4452D; --bg: #FBE9E7; }
.filters.chips [data-k="history"] { --c: #5A6778; --bg: #EEF1F5; }
/* Requests page filters as chips */
.filters.chips [data-f="all"] { --c: #0B1F3A; --bg: #E9EEF5; }
.filters.chips [data-f="service"] { --c: #0254FE; --bg: #E8EEFF; }
.filters.chips [data-f="supply"] { --c: #0379B8; --bg: #E3F3FD; }
.filters.chips [data-f="urgent"] { --c: #C0392B; --bg: #FBE9E7; }
.subfilters.filters.chips .n:empty { display: inline-block; }
.toolbar-card > .filters.stat-tabs:not(:only-child) { width: auto; grid-auto-columns: 170px; }
@media (max-width: 560px) { .toolbar-card > .filters.stat-tabs:not(:only-child) { width: 100%; grid-auto-columns: minmax(0, 1fr); } }
