/* Dispatch Board — the ondemandprime.com look (owner ruling 2026-10-13):
   near-black ground, charcoal panels, warm off-white type, ODP orange #FF5500
   only for "needs attention", calm blue for "on track", Archivo + IBM Plex Mono. */
:root {
  --base: #0C0F15;
  --panel: #161B25;
  --navy: #2C2E32;
  --attention: #FF5500;
  --on-track: #5EB8FF;
  --text: #EFEBE2;
  --muted: rgba(239, 235, 226, 0.62);
  color-scheme: dark;
}
/* Light theme (theme.js): website white with navy ink; accents deepened to read on white. */
:root[data-theme="light"] {
  --base: #F3F1EC;
  --panel: #FFFFFF;
  --navy: #DDD8CE;
  --attention: #C2410C;
  --on-track: #1A64A8;
  --text: #141A26;
  --muted: #5A5F6A;
  color-scheme: light;
}
:root[data-theme="light"] .ok-text { color: #16794A; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 15px;
}
main { max-width: 1200px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-weight: 600; font-size: 28px; margin: 0 0 8px; }
h1.attention { color: var(--attention); }
h2 { font-weight: 700; font-size: 18px; margin: 32px 0 12px; color: var(--text); }
header { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
/* Dispatch Board header stays pinned while the job list scrolls (owner ruling 2026-10-22). */
#board > header { position: sticky; top: 0; z-index: 60; background: var(--base); padding: 12px 0; margin-top: -12px; box-shadow: 0 0 0 100vmax var(--base); clip-path: inset(0 -100vmax -16px); }
#board > header.stuck { box-shadow: 0 0 0 100vmax var(--base), 0 8px 12px -10px rgba(0,0,0,.45); }
@media (max-width: 700px) { #board > header { position: static; margin-top: 0; box-shadow: none; clip-path: none; } }
.controls { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
input, select, button {
  font: inherit; color: var(--text); background: var(--panel);
  border: 1px solid var(--navy); border-radius: 3px; padding: 8px 12px;
}
button { cursor: pointer; background: var(--navy); }
button.quiet { background: transparent; }
#sign-in form { display: grid; gap: 16px; max-width: 360px; background: var(--panel); padding: 24px; border-radius: 3px; }
.error, .attention { color: var(--attention); }
#toast { min-height: 1.4em; color: var(--muted); }
#toast.attention { color: var(--attention); }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 13px; padding: 0 12px; }
td { background: var(--panel); padding: 10px 12px; vertical-align: top; }
td:first-child { border-radius: 3px 0 0 12px; }
td:last-child { border-radius: 0 3px 3px 0; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--navy); font-size: 12px; font-weight: 500; }
.chip.attention { border-color: var(--attention); color: var(--attention); }
.chip.on-track { border-color: var(--on-track); color: var(--on-track); }
.badge { display: block; margin-top: 6px; font-size: 12px; }
.flag, .warn { font-size: 12px; color: var(--attention); margin-top: 4px; }
#notes { list-style: none; padding: 0; display: grid; gap: 6px; }
#notes li { background: var(--panel); padding: 10px 12px; border-radius: 3px; color: var(--muted); }
@media (max-width: 720px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { margin-bottom: 10px; }
  td, td:first-child, td:last-child { border-radius: 0; }
  tr td:first-child { border-radius: 3px 12px 0 0; }
  tr td:last-child { border-radius: 0 0 3px 3px; }
}

.signin-links { display: flex; gap: 16px; justify-content: space-between; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted, #8a93a6); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
#set-password { display: grid; gap: 16px; max-width: 360px; background: var(--panel); padding: 24px; border-radius: 3px; }
#set-password[hidden], #sign-in-form[hidden], #sign-in[hidden] { display: none; }
.ok-text { color: #3fb950; }

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.brand .mark { width: 40px; height: 40px; object-fit: contain; }
.brand-t { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
/* Logo and wordmark balanced, vertically centered (owner feedback 2026-10-22). */
.brand-t:has(.brand-word) { display: flex; align-items: center; gap: 12px; letter-spacing: 0; }
.brand-word { font-size: 24px; font-weight: 800; letter-spacing: .03em; line-height: 1; white-space: nowrap; }
.brand-page { display: flex; align-items: center; height: 22px; padding-left: 12px; border-left: 1px solid var(--line, rgba(128,128,128,.35)); font-size: 11px; font-weight: 700; letter-spacing: .12em; opacity: .75; white-space: nowrap; }
@media (max-width: 700px) { .brand .mark { width: 32px; height: 32px; } .brand-word { font-size: 19px; } .brand-page { display: none; } }
.brand-t b { color: var(--attention); }
#sign-in button[type=submit], #set-password button[type=submit] { background: var(--attention); border-color: var(--attention); color: #fff; font-weight: 600; letter-spacing: .04em; }

/* The hidden attribute always wins over layout rules (sign-in form, set-password card, sections). */
[hidden] { display: none !important; }
