/* Tokens match the approved report mock-up: SU maroon and gold, Source Serif headings, Public Sans body. */
:root {
  --paper: #F4F3F5; --surface: #FFFFFF; --ink: #22181D; --ink-muted: #5E5359; --line: #E1DCDF;
  --maroon: #61223B; --maroon-soft: #F3E6EB; --gold: #8C6D2C; --danger: #A3283A; --danger-soft: #F8E3E6;
  --ok: #2E7D53; --ok-soft: #E3F3E9;
  --f-display: "Source Serif 4", Georgia, serif; --f-body: "Public Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #151114; --surface: #1D181B; --ink: #ECE6E9; --ink-muted: #A99DA3; --line: #322A2F;
          --maroon: #E8A3BA; --maroon-soft: #3A1F2A; --danger: #F08A99; --danger-soft: #3A1C21; --ok: #4FB27E; --ok-soft: #17301F; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0 0 .5rem; text-wrap: balance; }
a { color: var(--maroon); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem max(16px, 4vw); background: var(--surface); border-bottom: 2px solid var(--maroon); }
.brand { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; text-decoration: none; color: var(--maroon); }
.actions { display: flex; gap: 1rem; align-items: center; }
.page { max-width: 960px; margin: 2rem auto; padding: 0 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.card.narrow { max-width: 440px; margin: 0 auto; }
.stack { display: grid; gap: .6rem; }
label { font-weight: 600; font-size: .9rem; }
input[type=email], input[type=password], input[type=text] { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--surface); color: var(--ink); }
button, .button { font: inherit; padding: .65rem 1rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .button.primary { background: var(--maroon); color: #fff; border-color: var(--maroon); }
button.link { border: none; background: none; color: var(--maroon); padding: 0; text-decoration: underline; }
form.inline { display: inline; }
.notice { background: var(--ok-soft); color: var(--ok); padding: .6rem .8rem; border-radius: 6px; }
.error { background: var(--danger-soft); color: var(--danger); padding: .6rem .8rem; border-radius: 6px; }
.muted { color: var(--ink-muted); }
.links { font-size: .9rem; }
.chip { display: inline-block; background: var(--maroon-soft); color: var(--maroon); border-radius: 100px; padding: .1rem .6rem; margin-right: .3rem; font-size: .85rem; }
.codes { font-family: ui-monospace, monospace; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.qr svg { max-width: 220px; height: auto; }
.footer { text-align: center; color: var(--ink-muted); font-size: .85rem; padding: 2rem 16px; }

/* Plan 2: navigation, tables, forms and status badges. */
select, textarea, input[type=datetime-local], input[type=file] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--surface); color: var(--ink); }
textarea { min-height: 6rem; resize: vertical; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: .5rem max(16px, 4vw); background: var(--surface); border-bottom: 1px solid var(--line); }
.nav a { text-decoration: none; padding: .3rem 0; }
.nav a[aria-current=page] { font-weight: 600; border-bottom: 2px solid var(--maroon); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); font-weight: 600; }
.badge { display: inline-block; border-radius: 100px; padding: .05rem .6rem; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.badge.late, .badge.needs_follow_up, .badge.needs_attention { background: var(--danger-soft); color: var(--danger); }
.badge.on-time, .badge.reviewed, .badge.ready, .badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.needs_review, .badge.pending, .badge.queued, .badge.analysing { background: var(--maroon-soft); color: var(--maroon); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card + .card, .card + .grid, .grid + .card { margin-top: 1.25rem; }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; overflow-wrap: anywhere; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--ink-muted); }
dl.facts dd { margin: 0; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.empty { color: var(--ink-muted); }
.big { font-family: var(--f-display); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.tree, .tree ul { list-style: none; margin: 0; padding-left: 1.1rem; }
.tree ul { border-left: 1px solid var(--line); }
.tree li { margin: .35rem 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.checks label { font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; }
details.inline-form summary { cursor: pointer; color: var(--maroon); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row.spread { justify-content: space-between; }
.mt { margin-top: 1.5rem; }
.auto-width { width: auto; }


.narrow-input { width: auto; flex: 1 1 10rem; min-width: 0; }
