/* =====================================================================
   CBS Metro v3 - one stylesheet for the whole app.

   Design language carried over from the approved field-entry prototype:
   navy-slate ink, a concrete grey ground biased toward the accent, signage
   blue for anything interactive, and a kerb amber reserved for "attention"
   and for the mode you are locked into. Barlow (a transport grotesque) for
   text, IBM Plex Mono for anything that is a number on a plate or a ticket.

   Mobile first throughout: every target is >= 46px, every text input is
   >= 16px so iOS does not zoom on focus.
   ===================================================================== */

:root {
  --ink:        #101826;
  --ink-2:      #3C4757;
  --muted:      #6B7686;
  --line:       #D8DEE7;
  --ground:     #EDF0F4;
  --surface:    #FFFFFF;
  --surface-2:  #F6F8FB;

  --accent:     #1B4FD8;
  --accent-ink: #123AA6;
  --accent-soft:#E4EBFC;

  --warn:       #C77C00;
  --warn-bg:    #FDF1D8;
  --warn-line:  #F2A900;

  --go:         #0E7C4A;
  --go-bg:      #DCF2E7;
  --stop:       #B03024;
  --stop-bg:    #FBE4E2;

  --bar:        #101826;
  --bar-ink:    #FFFFFF;

  --shadow:     0 1px 2px rgba(16,24,38,.07), 0 4px 14px rgba(16,24,38,.06);
  --shadow-up:  0 -6px 20px rgba(16,24,38,.10);
  --safe-b:     env(safe-area-inset-bottom, 0px);

  --sans: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --cond: "Barlow Semi Condensed", "Barlow", -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #E7ECF3; --ink-2: #B6C0CE; --muted: #8592A4; --line: #2A3547;
    --ground: #0A0F18; --surface: #141C29; --surface-2: #1B2432;
    --accent: #6E9BFF; --accent-ink: #A8C2FF; --accent-soft: #1B2B4D;
    --warn: #F5C35C; --warn-bg: #3A2E12; --warn-line: #F2A900;
    --go: #4FC48A; --go-bg: #10301F; --stop: #F58A80; --stop-bg: #3A1B18;
    --bar: #141C29; --bar-ink: #E7ECF3;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --shadow-up: 0 -6px 20px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #E7ECF3; --ink-2: #B6C0CE; --muted: #8592A4; --line: #2A3547;
  --ground: #0A0F18; --surface: #141C29; --surface-2: #1B2432;
  --accent: #6E9BFF; --accent-ink: #A8C2FF; --accent-soft: #1B2B4D;
  --warn: #F5C35C; --warn-bg: #3A2E12; --warn-line: #F2A900;
  --go: #4FC48A; --go-bg: #10301F; --stop: #F58A80; --stop-bg: #3A1B18;
  --bar: #141C29; --bar-ink: #E7ECF3;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --shadow-up: 0 -6px 20px rgba(0,0,0,.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

a { color: var(--accent); }

/* ------------------------------------------------------------- app bar */

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bar); color: var(--bar-ink);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 15px 11px;
  display: flex; align-items: center; gap: 11px;
}
.appbar a { color: inherit; text-decoration: none; }
.appbar .back { font-size: 21px; line-height: 1; padding: 6px 8px; margin-left: -8px; }
.appbar .logo { flex: none; width: 32px; height: 32px; display: block; }
.appbar .back + .logo { margin-left: -6px; }
.appbar .mark {
  flex: 1; min-width: 0;
  font-family: var(--cond); font-weight: 700; font-size: 18px;
  letter-spacing: .06em; text-transform: uppercase;
}
.appbar .mark small {
  display: block; font-size: 10.5px; letter-spacing: .17em;
  opacity: .58; font-weight: 600; text-transform: uppercase;
}
.appbar .who { text-align: right; font-size: 12.5px; line-height: 1.3; max-width: 52%; }
.appbar .who b { font-weight: 600; }
.appbar .who span { display: block; font-size: 11px; opacity: .6; }
.appbar .who a { text-decoration: underline; }

/* --------------------------------------------------------- visit strip */

.vstrip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 15px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
  position: sticky; top: 0; z-index: 35;
}
.vstrip .v-name { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.vstrip .v-range { flex: 1; min-width: 0; }
.vstrip .v-day {
  font-family: var(--cond); font-weight: 700; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 3px 9px; border-radius: 6px;
}
.vstrip .v-day.v-past { background: var(--surface-2); color: var(--muted); }
.vstrip-none { background: var(--warn-bg); color: var(--warn); }
.vstrip-none a { color: inherit; font-weight: 700; }
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--go);
  box-shadow: 0 0 0 3px var(--go-bg); flex: none;
}

/* ------------------------------------------------------------ day tabs */

.daytabs {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 2px 4px; margin-bottom: 6px; scrollbar-width: none;
}
.daytabs::-webkit-scrollbar { display: none; }
.daytab {
  flex: none; min-width: 62px; text-align: center; text-decoration: none;
  padding: 8px 11px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.daytab .n {
  display: block; font-family: var(--cond); font-weight: 700; font-size: 13px;
  letter-spacing: .05em; text-transform: uppercase;
}
.daytab .w { display: block; font-size: 11px; color: var(--muted); }
.daytab.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.daytab.on .w { color: var(--accent-ink); opacity: .75; }
.daytab.future { opacity: .45; }

.vpick { margin: 12px 0 2px; }
.vpick select {
  width: 100%; font-family: var(--sans); font-size: 15px;
  padding: 11px 12px; min-height: 46px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}

/* ---------------------------------------------------------------- shell */

.wrap { max-width: 640px; margin: 0 auto; padding: 13px 13px 118px; }
body.has-tabbar .wrap { padding-bottom: 96px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 11px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 11px 13px; }
.card.flat  { box-shadow: none; background: var(--surface-2); }

.lbl {
  display: block;
  font-family: var(--cond); font-size: 12px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px;
}
.opt { font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .7; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.45; }

.sect { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.sect .lbl { margin-bottom: 0; }
.sect-sub { font-size: 12.5px; color: var(--muted); }
.sect-link { margin-left: auto; font-size: 13px; text-decoration: none; font-weight: 600; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.stack { display: flex; flex-direction: column; gap: 11px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 7px; }

/* --------------------------------------------------------------- inputs */

input, button, select, textarea { font-family: inherit; }

.inp, input[type=text], input[type=number], input[type=email], input[type=tel],
input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%;
  font-family: var(--sans); font-size: 16px;
  padding: 12px 13px; min-height: 50px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
.inp.num, input[inputmode=numeric], input[type=number] {
  font-family: var(--mono); font-weight: 600; letter-spacing: .03em;
}
.inp::placeholder, input::placeholder {
  font-family: var(--sans); font-weight: 400; letter-spacing: 0;
  color: var(--muted); opacity: .85;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
a:focus-visible, button:focus-visible, .chip:focus-visible, .daytab:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ------------------------------------------------------ segmented + chips */

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 3px; border-radius: 12px;
}
.segmented button {
  border: 0; background: transparent;
  font-family: var(--cond); font-size: 15px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); min-height: 48px; border-radius: 9px; cursor: pointer;
  position: relative; transition: background .13s, color .13s;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.segmented button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 27%; right: 27%; bottom: 7px;
  height: 3px; border-radius: 2px; background: var(--warn-line);
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  min-height: 46px; padding: 8px 15px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 10px; cursor: pointer;
  transition: border-color .13s, background .13s, color .13s;
}
.chip[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-ink); font-weight: 700;
}

/* ---------------------------------------------------- bus autocomplete */

.ac { position: relative; }
.ac-input-wrap { position: relative; }
.ac-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; background: transparent;
  font-size: 20px; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 5px); z-index: 30;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(16,24,38,.2);
  max-height: 296px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.ac-list:empty { display: none; }
.ac-item {
  display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  padding: 12px 13px; min-height: 52px; cursor: pointer; color: var(--ink);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.on { background: var(--accent-soft); }
.ac-item b {
  flex: 1; font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: .03em;
}
.ac-item b mark { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 1px; }
.ac-item span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ac-empty { padding: 15px 13px; color: var(--muted); font-size: 14px; }
.ac-item.ac-add { color: var(--accent); font-weight: 700; font-size: 15px; align-items: center; }
.ac-empty + .ac-add { border-top: 1px solid var(--line); }

.bus-picked {
  display: flex; align-items: center; gap: 11px;
  background: var(--accent-soft); border: 1.5px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; min-height: 50px;
}
.bus-picked .n {
  font-family: var(--mono); font-size: 18px; font-weight: 600;
  letter-spacing: .04em; color: var(--accent-ink);
}
.bus-picked .m { font-size: 12.5px; color: var(--accent-ink); opacity: .75; }
.bus-picked button { margin-left: auto; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 21px; line-height: 1; color: var(--accent-ink);
}

/* ------------------------------------------------------------ when line */

.whenline { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.whenline .now { font-weight: 700; color: var(--ink); font-family: var(--mono); }
.whenline button {
  margin-left: auto; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--accent); border-radius: 999px; padding: 7px 14px; min-height: 40px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; font-size: 17px; font-weight: 600;
  min-height: 54px; padding: 13px 18px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: #fff;
  cursor: pointer; text-decoration: none;
}
:root[data-theme="dark"] .btn { color: #0A0F18; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-go { background: var(--go); font-size: 18px; min-height: 58px; }
.btn-quiet {
  background: var(--surface); color: var(--ink-2);
  border: 1.5px solid var(--line); font-size: 15px; min-height: 46px;
}
:root[data-theme="dark"] .btn-quiet { color: var(--ink-2); }
.btn-danger { background: var(--stop); }
.btn-sm { width: auto; min-height: 42px; font-size: 14px; padding: 9px 15px; border-radius: 10px; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 36;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up);
  padding: 10px 13px calc(10px + var(--safe-b));
}
/* The tab bar is 58px PLUS the phone's home-indicator strip, so the Save bar
   sits on top of both - and does not pad for that strip a second time. */
body.has-tabbar .savebar { bottom: calc(58px + var(--safe-b)); padding-bottom: 10px; }
/* A page with a Save bar AND a tab bar must clear both, or its last card
   (Your last entries) hides underneath them. */
body.has-savebar .wrap { padding-bottom: calc(150px + var(--safe-b)); }
.savebar .inner { max-width: 640px; margin: 0 auto; }

/* -------------------------------------------------------------- banners */

.banner {
  display: block;
  border-radius: 11px; padding: 12px 14px; margin-bottom: 11px;
  font-size: 14.5px; border: 1.5px solid transparent; text-decoration: none;
}
.banner b { display: block; margin-bottom: 2px; }
.banner-good { background: var(--go-bg);   border-color: var(--go);   color: var(--go); }
.banner-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.banner-bad  { background: var(--stop-bg); border-color: var(--stop); color: var(--stop); }
.banner-link { cursor: pointer; }

.inline-warn, .warn-inline {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--warn); background: var(--warn-bg);
  border-radius: 9px; padding: 9px 11px; margin-top: 8px;
}

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

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 200%);
  width: min(600px, calc(100vw - 26px));
  background: var(--ink); color: var(--surface);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 16px 40px rgba(16,24,38,.4);
  font-size: 14.5px; z-index: 90;
  transition: transform .23s cubic-bezier(.2,.85,.3,1);
}
:root[data-theme="dark"] .toast { background: #E7ECF3; color: #0A0F18; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--stop); color: #fff; }
.toast .msg { flex: 1; }
.toast button {
  border: 0; background: rgba(127,127,127,.3); color: inherit;
  font-family: var(--cond); font-size: 12.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 9px 13px; min-height: 40px; border-radius: 8px; cursor: pointer;
}

/* ------------------------------------------------------------ list rows */

.row, .entry {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.row:last-child, .entry:last-child { border-bottom: 0; }
.row .t, .entry .t {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  color: var(--muted); width: 44px; flex: none;
}
.row .body, .entry .body { flex: 1; min-width: 0; }
.row .plate, .entry .bn {
  font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: .03em;
}
.row .sub, .entry .sub { font-size: 12.5px; color: var(--muted); }
.row .sub i, .entry .sub i, .entry .sub .dot { font-style: normal; opacity: .45; margin: 0 5px; }
.row .amt, .entry .amt { font-family: var(--mono); font-weight: 600; font-size: 15px; white-space: nowrap; }
.row form { margin: 0; }
/* the one active visit, so it is unmistakable in the list */
.row-active {
  background: var(--go-bg);
  border-radius: 9px;
  padding-left: 10px; padding-right: 10px;
  margin: 0 -10px;
  border-bottom-color: transparent;
}

/* ----------------------------------------------------------------- tags */

.tag {
  display: inline-block;
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap; vertical-align: 1px;
}
.tag-trip     { background: var(--accent-soft); color: var(--accent-ink); }
.tag-empty    { background: #EDE9FE; color: #5B21B6; }
.tag-parking  { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag-pending, .tag-unverified { background: var(--warn-bg); color: var(--warn); }
.tag-approved { background: var(--go-bg);   color: var(--go); }
.tag-rejected { background: var(--stop-bg); color: var(--stop); }
.tag-live     { background: var(--go-bg);   color: var(--go); }
:root[data-theme="dark"] .tag-empty { background: #2A2350; color: #C7B8FF; }

/* -------------------------------------------------------------- tallies */

.tally5 { display: flex; }
.tally5 > div { flex: 1; text-align: center; min-width: 0; }
.tally5 .n {
  font-family: var(--mono); font-size: 22px; font-weight: 600; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tally5 .n.warnnum { color: var(--warn); }
.tally5.tally-sm .n { font-size: 17px; }
.tally5 .k {
  font-family: var(--cond); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* --------------------------------------------------------------- tables */

.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td {
  padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.grid thead th {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  border-bottom-width: 1.5px;
}
table.grid tbody th { font-weight: 600; }
table.grid tbody th a { text-decoration: none; }
table.grid .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.grid .mono { font-family: var(--mono); letter-spacing: .02em; }
table.grid tr.zero td, table.grid tr.zero th { opacity: .45; }
table.grid tr.rownow { background: var(--accent-soft); }
table.grid tfoot th, table.grid tfoot td {
  font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0;
}
.wk { font-size: 11px; color: var(--muted); font-weight: 500; }
.dash { color: var(--muted); opacity: .5; }

/* a tappable number inside the status grid */
.cell {
  border: 0; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--accent);
  padding: 4px 6px; margin: -4px -6px; border-radius: 6px;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.cell:hover { background: var(--accent-soft); }

/* ----------------------------------------------------------------- bars */

.barrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.barlab { width: 34%; font-size: 13.5px; color: var(--ink-2); }
.barlab a { text-decoration: none; font-family: var(--mono); font-weight: 600; }
.bartrack { flex: 1; height: 9px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.barfill { height: 100%; background: var(--accent); border-radius: 5px; opacity: .55; }
.barfill-now { opacity: 1; }
.barval {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  min-width: 58px; text-align: right; font-variant-numeric: tabular-nums;
}
.barval small { color: var(--muted); font-weight: 500; margin-left: 5px; }

/* -------------------------------------------------------- bottom sheet */

.sheet-back {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(16,24,38,.5);
}
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 71;
  width: min(640px, 100vw);
  max-height: 74vh; overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 4px 15px calc(18px + var(--safe-b));
  box-shadow: 0 -12px 40px rgba(16,24,38,.3);
}
.sheet-head {
  position: sticky; top: 0; background: var(--surface);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.sheet-head b { flex: 1; font-size: 16px; }
.sheet-body { padding-bottom: 6px; }

/* ------------------------------------------------------------ admin rows */

.adminrow {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: inherit;
}
.adminrow-t { font-size: 16px; font-weight: 600; }
.adminrow-n {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.adminrow-go { font-size: 22px; color: var(--muted); line-height: 1; }

/* ------------------------------------------------------------ bottom nav */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 38;
  display: flex; background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none;
  color: var(--muted);
  font-family: var(--cond); font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 2px 7px; min-height: 58px;
  border-top: 2.5px solid transparent; margin-top: -1px;
}
.tabbar a .ico { display: block; font-size: 18px; line-height: 1.25; margin-bottom: 1px; }
.tabbar a.on { color: var(--accent); border-top-color: var(--accent); }

/* -------------------------------------------------- the front door (gate) */

body.gate { background: var(--ground); }
.gate-wrap { max-width: 460px; padding-bottom: 40px; }

.gate-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 3px; border-radius: 12px; margin: 14px 0 12px;
}
.gate-tab {
  text-align: center; text-decoration: none;
  font-family: var(--cond); font-size: 15px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 13px 6px; min-height: 48px;
  border-radius: 9px;
}
.gate-tab.on {
  background: var(--ink); color: var(--surface);
  box-shadow: 0 1px 3px rgba(16,24,38,.25);
}
:root[data-theme="dark"] .gate-tab.on { color: var(--ground); }

.gate-lead {
  margin: 0 0 15px; font-size: 14.5px; color: var(--muted); line-height: 1.5;
}
.gate-lead b { color: var(--ink); }
.gate-panel .hint { margin-top: 13px; }

/* number-first sign-in: 1 Mobile number -> 2 Password / Your details */
.gate-steps {
  list-style: none; display: flex; gap: 8px; margin: 14px 0 12px; padding: 0;
}
.gate-steps li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-family: var(--cond); font-size: 13.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2);
}
.gate-steps li span {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); color: var(--ink); font-size: 12.5px; letter-spacing: 0;
}
.gate-steps li.on { color: var(--ink); border-color: var(--ink); background: var(--surface); }
.gate-steps li.on span { background: var(--ink); color: var(--surface); }
.gate-steps li.done span { background: var(--go); color: #fff; }
.gate-num { font-size: 22px; letter-spacing: .04em; }
.gate-guide { margin: 16px 0 0; padding: 0; list-style: none; }
.gate-guide li {
  font-size: 13.5px; line-height: 1.45; color: var(--muted);
  padding: 9px 0 0; margin-top: 9px; border-top: 1px solid var(--line);
}
.gate-guide li:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.gate-guide b { color: var(--ink); }
.gate-who {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 11px 13px; margin: 0 0 13px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.gate-who-n { font-size: 18px; font-weight: 700; }
.gate-who-id { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.gate-dev { font-size: 13px; color: var(--muted); margin: -2px 0 12px; }
.gate-dev b { color: var(--ink); }

.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 70px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--accent);
  font: 600 13px var(--sans); padding: 8px 10px; cursor: pointer;
}
/* Every property forced: a general `input` width rule otherwise stretches the
   hidden username field (it is there for password managers) past the screen. */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-width: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  white-space: nowrap; border: 0 !important; padding: 0 !important; margin: -1px !important;
}

/* ------------------------------------------------ people (super admin) */
.tabbar a { position: relative; }
.tab-badge {
  position: absolute; top: 4px; left: calc(50% + 7px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--stop); color: #fff; font: 700 11px/18px var(--sans);
  letter-spacing: 0;
}
.pfilter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.pfilter a {
  text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
}
.pfilter a.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pfilter a i { font-style: normal; opacity: .65; margin-left: 3px; }
.prow { display: flex; gap: 10px; align-items: flex-start; }
.prow .body { flex: 1; min-width: 0; }
.prow .sub, .devrow .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.prow .sub i, .devrow .sub i { font-style: normal; opacity: .45; margin: 0 5px; }
.prow-n { font-size: 16.5px; font-weight: 700; }
.prow-n a { color: inherit; text-decoration: none; }
.idtag { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 500; }
.approvebar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 11px; }
.approvebar select { flex: 1; min-width: 130px; }
.devrow { padding: 10px 0; border-top: 1px solid var(--line); }
.devrow:first-of-type { border-top: 0; }
.devrow-t { font-weight: 700; }
.devrow .btnrow { margin-top: 7px; }
.devrow.gone { opacity: .55; }
.logline { font-size: 13px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); }
.logline b { color: var(--ink); font-weight: 600; }
.me-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 6px 0 14px; }
.me-foot a { color: var(--accent); }

/* iPhone install-first steps on the front door */
.ios-steps { list-style: none; margin: 4px 0 0; padding: 0; }
.ios-steps li {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 0; border-top: 1px solid var(--line);
  font-size: 14px; line-height: 1.35; color: var(--ink-2);
}
.ios-steps li:first-child { border-top: 0; }
.ios-steps li b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 1px; }
.ios-steps li div b + b, .ios-steps li div span b { display: inline; font-size: inherit; }
.ios-ico {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.ios-ico-app { background: var(--surface-2); }
.ios-ico-app img { border-radius: 7px; display: block; }

/* ------------------------------------------------------- install prompt */

.installbar {
  position: fixed; left: 50%; bottom: 14px; transform: translate(-50%, 200%);
  width: min(600px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 11px;
  background: var(--ink); color: var(--surface);
  border-radius: 13px; padding: 12px 13px;
  box-shadow: 0 16px 40px rgba(16,24,38,.4);
  z-index: 95;
  transition: transform .24s cubic-bezier(.2,.85,.3,1);
}
:root[data-theme="dark"] .installbar { background: #E7ECF3; color: #0A0F18; }
.installbar.up { transform: translate(-50%, 0); }
.installbar .m { flex: 1; font-size: 12.5px; opacity: .8; line-height: 1.35; }
.installbar .m b { display: block; font-size: 14.5px; opacity: 1; margin-bottom: 1px; }
.installbar .yes {
  border: 0; background: var(--accent); color: #fff;
  font-family: var(--cond); font-size: 13px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 10px 15px; min-height: 42px; border-radius: 9px; cursor: pointer;
}
.installbar .no {
  border: 0; background: transparent; color: inherit; opacity: .6;
  font-size: 22px; line-height: 1; width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer;
}

/* ----------------------------------------------------------------- misc */

.empty-state, .blank {
  text-align: center; color: var(--muted); font-size: 14.5px; padding: 26px 14px;
}
.hidden, .hide { display: none !important; }
[hidden] { display: none !important; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================ entry form
   The field form, compacted so that everything down to the challan and
   sangat boxes fits a phone screen ABOVE the Save bar - no scrolling to
   finish an entry. Scoped to .entry-form so no other screen changes. */

.entry-form { padding: 12px 12px 13px; }
.entry-form .lbl { margin: 13px 0 6px; font-size: 11.5px; }
.entry-form .lbl.ef-first { margin-top: 0; }
/* The time line, at the foot of the card. */
.entry-form .ef-whenrow { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.entry-form .whenline { font-size: 14px; }
.entry-form .whenline button { min-height: 34px; padding: 5px 14px; font-size: 13px; }
.entry-form .ef-when { margin-top: 10px; }
.entry-form .ef-when .lbl { margin-top: 0; }
.entry-form .segmented button { min-height: 44px; }
.entry-form .chips { gap: 6px; }
.entry-form .chip { min-height: 42px; padding: 7px 13px; font-size: 14px; }
.entry-form .field { margin-bottom: 0; }
.entry-form .inline-warn { margin-top: 8px; }

/* One slim line instead of a banner - the app bar already says "unverified". */
.note-warn {
  font-size: 12.5px; line-height: 1.35; color: var(--warn);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: 9px; padding: 7px 11px; margin-bottom: 9px;
}

/* On a phone the visit strip is ONE line: name + day. The date range would
   wrap it onto a second line on every screen, and the day chip says it. */
@media (max-width: 480px) {
  .vstrip { flex-wrap: nowrap; padding: 8px 15px; }
  .vstrip .v-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .vstrip .v-range { display: none; }
}

/* Entry page chrome, a little shorter: the Save button and the app bar. */
body.has-savebar .savebar { padding-top: 8px; padding-bottom: 8px; }
body.has-savebar .savebar .btn { min-height: 50px; padding-top: 10px; padding-bottom: 10px; }
.entry-form .inp, .entry-form input[type=text], .entry-form input[type=number] { min-height: 46px; padding-top: 10px; padding-bottom: 10px; }
.note-warn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* SHORT screens (a small phone, or any phone inside the browser with its
   address bar): squeeze once more so the challan and sangat boxes still land
   above the Save bar. Tall screens never see this. */
@media (max-height: 700px) {
  body.has-savebar .appbar { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); padding-bottom: 7px; }
  body.has-savebar .appbar .mark small { display: none; }
  body.has-savebar .vstrip { padding-top: 6px; padding-bottom: 6px; }
  body.has-savebar .wrap { padding-top: 9px; }
  .entry-form { padding-top: 10px; padding-bottom: 11px; }
  .entry-form .lbl { margin: 9px 0 5px; }
  .entry-form .segmented button { min-height: 40px; }
  .entry-form .chip { min-height: 38px; padding: 5px 12px; }
  .entry-form .inp, .entry-form input[type=text], .entry-form input[type=number] { min-height: 44px; }
}

/* Status for a field phone: a plain "Today · Day 3 · Fri" line instead of
   day tabs - field sees today only. */
.dayline {
  font-family: var(--cond); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  padding: 4px 3px 10px;
}

/* Field phones have no app bar, so the visit strip is the top of the screen:
   it must clear the phone's status bar / notch itself (the installed iPhone
   app draws under the status bar). */
body.field-shell .vstrip { padding-top: calc(env(safe-area-inset-top, 0px) + 9px); }
body.field-shell .wrap { padding-top: 11px; }

/* ------------------------------------------------ Challans tab (2026-10-02)
   The whole card is the state: yellow pending, green approved / edited,
   light orange rejected. Tints stay readable in dark mode. */
:root {
  --chl-pend-bg: #FEF6C7; --chl-pend-line: #E3B505;
  --chl-ok-bg:   #E2F5EA; --chl-ok-line:   #1F9D5C;
  --chl-rej-bg:  #FFE8D4; --chl-rej-line:  #F08A3C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chl-pend-bg: #33300F; --chl-ok-bg: #11301F; --chl-rej-bg: #3A2414;
  }
}
:root[data-theme="dark"] { --chl-pend-bg: #33300F; --chl-ok-bg: #11301F; --chl-rej-bg: #3A2414; }

.chl { border-left: 6px solid var(--chl-pend-line); background: var(--chl-pend-bg); }
.chl-approved { border-left-color: var(--chl-ok-line);  background: var(--chl-ok-bg); }
.chl-rejected { border-left-color: var(--chl-rej-line); background: var(--chl-rej-bg); }

.chl-top { display: flex; align-items: flex-start; gap: 10px; }
.chl-route { flex: 1; font-size: 17px; font-weight: 750; line-height: 1.25; }
.chl-state {
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--chl-pend-line);
}
.chl-approved .chl-state { background: var(--chl-ok-line); }
.chl-rejected .chl-state { background: var(--chl-rej-line); }
.chl-no { font-size: 15px; margin: 2px 0 10px; }
.chl-no b { font-family: var(--mono); font-size: 18px; }

.chl-info { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0 0 10px; }
.chl-info dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.chl-info dd { margin: 0; font-size: 14.5px; min-width: 0; overflow-wrap: anywhere; }
.chl-sangat { font-size: 18px; font-variant-numeric: tabular-nums; }
.chl-why { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.chl-edited { margin-bottom: 8px; }

.chl-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
               border-top: 1px solid var(--line); padding-top: 10px; }
.chl-actions .btn { width: 100%; margin: 0; }
.chl-btn-ok { background: var(--chl-ok-line); }
.chl-btn-no { background: var(--chl-rej-line); }

.chl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chl-bar .chips { flex: 1; }
.chl-bar .chip { text-decoration: none; display: inline-flex; align-items: center; }
.chl-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 7px; }
@media (max-width: 480px) {
  .chl-filters { grid-template-columns: 1fr 1fr; }
  .chl-filters select { grid-column: 1 / -1; }
}
.mono { font-family: var(--mono); letter-spacing: .02em; }
.chl-del { display: block; margin: 10px 0 0 auto; background: none; border: 0; padding: 6px 2px;
           color: var(--stop); font: 600 13px var(--sans); text-decoration: underline; cursor: pointer; }
.entry .chl-del { margin: 0 0 0 8px; display: inline-block; }

/* ------------------------------------------------ Summary (2026-10-02) */
.sum-help { font-size: 14.5px; line-height: 1.45; }
.sum-help .hint { margin-top: 6px; }
.sum-jump { margin: 0 0 12px; }
.sum-jump .chip { text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.sum-day { scroll-margin-top: 12px; margin-bottom: 22px; }
.sum-day-h { font-size: 20px; font-weight: 800; margin: 6px 4px 2px; display: flex; align-items: center; gap: 8px; }
.sum-day-sub { color: var(--muted); font-size: 14px; margin: 0 4px 10px; }
.sum-route-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sum-route-name { font-size: 17px; font-weight: 750; color: var(--accent-ink); background: none; border: 0;
                  padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.sum-route-tot { color: var(--muted); font-size: 14px; }
.sum-tbl th[scope="row"] small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.sum-tbl .sumcell { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.sum-tbl .sumcell b { font-size: 17px; }
.sum-tbl .sumcell small { font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.sum-tbl .sum-total th, .sum-tbl .sum-total td { border-top: 2px solid var(--line); background: var(--surface-2); }
.sum-idle { padding: 0 4px; }
/* All six columns fit a 360px phone - no sideways scrolling for these readers. */
.sum-route .tblwrap { overflow-x: visible; margin: 0; }
.sum-tbl { table-layout: fixed; }
.sum-tbl th, .sum-tbl td { padding: 8px 2px; white-space: normal; text-align: center; }
.sum-tbl thead th { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; text-transform: none;
                    line-height: 1.15; vertical-align: bottom; }
.sum-tbl th:first-child { width: 27%; text-align: left; padding-left: 4px; }
.sum-tbl th[scope="row"] { font-size: 14px; line-height: 1.2; }
.sum-tbl td.num { text-align: center; }
.sum-tbl .sumcell { margin: -4px 0; padding: 4px 2px; text-decoration: none; }
.sum-tbl .sumcell b { text-decoration: underline; text-underline-offset: 3px; }
.sum-tbl .sumcell small { font-family: var(--sans); }
.sum-tbl .sum-total th, .sum-tbl .sum-total td { font-weight: 700; }
.sum-route-name { font-family: var(--sans); margin: 0; }

/* ------------------------------------------------- search: bus details */

.busd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.busd {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 14px;
  margin: 12px 0 0; font-size: 15px;
}
.busd dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.busd dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.busd dd a { font-weight: 600; }
.busd-none { color: var(--muted); }

/* ------------------------------------------- fuel highlight on Search */
/* Fuel filled + trips done, right under the bus number (founder 2026-10-06). */
.fuelhl {
  display: flex; gap: 10px; margin: 10px 0 4px;
}
.fuelhl > div {
  flex: 1; min-width: 0; text-align: center; padding: 10px 6px;
  background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: 12px;
}
.fuelhl .n {
  font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.fuelhl .k {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px;
}

/* ------------------------------------------- projection (founder, 2026-10-17) */
/* Six tabs (Management, Super Admin) - squeeze the labels so PROJECTION fits a 360px phone. */
.tabbar-6 a { font-size: 10.5px; letter-spacing: .02em; padding-left: 0; padding-right: 0; overflow: hidden; }

.pj-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 6px; margin-bottom: 12px; }
.pj-day {
  display: block; text-align: center; text-decoration: none; padding: 6px 2px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 14px; line-height: 1.15;
}
.pj-day small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.pj-day.closed { background: var(--surface-2); color: var(--muted); border-color: var(--surface-2); opacity: .75; }
.pj-day[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.pj-card.closed { background: var(--surface-2); box-shadow: none; color: var(--muted); }
.pj-title { font-size: 18px; font-weight: 800; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pj-title span { font-size: 13px; font-weight: 600; color: var(--muted); }

.pj-dirtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.pj-dirtabs button {
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 10px;
  padding: 7px 4px; font-weight: 700; font-size: 14.5px; cursor: pointer; line-height: 1.2;
}
.pj-dirtabs button small { display: block; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.pj-dirtabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pj-dir-h { font-size: 15px; margin: 12px 0 4px; color: var(--accent-ink); }

.pj-grid, .pj-row { display: grid; grid-template-columns: minmax(0, 1fr) 58px 118px 36px; gap: 6px; align-items: center; }
.pj-head { font-family: var(--cond); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 2px 0 4px; }
.pj-row { padding: 6px 0; border-top: 1px solid var(--line); }
.pj-name { font-weight: 700; font-size: 14.5px; line-height: 1.15; min-width: 0; overflow-wrap: break-word; }
.pj-name small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.pj-row input.pj-n, .pj-part input.pj-pn {
  min-height: 40px; padding: 6px 2px; text-align: center; font-size: 16px; border-radius: 8px;
}
.pj-row select, .pj-part select { min-height: 40px; padding: 6px 4px; font-size: 14px; border-radius: 8px; }
.pj-row select.unset, .pj-part select.unset { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.pj-split, .pj-x {
  width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface-2);
  color: var(--accent); cursor: pointer; display: grid; place-items: center; padding: 0; font-size: 18px;
}
.pj-x { color: var(--muted); }
.pj-split[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pj-parts { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 5px; }
.pj-part { display: grid; grid-template-columns: 58px 118px 36px; gap: 6px; align-items: center; }
.pj-addpart { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 13.5px; text-align: left; padding: 2px 0; cursor: pointer; }
.pj-left { font-size: 12.5px; font-weight: 700; }
.pj-left.ok { color: var(--go); } .pj-left.warn { color: var(--warn); }
.pj-tag { font-family: var(--sans); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; }
.pj-rm { background: none; border: 0; padding: 0 0 0 4px; color: var(--muted); font-size: 11.5px; text-decoration: underline; cursor: pointer; }
.pj-tot { border-top: 2px solid var(--line); padding-top: 8px; font-weight: 700; }
.pj-tot small { font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--muted); }
.pj-sum { text-align: center; font-family: var(--mono); font-size: 17px; }
.pj-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 12px; }
.pj-add input { min-height: 42px; padding: 8px 10px; font-size: 15px; }

.pj-two { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pj-two th, .pj-two td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: right; font-size: 15px; }
.pj-two th:first-child, .pj-two td:first-child { text-align: left; }
.pj-two thead th { border-top: 0; font-family: var(--cond); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); line-height: 1.15; }
.pj-two td.n { font-family: var(--mono); font-weight: 600; }
.pj-two td.z { color: var(--line); }
.pj-two tfoot td { font-weight: 800; border-top: 2px solid var(--line); }

.pj-sdir + .pj-sdir { margin-top: 14px; }
.pj-sdir-h { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--cond); font-weight: 700;
  font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink);
  border-bottom: 2px solid var(--accent); padding-bottom: 3px; }
.pj-sdir-h span:last-child { font-family: var(--mono); letter-spacing: 0; text-transform: none; font-size: 13px; }
.pj-pl { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pj-pl:last-child { border-bottom: 0; }
.pj-pl-h { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.pj-pl-h b { font-family: var(--mono); font-size: 16px; }
.pj-pl-ops { font-size: 13.5px; color: var(--muted); padding-left: 12px; line-height: 1.35; }
.pj-pl.none .pj-pl-h { color: var(--warn); }
