:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #5b6475;
  --line: #d9dde4;
  --brand: #14213d;
  --accent: #f2a900;
  --go: #1d7a46;
  --stop: #b3261e;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4e00;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1320;
    --surface: #171e2e;
    --ink: #eef1f6;
    --muted: #a3acbd;
    --line: #2a3346;
    --brand: #0a0f1a;
    --go: #2fa866;
    --stop: #e0544b;
    --warn-bg: #3a2f10;
    --warn-ink: #ffd877;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 760px; margin: 0 auto; padding: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
main.wide { max-width: 1200px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--brand); color: #fff; padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.topbar a, .topbar button { color: #fff; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: .2px; }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; margin-right: 8px; }
.topbar nav { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.topbar form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 32px auto; }
h1 { font-size: 1.5rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 15px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.applist { display: grid; gap: 10px; }
.error { color: var(--stop); font-weight: 600; }
.muted { color: var(--muted); }
.flag { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--line); }
.pill.submitted { background: var(--warn-bg); color: var(--warn-ink); }
.pill.approved { background: var(--go); color: #fff; }
.scroll-x { overflow-x: auto; }
