/* TrueUp — design tokens and shell styles.
 *
 * Token NAMES deliberately match Dispatch's (--bg, --panel, --signal, --ink, …)
 * so that app's layouts.js colour-scheme picker ports across without a rename
 * pass, and so anyone moving between the two codebases reads one vocabulary.
 *
 * Colours are defined ONCE here in :root. `npm run check:styles` flags any raw
 * hex elsewhere in this file that duplicates a token, and any border-radius off
 * the scale below.
 *
 * NOTE: Dispatch runs two themes from one token set — a dark app theme for the
 * logged-in product and a white-blue public theme for logged-out pages. TrueUp
 * currently ships only the dark app theme; the public theme is part of the
 * later marketing/landing work, not phase 0.
 */

:root {
  /* surfaces */
  --bg: #14171c;
  --panel: #1b1f26;
  --panel-raised: #232830;
  --panel-border: #2f3540;

  /* text */
  --ink: #eef1f5;
  --ink-dim: #99a2af;

  /* accent — safety orange reads as construction and matches Dispatch's default */
  --signal: #f07316;
  --signal-dim: #6b3a11;
  --signal-deep: #b8560f;
  --on-signal: #14171c;

  /* document ("paper") surfaces */
  --paper: #f7f7f5;
  --paper-line: #dcdcd6;

  /* status */
  --ok: #3fa66a;
  --warn: #d99a2b;
  --danger: #d9534f;

  /* radius scale — check-styles.js enforces these */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* The app ships only the dark theme, and this is what tells the browser so:
     without it a native date picker renders its own light chrome and its icon
     is near-invisible against --bg. Scrollbars follow the same signal. */
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; font-weight: 650; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }

/* ---------- brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, var(--signal), var(--signal-deep));
  display: grid;
  place-items: center;
  color: var(--on-signal);
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 auto;
}

/* ---------- generic controls ---------- */

.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--ink-dim);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--signal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--signal);
  color: var(--on-signal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--signal-deep); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--panel-border);
}
.btn-ghost:hover { background: var(--panel-raised); }
.btn-block { width: 100%; }

.note { color: var(--ink-dim); font-size: 13px; }

.alert {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel-raised);
  margin-bottom: 12px;
  font-size: 14px;
}
.alert-error { border-color: var(--danger); color: var(--ink); }
.alert-ok { border-color: var(--ok); }

.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 12px;
  word-break: break-all;
  font-size: 13px;
}

/* ---------- auth screen ---------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.auth-card .brand { margin-bottom: 20px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--ink-dim); }
.auth-row { display: flex; gap: 10px; }
.auth-row .field { flex: 1 1 0; min-width: 0; }

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

.shell { display: flex; min-height: 100vh; }

.nav {
  width: 220px;
  flex: 0 0 220px;
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav .brand { margin: 4px 4px 18px; }
.nav a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: 14px;
}
.nav a:hover { background: var(--panel-raised); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--signal-dim); color: var(--ink); }
.nav-spacer { flex: 1 1 auto; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--panel-border);
  background: var(--panel);
}
.topbar .spacer { flex: 1 1 auto; }
.org-chip {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--panel-border);
  background: var(--panel-raised);
  font-size: 13px;
  color: var(--ink-dim);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--signal-dim);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.content { padding: 24px 20px; max-width: var(--maxw); width: 100%; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-dim);
}
.empty h2 { color: var(--ink); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
  font-size: 14px;
}
.checklist li:last-child { border-bottom: 0; }
.checklist .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel-border);
  flex: 0 0 auto;
}
.checklist .dot.done { background: var(--ok); }

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}
.perm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  color: var(--ink-dim);
}
.perm.on { color: var(--ink); }
.perm .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--panel-border); flex: 0 0 auto; }
.perm.on .dot { background: var(--signal); }

/* ---------- page header ---------- */

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head .spacer { flex: 1 1 auto; }
.page-head h1 { margin-bottom: 2px; }
.row-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- collection (list) view ---------- */

.coll-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.coll-bar .spacer { flex: 1 1 auto; }
.coll-search { flex: 0 1 260px; min-width: 140px; }
.coll-bar select { width: auto; }

/* Wide tables scroll inside their own container — the page body must never
   scroll sideways, which on a phone makes everything feel broken. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}
.table th {
  color: var(--ink-dim);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--panel-raised); }
.table .right { text-align: right; }

.coll-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 12px 0;
}

.progress {
  position: relative;
  width: 120px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--panel-raised);
  overflow: hidden;
}
.progress-fill { height: 100%; background: var(--signal); }
.progress-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--ink);
}

/* ---------- project summary ---------- */

.project-summary { display: flex; gap: 28px; flex-wrap: wrap; }
.summary-cell strong { display: block; font-size: 20px; margin: 2px 0; }

.view-toggle { display: flex; gap: 6px; flex: 0 0 auto; }
.view-toggle .active { border-color: var(--signal); color: var(--ink); }

/* ---------- stage board and list ----------
   The board's columns come from the project's own stages, so the count varies
   per job. Columns are fixed-width and the board scrolls, rather than squeezing
   twelve stages into the viewport. */

.board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.board-col {
  flex: 0 0 260px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.board-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.board-col.blocked, .stage-row.blocked { opacity: 0.72; }

.stage-list { display: flex; flex-direction: column; gap: 12px; }
.stage-row {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.stage-milestones { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.stage-head { display: flex; flex-direction: column; gap: 4px; }
.stage-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-override { margin-top: 6px; font-size: 13px; padding: 6px 8px; }

.stage-blocked {
  font-size: 12px;
  color: var(--warn);
  border-left: 2px solid var(--warn);
  padding-left: 8px;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--panel-raised);
  color: var(--ink-dim);
  white-space: nowrap;
}
.badge-active { background: var(--signal-dim); color: var(--ink); }
.badge-complete { background: var(--ok); color: var(--on-signal); }
.badge-skipped { text-decoration: line-through; }

/* Milestone card — the unit of work everything later attaches to. */
.ms-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  background: var(--panel-raised);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.ms-card:hover { border-color: var(--signal); }
.ms-card input { width: auto; margin: 2px 0 0; flex: 0 0 auto; }
.ms-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-name { color: var(--ink); }
.ms-card.done .ms-name { text-decoration: line-through; color: var(--ink-dim); }
.ms-proof { font-size: 11px; color: var(--ink-dim); }

/* ---------- field capture ----------
   Bigger than the rest of the app on purpose. These controls get used on a
   phone, outdoors, often with gloves on. */

.btn-lg { padding: 15px 20px; font-size: 16px; }
.section-head { margin: 20px 0 10px; }

input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink-dim);
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  font: inherit;
}

.badge-assigned, .badge-in_progress { background: var(--panel-raised); }
.badge-submitted { background: var(--signal-dim); color: var(--ink); }
.badge-approved { background: var(--ok); color: var(--on-signal); }
.badge-rejected { background: var(--danger); color: var(--ink); }

/* ---------- approval desk ---------- */

.review-card { display: flex; gap: 14px; align-items: flex-start; }
.review-img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--panel-raised);
  flex: 0 0 auto;
}
.review-body { flex: 1 1 auto; min-width: 0; }
.review-body input[type="text"] { margin: 8px 0; }

/* ---------- dashboard and money ---------- */

.dash-list { display: flex; flex-direction: column; }
.dash-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--panel-border);
}
.dash-row:last-child { border-bottom: 0; }
.dash-row-main { flex: 1 1 auto; min-width: 0; }
.dash-money { text-align: right; flex: 0 0 auto; font-size: 14px; }

/* A flagged draw is outlined rather than filled red. The claim is "look at
   this", not "this person is a fraud" — the evidence beside it is what the
   reader is meant to judge. */
.draw-card.flagged { border-color: var(--danger); }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.evidence-cell {
  background: var(--panel-raised);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.evidence-cell strong { display: block; font-size: 18px; margin-top: 2px; }

/* ---------- support-access banner ----------
   Loud on purpose. This is the one state where looking like the normal app
   would be a problem. */

.support-bar {
  background: var(--signal-deep);
  color: var(--ink);
  padding: 9px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--panel-border);
}
.support-bar a { color: var(--ink); text-decoration: underline; }

/* ---------- bulk actions ----------
   Only rendered when something is selected. A permanently visible bar with
   "Delete" on it, sitting next to a list, is an accident waiting to happen. */

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--signal-dim);
  border: 1px solid var(--signal);
}
.bulk-bar .spacer { flex: 1 1 auto; }
.table td input[type="checkbox"] { width: auto; margin: 0; }

/* ---------- tasks ---------- */

.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--panel-border);
  font-size: 14px;
}
.task-list li:last-child { border-bottom: 0; }
.task-list input[type="checkbox"] { width: auto; margin: 0; flex: 0 0 auto; }
.task-list .ms-name.done { text-decoration: line-through; color: var(--ink-dim); }
.task-list .overdue { color: var(--danger); }

/* ---------- settings ---------- */

.settings-layout { display: flex; gap: 20px; align-items: flex-start; }
.settings-nav {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 16px;
}
.settings-nav a {
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: 14px;
}
.settings-nav a:hover { background: var(--panel-raised); color: var(--ink); text-decoration: none; }
.settings-nav a.active { background: var(--signal-dim); color: var(--ink); }
.settings-body { flex: 1 1 auto; min-width: 0; }

.perm-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  cursor: pointer;
}
.perm-switch input { width: auto; margin: 0; flex: 0 0 auto; }
/* An overridden switch is outlined so it is obvious which of a person's
   permissions differ from what their role would give them. */
.perm-switch.overridden { border: 1px solid var(--signal); }

.plan-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.plan-card { flex: 1 1 260px; }
.plan-card.current { border-color: var(--signal); }
.plan-price { font-size: 28px; font-weight: 700; margin: 6px 0 12px; }
.plan-price .note { font-size: 13px; font-weight: 400; }

/* ---------- schedule ----------
 * Timeline and crew share one row shape: a date (or site) column on the left,
 * everything else on the right. Two layouts that looked different for the same
 * underlying row would make the two views feel like two datasets, which is the
 * exact confusion docs/02-domain-model.md §12 exists to prevent.
 */

.sched-rows { display: flex; flex-direction: column; margin-top: 10px; }
.sched-row {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
}
.sched-row:last-child { border-bottom: 0; }
.sched-row[title] { cursor: pointer; }
.sched-row[title]:hover .sched-what strong { color: var(--signal); }
/* A conflicted row is marked on the row itself, not only in the banner above —
   the banner says a person is double-booked, this says which booking. */
.sched-row.conflicted { border-left: 2px solid var(--danger); padding-left: 10px; }
.sched-when {
  flex: 0 0 190px;
  font-size: 13px;
  color: var(--ink-dim);
}
.sched-what { flex: 1 1 auto; min-width: 0; }
.crew-line { padding: 4px 0; }
.crew-line + .crew-line { border-top: 1px dashed var(--panel-border); margin-top: 6px; }

.conflict-card { border-color: var(--danger); }

/* Named people. The chip is deliberately small and quiet — a normal day has
   several and they should read as a list, not as several badges shouting. */
.person-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--panel-raised);
  border: 1px solid var(--panel-border);
  font-size: 12px;
}
/* Linked to a crew member record, so the conflict check on this person is exact
   rather than name-matched. Worth showing: it is the difference between a
   reliable signal and a best guess. */
.person-chip.linked { border-color: var(--signal-dim); }
.person-chip.clash { border-color: var(--danger); color: var(--danger); }
.chip-x {
  background: none;
  border: 0;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.chip-x:hover { color: var(--danger); }
.person-add { display: flex; gap: 8px; }
.person-add input { flex: 1 1 auto; }

.sched-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 14px;
}
.btn-sm { padding: 5px 10px; font-size: 12px; margin-top: 6px; }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { border-color: var(--danger); }

/* ---------- logs and inspections ---------- */

/* A section heading with an action beside it. Distinct from .section-head,
   which is applied directly to an <h2> elsewhere rather than wrapping one. */
.section-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 10px;
  flex-wrap: wrap;
}
.section-head-row h2 { margin: 0; flex: 1 1 auto; }

/* The sentence that turns an inspection from a diary entry into evidence — it
   is the reason the milestone's proof requirement is satisfied, so it reads in
   the success colour rather than as another grey note. */
.proof-note { color: var(--ok); }

/* Daily-log prose. Logs are written as paragraphs at the end of a day, so the
   line breaks the author typed are part of the record. */
.log-notes {
  margin-top: 6px;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 14px;
}

textarea { resize: vertical; min-height: 80px; }

/* ---------- quotes ---------- */

/* Rows are anchors so the router handles them and cmd-click still works; these
   strip the link styling so they read as rows rather than as blue text. */
a.dash-row { color: inherit; text-decoration: none; }
a.dash-row:hover { text-decoration: none; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--panel-raised); }
.clickable-row:hover strong { color: var(--signal); }

/* The line editor packs six controls into a row; without this the inputs claim
   their default width and the table overflows on anything under a desktop. */
.table td input,
.table td select { padding: 6px 8px; font-size: 13px; min-width: 0; }
.table td input[type="number"] { width: 90px; }

/* ---------- bid leveling ---------- */

/* Numbers in a comparison table have to line up to be comparable at all. */
.level-table td, .level-table th { font-variant-numeric: tabular-nums; }
.level-table .right { text-align: right; }
.level-table tr.level-total td { border-top: 1px solid var(--panel-border); }
.level-table tr.level-total:last-child td { background: var(--panel-raised); }

/* An exclusion is the finding, not an error — it reads in the warning colour
   rather than the danger one, because the sub did nothing wrong by scoping
   their bid differently. */
.excluded { color: var(--warn); }
/* The cheapest column in each total row. */
.level-table .low { color: var(--ok); }

/* ---------- responsive ----------
 * Breakpoints follow Dispatch's existing ladder (480/560/640/760/820/860/900/1200)
 * rather than inventing a second scale. Phone-first matters more here than it
 * does in Dispatch: field crews are the highest-volume users and they are on
 * phones in a framed-out house.
 */

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .nav {
    width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
    padding: 10px 12px;
  }
  .nav .brand { margin: 0 12px 0 0; }
  .nav a { white-space: nowrap; }
  .nav-spacer { display: none; }
}

@media (max-width: 640px) {
  .content { padding: 16px 12px; }
  .card { padding: 16px; }
  .auth-card { padding: 22px; }
}

@media (max-width: 640px) {
  .page-head { flex-wrap: wrap; }
  .project-summary { gap: 18px; }
  .coll-search { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  h1 { font-size: 21px; }
  .auth-row { flex-direction: column; gap: 0; }
  .topbar { padding: 10px 12px; }
  .org-chip { display: none; }
  /* Full-width columns so the board degrades to one stage at a time rather
     than a row of unreadable slivers. The list view is the better answer at
     this size and is what a phone defaults to. */
  .board-col { flex: 0 0 85vw; }
  .summary-cell strong { font-size: 17px; }
  /* Stack the review card: a 200px thumbnail beside text leaves nothing
     readable at this width. */
  .review-card { flex-direction: column; }
  .review-img { width: 100%; height: 200px; }
  /* The dashboard row is four columns of information; on a phone it stacks
     rather than crushing the job name to two words. */
  .dash-row { flex-wrap: wrap; }
  .dash-row-main { flex: 1 1 100%; }
  .dash-money { text-align: left; }
  /* A 190px date column beside the crew names leaves the names about eight
     characters. Stack instead — the date reads as a heading over its work. */
  .sched-row { flex-direction: column; gap: 4px; }
  .sched-when { flex: 1 1 auto; font-weight: 650; color: var(--ink); }
  /* Settings becomes one column with the section list scrolling across the
     top, rather than a 190px rail eating half a phone screen. */
  .settings-layout { flex-direction: column; }
  .settings-nav {
    flex-direction: row;
    flex: 0 0 auto;
    overflow-x: auto;
    position: static;
    width: 100%;
  }
  .settings-nav a { white-space: nowrap; }
}

/* Stage name edited in place — it should read as the heading it replaces,
   not as a form field sitting where a heading was. */
.stage-name-input {
  width: auto;
  flex: 1 1 200px;
  font-weight: 650;
  font-size: 16px;
  background: transparent;
  border-color: transparent;
}
.stage-name-input:hover { border-color: var(--panel-border); }
.stage-name-input:focus { background: var(--bg); border-color: var(--signal); }

/* A deactivated member stays visible but reads as inactive — their work record
   is still there and still matters. */
.dash-row.suspended { opacity: 0.55; }

/* A hand-entered punch is weaker evidence than one captured on site. Marked so
   an approver sees the difference at a glance rather than treating them alike. */
.weak-source { color: var(--warn); }
