/* KitcheQ control plane - one stylesheet for both consoles (design §4: plain, dense admin style).
   Layout: a navy top bar with the KitcheQ wordmark and the console's sections, one content column; tables for lists,
   small forms beside them. Colours are tokens, redefined for dark mode.
   Brand (Chadi, 13 Oct 2026: application name KitcheQ, logos in brand/kitcheq/): navy #031930 (the wordmark's ink),
   the Q's blues #36B3FF / #1F93FE / #0782F5. Measured contrast (WCAG): #0782F5 on white is only 3.8:1, so links and
   buttons use the deeper brand blue #0566C2 (5.7:1, white text on it 5.7:1); the bright #36B3FF is used on navy
   (7.6:1). Status colours (ok / warn / bad) stay semantic, not brand. */
:root {
  --bg: #f4f7fb; --surface: #ffffff; --fg: #031930; --muted: #4a5d72; --rule: #dbe3ec;
  --accent: #0566C2; --accent-fg: #ffffff; --ok: #1e7a46; --warn: #a15c07; --bad: #b3261e;
  --ok-bg: #e5f3ea; --warn-bg: #fbefdc; --bad-bg: #fbe5e3;
  --bar: #031930; --bar-fg: #dfe3ea; --bar-on: #36B3FF; --bar-rule: #0b2a48;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #020e1c; --surface: #071d33; --fg: #e6edf5; --muted: #9fb2c6; --rule: #163452;
    --accent: #36B3FF; --accent-fg: #031930; --ok: #6cc28f; --warn: #e3a95a; --bad: #ef8a83;
    --ok-bg: #12301f; --warn-bg: #33281a; --bad-bg: #3a1e1c;
    --bar: #000e20; --bar-fg: #dfe3ea; --bar-on: #36B3FF; --bar-rule: #163452; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); }
a { color: var(--accent); }
header.top { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 10px 20px;
  background: var(--bar); color: var(--bar-fg); border-bottom: 1px solid var(--bar-rule); }
header.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bar-fg); }
header.top .brand img { height: 24px; width: auto; display: block; }
header.top .brand span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--bar-on);
  border: 1px solid var(--bar-rule); border-radius: 10px; padding: 1px 8px; }
header.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
header.top nav a { text-decoration: none; color: var(--bar-fg); padding: 2px 0; border-bottom: 2px solid transparent; }
header.top nav a:hover { color: #ffffff; }
header.top nav a.on { color: var(--bar-on); font-weight: 600; border-bottom-color: var(--bar-on); }
/* admin menu groups (Chadi, 25 Oct): a button opens its links on hover, keyboard focus or a tap (no script) */
header.top nav .menu { position: relative; }
header.top nav .menu > button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 2px 0;
  color: var(--bar-fg); font: inherit; cursor: pointer; height: auto; }
header.top nav .menu > button.on { color: var(--bar-on); font-weight: 600; border-bottom-color: var(--bar-on); }
header.top nav .menu > button:hover { color: #ffffff; }
header.top nav .menu .drop { display: none; position: absolute; left: -12px; top: 100%; z-index: 20; min-width: 190px;
  padding: 6px 0; background: var(--bar); border: 1px solid var(--bar-rule); border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
header.top nav .menu:hover .drop, header.top nav .menu:focus-within .drop { display: block; }
header.top nav .menu .drop a { display: block; padding: 6px 14px; border-bottom: 0; white-space: nowrap; }
header.top nav .menu .drop a.on { border-bottom: 0; }
header.top nav .menu .drop a:hover { background: var(--bar-rule); }
header.top .who { margin-left: auto; color: var(--bar-fg); display: flex; gap: 10px; align-items: center; opacity: .9; }
header.top .who a, header.top .who button.plain { color: var(--bar-on); }
header.top a:focus-visible, header.top button:focus-visible { outline-color: var(--bar-on); }
/* the KitcheQ lockup above the login / setup / recovery pages (no top bar there) */
.brandmark { display: flex; justify-content: center; padding: 4px 0 6px; }
.brandmark img { width: 240px; max-width: 80%; height: auto; }
main { padding: 20px; max-width: 1200px; margin: 0 auto; display: grid; gap: 18px; }
main.narrow { max-width: 460px; padding-top: 60px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0; }
section.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px;
  min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--rule); }
.pill.ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.pill.bad { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.msg { padding: 8px 12px; border-radius: 6px; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
form.stack { display: grid; gap: 10px; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
label.check { display: flex; gap: 6px; align-items: center; color: var(--fg); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--rule);
  border-radius: 4px; padding: 6px 8px; min-width: 0; }
textarea { width: 100%; font-family: var(--mono); font-size: 12px; }
button, .button { font: inherit; padding: 6px 14px; border-radius: 4px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg); cursor: pointer; text-decoration: none; display: inline-block; }
button.plain, .button.plain { background: transparent; color: var(--accent); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
/* One height for every one-line control (text / date / month inputs, selects, buttons, button links), so they line
   up in any row; the browser's own month / date inputs are otherwise taller than buttons. */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, button, .button { height: 34px; }
.button { line-height: 20px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent);
  outline-offset: 2px; }
.token { font-family: var(--mono); font-size: 15px; padding: 10px; background: var(--bg); border: 1px dashed var(--accent);
  border-radius: 4px; word-break: break-all; user-select: all; }
.muted { color: var(--muted); }
/* Toolbars: items sit on one bottom line, so a control with its label above (e.g. "Month" on the dues page) lines
   up with plain buttons beside it (Chadi, 13 Oct: boxes were not aligned). */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.actions > form { margin: 0; }
details summary { cursor: pointer; color: var(--accent); }
code { font-family: var(--mono); font-size: 12px; }
@media (max-width: 600px) { main { padding: 12px; } header.top { padding: 10px 12px; } }
/* password box with its eye button inside, on the right (Chadi, 13 Oct) */
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 36px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 4px; line-height: 0; height: auto;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.pw .eye:hover { color: var(--accent); }
.pw .eye .slash { display: none; }
.pw .eye[aria-pressed="true"] .slash { display: inline; }

/* Lite stills (R23): a grid of thumbnails, two per row on a phone. */
.stills { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.still { margin: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); }
.still img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.still figcaption { padding: 6px 8px; font-size: 13px; line-height: 1.5; }
@media (max-width: 520px) { .stills { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* Lite judge results and labelling (G7.3): picture with the judge's boxes beside the per-check truth table. */
.judge-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.judge-pic { position: relative; }
.judge-pic img { display: block; width: 100%; height: auto; border-radius: 6px; }
.jbox { position: absolute; border: 2px solid var(--bad); color: #fff; background: rgba(179, 38, 30, .15);
  font-size: 12px; font-weight: 600; padding: 0 3px; border-radius: 3px; pointer-events: none; }
.jbox.dropped { border-style: dashed; border-color: var(--muted); background: transparent; color: var(--muted); }
table.labels td, table.labels th { padding: 4px 6px; text-align: center; }
table.labels td:first-child, table.labels th:first-child { text-align: left; }
table.labels tr.said-yes td { background: var(--warn-bg); }
@media (max-width: 760px) { .judge-grid { grid-template-columns: 1fr; } }
