/* TRIO · the frame and the patterns every screen repeats (spec/04 §4, §5), with the values the Paper screens give.
   Colours, type, space and corners are the tokens in tokens.css; what the screens draw without a token yet is below. */

:root {
  /* drawn on the screens, not yet tokens (spec/04 §2.1, §2.2): amber text on its soft ground, and the line under it */
  --drawn-attention-ink: #7A5314;
  --drawn-attention-line: #EADFC8;
  /* the capacity hold, on primary: its time, its text, its labels, and the darker band its facts sit on */
  --drawn-hold-time: #A9C9B8;
  --drawn-hold-text: #C5DCD0;
  --drawn-hold-label: #8FB8A2;
  --drawn-hold-band: #0F4630;
  /* the timetable's bars: a car on rent, its turnaround, the line at now in blue, and the thin lines at each hour
     marked and at midnight, dark enough on any row's ground */
  --drawn-on-rent: #24312B;
  --drawn-turnaround: #D9B878;
  --drawn-now-line: #2F6FDE;
  --drawn-hour-line: rgb(22 33 29 / 0.06);
  --drawn-day-line: rgb(22 33 29 / 0.13);
  --sans: var(--font-sans), system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--font-mono), ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-synthesis: none; }
body {
  margin: 0; min-width: 1280px; background: var(--color-ground); color: var(--color-ink);
  font-family: var(--sans); font-size: var(--text-base); line-height: 16px; overflow-wrap: anywhere;
}
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono, .mono input { font-family: var(--mono); }
.muted { color: var(--color-muted); }
.faint { color: var(--color-faint); }
.primary-text { color: var(--color-primary); }
.attention-text { color: var(--color-attention); }
.icon { flex-shrink: 0; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* focus is always visible: 2 px primary, 2 px off the element (spec/04 §6) */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ─── the top bar ─── */

.top-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px;
  background: var(--color-surface); border-bottom: 1px solid var(--color-line); font-size: 12px; line-height: 16px;
}
.brand { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; color: var(--color-ink); }
.brand:hover { text-decoration: none; }
.brand b { font-size: 16px; font-weight: 700; letter-spacing: var(--tracking-tight); line-height: 20px; }
.brand small {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; line-height: 14px;
  color: var(--color-muted);
}
.top-bar nav { flex-grow: 1; }
.menus { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.drop { position: relative; }
.drop > button {
  display: flex; align-items: center; gap: 7px; margin: 0; border: 0; background: none; cursor: pointer;
}
.menu > button, .menu > a { display: block; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--color-muted); font-weight: 500; }
.menu > button:hover, .menu > a:hover { color: var(--color-ink); text-decoration: none; }
.menu.current > button, .menu.current > a { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.drop-items {
  position: absolute; top: 100%; left: 0; z-index: 30; display: none; min-width: 208px; margin: 0; padding: 4px;
  list-style: none; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(22 33 29 / 0.08);
}
.drop:hover > .drop-items, .drop:focus-within > .drop-items { display: block; }
.drop-items.right { left: auto; right: 0; }
.drop-items a, .drop-items button {
  display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--color-ink); font-size: 12px; font-weight: 500; line-height: 16px; text-align: left; cursor: pointer;
}
.drop-items a:hover, .drop-items button:hover { background: var(--color-ground); text-decoration: none; }
.drop-items [aria-current] { background: var(--color-primary-soft); color: var(--color-primary); }
.drop-items .note { padding: 7px 10px 4px; color: var(--color-muted); font-size: 11px; line-height: 14px; }
.drop-items hr { margin: 4px 0; border: 0; border-top: 1px solid var(--color-line-soft); }
.drop-items .note b { display: block; color: var(--color-ink); font-size: 12px; font-weight: 600; line-height: 16px; }
.account { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.office-switch > button {
  padding: 6px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; line-height: 14px;
  color: var(--color-ink);
}
.office-switch > button .icon { color: var(--color-muted); }
.office-switch .mono { display: inline-block; width: 36px; color: var(--color-muted); letter-spacing: 0.06em; }
.person > button {
  justify-content: center; width: 28px; height: 28px; border-radius: 14px; background: var(--color-line);
  color: var(--color-ink); font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
}

/* ─── the page ─── */

.page { display: flex; flex-direction: column; gap: 18px; max-width: 1440px; margin: 0 auto; padding: 24px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-header .title { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.page-header .title.spaced { gap: 7px; }
.page-header h1 {
  display: flex; align-items: center; gap: 11px; font-size: 26px; font-weight: 700; letter-spacing: var(--tracking-tight);
  line-height: 32px;
}
.page-header p { color: var(--color-muted); font-size: 13px; line-height: 16px; }
.actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.columns { display: flex; align-items: flex-start; gap: 18px; }
.columns > .main { display: flex; flex-direction: column; flex: 1 1 0; gap: 18px; min-width: 0; }
.columns > .side { display: flex; flex-direction: column; flex-shrink: 0; gap: 18px; width: 420px; }

/* ─── buttons and links ─── */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface);
  color: var(--color-ink); font-size: 12px; font-weight: 500; line-height: 16px; cursor: pointer; white-space: nowrap;
}
.button:hover { text-decoration: none; filter: brightness(0.97); }
.button.primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-surface); font-weight: 600; padding: 9px 16px; }
.button.quiet { color: var(--color-muted); }
.button.attention { border-color: var(--color-attention); color: var(--color-attention); }
.button.wide { width: 100%; }
.link { color: var(--color-primary); font-size: 12px; font-weight: 500; }

/* ─── tags and chips ─── */

.tag {
  display: inline-block; padding: 3px 9px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.04em; line-height: 14px;
  color: var(--color-muted); text-transform: uppercase;
}

/* ─── panels ─── */

.panel {
  display: flex; flex-direction: column; overflow: clip; background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 20px 13px;
  border-bottom: 1px solid var(--color-line-soft);
}
.side .panel-head, .side .panel-row, .side .panel-foot { padding-left: 18px; padding-right: 18px; }
.panel-head h2 { font-size: 15px; font-weight: 600; line-height: 18px; }
.panel-head .meta { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.panel-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--color-line-soft);
  font-size: 12px; line-height: 16px;
}
.panel-row:last-child { border-bottom: 0; }
.panel-row .label { flex: 1; min-width: 0; }
.panel-row .value { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.panel-foot {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--color-ground);
  border-top: 1px solid var(--color-line-soft); color: var(--color-muted); font-size: 11px; line-height: 17px;
}
.panel-foot .icon { color: var(--color-muted); }
.fields { display: flex; gap: 14px; padding: 8px 20px; }
.fields:first-of-type { padding-top: 18px; }
.fields:last-child { padding-bottom: 18px; }
.fields > div { display: flex; flex-direction: column; flex: 1 1 0; gap: 3px; min-width: 0; }
.fields > .wide { flex-grow: 2; }
.fields dt, .fields .k { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.fields dd, .fields .v { margin: 0; font-size: 13px; line-height: 16px; }
.fields .none { color: var(--color-faint); }
.documents { display: flex; gap: 14px; padding: 18px 20px; }
.document {
  display: flex; flex: 1 1 0; flex-direction: column; gap: 3px; min-width: 0; padding: 13px;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
}
.document b { font-size: 13px; font-weight: 600; line-height: 16px; }
.document small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.document.missing { border-style: dashed; color: var(--color-muted); }

/* the panel that needs someone: soft amber, an amber border, its amount in amber mono (spec/04 §5) */
.panel.owed { background: var(--color-attention-soft); border: 2px solid var(--color-attention); }
.panel.owed > .panel-head { align-items: center; padding: 15px 18px 12px; border: 0; }
.panel.owed > .panel-head h2 { flex: 1; color: var(--drawn-attention-ink); font-size: 14px; font-weight: 700; }
.panel.owed > .panel-head .icon { color: var(--color-attention); }
.panel.owed > .panel-head .amount { color: var(--color-attention); font-family: var(--mono); font-size: 19px; font-weight: 600; line-height: 24px; }
.panel.owed .rows { background: var(--color-surface); border-top: 1px solid var(--drawn-attention-line); }
.panel .rows .panel-row { padding: 12px 18px; }
.panel-row .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.panel-row .what b { font-size: 13px; font-weight: 600; line-height: 16px; }
.panel-row .what small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.panel-row .amount { width: 88px; flex-shrink: 0; text-align: right; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.panel.owed .panel-row .amount { color: var(--color-attention); }
.panel.owed .panel-row .amount.faint { color: var(--color-faint); font-weight: 400; }

/* a likely duplicate, beside the record (Client record) */
.aside { display: flex; flex-direction: column; gap: 11px; padding: 2px 4px; }
.pair-card {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px dashed var(--color-line);
  border-radius: var(--radius-sm); color: var(--color-ink);
}
.pair-card:hover { text-decoration: none; background: var(--color-surface); }
.pair-card .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pair-card small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.aside p { color: var(--color-muted); font-size: 11px; line-height: 17px; }

/* ─── an eyebrow, and a note on a surface ─── */

.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-caps); line-height: 14px;
  color: var(--color-muted); text-transform: uppercase;
}
.notes { display: flex; gap: 16px; }
.notes > div {
  display: flex; flex: 1 1 0; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; background: var(--color-surface);
  border: 1px solid var(--color-line); border-radius: var(--radius-md);
}
.notes p { color: var(--color-muted); font-size: 12px; line-height: 17px; }

/* ─── banners ─── */

.banner {
  display: flex; align-items: center; gap: 11px; padding: 12px 16px; background: var(--color-attention-soft);
  border: 1px solid var(--color-attention); border-radius: var(--radius-sm);
}
.banner .icon { color: var(--color-attention); }
.banner .text { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.banner strong { font-size: 13px; font-weight: 600; line-height: 17px; }
.banner p { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.banner.quiet { background: var(--color-surface); border-color: var(--color-line); }
.banner.quiet .icon { color: var(--color-muted); }
.banner.danger { border-color: var(--color-danger); background: var(--color-surface); }
.banner.danger .icon, .banner.danger strong { color: var(--color-danger); }

/* ─── the filter bar ─── */

.filters {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--color-surface);
  border: 1px solid var(--color-line); border-radius: var(--radius-md);
}
.filters .grow { flex-grow: 1; }
.search {
  display: flex; align-items: center; gap: 9px; width: 330px; height: 34px; padding: 0 12px; background: var(--color-ground);
  border: 1px solid var(--color-line); border-radius: var(--radius-sm); color: var(--color-muted);
}
.search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font-size: 13px; line-height: 16px; color: var(--color-ink); }
.search input::placeholder { color: var(--color-faint); }
.search:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.select { position: relative; display: flex; align-items: center; height: 34px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.select select {
  height: 32px; padding: 0 32px 0 12px; border: 0; background: transparent; color: var(--color-muted); font-size: 13px;
  line-height: 16px; cursor: pointer; appearance: none;
}
.select select:focus-visible { outline-offset: 3px; }
.select .icon { position: absolute; right: 12px; color: var(--color-muted); pointer-events: none; }
.toggle {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--color-attention);
  border-radius: var(--radius-sm); background: var(--color-attention-soft); color: var(--color-attention);
  font-size: 13px; font-weight: 500; line-height: 16px;
}
.toggle:hover { text-decoration: none; }
.toggle .mono { font-size: 12px; font-weight: 400; }
.toggle[aria-pressed="true"] { background: var(--color-attention); color: var(--color-surface); }

/* ─── tables (spec/04 §5) ─── */

.list { overflow: clip; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.list-head, .list-row, .list-foot { display: flex; align-items: center; gap: 14px; padding: 9px 18px; }
.list-head { background: var(--color-ground); border-bottom: 1px solid var(--color-line); }
.list-head > * {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-caps); line-height: 14px;
  color: var(--color-muted); text-transform: uppercase; white-space: nowrap;
}
.list-head > .cell, .list-head > .cell.num { color: var(--color-muted); }
.list-head > .strong, .list-head > .cell.strong { color: var(--color-ink); }
.list-row { border-bottom: 1px solid var(--color-line-soft); color: var(--color-ink); }
a.list-row:hover { background: var(--color-ground); text-decoration: none; }
.list-row.attention { background: var(--color-attention-soft); border-left: 3px solid var(--color-attention); padding-left: 15px; }
.list-row.attention + .list-row:not(.attention) { border-top: 1px solid var(--color-line); margin-top: -1px; }
.list-row.chosen { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); padding-left: 17px; }
.list-foot { padding: 12px 18px; background: var(--color-ground); color: var(--color-muted); font-size: 12px; line-height: 16px; }
.list-foot .grow { flex: 1; }
.list-empty { padding: 24px 18px; color: var(--color-muted); }
.list-empty p + p { margin-top: 6px; }
.cell-main { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.cell-main b { font-size: 13px; font-weight: 600; line-height: 16px; }
.cell-main small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.attention .cell-main small { color: var(--color-attention); }
.cell { flex-shrink: 0; font-size: 12px; line-height: 16px; color: var(--color-muted); }
.cell.num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; color: var(--color-ink); }
.cell.num .mono { font-size: 13px; }
.cell.num small { color: var(--color-muted); font-family: var(--sans); font-size: 11px; line-height: 14px; }
.cell .now { color: var(--color-primary); }
.cell .next { color: var(--color-ink); }
.w-kind { width: 110px; } .w-country { width: 190px; } .w-rentals { width: 80px; } .w-when { width: 220px; padding-left: 18px; }
.w-open { width: 170px; }
.new-row { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--color-line); background: var(--color-surface); }
.new-row .grow { flex: 1; color: var(--color-muted); }

/* the record's rental history */
.history .list-head, .history .list-row { gap: 14px; padding: 8px 20px; }
.history .list-row { padding-top: 12px; padding-bottom: 12px; font-family: var(--mono); font-size: 12px; line-height: 16px; }
.history .list-row:last-child { border-bottom: 0; }
.history .w-no { width: 64px; font-weight: 600; } .history .w-period { width: 116px; } .history .w-group { width: 34px; }
.history .w-car { flex: 1; min-width: 0; } .history .w-total { width: 84px; text-align: right; }
.history .w-outcome { width: 128px; display: flex; align-items: center; gap: 6px; font-family: var(--sans); color: var(--color-muted); }
.history .chosen .w-no { width: 61px; color: var(--color-primary); }
.history .chosen .w-outcome { color: var(--color-primary); font-weight: 600; }
.history .attention-outcome { color: var(--color-attention); }
.history .w-car.none { color: var(--color-muted); font-family: var(--sans); font-size: 13px; }

/* ─── forms (spec/04 §5) ─── */

.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; padding: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field.span-4 { grid-column: span 4; }
.field label, .field .label { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-ink); font-size: 13px; line-height: 16px;
}
.field.required input, .field.required select { border-color: var(--color-ink); }   /* the border says what must be filled */
.field input.mono { font-family: var(--mono); }
.field .help { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.field .error, .form-error { color: var(--color-danger); font-size: 12px; line-height: 16px; }
.field.has-error input, .field.has-error select { border-color: var(--color-danger); }
.form-error { padding: 12px 20px; border-bottom: 1px solid var(--color-line-soft); }
.segmented { display: inline-flex; width: max-content; border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 9px 15px; color: var(--color-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.segmented label + label span { border-left: 1px solid var(--color-line); }
.segmented input:checked + span { background: var(--color-primary-soft); color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.segmented input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--color-line-soft); background: var(--color-ground); }
.form-actions .grow { flex: 1; color: var(--color-muted); font-size: 12px; align-self: center; }

/* ─── signing in ─── */

.sign-in { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 12vh 24px 24px; }
.sign-in .panel { width: 400px; }
.sign-in .brand { padding: 22px 24px 0; }
.sign-in h1 { padding: 16px 24px 4px; font-size: 19px; font-weight: 700; letter-spacing: var(--tracking-tight); line-height: 24px; }
.sign-in .lead { padding: 0 24px; color: var(--color-muted); font-size: 13px; line-height: 18px; }
.sign-in form { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 24px; }
.sign-in .qr { display: flex; justify-content: center; padding: 16px 24px 0; }
.sign-in .qr svg { display: block; width: 172px; height: 172px; }
.sign-in .key { margin: 10px 24px 0; padding: 9px 11px; background: var(--color-ground); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; line-height: 16px; text-align: center; letter-spacing: 0.04em; }
.sign-in .steps { margin: 12px 24px 0; padding-left: 18px; color: var(--color-muted); font-size: 12px; line-height: 18px; }
.sign-in .aside-link {
  display: flex; flex-direction: row; align-items: baseline; gap: 4px; padding: 13px 24px; background: var(--color-ground);
  border-top: 1px solid var(--color-line-soft); font-size: 12px; line-height: 16px; color: var(--color-muted);
}
.sign-in .aside-link button { padding: 0; border: 0; background: none; color: var(--color-primary); font-weight: 500; cursor: pointer; }

/* ─── messages ─── */

.messages { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.messages li { padding: 10px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); font-size: 12px; }
.messages .error { border-color: var(--color-danger); color: var(--color-danger); }
.messages .success { border-color: var(--color-primary); color: var(--color-primary); }
.messages .warning { border-color: var(--drawn-attention-line); background: var(--color-attention-soft); color: var(--drawn-attention-ink); }
.icon.small { width: 12px; height: 12px; }

/* ─── a task page: numbered steps on the left, what they add up to on the right (New reservation) ─── */

.page-form { display: flex; flex-direction: column; gap: 18px; }
.page-form .columns > .side { width: 392px; }
.step-head { align-items: center; justify-content: flex-start; gap: 10px; }
.step-head h2 { flex: 1; }
.step {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 10px; background: var(--color-ink); color: var(--color-surface); font-family: var(--mono);
  font-size: 11px; font-weight: 500; line-height: 14px;
}
.eyebrow.primary { color: var(--color-primary); }
.period { display: flex; gap: 20px; padding: 18px 20px; }
.period .end { display: flex; flex: 1 1 0; flex-direction: column; gap: 12px; min-width: 0; }
.period .divider { flex-shrink: 0; align-self: stretch; width: 1px; background: var(--color-line-soft); }
.period .when { display: flex; gap: 10px; }
.period .when > .field:first-child { flex: 1; }
.field.time { flex-shrink: 0; width: 88px; }
.with-icon, .field .select { position: relative; display: block; height: auto; border: 0; }
.with-icon input { padding-right: 34px; }
.with-icon .icon { position: absolute; top: 11px; right: 11px; color: var(--color-muted); pointer-events: none; }
.field .select select { height: 36px; padding: 0 32px 0 11px; color: var(--color-ink); appearance: none; }
.field .select .icon { position: absolute; top: 15px; right: 12px; }
.field.required .select select { border-color: var(--color-ink); }
.select.compact { height: 30px; }
.select.compact select { height: 28px; padding-left: 11px; color: var(--color-ink); font-size: 12px; }

/* the group table: a row is a button; the chosen one is primary-soft with a primary edge */
.groups .list-head { padding: 8px 20px; }
.w-grp { flex-shrink: 0; width: 34px; } .w-acriss { flex-shrink: 0; width: 62px; } .grow { flex: 1; min-width: 0; }
.w-free { flex-shrink: 0; width: 64px; text-align: right; } .w-price { flex-shrink: 0; width: 88px; text-align: right; }
.group-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border: 0;
  border-bottom: 1px solid var(--color-line-soft); background: var(--color-surface); text-align: left; cursor: pointer;
}
.group-row:last-child { border-bottom: 0; }
.group-row:hover:not(:disabled) { background: var(--color-ground); }
.group-row .w-grp { font-size: 14px; font-weight: 600; line-height: 18px; }
.group-row .w-acriss { color: var(--color-muted); font-size: 12px; }
.group-row .grow { font-size: 13px; }
.group-row .w-free { font-size: 14px; font-weight: 500; line-height: 18px; }
.group-row .w-price { color: var(--color-muted); font-size: 13px; }
.group-row.chosen { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); padding-left: 17px; }
.group-row.chosen .w-grp, .group-row.chosen .w-acriss, .group-row.chosen .w-free { color: var(--color-primary); }
.group-row.chosen .w-free { font-weight: 600; }
.group-row.chosen .grow, .group-row.chosen .w-price { color: var(--color-ink); font-weight: 500; }
.group-row.none { cursor: default; }
.group-row.none, .group-row.none span { color: var(--color-faint); }
.group-row .faint { font-size: 13px; font-weight: 400; }
.last { display: inline-flex; align-items: baseline; gap: 5px; color: var(--color-attention); font-weight: 600; }
.last small { font-size: 11px; font-weight: 400; }

/* who drives: the search is the name field; what it finds is listed under it */
.fields-row { display: flex; gap: 14px; padding: 6px 20px; }
.driver > .panel-head + .fields-row, .driver > .chosen-client + .fields-row { padding-top: 18px; }
.fields-row > .field { flex: 1 1 0; }
.fields-row > .field.wide { flex-grow: 2; }
.matches:not(:empty) { margin-top: 8px; border-top: 1px solid var(--color-line-soft); }
.match {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 20px; border: 0;
  border-bottom: 1px solid var(--color-line-soft); background: var(--color-surface); text-align: left; cursor: pointer;
}
.match:hover { background: var(--color-ground); }
.match .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.match b { font-size: 13px; font-weight: 600; line-height: 16px; }
.match small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.match.new { gap: 8px; color: var(--color-primary); font-size: 12px; font-weight: 500; }
.chosen-client {
  display: flex; align-items: center; gap: 12px; margin: 18px 20px 0; padding: 11px 13px;
  background: var(--color-primary-soft); border-radius: var(--radius-sm);
}
.chosen-client .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.chosen-client b { font-size: 13px; font-weight: 600; line-height: 16px; }
.chosen-client small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
button.link { padding: 0; border: 0; background: none; cursor: pointer; }
details.further { margin-top: 12px; }
details.further > summary {
  display: flex; align-items: center; gap: 8px; padding: 13px 20px; background: var(--color-ground);
  border-top: 1px solid var(--color-line-soft); cursor: pointer; list-style: none;
}
details.further > summary::-webkit-details-marker { display: none; }
details.further > summary .link { display: inline-flex; align-items: center; gap: 8px; }
details.further > summary .meta { color: var(--color-muted); font-size: 11px; line-height: 14px; }
details.further[open] > summary { border-bottom: 1px solid var(--color-line-soft); }
details.further > .fields-row:first-of-type { padding-top: 14px; }
.extras ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 0; padding: 0; list-style: none; }
.extras label, .check { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 16px; }
.check { padding: 10px 20px 18px; }

/* the capacity hold, drawn on primary (RES-3) */
.hold-panel { display: flex; flex-direction: column; overflow: clip; background: var(--color-primary); border-radius: var(--radius-md); color: var(--color-surface); }
.hold-head { display: flex; align-items: center; gap: 9px; padding: 16px 18px 12px; }
.hold-head b { flex: 1; font-size: 14px; font-weight: 600; line-height: 18px; }
.hold-head .mono { color: var(--drawn-hold-time); font-size: 12px; line-height: 16px; }
.hold-panel p { padding: 0 18px 16px; color: var(--drawn-hold-text); font-size: 12px; line-height: 19px; }
.hold-facts { display: flex; gap: 14px; padding: 12px 18px; background: var(--drawn-hold-band); }
.hold-facts > div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.hold-facts small {
  color: var(--drawn-hold-label); font-family: var(--mono); font-size: 10px; letter-spacing: var(--tracking-caps);
  line-height: 12px; text-transform: uppercase;
}
.hold-facts span { font-family: var(--mono); font-size: 13px; font-weight: 500; line-height: 16px; }
.hold-panel.expired .hold-head .mono { color: var(--color-surface); font-weight: 600; }

/* the quote, line by line, VAT included */
.quote-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--color-line-soft); font-size: 13px; }
.quote-row.first { border-top: 0; }
.quote-row .mono { flex-shrink: 0; width: 88px; text-align: right; }
.quote-sub { display: flex; gap: 12px; padding: 0 18px 11px; color: var(--color-muted); font-size: 12px; }
.upgrade-choice { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 12px; }
.upgrade-choice small { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.quote-total { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--color-ink); }
.quote-total .grow { display: flex; flex-direction: column; gap: 2px; }
.quote-total b { font-size: 14px; font-weight: 700; line-height: 18px; }
.quote-total small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.quote-total .amount { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 28px; }
.quote-total .currency { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.quote-empty { padding: 16px 18px; color: var(--color-muted); font-size: 12px; line-height: 17px; }
.aside.numbered ol { display: flex; flex-direction: column; gap: 11px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.aside.numbered li { display: flex; gap: 10px; color: var(--color-ink); font-size: 12px; line-height: 19px; }
.aside.numbered li::before {
  flex-shrink: 0; width: 14px; padding-top: 1px; counter-increment: step; content: counter(step);
  color: var(--color-primary); font-family: var(--mono); font-size: 11px; line-height: 14px;
}
.aside.numbered > p { padding-top: 11px; border-top: 1px solid var(--color-line); font-size: 12px; line-height: 19px; }

/* ─── a record of a booking (Reservation detail) ─── */

.tag.status { border-color: var(--color-primary); color: var(--color-primary); font-weight: 500; }
.tag.status.open, .tag.status.handed-over { border-color: var(--color-ink); color: var(--color-ink); }
.tag.status.canceled, .tag.status.rejected, .tag.status.no-show { border-color: var(--color-line); color: var(--color-muted); }
.tag.soft { border-color: transparent; background: var(--color-primary-soft); color: var(--color-primary); font-weight: 500; }
.booking-ends { display: flex; }
.booking-ends .end {
  display: flex; flex: 1 1 0; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 20px;
  border-right: 1px solid var(--color-line-soft);
}
.booking-ends .end.group { flex: 0 0 170px; border-right: 0; }
.booking-ends .end > div { display: flex; flex-direction: column; gap: 3px; }
.booking-ends b { font-size: 19px; font-weight: 500; line-height: 24px; }
.booking-ends .group b { font-weight: 600; }
.booking-ends small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.panel-foot .grow { flex: 1; min-width: 0; }
.panel-foot.attention, .panel-foot.held { gap: 14px; padding: 13px 20px; font-size: 12px; line-height: 16px; }
.panel-foot.attention { background: var(--color-attention-soft); color: var(--drawn-attention-ink); }
.panel-foot.attention .icon { color: var(--color-attention); }
.panel-foot.attention.strong { border-top-color: var(--color-attention); }
.panel-foot.held { background: var(--color-primary-soft); color: var(--color-ink); }
.panel-foot.held .icon { color: var(--color-primary); }
.attention-link { color: var(--color-attention); font-size: 12px; font-weight: 600; line-height: 16px; }
.customer { display: flex; }
.customer .who { display: flex; flex: 1; flex-direction: column; gap: 14px; min-width: 0; margin: 0; padding: 18px 20px; }
.customer .who > div { display: flex; flex-direction: column; gap: 3px; }
.customer dt { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.customer dd { margin: 0; font-size: 13px; line-height: 16px; }
.customer dd.name { font-size: 14px; font-weight: 600; line-height: 18px; }
.customer dd.muted { font-size: 12px; }
.customer .papers {
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; width: 290px; padding: 18px 20px;
  border-left: 1px solid var(--color-line-soft);
}
.customer .papers .label { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.customer .papers p { color: var(--color-muted); font-size: 11px; line-height: 17px; }

/* the history: when, a dot, what happened, and where it came from; a change is amber, what is still to come faint */
.moment { display: flex; align-items: flex-start; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--color-line-soft); }
.moment:last-child { border-bottom: 0; }
.moment .w-at { flex-shrink: 0; width: 108px; color: var(--color-muted); font-size: 11px; line-height: 14px; }
.moment .w-dot { display: flex; flex-shrink: 0; justify-content: center; width: 22px; padding-top: 3px; }
.moment .w-dot i { width: 8px; height: 8px; border-radius: 4px; background: var(--color-primary); }
.moment .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.moment .what b { font-size: 13px; font-weight: 600; line-height: 16px; }
.moment .what small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.moment .w-source { flex-shrink: 0; width: 124px; color: var(--color-muted); font-size: 11px; line-height: 14px; }
.moment.change { background: var(--color-attention-soft); }
.moment.change .w-at, .moment.change b, .moment.change .w-source, .moment.change .moves { color: var(--drawn-attention-ink); }
.moment.change .w-dot i { background: var(--color-attention); }
.moment.end .w-dot i { background: var(--color-muted); }
.moment.pending .w-at, .moment.pending b, .moment.pending small, .moment.pending .w-source { color: var(--color-faint); font-weight: 400; }
.moment.pending .w-dot i { border: 1.5px solid var(--color-line); background: none; }
.moves { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 1px; font-size: 12px; line-height: 16px; }
.moves s { color: var(--color-muted); }
.moves .now { font-weight: 600; }
.aside.related .pair { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 16px; }
.aside.related .pair > span:first-child { flex: 1; min-width: 0; }

/* changing and ending a booking */
.fields-row.padded { padding: 18px 20px; }
.narrow-panel { max-width: 760px; }
.choices { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 6px; }
.choice { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 16px; cursor: pointer; }
.choice input { margin: 0; accent-color: var(--color-primary); }
.choice b { font-weight: 500; }
.w-reg { flex-shrink: 0; width: 110px; font-weight: 600; } .w-stands { flex-shrink: 0; width: 90px; }
.w-km { flex-shrink: 0; width: 100px; text-align: right; } .w-act { display: flex; flex-shrink: 0; justify-content: flex-end; width: 150px; }

/* ─── Reservations: one list, three column presets (RES-10) ─── */

.select.set { border-color: var(--color-ink); }
.select.set select { color: var(--color-ink); font-weight: 500; }
.list-tools { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--color-line-soft); }
.list-tools .note { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.tabs { display: inline-flex; padding: 2px; background: var(--color-ground); border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.tabs a, .tabs .off { padding: 7px 12px; border-radius: 2px; color: var(--color-muted); font-size: 12px; line-height: 16px; }
.tabs a:hover { color: var(--color-ink); text-decoration: none; }
.tabs a[aria-current] { background: var(--color-ink); color: var(--color-surface); font-weight: 500; }
.tabs .off { color: var(--color-faint); cursor: not-allowed; }
.reservations .list-row { padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 16px; }
.reservations .list-row.ended, .reservations .list-row.ended span { color: var(--color-faint); }
.r-no { flex-shrink: 0; width: 52px; font-weight: 600; } .r-grp { flex-shrink: 0; width: 34px; }
.r-when { flex-shrink: 0; width: 116px; } .r-route { flex-shrink: 0; width: 74px; color: var(--color-muted); }
.r-route.one-way { color: var(--color-attention); }
.r-market { flex-shrink: 0; width: 84px; color: var(--color-muted); } .r-source { flex-shrink: 0; width: 86px; }
.r-booker { flex-shrink: 0; width: 160px; } .r-list { flex-shrink: 0; width: 92px; }
.r-total { flex-shrink: 0; width: 80px; text-align: right; font-weight: 600; } .r-status { flex-shrink: 0; width: 98px; }
.reservations .list-row .r-total { font-weight: 600; }
.reservations .list-row.ended .r-total { font-weight: 400; }
.chip {
  display: inline-block; padding: 3px 8px; border: 1px solid var(--color-primary); border-radius: var(--radius-sm);
  color: var(--color-primary); font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 14px;
}
.chip.open { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-surface); }
.chip.handed-over { border-color: var(--color-ink); color: var(--color-ink); }
.chip.canceled, .chip.rejected, .chip.no-show { border-color: var(--color-line); color: var(--color-muted); }
.pages { display: flex; align-items: center; gap: 6px; }
.pages a, .pages span { min-width: 26px; padding: 4px 7px; border-radius: var(--radius-sm); color: var(--color-muted); font-family: var(--mono); font-size: 12px; text-align: center; }
.pages a[aria-current] { background: var(--color-ink); color: var(--color-surface); }

/* ─── Timetable: a row per car, a bar per thing that takes it (RES-13) ─── */

.button.square { width: 34px; height: 34px; padding: 0; }
/* a day, a week or a month: the switch between them, and Today */
.segmented.links { overflow: clip; }
.segmented.links a { display: block; padding: 8px 13px; color: var(--color-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.segmented.links a + a { border-left: 1px solid var(--color-line); }
.segmented.links a:hover { color: var(--color-ink); text-decoration: none; }
.segmented.links a[aria-current] {
  background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; box-shadow: inset 0 0 0 1px var(--color-primary);
}
.timetable-actions .button:not(.square) { height: 34px; padding: 0 13px; }
.chart { overflow: clip; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.chart-head { display: flex; background: var(--color-ground); border-bottom: 1px solid var(--color-line); }
.chart-head .who { align-self: flex-end; padding: 0 18px 7px; }
/* the scale: each day, and under it the hours marked — every hour of a day, every third of a week, every eighth of a
   month — with now on it in blue */
.scale { display: block; flex: 1; min-width: 0; overflow: hidden; }
.scale line { stroke: var(--drawn-hour-line); }
.scale line.day { stroke: var(--color-line); }
.scale text { font-family: var(--mono); font-size: 10px; fill: var(--color-faint); }
.scale .date { font-size: 11px; fill: var(--color-muted); }
.scale .date.sunday { fill: var(--color-faint); }
.scale .date.today { fill: var(--color-ink); font-weight: 600; }
.scale .hour.midnight { fill: var(--color-muted); }
.chart.month .scale .hour { font-size: 9px; }
.now-marker rect { fill: var(--drawn-now-line); }
.now-marker text { font-size: 10px; font-weight: 600; fill: var(--color-surface); }
.chart .who { display: flex; flex-shrink: 0; align-items: center; gap: 10px; width: 212px; padding: 0 18px; }
.chart-row { display: flex; border-bottom: 1px solid var(--color-line-soft); }
/* a car's registration with its group and ACRISS code beside it, the gearbox in the code, and its model under them */
.chart-row .who { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; height: 40px; overflow: hidden; }
.chart-row .who .line { display: flex; align-items: baseline; gap: 8px; }
.chart-row .who b { flex-shrink: 0; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; }
.chart-row .who .mono.muted, .chart-row .who .mono.attention-text { flex-shrink: 0; font-size: 11px; line-height: 14px; white-space: nowrap; }
.chart-row .who .model { overflow: hidden; max-width: 100%; font-size: 11px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.chart-row.faint .who, .chart-row.faint .who span { color: var(--color-faint); }
.chart-row.attention { background: var(--color-attention-soft); }
.chart-row.attention .who .line { align-items: center; }
.chart-row.attention .who .icon { width: 13px; height: 13px; color: var(--color-attention); }
.chart-row .who.group b { font-weight: 600; }
.bars { display: block; flex: 1; min-width: 0; overflow: hidden; }
.bars .ticks line { stroke: var(--drawn-hour-line); }
.bars .ticks line.day { stroke: var(--drawn-day-line); }
.bars .now { stroke: var(--drawn-now-line); stroke-width: 2; pointer-events: none; }
.bars .now[hidden], .now-marker[hidden] { display: none; }   /* now has moved past the window */
.bars .bar { stroke-width: 1; }
.bar.rent { fill: var(--drawn-on-rent); }
.bar.held { fill: var(--color-primary); }
.bar.turnaround { fill: var(--drawn-turnaround); }
.bar.transfer { fill: var(--color-faint); }
.bar.unavailable, .bar.out, .bar.booked { fill: var(--color-surface); stroke: var(--color-line); stroke-dasharray: 3 2; }
.bar.unplaced { fill: var(--color-surface); stroke: var(--color-attention); stroke-dasharray: 3 2; }
.bars text { font-family: var(--sans); font-size: 11px; font-weight: 500; fill: var(--color-surface); }
.bars text.unavailable, .bars text.out, .bars text.booked { fill: var(--color-muted); font-weight: 400; }
.bars text.unplaced { fill: var(--color-attention); }
.bars a:hover { text-decoration: none; }
.bars a:hover .bar { filter: brightness(1.15); }
.chart-legend { display: flex; align-items: center; gap: 18px; padding: 14px 18px; background: var(--color-ground); color: var(--color-muted); font-size: 11px; line-height: 14px; }
.chart-legend > span { display: flex; align-items: center; gap: 7px; }
.chart-legend i { width: 18px; height: 10px; border-radius: 2px; }
.chart-legend .rent { background: var(--drawn-on-rent); } .chart-legend .held { background: var(--color-primary); }
.chart-legend .turnaround { background: var(--drawn-turnaround); } .chart-legend .transfer { background: var(--color-faint); }
.chart-legend .unavailable, .chart-legend .booked { border: 1px dashed var(--color-line); background: var(--color-surface); }
.chart-legend .unplaced { border: 1px dashed var(--color-attention); background: var(--color-surface); }
.chart-legend .now { width: 2px; height: 12px; border-radius: 0; background: var(--drawn-now-line); }
.chart-legend .grow { flex: 1; }
/* the Timetable's drag (RES-9): the bar lifted, the cars it can be held on lit, where it would land dashed, and the bar
   over the chart saying what a drop does — on which a held booking's car is given back */
.bars a[data-booking] { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.chart.dragging, .chart.dragging .bars a { cursor: grabbing; }
.bars a.lifted { opacity: 0.4; }
.chart-hint {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--color-line);
  background: var(--color-primary-soft); font-size: 12px; line-height: 16px;
}
.chart-hint[hidden] { display: none; }
.chart-hint .grow { flex: 1; color: var(--color-ink); font-weight: 500; }
.chart-hint.failed { background: var(--color-attention-soft); }
.chart-hint.failed .muted { display: none; }
.chart-row.target { background: var(--color-primary-soft); }
.chart-row.over, .chart-hint.over { box-shadow: inset 0 0 0 2px var(--color-primary); }
.bars .landing .bar { fill: var(--color-surface); stroke: var(--color-primary); stroke-width: 1.5; stroke-dasharray: 4 3; }
.bars .landing text { fill: var(--color-primary); font-weight: 600; }
/* a lit car's tags stand where its model was: an upgrade, priced at the hand-over (D3), another group's, or a rental's
   last hours overlapped (18 October) */
.chart-row.tagged .who .model { display: none; }
.chart-row .who .drag-tags { display: flex; gap: 4px; }
.chart-row .who .tag.drag {
  flex-shrink: 0; padding: 0 5px; border-color: var(--color-primary); border-radius: 2px; background: var(--color-surface);
  color: var(--color-primary); font-size: 10px; font-weight: 500; line-height: 12px;
}
/* every other car says why it cannot take the booking — in amber, under the pointer — and a drop on it sends nothing */
.chart-row.refusing.over { box-shadow: inset 0 0 0 2px var(--color-attention); }
.chart-hint.refusing { background: var(--color-attention-soft); }
.chart-hint.refusing .grow { color: var(--drawn-attention-ink); }
/* the foot of the chart, where a held booking is dropped to give its car back */
.chart-release { padding: 10px 18px; border-bottom: 1px solid var(--color-line-soft); background: var(--color-surface); }
.chart-release[hidden] { display: none; }
.chart-release span {
  display: block; padding: 11px 16px; border: 1.5px dashed var(--color-primary); border-radius: 4px;
  background: var(--color-primary-soft); color: var(--color-primary); font-size: 12px; font-weight: 500; line-height: 16px;
  text-align: center;
}
.chart-release.over span { border-style: solid; }
/* what a bar is and when, on hover or focus — never while a bar is being dragged */
.chart-tip {
  position: fixed; top: 0; left: 0; z-index: 41; display: flex; flex-direction: column; gap: 3px; max-width: 380px;
  padding: 9px 12px 10px; border-radius: 4px; background: var(--color-ink); box-shadow: 0 6px 18px rgb(22 33 29 / 0.22);
  color: var(--color-surface); pointer-events: none;
}
.chart-tip[hidden], .chart-tip [hidden] { display: none; }
.chart-tip b { font-size: 12px; font-weight: 600; line-height: 16px; }
.chart-tip .mono { font-size: 12px; line-height: 16px; }
.chart-tip small { color: #B9C4BF; font-size: 11px; line-height: 14px; }
.drag-pill {
  position: fixed; top: 0; left: 0; z-index: 40; padding: 3px 8px; border-radius: 3px; background: var(--color-ink);
  color: var(--color-surface); box-shadow: 0 4px 12px rgb(22 33 29 / 0.25); font: 600 11px/14px var(--mono);
  pointer-events: none;
}

/* ─── Dashboard: the office's schedule (J1) ─── */

.schedule .list-tools { padding: 16px 18px 14px; border-bottom: 0; }
.schedule .list-tools h2 { font-size: 15px; font-weight: 600; line-height: 18px; }
.schedule .list-tools .mono { font-size: 11px; line-height: 14px; }
.schedule .list-head { gap: 16px; padding: 8px 18px; border-top: 1px solid var(--color-line); }
.schedule .list-row { gap: 16px; padding: 11px 18px; font-size: 13px; line-height: 16px; }
.chips { display: flex; align-items: center; gap: 6px; }
.chips a {
  padding: 5px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); color: var(--color-muted);
  font-size: 11px; font-weight: 500; line-height: 14px;
}
.chips a:hover { color: var(--color-ink); text-decoration: none; }
.chips a[aria-current] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-surface); font-weight: 600; }
.s-when { flex-shrink: 0; min-width: 108px; font-size: 12px; font-weight: 500; }
.s-kind { display: flex; flex-shrink: 0; width: 64px; }
.s-car { display: flex; align-items: center; gap: 6px; flex-shrink: 0; width: 132px; font-size: 12px; }
.s-car .icon { width: 12px; height: 12px; }
.s-grp { flex-shrink: 0; width: 40px; font-size: 12px; }
.s-days { flex-shrink: 0; width: 44px; font-size: 12px; text-align: right; }
.list-head .s-days { text-align: right; }
.kind {
  display: inline-block; padding: 2px 8px; border: 1px solid var(--color-primary); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; line-height: 14px;
}
.kind.out { background: var(--color-primary); color: var(--color-surface); }
.kind.back { color: var(--color-primary); }
.kind.move { background: var(--color-ground); border-color: var(--color-line); color: var(--color-muted); }
.list-foot.attention { gap: 8px; padding: 13px 18px; background: var(--color-attention-soft); color: var(--drawn-attention-ink); font-weight: 500; }
.list-foot.attention .icon { width: 14px; height: 14px; color: var(--color-attention); }
.list-foot.attention + .list-foot.attention { border-top: 1px solid var(--drawn-attention-line); }

/* the fleet beside the schedule (CAR-6, CAR-9): a column of what needs someone and what is free, and a narrow one of
   the offices, today's rates and who is in */
.dashboard { display: flex; align-items: flex-start; gap: 20px; }
.dashboard > .schedule { flex: 1 1 0; min-width: 0; }
.dash-col { display: flex; flex-direction: column; flex-shrink: 0; gap: 20px; }
.dash-col.mid { width: 330px; }
.dash-col.side { width: 236px; }
.dash-col .panel-head { padding: 16px 18px 12px; border-bottom: 0; }
.dash-col .list-empty { padding: 4px 18px 18px; font-size: 12px; line-height: 17px; }
.fleet-attention .caps { color: var(--color-faint); font: 400 11px/14px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.fleet-attention summary { list-style: none; cursor: pointer; }
.fleet-attention summary::-webkit-details-marker { display: none; }
.fleet-attention summary .icon { color: var(--color-faint); }
.fleet-attention details[open] > summary .icon { transform: rotate(180deg); }
.att-head, .att-head > summary { display: flex; align-items: center; gap: 14px; }
.att-head { padding: 4px 18px 16px; }
details.att-head { display: block; padding: 0; }
details.att-head > summary { padding: 4px 18px 16px; }
.att-head .big { font-size: 38px; font-weight: 400; letter-spacing: -0.03em; line-height: 38px; }
.att-head .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.att-head .what b { font-size: 13px; font-weight: 600; line-height: 16px; }
.att-head .what small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.att-head .what small.attention-text { color: var(--color-attention); font-weight: 500; }
.att-row, .att-row > summary { display: flex; align-items: center; gap: 12px; }
.att-row { padding: 10px 18px; border-top: 1px solid var(--color-line-soft); font-size: 13px; line-height: 16px; }
details.att-row { display: block; padding: 0; }
details.att-row > summary { padding: 10px 18px; }
.att-row .grow { flex: 1; min-width: 0; }
.att-row .n { width: 40px; flex-shrink: 0; text-align: right; font-weight: 500; }
.att-row.none { color: var(--color-muted); }
.att-row.none .n { color: var(--color-faint); font-weight: 400; }
.att-row.none::after { content: ""; width: 8px; flex-shrink: 0; }   /* where the others' chevron is */
.fleet-attention summary:hover { background: var(--color-ground); }
.att-cars { margin: 0; padding: 0 18px 10px; list-style: none; }
details.att-head > .att-cars { margin-top: -6px; }
.att-cars a { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; color: var(--color-ink); font-size: 12px; line-height: 16px; }
.att-cars a:hover { text-decoration: none; }
.att-cars a:hover .mono:first-child { color: var(--color-primary); }
.att-cars .mono:first-child { flex-shrink: 0; width: 76px; font-weight: 500; }
.att-cars .grow { flex: 1; min-width: 0; }
.att-cars .faint { font-size: 11px; }
.dash-col .here { display: flex; align-items: baseline; gap: 5px; color: var(--color-muted); font-size: 12px; line-height: 16px; }
.dash-col .here b { color: var(--color-primary); font-size: 18px; font-weight: 500; line-height: 22px; }
.off-road .here b { color: var(--color-ink); }
.off-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--color-line-soft); color: var(--color-ink); font-size: 12px; line-height: 16px; }
.off-row:hover { background: var(--color-ground); text-decoration: none; }
.off-row .mono:first-child { flex-shrink: 0; width: 76px; font-weight: 500; }
.off-row .state-code { flex-shrink: 0; }
.off-row .grow { flex: 1; min-width: 0; text-align: right; }
.off-road .panel-foot { gap: 12px; padding: 10px 18px; }
.off-road .panel-foot .grow { flex: 1; min-width: 0; }
.av-row { display: flex; align-items: center; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--color-line-soft); font-size: 12px; line-height: 16px; }
.av-row:last-child { border-bottom: 0; }
.av-row.heads {
  padding: 7px 18px; background: var(--color-ground); border-top: 1px solid var(--color-line); border-bottom-color: var(--color-line);
  color: var(--color-muted); font: 500 11px/14px var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase;
}
.av-grp { flex-shrink: 0; width: 52px; }
.av-row:not(.heads) .av-grp { font-size: 13px; font-weight: 600; }
.av-row .grow { flex: 1; min-width: 0; }
.av-row .tag { margin-left: 6px; padding: 1px 6px; font-size: 10px; }
.av-n { flex-shrink: 0; width: 36px; text-align: right; }
.av-row:not(.heads) .av-n { font-size: 13px; font-weight: 500; }
.idle .panel-head { padding: 14px 16px 11px; }
.idle .panel-head h2 { font-size: 13px; line-height: 16px; }
.idle-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--color-line-soft); font-size: 12px; line-height: 16px; }
.idle-row:last-child { padding-bottom: 12px; }
.idle-row .mono:first-child { flex-shrink: 0; width: 40px; font-weight: 500; }
.idle-row .grow { flex: 1; min-width: 0; text-align: right; }
.idle-row .n { flex-shrink: 0; width: 24px; color: var(--color-faint); font-size: 13px; text-align: right; }
.idle-row.here .n { color: var(--color-primary); font-weight: 600; }
.today-facts { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.today-facts .caps { color: var(--color-muted); font: 500 11px/14px var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.today-facts .fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 16px; }
.today-facts .fact .mono { font-size: 14px; font-weight: 500; line-height: 18px; }
.today-facts hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--color-line); }

/* ─── Fleet and Fleet status: every car, today (CAR-2) ─── */

.tiles {
  display: flex; overflow: clip; background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}
.tile { display: flex; flex: 1 1 0; flex-direction: column; gap: 4px; padding: 14px 18px; border-right: 1px solid var(--color-line-soft); }
.tile:last-child { border-right: 0; }
.tile b { font-size: 26px; font-weight: 500; line-height: 32px; }
.tile span { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.tile.available { background: var(--color-primary-soft); }
.tile.available b, .tile.available span { color: var(--color-primary); }
.tile.available span, .tile.out span { font-weight: 600; }
.tile.out { background: var(--color-attention-soft); }
.tile.out b { color: var(--color-attention); }
.tile.out span { color: var(--drawn-attention-ink); }
.fleet .list-head, .status .list-head { padding: 9px 18px; }
.fleet .list-row, .status .list-row { padding: 11px 18px; font-size: 13px; line-height: 16px; }
.fleet .list-row.blocked { background: var(--color-attention-soft); }
.f-reg { flex-shrink: 0; width: 104px; font-size: 12px; font-weight: 600; }
.f-grp { flex-shrink: 0; width: 34px; font-size: 12px; }
.f-office { flex-shrink: 0; width: 48px; font-size: 12px; }
.f-km { flex-shrink: 0; width: 86px; font-size: 12px; text-align: right; }
.list-head .f-km, .list-head .t-km { text-align: right; }
.f-state { display: flex; flex-shrink: 0; width: 110px; }
.f-due { flex-shrink: 0; width: 136px; font-size: 12px; }
.f-due.strong { font-weight: 600; }
.f-service { flex-shrink: 0; width: 96px; font-size: 12px; }
.state {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); color: var(--color-muted); font-family: var(--mono); font-size: 11px; font-weight: 500;
  line-height: 14px;
}
.state.idle { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary); }
.state.rent { background: var(--drawn-on-rent); border-color: transparent; color: var(--color-surface); }
.state.blocked { padding: 0; border: 0; color: var(--color-attention); }
.state.blocked .icon { width: 12px; height: 12px; }
.cards { display: flex; gap: 12px; }
.card {
  display: flex; flex: 1 1 0; flex-direction: column; gap: 5px; min-width: 0; padding: 15px 18px;
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
}
.card.wide { flex-grow: 1.3; }
.card b { font-size: 12px; font-weight: 500; line-height: 16px; }
.card > .mono { font-size: 26px; font-weight: 500; letter-spacing: var(--tracking-tight); line-height: 32px; }
.card small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.t-reg { flex-shrink: 0; width: 110px; font-size: 12px; font-weight: 500; }
.t-grp { flex-shrink: 0; width: 56px; font-size: 12px; }
.t-base { flex-shrink: 0; width: 66px; font-size: 12px; }
.t-state { flex-shrink: 0; width: 120px; }
.t-what { overflow: hidden; flex-shrink: 0; width: 230px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.t-since { flex-shrink: 0; width: 100px; font-size: 12px; }
.t-km { flex-shrink: 0; width: 90px; font-size: 12px; text-align: right; }
.state-code {
  display: inline-block; padding: 2px 6px; background: var(--color-ground); border: 1px solid var(--color-line);
  border-radius: 2px; color: var(--color-muted); font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: var(--tracking-caps); line-height: 14px;
}
.state-code.idle { background: var(--color-surface); color: var(--color-ink); }
.state-code.rent { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary); }
.state-code.blocked { background: var(--color-attention-soft); border-color: var(--color-attention); color: var(--color-attention); }
.state-code.held { background: var(--color-surface); border-color: var(--drawn-turnaround); color: var(--color-ink); white-space: nowrap; }
.status .list-foot { gap: 10px; }

/* ─── Vehicle record (CAR-3) ─── */

h1.vehicle { display: flex; align-items: center; gap: 11px; }
h1.vehicle .mono { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 32px; }
h1.vehicle .model { color: var(--color-muted); font-size: 19px; font-weight: 400; letter-spacing: 0; line-height: 24px; }
h1.vehicle .tag { padding: 3px 9px; }
.banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 12px; line-height: 16px;
}
.banner.blocked { background: var(--color-attention-soft); border: 2px solid var(--color-attention); color: var(--drawn-attention-ink); }
.banner .icon { color: var(--color-attention); }
.banner .grow { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.banner b { font-size: 14px; font-weight: 700; line-height: 18px; }
.button.attention-fill { background: var(--color-attention); border-color: var(--color-attention); color: var(--color-surface); font-weight: 600; }
.clock { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--color-line-soft); }
.clock:last-child { border-bottom: 0; }
.c-name { flex-shrink: 0; width: 168px; font-size: 13px; line-height: 16px; }
.c-date { flex-shrink: 0; width: 104px; font-size: 13px; line-height: 16px; }
.clock .meter { flex: 1; min-width: 0; }
.meter .track { fill: var(--color-line-soft); }
.meter .used { fill: var(--color-primary); }
.c-left { flex-shrink: 0; width: 104px; color: var(--color-muted); font-size: 12px; line-height: 16px; text-align: right; }
.c-none { flex: 1; color: var(--color-faint); font-size: 12px; line-height: 16px; }
.clock.soon .meter .used, .clock.expired .meter .used { fill: var(--color-attention); }
.clock.soon .c-left { color: var(--color-attention); }
.clock.expired { background: var(--color-attention-soft); }
.clock.expired .c-name { color: var(--drawn-attention-ink); font-weight: 600; }
.clock.expired .c-date, .clock.expired .c-left { color: var(--color-attention); font-weight: 600; }
.clock.expired .meter .track { fill: var(--color-attention); }
.record-table .list-head { padding: 8px 20px; }
.record-table .list-row { padding: 12px 20px; font-size: 13px; line-height: 16px; }
.v-date { flex-shrink: 0; width: 80px; font-size: 12px; }
.v-km { flex-shrink: 0; width: 74px; font-size: 12px; text-align: right; }
.list-head .v-km { text-align: right; }
.v-back { flex-shrink: 0; width: 104px; font-size: 12px; }
.v-when { flex-shrink: 0; width: 118px; font-size: 12px; }
.v-route { flex-shrink: 0; width: 86px; font-size: 12px; }
.v-on { flex-shrink: 0; width: 72px; font-size: 12px; text-align: right; }
.list-head .v-on { text-align: right; }
.finance .panel-head { align-items: center; }
.finance .panel-head .tag { padding: 2px 8px; }
.finance .panel-row { padding-top: 12px; padding-bottom: 12px; }
.finance .panel-row .label { color: var(--color-muted); }
.panel-row.shaded { background: var(--color-ground); border-top: 1px solid var(--color-line-soft); }
.figures { display: flex; border-bottom: 1px solid var(--color-line-soft); }
.figures > div { display: flex; flex: 1 1 0; flex-direction: column; gap: 4px; padding: 14px 18px; border-right: 1px solid var(--color-line-soft); }
.figures > div:last-child { border-right: 0; }
.figures b { font-size: 20px; font-weight: 500; line-height: 24px; }
.figures span { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.year .panel-row .label { color: var(--color-muted); }
.aside.related .pair small { display: block; margin-top: 2px; color: var(--color-muted); font-size: 11px; line-height: 14px; }

/* Hand over a car (J3) — the cars to choose from, the driver's licence against the minimum, the readings, the money */
.cars .c-reg, .cars .c-km, .cars .c-fuel, .cars .c-next { flex-shrink: 0; }
.cars .c-reg { width: 112px; }
.cars .c-km { width: 88px; text-align: right; }
.cars .c-fuel { width: 62px; text-align: right; }
.cars .c-next { display: flex; align-items: center; gap: 6px; width: 216px; }
.page-header .tag.route { text-transform: none; letter-spacing: 0; }
.cars .c-next .icon { width: 12px; height: 12px; flex-shrink: 0; }
.car-row { padding-top: 13px; padding-bottom: 13px; cursor: pointer; font-size: 13px; }
.car-row .c-km, .car-row .c-fuel, .car-row .c-next { font-size: 12px; }
.car-row .c-next { color: var(--color-muted); }
.car-row .c-next.attention-text { color: var(--color-attention); }
.car-row .tag { margin-left: 6px; padding: 1px 7px; font-size: 10px; line-height: 12px; vertical-align: 1px; }
.car-row.cannot { cursor: default; color: var(--color-muted); }
.car-row:has(input:checked) { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); padding-left: 15px; }
.car-row:has(input:checked) .c-reg { color: var(--color-primary); font-weight: 600; }
.car-row:has(input:checked) .grow { font-weight: 500; }
.car-row:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.car-row:not(.cannot):hover { background: var(--color-ground); }
.cars .upgrades { margin-top: 0; }
.cars .upgrades > summary { padding: 11px 20px; }
.cars .form-error.inset { border-bottom: 0; }
.held-for { flex: 1 1 0; }
.held-for .held { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: var(--radius-sm);
                  background: var(--color-ground); color: var(--color-muted); font-size: 13px; font-weight: 500; }
.held-for .held.ok { background: var(--color-primary-soft); color: var(--color-primary); }
.held-for .held.short { background: var(--color-attention-soft); color: var(--color-attention); }
.held-for .held.refused { background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-danger); color: var(--color-danger); }
.driver details.further { margin-top: 6px; }
.driver > .fields-row:last-of-type { padding-bottom: 14px; }
.readings { display: flex; gap: 14px; padding: 18px 20px; }
.readings .km { flex-shrink: 0; width: 150px; }
.readings .fuel { flex-shrink: 0; width: 118px; }
.readings .grow { min-width: 0; }
.with-unit { position: relative; display: block; }
.field .with-unit input[type="text"] { width: 100%; padding-right: 40px; font: 500 13px/16px var(--mono); text-align: right; }
.field.required .with-unit input { border-color: var(--color-ink); }
.field.has-error .with-unit input { border-color: var(--color-danger); }
.with-unit > span { position: absolute; top: 10px; right: 11px; color: var(--color-muted); font: 12px/16px var(--mono); pointer-events: none; }
.damage-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 36px; padding: 8px 12px;
               border-radius: var(--radius-sm); background: var(--color-ground); font-size: 12px; line-height: 16px; }
.damage-list small { color: var(--color-muted); font-size: 11px; }
.quote-row small { display: block; margin-top: 2px; color: var(--color-muted); font-size: 11px; line-height: 14px; }
.payment-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.pay-by { display: flex; gap: 6px; }
.pay-by label { position: relative; flex: 1 1 0; cursor: pointer; }
.pay-by input { position: absolute; opacity: 0; }
.pay-by span { display: flex; align-items: center; height: 36px; padding: 0 11px; border: 1px solid var(--color-line);
               border-radius: var(--radius-sm); color: var(--color-muted); font-size: 13px; }
.pay-by input:checked + span { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-ink); font-weight: 500; }
.pay-by input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.field.has-error .pay-by span { border-color: var(--color-danger); }
.payment .card-fields { display: none; gap: 10px; }
.payment:has(.pay-by input[value="card"]:checked) .card-fields { display: flex; }
.card-fields > .field { flex: 1 1 0; }
.card-fields > .field.wide { flex-grow: 2; }
.owes { display: flex; flex-direction: column; gap: 10px; padding: 11px 13px; border-radius: var(--radius-sm);
        background: var(--color-attention-soft); color: var(--drawn-attention-ink); font-size: 12px; line-height: 16px; }
.owes .owed { display: flex; gap: 10px; }
.owes .icon { flex-shrink: 0; color: var(--color-attention); }
.owes b { display: block; font-weight: 600; }
.owes .take { display: flex; align-items: flex-start; gap: 10px; padding-left: 25px; color: var(--color-ink); font-weight: 500;
              cursor: pointer; }
.owes .take input { flex-shrink: 0; width: 14px; height: 14px; margin: 1px 0 0; accent-color: var(--color-attention); }
.invoice-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px;
                   border-top: 1px solid var(--color-line-soft); }
.invoice-preview .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.invoice-preview b { font-size: 12px; font-weight: 600; line-height: 16px; }
.invoice-preview small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.prints ul { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.prints li { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 16px; }
.prints li .icon { flex-shrink: 0; color: var(--color-primary); }
.to-print .panel-row { padding: 14px 20px; }

/* Cars due back (J6 step 1) — a reading taken at the desk, once, while the car is in front of the person */
.banner.info { border-color: transparent; background: var(--color-primary-soft); }
.banner.info .icon { color: var(--color-primary); }
.banner.info p { color: var(--color-ink); }
.due-back .d-due, .due-back .d-no { flex-shrink: 0; width: 110px; font-size: 12px; }
.due-back .d-km { flex-shrink: 0; width: 140px; }
.due-back .d-fuel { flex-shrink: 0; width: 120px; }
.due-back .d-state { flex-shrink: 0; width: 170px; }
.due-back .d-act { flex-shrink: 0; width: 84px; text-align: right; }
.due-back .list-row { padding-top: 12px; padding-bottom: 12px; font-size: 13px; }
.due-back .list-row input[type="text"], .due-back .reading {
  display: block; width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-ink); font: 13px/30px var(--mono);
}
.due-back .list-row input::placeholder { color: var(--color-faint); }
.due-back .select { position: relative; display: block; }
.due-back select { width: 100%; height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
                   background: var(--color-surface); color: var(--color-ink); font-size: 12px; appearance: none; }
.due-back .select .icon { position: absolute; top: 13px; right: 10px; pointer-events: none; }
.due-back .button { padding: 6px 12px; }
.due-back .list-row.checked { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); padding-left: 15px; }
.due-back .list-row.checked .reading { border-color: var(--color-primary); }
.due-back .list-row.checked .said { color: var(--color-primary); font-size: 12px; font-weight: 500; }
.due-back .list-row.attention .reading { border-color: var(--color-attention); }
.due-back .list-row.attention .said { color: var(--color-attention); font-size: 12px; font-weight: 600; }
.due-back .list-row.late .d-due { color: var(--color-attention); }
.due-back .list-foot { padding: 13px 18px; background: var(--color-ground); color: var(--color-muted); font-size: 12px; }
.panel-row .value.plain { font-family: var(--sans); }

/* Hand over a car with no booking (J4) — the pick-up is now, and the client is found or made new */
.period .fixed { display: flex; align-items: center; height: 36px; padding: 0 11px; border-radius: var(--radius-sm);
                 background: var(--color-ground); color: var(--color-ink); font-size: 13px; }
.new-client { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--color-primary-soft);
              border-bottom: 1px solid var(--color-line-soft); }
.new-client .icon { flex-shrink: 0; color: var(--color-primary); }
.new-client .what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.new-client b { font-size: 13px; font-weight: 600; line-height: 16px; }
.new-client small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.find-client { padding: 12px 20px 0; color: var(--color-muted); font-size: 12px; line-height: 16px; }
.driver .matches { padding: 0 20px; }
.driver details.further + details.further { margin-top: 0; border-top: 1px solid var(--color-line-soft); }

/* Scans of a client's documents (CLI-4) — opened only through the application, every opening recorded */
.scans { flex-wrap: wrap; }
.scans .document.scan { flex: 0 1 266px; align-items: stretch; text-align: left; }
.scans .thumb { display: flex; align-items: center; justify-content: center; height: 78px; margin-bottom: 10px;
                border-radius: var(--radius-sm); background: var(--color-ground); color: var(--color-muted); }
.scans .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scans .document.scan .link { align-self: flex-start; margin-top: 8px; }
.scans.compact .document.scan { flex-direction: row; align-items: center; gap: 12px; }
.scans.compact .thumb { flex-shrink: 0; width: 46px; height: 32px; margin: 0; }
.scans.compact .what { flex: 1; }
.scans.compact .document.scan .link { align-self: center; margin: 0; }
.scans .add-scan { display: flex; flex-direction: column; justify-content: center; gap: 8px; flex: 0 1 300px;
                   border-style: dashed; }
.scans .add-head { display: flex; align-items: center; gap: 8px; color: var(--color-primary); font-size: 12px; font-weight: 500; }
.scans .add-scan input[type="file"] { max-width: 100%; font-size: 11px; }
.scans .add-scan .select select { height: 30px; font-size: 12px; }
.scans.compact { padding: 4px 20px 14px; }
.scans.compact .document.scan, .scans.compact .add-scan { flex-basis: 280px; }
.scan-form { display: none; }
.scans.compact { align-items: flex-start; }
.scans.compact .add-scan { flex: 1 1 420px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.scans.compact .add-scan .select { width: 170px; }
.scans.compact .add-scan input[type="file"] { flex: 1; min-width: 150px; }

/* Return a car (J6): the readings against the pick-up's, a damage found, and the settlement line by line */
.tag.dark { border-color: transparent; background: #24312B; color: var(--color-surface); font-weight: 500; }
.page-header h1 .reg { color: var(--color-muted); font-size: 20px; font-weight: 500; line-height: 24px; }
.banner.late { border-left: 3px solid var(--color-attention); }
.banner.late strong { color: var(--drawn-attention-ink); font-weight: 400; }
.return .columns > .side { width: 408px; }
.reading-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--color-line-soft); }
.reading-row.end { border-bottom: 0; }
.reading-row.headings .now { text-align: right; }
.reading-row.headings { padding: 8px 20px; border-bottom-color: var(--color-line); background: var(--color-ground); }
.reading-row.headings span { color: var(--color-muted); font: 500 11px/14px var(--mono); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.reading-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reading-row .grow b { font-size: 13px; font-weight: 600; line-height: 16px; }
.reading-row .grow small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.reading-row .was { width: 112px; flex-shrink: 0; text-align: right; color: var(--color-muted); }
.reading-row .now { width: 132px; flex-shrink: 0; }
.reading-row .now input[type="text"] { width: 100%; height: 36px; border-color: var(--color-ink); text-align: right; font: 500 13px/16px var(--mono); }
.reading-row .diff { width: 150px; flex-shrink: 0; text-align: right; }
.reading-row .diff.flag { color: var(--color-attention); font-weight: 600; }
.row-error { padding: 0 20px 10px; color: var(--color-danger); font-size: 12px; line-height: 16px; text-align: right; }
.return-condition .known { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 20px; border-bottom: 1px solid var(--color-line-soft);
  color: var(--color-muted); font-size: 12px; line-height: 16px; }
.return-condition .known span { color: var(--color-ink); }
.found { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; background: var(--color-attention-soft);
  border-bottom: 1px solid var(--color-line-soft); color: var(--drawn-attention-ink); }
.found > .icon { flex-shrink: 0; margin-top: 2px; color: var(--color-attention); }
.found .grow { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.found b { font-size: 13px; font-weight: 600; line-height: 16px; }
.found p { font-size: 12px; line-height: 19px; }
.found-fields { display: flex; gap: 10px; }
.found-fields .what { flex: 1; }
.found-fields .amount { width: 150px; flex-shrink: 0; }
.found .charge { display: flex; flex-direction: column; flex-shrink: 0; gap: 7px; width: 150px; }
.found .charge label { position: relative; cursor: pointer; }
.found .charge input { position: absolute; opacity: 0; }
.found .charge label span { display: block; padding: 8px 13px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-muted); font-size: 12px; font-weight: 500; line-height: 16px; text-align: center; }
.found .charge input:checked + span { border-color: var(--color-attention); background: var(--color-attention); color: var(--color-surface); font-weight: 600; }
.found .charge input:focus-visible + span { outline: 2px solid var(--color-attention); outline-offset: 2px; }
.found .charge .link { align-self: center; font-size: 11px; }
.return-condition .cleanliness { display: flex; gap: 14px; padding: 16px 20px; }
.return-condition .cleanliness > .field { flex: 1 1 0; }
.return-condition .plain { display: flex; align-items: center; height: 30px; color: var(--color-muted); font-size: 12px; }
.clean-dirty { display: flex; gap: 7px; }
.clean-dirty label { position: relative; cursor: pointer; }
.clean-dirty input { position: absolute; opacity: 0; }
.clean-dirty span { display: inline-block; padding: 6px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  color: var(--color-muted); font-size: 12px; line-height: 16px; }
.clean-dirty input:checked + span { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-surface); font-weight: 600; }
.clean-dirty input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.panel-foot.links { gap: 22px; }
.panel-foot.links .link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.settle-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--color-line-soft); font-size: 13px; line-height: 16px; }
.settle-row .grow { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.settle-row small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.settle-row .mono { width: 92px; flex-shrink: 0; text-align: right; }
.settle-row.flag { background: var(--color-attention-soft); color: var(--drawn-attention-ink); font-weight: 600; }
.settle-row.flag small { color: var(--drawn-attention-ink); font-weight: 400; }
.settle-row.flag .mono { color: var(--color-attention); }
.settle-row.paid { border-top: 1px solid var(--color-line-soft); border-bottom: 0; background: var(--color-ground); color: var(--color-muted); font-size: 12px; }
.settle-row.paid .mono { font-size: 13px; }
.to-pay { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--color-primary); color: var(--color-surface); }
.to-pay .grow { font-size: 13px; font-weight: 600; line-height: 16px; }
.to-pay .amount { font-size: 19px; font-weight: 600; line-height: 24px; }
.to-pay .currency { color: #A9C9B8; font-size: 12px; line-height: 16px; }
.to-pay.nothing { background: var(--color-ground); color: var(--color-muted); }
.to-pay.nothing .currency { color: var(--color-faint); }
.aside.numbered li.attention::before { color: var(--color-attention); }

.panel-row .label small.block { display: block; color: var(--color-muted); font-size: 11px; line-height: 14px; }

/* Extend a rental (J7) and Swap the car (J8) */
.extend-fields { display: flex; gap: 14px; padding: 18px 20px; }
.extend-fields > .field { flex: 1 1 0; }
.extend-fields > .field.extend-to { flex: 1.15 1 0; }
.field .read { display: flex; align-items: center; height: 36px; padding: 0 11px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); background: var(--color-ground); color: var(--color-muted); font-size: 13px; }
.day-time { display: flex; gap: 6px; }
.day-time input[type="text"] { flex: 1 1 0; min-width: 0; }
.day-time input[name="to_time"] { flex: 0 0 72px; }
.field-note { padding: 0 20px 14px; font-size: 12px; line-height: 16px; }
.field-note.error { color: var(--color-danger); }
.panel.clash { border-color: var(--color-attention); }
.clash-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; background: var(--color-attention-soft);
  border-bottom: 1px solid var(--color-attention); color: var(--drawn-attention-ink); }
.clash-head .icon { flex-shrink: 0; color: var(--color-attention); }
.clash-head b { font-size: 13px; font-weight: 600; line-height: 17px; }
.clash-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--color-line-soft); font-size: 13px; }
.clash-row .ref { width: 120px; flex-shrink: 0; font-weight: 600; }
.clash-row .muted { color: var(--color-muted); }
.clash-row .flag { color: var(--color-attention); font-weight: 600; white-space: nowrap; }
.clash-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--color-ground);
  color: var(--color-muted); font-size: 12px; }
.extension-total .settle-row { font-size: 12px; }
.new-total { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px; background: var(--color-primary-soft);
  border-top: 1px solid var(--color-line-soft); }
.new-total .grow { font-size: 13px; font-weight: 600; }
.new-total .amount { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 30px; }
.new-total .currency { color: var(--color-muted); font-size: 12px; }
.swap-cards { display: flex; gap: 18px; align-items: flex-start; }
.swap-card { flex: 1 1 0; min-width: 0; }
.swap-card.out { border-color: var(--color-primary); }
.swap-card .card-head { padding: 12px 18px; background: var(--color-ground); border-bottom: 1px solid var(--color-line); }
.swap-card.out .card-head { background: var(--color-primary-soft); border-bottom-color: var(--color-primary); }
.swap-card.out .card-head .eyebrow { color: var(--color-primary); }
.swap-card .card-car { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-bottom: 1px solid var(--color-line-soft); }
.swap-card .card-car b { font-size: 19px; font-weight: 500; line-height: 24px; }
.swap-card .card-car small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.swap-card .card-car .select select { height: 36px; padding: 0 32px 0 11px; border: 1px solid var(--color-ink); border-radius: var(--radius-sm);
  background: var(--color-surface); font: 500 13px/16px var(--mono); appearance: none; width: 100%; }
.swap-card .card-car .select { position: relative; display: flex; align-items: center; }
.swap-card .card-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px; border-bottom: 1px solid var(--color-line-soft); font-size: 13px; }
.swap-card .card-row:last-child { border-bottom: 0; }
.swap-card .card-row .grow { flex: 1; color: var(--color-muted); font-size: 12px; }
.swap-card .card-row .field { width: 120px; flex-shrink: 0; }
.swap-card .card-row .field.wide { width: 200px; }
.swap-card .card-row input[type="text"] { width: 100%; height: 34px; text-align: right; }
.swap-card .card-row .field.wide input[type="text"] { text-align: left; }
.swap-card .card-row.has-error input { border-color: var(--color-danger); }
.swap-card .goes { display: flex; gap: 6px; }
.swap-card .goes label { position: relative; cursor: pointer; }
.swap-card .goes input { position: absolute; opacity: 0; }
.swap-card .goes span { display: inline-block; padding: 6px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  color: var(--color-muted); font-size: 12px; line-height: 16px; }
.swap-card .goes input:checked + span { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-surface); font-weight: 600; }
.swap-card .goes input[value="service"]:checked + span { border-color: var(--color-attention); background: var(--color-attention); }
.banner.swap-warning strong { color: var(--drawn-attention-ink); }
.banner.swap-warning p { color: var(--drawn-attention-ink); }
.button:disabled { cursor: not-allowed; }
.button.primary:disabled { border-color: var(--color-faint); background: var(--color-faint); color: var(--color-surface); }

/* Rental agreements (RNT-11) */
.agreements .list-row { padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 16px; }
.agreements .list-row.ended, .agreements .list-row.ended span { color: var(--color-muted); }
.a-no { flex-shrink: 0; width: 60px; font-weight: 600; } .a-reg { flex-shrink: 0; width: 104px; } .a-grp { flex-shrink: 0; width: 38px; }
.a-when { flex-shrink: 0; width: 120px; } .a-due { flex-shrink: 0; width: 132px; } .a-res { flex-shrink: 0; width: 92px; }
.a-total { flex-shrink: 0; width: 80px; text-align: right; } .a-state { flex-shrink: 0; width: 82px; padding-left: 14px; }
.agreements .list-row .a-total { font-weight: 600; }
.agreements .list-row.ended .a-total { font-weight: 400; }
.chip.closed { border-color: var(--color-line); color: var(--color-muted); }
.due-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px;
  border: 1px solid var(--color-attention); border-radius: var(--radius-sm); background: var(--color-attention-soft);
  color: var(--drawn-attention-ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.due-chip input { position: absolute; opacity: 0; }
.due-chip b { padding: 1px 7px; border-radius: 999px; background: var(--color-attention); color: var(--color-surface); font-size: 11px; font-weight: 600; }
.due-chip.on { background: var(--color-attention); color: var(--color-surface); }
.due-chip.on b { background: var(--color-surface); color: var(--color-attention); }
.due-chip:has(input:focus-visible) { outline: 2px solid var(--color-attention); outline-offset: 2px; }
.more-filters { position: relative; }
.more-filters summary { display: flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); background: var(--color-surface); font-size: 13px; cursor: pointer; list-style: none; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters[open] summary { border-color: var(--color-ink); }
.more-filters .more-body { position: absolute; right: 0; top: 40px; z-index: 5; display: flex; align-items: flex-end; gap: 10px; padding: 14px;
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(22, 33, 29, 0.08); }
.more-filters .field input { width: 120px; height: 34px; }

/* Damages (MNY-9, J13) */
.damage-tiles .tile { padding: 16px 20px; }
.damage-tiles .tile b { font-size: 26px; }
.damage-tiles .tile.open { background: var(--color-attention-soft); }
.damage-tiles .tile.open b { color: var(--color-attention); }
.damage-tiles .tile.open span { color: var(--drawn-attention-ink); font-weight: 600; }
.damage-tiles .tile.faint b { color: var(--color-muted); }
.damages .list-row { align-items: center; padding-top: 12px; padding-bottom: 12px; font-size: 13px; line-height: 16px; }
.damages .list-row.owed { background: var(--color-attention-soft); box-shadow: inset 3px 0 0 var(--color-attention); }
.damages .list-row.owed small { color: var(--drawn-attention-ink); }
.damages .list-row.ended, .damages .list-row.ended span { color: var(--color-faint); }
.damages .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.damages small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.d-no { flex-shrink: 0; width: 92px; font-weight: 600; } .d-reg { flex-shrink: 0; width: 114px; } .d-found { flex-shrink: 0; width: 76px; }
.d-amount { flex-shrink: 0; width: 110px; text-align: right; font-weight: 600; padding-right: 14px; }
.d-pays { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; width: 164px; }
.d-state { flex-shrink: 0; width: 130px; }
.damages .list-row.ended .d-amount { font-weight: 400; }
.chip.not-invoiced { border-color: var(--color-attention); color: var(--color-attention); }
.chip.paid { border-color: transparent; background: var(--color-primary-soft); color: var(--color-primary); }
.chip.claim-filed { border-color: var(--color-line); color: var(--color-ink); }
.chip.written-off { border-color: var(--color-line); color: var(--color-faint); }
.damages ~ .banner.quiet p { color: var(--color-muted); }
.damage-actions .payment-body .button { align-self: flex-start; }
.damage-actions .help, .raise .help { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.damage-actions .two { display: flex; gap: 10px; }
.damage-actions .two > .field { flex: 1 1 0; }
.aside-note { color: var(--color-muted); font-size: 12px; line-height: 17px; padding: 0 4px; }
.raise-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.raise .pay-by.payer label span { white-space: nowrap; }
.raise .help.beside { align-self: end; margin: 0; padding-bottom: 10px; }
.panel.owed .panel-foot.actions { display: flex; gap: 8px; padding: 14px 18px; background: var(--color-surface); border-top: 1px solid var(--drawn-attention-line); }

/* ─── Invoices, New invoice and an invoice's page (MNY-1, MNY-4, MNY-13) ─── */

.invoice-tiles {
  display: grid; grid-template-columns: 1.35fr 1.1fr 1fr 0.85fr; gap: 12px; overflow: visible; background: none;
  border: 0; border-radius: 0;
}
.invoice-tiles .tile, .invoice-tiles .tile:last-child {
  gap: 6px; padding: 16px 18px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md);
}
.tile .tile-label { color: var(--color-ink); font-size: 13px; font-weight: 500; line-height: 16px; }
.invoice-tiles .tile b { font-family: var(--mono); }
.invoice-tiles .tile.attention { background: var(--color-attention-soft); border-color: var(--drawn-attention-line); }
.invoice-tiles .tile.attention b { color: var(--color-attention); }
.panel.register > .panel-head { align-items: center; }
.register .filters { border: 0; border-bottom: 1px solid var(--color-line-soft); border-radius: 0; }
.register .list { border: 0; border-radius: 0; }
.invoices .list-row { padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 16px; }
.invoices .list-row.ended .i-total, .invoices .what { color: var(--color-muted); }
.invoices .tag { margin-left: 6px; font-size: 10px; }
.i-no { flex-shrink: 0; width: 96px; font-weight: 600; } .i-day { flex-shrink: 0; width: 64px; color: var(--color-muted); }
.i-total { flex-shrink: 0; width: 110px; text-align: right; font-weight: 600; }
.i-pay { display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; gap: 4px; width: 196px; padding-left: 14px; }
.i-pay small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.list-head .i-total { text-align: right; }
.chip.due { border-color: var(--color-ink); color: var(--color-ink); }
.chip.past-pick-up { border-color: var(--color-attention); color: var(--color-attention); }
.chip.credited { border-color: var(--color-line); color: var(--color-muted); }
.drafts .panel-row { align-items: center; }
.draft-actions { display: flex; gap: 8px; } .draft-actions form { margin: 0; }

.invoice-lines .line-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--color-line-soft);
  font-size: 13px; line-height: 16px;
}
.invoice-lines .line-row.headings { padding-top: 9px; padding-bottom: 9px; background: var(--color-ground); border-bottom-color: var(--color-line); }
.invoice-lines .line-row.headings > * {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-caps); color: var(--color-muted);
  text-transform: uppercase;
}
.invoice-lines .grow { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.invoice-lines small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.l-cat { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; width: 130px; }
.l-cat small { font-family: var(--sans); }
.l-qty { flex-shrink: 0; width: 64px; text-align: right; } .l-unit { flex-shrink: 0; width: 96px; text-align: right; }
.l-amount { flex-shrink: 0; width: 112px; text-align: right; font-weight: 600; } .l-x { flex-shrink: 0; width: 20px; text-align: center; }
.invoice-lines .line-row.sum { padding-top: 7px; padding-bottom: 7px; border-bottom: 0; color: var(--color-muted); }
.invoice-lines .line-row.sum .l-amount { font-weight: 400; }
.invoice-lines .line-row.total { padding-top: 12px; border-top: 1px solid var(--color-ink); border-bottom: 0; font-weight: 700; }
.invoice-lines .line-row.edit input { width: 100%; height: 34px; padding: 0 9px; text-align: right; }
.invoice-lines .line-row.edit .select { width: 100%; }
.invoice-lines .line-row.edit .select select { width: 100%; color: var(--color-ink); }
.invoice-lines .line-row.has-error .select { border-color: var(--color-danger); }
.invoice-lines .error { color: var(--color-danger); font-size: 11px; line-height: 14px; }
.invoice-lines .panel-foot.links { display: flex; align-items: center; gap: 12px; padding: 12px 20px; font-size: 12px; }
.panel-row.link-row { color: var(--color-ink); }
.panel-row.link-row:hover { background: var(--color-ground); text-decoration: none; }
.credit-actions .button-row { display: flex; gap: 8px; }

.doc-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 18px 20px; }
.doc-kind {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); cursor: pointer;
}
.doc-kind input { position: absolute; opacity: 0; }
.doc-kind b { font-size: 13px; font-weight: 600; line-height: 16px; }
.doc-kind small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.doc-kind:has(input:checked) { background: var(--color-primary-soft); border-color: var(--color-primary); }
.doc-kind:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.invoice-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.invoice-fields .span-all { grid-column: 1 / -1; }
.invoice-fields .read.muted { background: var(--color-ground); color: var(--color-muted); }
.invoice-fields .field-note { display: flex; align-items: center; gap: 6px; padding: 0; color: var(--color-muted); }
.invoice-fields .field-note.error { color: var(--color-danger); }
.invoice-fields .help { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.pay-by.read-only span { flex: 1 1 0; color: var(--color-muted); }
.pay-by.read-only span.on { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-ink); font-weight: 500; }
.invoice-total .settle-row .mono { width: auto; }
.paid-block { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--color-primary); color: var(--color-surface); }
.paid-block .grow { display: flex; flex-direction: column; gap: 2px; }
.paid-block b { font-size: 14px; font-weight: 700; line-height: 18px; }
.paid-block small { font-size: 11px; line-height: 14px; opacity: 0.85; }
.paid-block .mono { font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-caps); }
.paid-block.due { background: var(--color-ink); }

/* ─── Cash at the desks (MNY-6, MNY-7; J11) ─── */

.cash .list-row { padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 16px; }
.cash .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cash .grow small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.c-num { flex-shrink: 0; width: 132px; text-align: right; } .c-out { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; width: 112px; }
.c-out small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.list-head .c-num, .list-head .c-out { text-align: right; }
.cash .strong { font-weight: 600; }
.cash .agrees { color: var(--color-primary); }
.cash .flag { color: var(--color-attention); font-weight: 600; }
.cash .list-row.off { background: var(--color-attention-soft); box-shadow: inset 3px 0 0 var(--color-attention); }
.payouts .p-office { flex-shrink: 0; width: 64px; color: var(--color-muted); font-size: 12px; }
.payouts .panel-row .label { font-size: 13px; }
.close-day.attention { border-color: var(--drawn-attention-line); }
.close-day.attention .panel-head { background: var(--color-attention-soft); }
.close-day.attention .panel-head h2 { color: var(--drawn-attention-ink); }
.close-day .payment-body .button, .payout-form .payment-body .button { align-self: flex-start; }
.close-day .help, .payout-form .help { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.payment-body.ruled { border-top: 1px solid var(--color-line-soft); }
.payout-form .two { display: flex; gap: 10px; } .payout-form .two > .field { flex: 1 1 0; }

/* ─── Who owes us (MNY-8) ─── */

.invoice-tiles .tile.faint .tile-label, .invoice-tiles .tile.faint b, .invoice-tiles .tile.faint span { color: var(--color-faint); }
.balances .list { border: 0; border-radius: 0; }
.owed .list-row { padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 16px; }
.owed .who { color: var(--color-ink); font-weight: 600; }
.owed .list-row.disputed { background: var(--color-attention-soft); box-shadow: inset 3px 0 0 var(--color-attention); }
.owed .list-row.ended .who, .owed .list-row.ended .o-num { color: var(--color-muted); font-weight: 400; }
.o-kind { flex-shrink: 0; width: 120px; color: var(--color-muted); }
.o-num { flex-shrink: 0; width: 120px; text-align: right; } .o-total { flex-shrink: 0; width: 110px; text-align: right; font-weight: 600; }
.o-open { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; width: 230px; padding-left: 14px; color: var(--color-muted); }
.o-open a { color: var(--color-muted); } .o-open a.flag { color: var(--color-attention); font-weight: 500; }
.list-head .o-num, .list-head .o-total { text-align: right; }

/* ─── Take a car out of service (CAR-4; J9) ─── */

.reasons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 18px 20px; }
.reason-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 10px;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm); color: var(--color-muted); cursor: pointer;
}
.reason-card input { position: absolute; opacity: 0; }
.reason-card b { color: var(--color-ink); font-size: 12px; font-weight: 600; line-height: 16px; }
.reason-card small { font-size: 11px; line-height: 14px; }
.reason-card:has(input:checked) { padding: 12px 9px; background: var(--color-primary-soft); border: 2px solid var(--color-primary); color: var(--color-primary); }
.reason-card:has(input:checked) b { color: var(--color-primary); }
.reason-card:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.oos-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.oos-fields .vehicle { grid-column: span 2; }
.oos-fields .span-2 { grid-column: span 3; }
.oos-fields .help { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.clash-panel { border: 1.5px solid var(--color-attention); background: var(--color-surface); }
.clash-panel .clash-head { display: flex; align-items: center; gap: 8px; padding: 15px 18px 6px; border-bottom: 0; background: var(--color-attention-soft); color: var(--color-attention); }
.clash-panel .clash-head b { color: var(--drawn-attention-ink); font-size: 14px; }
.clash-panel > p { margin: 0; padding: 0 18px 14px; background: var(--color-attention-soft); color: var(--drawn-attention-ink); font-size: 12px; line-height: 18px; }
.clash-panel .value.flag, .panel .value.flag { color: var(--color-attention); }
.clash-panel .clash-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--color-line-soft); }
.panel .o-code { flex-shrink: 0; width: 64px; color: var(--color-muted); font-size: 11px; }
.panel .panel-note { margin: 0; padding: 12px 18px; color: var(--color-muted); font-size: 12px; line-height: 17px; }
.banner.out-of-service-banner { display: flex; align-items: center; gap: 12px; border-color: var(--drawn-attention-line); background: var(--color-attention-soft); }
.banner.out-of-service-banner .grow { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.banner.out-of-service-banner b { color: var(--drawn-attention-ink); }
.banner.out-of-service-banner span { color: var(--drawn-attention-ink); font-size: 12px; }
.banner.out-of-service-banner form { margin: 0; }
.banner.out-of-service-banner.planned { border-color: var(--color-line); background: var(--color-surface); }
.banner.out-of-service-banner.planned b, .banner.out-of-service-banner.planned span { color: var(--color-ink); }
.banner.out-of-service-banner.planned svg { color: var(--color-muted); }
.banner.out-of-service-banner .ends-on-arrival { max-width: 170px; color: var(--drawn-attention-ink); font-size: 11px; line-height: 15px; text-decoration: underline; }
.move-end { position: relative; }
.move-end summary { list-style: none; cursor: pointer; }
.move-end summary::-webkit-details-marker { display: none; }
.move-end[open] summary { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary); }
.move-end form { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; width: 330px; padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 6px 18px rgb(22 33 29 / 0.10); }
.move-end .field { flex: 1; }
.move-end .button.primary { height: 36px; }
.move-end form small { width: 100%; color: var(--color-muted); font-size: 11px; line-height: 14px; }
.move-end .day-time input[name="until_time"] { flex: 0 0 64px; }
.already-panel > p { margin: 0; padding: 12px 18px 14px; font-size: 12px; line-height: 18px; color: var(--color-ink); }
.already-panel .clash-actions { display: flex; gap: 8px; padding: 0 18px 16px; }

/* ─── Transfers (CAR-7) ─── */

.transfers-note p { color: var(--color-ink); font-size: 12px; line-height: 16px; }
.list.transfers { overflow: visible; }   /* a row's form opens over the rows below it */
.transfers .list-head { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.transfers .list-foot { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.transfers .list-row { padding: 11px 18px; font-size: 13px; line-height: 16px; }
.transfers .list-row.attention { padding-left: 15px; }
.transfers .x-no { flex-shrink: 0; width: 80px; font-size: 12px; font-weight: 500; }
.transfers .x-reg { flex-shrink: 0; width: 96px; font-size: 12px; }
.transfers .x-reg a { color: var(--color-ink); }
.transfers .x-reason { flex-shrink: 0; width: 76px; }
.transfers .x-what { flex: 1; min-width: 0; }
.transfers .x-when { flex-shrink: 0; width: 132px; color: var(--color-muted); font-size: 12px; }
.transfers .x-when.flag { color: var(--color-attention); font-weight: 600; }
.transfers .x-when.sans { font-family: inherit; }
.transfers .x-who { flex-shrink: 0; width: 128px; font-size: 12px; }
.transfers .x-who.faint { color: var(--color-faint); }
.transfers .x-act { display: flex; flex-shrink: 0; justify-content: flex-end; width: 104px; }
.transfers .state-code.blocked { background: var(--color-surface); }
.row-action { position: relative; }
.row-action summary { padding: 6px 11px; list-style: none; cursor: pointer; }
.row-action summary::-webkit-details-marker { display: none; }
.row-action[open] summary { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary); }
.row-action form { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; width: 320px; padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 6px 18px rgb(22 33 29 / 0.10); }
.row-action form b { font-size: 13px; font-weight: 600; line-height: 17px; }
.row-action form .error { color: var(--color-danger); font-size: 12px; line-height: 16px; }
.row-action .readings { display: flex; gap: 10px; padding: 0; }
.row-action .readings .field { flex: 1; }
.row-action .readings .field + .field { flex: 0 0 96px; }
.row-action .day-time input[name$="-at"] { flex: 0 0 72px; }
.row-action form small { color: var(--color-muted); font-size: 11px; line-height: 15px; }

/* ─── Corrections (REC-2) ─── */

.corrections-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.corrections-note { align-items: flex-start; border-color: var(--color-attention); }
.corrections-note .icon { margin-top: 1px; }
.corrections-note strong { color: var(--drawn-attention-ink); }
.corrections-note p { color: var(--drawn-attention-ink); }
.corrections .list-row { align-items: flex-start; padding-top: 13px; padding-bottom: 13px; font-size: 13px; line-height: 17px; }
.corrections .list-row.attention { padding-left: 15px; }
.corrections .c-when { flex-shrink: 0; width: 96px; color: var(--color-muted); font-size: 12px; }
.corrections .c-who { flex-shrink: 0; width: 110px; }
.corrections .c-record { display: flex; flex-direction: column; flex-shrink: 0; gap: 2px; width: 150px; }
.corrections .c-record b { font-size: 12px; font-weight: 600; }
.corrections .c-record small, .corrections .c-decision small { color: var(--color-muted); font-size: 11px; line-height: 15px; }
.corrections .c-values { flex-shrink: 0; width: 230px; color: var(--color-muted); font-size: 12px; }
.corrections .c-values .was { text-decoration: line-through; }
.corrections .c-values .now { color: var(--color-ink); font-weight: 600; }
.corrections .c-why { flex: 1; min-width: 0; }
.corrections .c-decision { display: flex; flex-direction: column; flex-shrink: 0; gap: 4px; width: 300px; }
.corrections .c-verdict { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.corrections .c-decision small.flag { color: var(--color-attention); }
.state-code.applied { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary); }
.state-code.refused { background: var(--color-surface); }
.state-code.waiting { background: var(--color-attention); border-color: var(--color-attention); color: var(--color-surface); }
.corrections .decide { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.corrections .decide .button { padding: 6px 12px; }
.row-action.refuse .refuse-why { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; width: 300px; padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 6px 18px rgb(22 33 29 / 0.10); }
.row-action.refuse label { color: var(--color-muted); font-size: 11px; }
.row-action.refuse textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--color-ink); border-radius: var(--radius-sm); font: inherit; font-size: 13px; }
.list.corrections { overflow: visible; }
.corrections .list-head { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.corrections-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.corrections-notes .aside { padding: 16px 18px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.corrections-notes .aside p { margin: 8px 0 0; color: var(--color-ink); font-size: 12px; line-height: 18px; }
.ask-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.ask-fields .span-2 { grid-column: span 2; }
.ask-fields .read { display: flex; align-items: center; height: 36px; padding: 0 11px; background: var(--color-ground); border: 1px solid var(--color-line-soft); border-radius: var(--radius-sm); font-size: 13px; }
.ask-fields textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--color-ink); border-radius: var(--radius-sm); font: inherit; font-size: 13px; line-height: 18px; }
.panel .panel-note.ink { color: var(--color-ink); }
.panel-row .value.sans { font-family: inherit; font-size: 12px; font-weight: 500; }

/* ─── Not on your record (ADM-2) ─── */

.not-on-record { width: 520px; }
.not-on-record .panel-row.needed { background: var(--color-ground); font-weight: 600; }
.not-on-record .tag.needed { margin-left: auto; padding: 2px 7px; border: 1px solid var(--color-ink); border-radius: 2px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.not-on-record .panel-row .value { min-width: 28px; text-align: right; }
.not-on-record .panel-note small { display: block; margin-top: 4px; color: var(--color-faint); font-size: 11px; }

/* ─── your account (ADM-1, ADM-4): a password of one's own, the second factor and its phone, the screens' language,
   and what one may do ─── */
.person.current > button { background: var(--color-primary-soft); color: var(--color-primary); box-shadow: 0 0 0 1.5px var(--color-primary); }
.account .fields-row { padding: 18px 20px 20px; }
.account .panel-foot { color: var(--color-muted); font-size: 12px; }
.account .panel-foot .grow { flex: 1; }
.account .panel-foot.stacked { flex-direction: column; align-items: flex-start; gap: 4px; }
.device { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.device-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px;
  border-radius: var(--radius-sm); background: var(--color-primary-soft); color: var(--color-primary);
}
.device .grow { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.device b { font-size: 13px; font-weight: 600; line-height: 16px; }
.device small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.phone-move { display: flex; align-items: flex-start; gap: 28px; padding: 18px 20px 20px; }
.phone-move .steps-col { display: flex; flex: 1; flex-direction: column; gap: 14px; min-width: 0; }
.numbered { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.numbered li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 20px; counter-increment: step; }
.numbered li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px;
  height: 20px; border-radius: 10px; background: var(--color-ink); color: var(--color-surface); font-family: var(--mono);
  font-size: 11px; font-weight: 500;
}
.account .phone-move .fields-row { padding: 4px 0 0 30px; }
.phone-move .fields-row > .field:first-child { flex: 0 0 250px; }
.phone-move .fields-row > .field:last-child { flex: 0 0 150px; }
.phone-move .qr { flex-shrink: 0; padding: 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.phone-move .qr svg { display: block; width: 130px; height: 130px; }
.phone-move .key { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; align-self: center; width: 190px; }
.phone-move .key .mono { padding: 9px 11px; border-radius: var(--radius-sm); background: var(--color-ground); font-size: 13px; letter-spacing: 0.04em; }
.move .key small { color: var(--color-muted); font-size: 11px; line-height: 14px; }
.language-row { display: flex; align-items: center; gap: 18px; padding: 18px 20px 20px; }
.languages { display: flex; flex-shrink: 0; gap: 6px; width: 260px; }
.languages span {
  flex: 1; padding: 9px 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); color: var(--color-muted);
  font-size: 12px; line-height: 16px;
}
.languages .on { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-ink); font-weight: 500; }
.languages .not-yet { border-style: dashed; background: var(--color-ground); color: var(--color-faint); }
.language-row p { flex: 1; color: var(--color-muted); font-size: 12px; line-height: 17px; }
.rights .panel-row .value { min-width: 28px; text-align: right; }
.rights .panel-row .faint { color: var(--color-faint); font-weight: 400; }
.rights .tag.beyond { padding: 1px 6px; font-size: 10px; }
.rights .panel-foot { align-items: flex-start; font-size: 11px; }
.rights .panel-foot .icon { margin-top: 1px; }
.sign-in .hint { margin-top: -6px; color: var(--color-muted); font-size: 12px; line-height: 16px; }
.sign-in .panel-actions { padding: 18px 24px 24px; }

/* ─── when something goes wrong (03 §8): an address that leads nowhere, a failure, and TRIO out of reach ─── */
.where-to-look, .what-happened { width: 520px; }
.where-to-look .panel-row { color: var(--color-ink); }
.where-to-look .panel-row:hover { background: var(--color-ground); text-decoration: none; }
.where-to-look .panel-row .label { color: var(--color-primary); font-weight: 500; }
.where-to-look .finds { color: var(--color-muted); }
.what-happened .panel-note small { display: block; margin-top: 4px; color: var(--color-muted); font-size: 11px; }
.sign-in .on-paper { display: flex; flex-direction: column; gap: 9px; margin: 18px 24px 0; padding: 13px 14px; border-radius: var(--radius-sm); background: var(--color-ground); }
.sign-in .on-paper ol { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 18px; font-size: 12px; line-height: 17px; }
.sign-in .on-paper li::marker { color: var(--color-muted); font-family: var(--mono); font-size: 11px; }


/* ─── Settings and Admin settings (ADM-2, asked on 18 October): every setting on one page in its sections, grouped,
   with the groups beside them; the people's roles and rights on the admin's own page ─── */
.today-facts .facts-head { display: flex; align-items: baseline; justify-content: space-between; }
.settings-page { gap: 28px; }
.settings-nav {
  position: sticky; top: 16px; display: flex; flex-direction: column; flex-shrink: 0; gap: 18px; width: 220px;
  max-height: calc(100vh - 32px); overflow-y: auto; padding-top: 4px;
}
.settings-nav .nav-group { display: flex; flex-direction: column; gap: 2px; }
.settings-nav .eyebrow, .group-rule span {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; line-height: 14px;
  color: var(--color-muted); text-transform: uppercase;
}
.settings-nav .eyebrow { padding: 0 10px 4px; }
.settings-nav a { padding: 6px 10px; border-radius: var(--radius-sm); color: var(--color-ink); font-size: 13px; line-height: 16px; }
.settings-nav a:hover { background: var(--color-surface); text-decoration: none; }
.settings-nav a[aria-current] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 500; }
.settings-page > .main { gap: 16px; }
.group-rule { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
.group-rule:first-child { padding-top: 4px; }
.group-rule::after { content: ""; flex: 1; height: 1px; background: var(--color-line); }
.settings-section { scroll-margin-top: 16px; }
.panel-head.stacked { align-items: center; padding: 14px 20px 12px; }
.panel-head.stacked .title { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.panel-head.stacked .actions .button { padding: 6px 12px; }
.settings-section .panel-note { padding: 11px 20px; border-top: 1px solid var(--color-line-soft); background: var(--color-ground); }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.rates .with-unit input[type="text"] { padding-right: 58px; }   /* BAM/l */
.segmented.fill { display: flex; width: 100%; }
.segmented.fill label { flex: 1 1 0; min-width: 0; }
.messages.in-panel { padding: 12px 20px 0; }
.table-scroll { overflow-x: auto; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 16px; }
.settings-table th, .settings-table td {
  padding: 10px 8px; border-bottom: 1px solid var(--color-line-soft); text-align: left; vertical-align: middle; white-space: nowrap;
}
.settings-table th:first-child, .settings-table td:first-child { padding-left: 20px; }
.settings-table th:last-child, .settings-table td:last-child { padding-right: 20px; }
.settings-table thead th {
  padding-top: 8px; padding-bottom: 8px; background: var(--color-ground); font-family: var(--mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.06em; line-height: 14px; color: var(--color-muted); text-transform: uppercase;
}
.settings-table tbody th { font-weight: 500; color: var(--color-ink); }
.settings-table tbody td { color: var(--color-muted); }
.settings-table tbody tr:last-child > * { border-bottom: 0; }
.settings-table tr.faint > *, .settings-table tr.faint .who b { color: var(--color-faint); }
.settings-table .edit { width: 1%; text-align: right; }
/* the rights, the same six columns on both tables, each centred under its name */
.settings-table.rights-table { table-layout: fixed; }
.settings-table.rights-table thead .who { width: 228px; }
.settings-table.rights-table thead .role { width: 166px; }
.settings-table.rights-table thead .who.wide { width: 394px; }
.settings-table.rights-table .right { text-align: center; white-space: normal; }
.settings-table.rights-table .who b { display: block; font-weight: 500; color: var(--color-ink); }
.settings-table.rights-table .who small { display: block; color: var(--color-muted); font-size: 12px; font-weight: 400; }
.settings-table.rights-table .select { height: 32px; background: var(--color-surface); }
.settings-table.rights-table .select select { width: 100%; height: 30px; color: var(--color-ink); }
.box {
  position: relative; display: inline-block; flex-shrink: 0; width: 18px; height: 18px; border: 1px solid var(--color-line);
  border-radius: 4px; background: var(--color-surface); vertical-align: middle;
}
.box.on, .tick input:checked + .box { background: var(--color-primary); border-color: var(--color-primary); }
.box.on::after, .box.role::after, .tick input:checked + .box::after {
  content: ""; position: absolute; top: 4px; left: 3px; width: 9px; height: 5px; border: solid var(--color-surface);
  border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.box.role, .tick.from-role input + .box { background: var(--color-primary-soft); border-color: var(--color-primary-soft); }
.box.role::after, .tick.from-role input + .box::after { border-color: var(--color-primary); }
.tick { position: relative; display: inline-block; line-height: 0; vertical-align: middle; cursor: pointer; }
.tick input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick.from-role, .tick.from-role input { cursor: default; }
.tick input:focus-visible + .box { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.settings-page .panel-foot { font-size: 12px; line-height: 16px; }
.panel-foot .legend { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin-right: 6px; }

/* ─── Hand over a car, from a reservation (J3, 19 October): the bookings going out here today, and any other found by
   its number or its client, above the walk-in ─── */
.from-booking .list-head, .from-booking .list-row { gap: 14px; padding-left: 20px; padding-right: 20px; }
.from-booking .list-row { padding-top: 11px; padding-bottom: 11px; font-size: 13px; line-height: 16px; }
.from-booking .w-at, .from-booking .w-res { flex-shrink: 0; width: 48px; }
.from-booking .w-group { flex-shrink: 0; width: 84px; color: var(--color-muted); }
.from-booking .w-days { flex-shrink: 0; width: 56px; color: var(--color-muted); }
.from-booking .w-car { flex-shrink: 0; width: 96px; }
.from-booking .w-act { display: flex; flex-shrink: 0; justify-content: flex-end; width: 104px; }
.from-booking .list-row .w-at { font-weight: 500; }
.from-booking .list-row .w-res { color: var(--color-muted); }
.from-booking .list-row .w-car .mono { font-weight: 500; }
.from-booking .list-row .w-car .faint { color: var(--color-faint); font-size: 12px; }
.from-booking .w-act .button { padding: 6px 12px; }
.from-booking .who { display: flex; flex-direction: column; gap: 2px; }
.from-booking .who b { font-weight: 500; }
.from-booking .who small { color: var(--color-muted); font-size: 12px; line-height: 16px; }
.from-booking .elsewhen .w-at { color: var(--color-attention); }
.from-booking .list-empty { padding: 14px 20px; }
.find-booking {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--color-line-soft);
  background: var(--color-ground); color: var(--color-muted); font-size: 12px; line-height: 16px;
}
.find-booking input {
  flex-shrink: 0; width: 320px; height: 34px; padding: 0 11px; border: 1px solid var(--color-line);
  border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font-size: 13px;
}
.find-booking .button { height: 34px; }
.find-booking .grow { flex: 1; min-width: 0; }
#booking-matches .list-row { border-top: 1px solid var(--color-line-soft); border-bottom: 0; }
