/* The admin console: the app's tokens (tokens.css, copied in by deploy.sh)
   and plain tables, nothing more. Works at 1440 wide and at 390. */
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink-ground); }
body {
  margin: 0; min-height: 100vh; padding: 0 16px 48px;
  background: var(--bg); color: var(--ink-ground);
  font: 16px/1.5 var(--font-body);
}
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.top {
  max-width: 1200px; margin: 0 auto; padding: 20px 0;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--font-brand); color: var(--brand-ink); font-size: 24px; }
.who { display: flex; gap: 12px; align-items: center; color: var(--ink-soft-ground); overflow-wrap: anywhere; }
.who[hidden] { display: none; }
main { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--surface); color: var(--ink-card);
  border: 1px solid var(--track); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 520px;
}
.card h2 { font-size: 20px; }
.label { margin: 8px 0 0; font-weight: 700; }
.note { margin: 0; color: var(--ink-soft-card); }
.error { margin: 0; color: var(--danger); }
.error:empty { display: none; }
.secret { font-size: 18px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.qr-holder { width: 180px; background: var(--qr-tile-bg); padding: 10px; border-radius: 8px; }
.qr-holder:empty { display: none; }
.qr { display: block; width: 100%; height: auto; }
.qr path { fill: var(--qr-caption-ink); }
/* Cards stay light in both themes (the app's tokens); what sits on a card
   uses the card's own ink and selected colors, what sits on the ground the
   ground's. */
input[type=text], input[type=email] {
  font: inherit; padding: 8px 10px;
  border: 1px solid var(--ink-soft-card); border-radius: 8px; background: var(--surface2); color: var(--ink-card);
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--selected-card); }
.btn {
  font: inherit; font-weight: 700; min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 2px solid var(--selected-card); background: var(--selected-card); color: var(--on-selected-card);
  cursor: pointer; display: inline-flex; align-items: center; text-decoration: none;
}
.btn.plain { background: transparent; color: var(--selected-card); }
.top .btn { border-color: var(--selected); background: var(--selected); color: var(--on-selected); }
.top .btn.plain { background: transparent; color: var(--selected); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--selected-card); outline-offset: 2px; }
.top .btn:focus-visible { outline-color: var(--selected); }

/* ------------------------------------------------------------ the console */
.slot { min-width: 0; }
.panel {
  background: var(--surface); color: var(--ink-card); border: 1px solid var(--track);
  border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.panel h2 { font-size: 22px; color: var(--heading); }
.panel h3 { font-size: 16px; margin: 6px 0 0; }
.card.wide { max-width: none; align-items: stretch; }
.card h4 { margin: 10px 0 0; font-size: 15px; }
.note { margin: 0; color: var(--ink-soft-card); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li {
  display: grid; grid-template-columns: 14px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 4px 0; border-bottom: 1px solid var(--track);
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--c-todo); }
.dot.amber { background: var(--c-food); }
.dot.red { background: var(--danger); }
.check-value { color: var(--ink-soft-card); overflow-wrap: anywhere; }
.check-time { color: var(--ink-soft-card); font-size: 13px; white-space: nowrap; }

.tiles, .stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile, .stages li { background: var(--surface2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.tile-num { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.tile-label { color: var(--ink-soft-card); font-size: 14px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--track); vertical-align: top; }
td { white-space: nowrap; }
td.wrap { white-space: normal; min-width: 12em; }
th { font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover, tr.clickable:focus-visible { background: var(--surface2); outline: none; }
.sort { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
th[aria-sort="ascending"] .sort::after { content: " \2191"; }
th[aria-sort="descending"] .sort::after { content: " \2193"; }
.mark { font-size: 12px; font-weight: 700; color: var(--on-selected-card); background: var(--selected-card); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

.bars { width: 100%; height: 80px; display: block; }
.bar-main { fill: var(--selected-card); }
.bar-tv { fill: var(--c-act); }
.bar-board { fill: var(--c-todo); }
.bar-person { fill: var(--c-food); }

.add-form { display: grid; grid-template-columns: max-content minmax(0, 360px); gap: 8px 12px; align-items: center; }
.add-form input[type=email], .add-form input[type=text] { font-size: 16px; letter-spacing: normal; width: 100%; }
.add-form .check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.add-form .error, .add-form .btn { grid-column: 1 / -1; justify-self: start; }
input.code { font-size: 20px; letter-spacing: 0.2em; width: 9em; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:not(.plain) { background: var(--danger); color: var(--on-selected-card); }
.confirm { flex-basis: 100%; background: var(--surface2); border: 1px solid var(--danger); border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.confirm p { margin: 0; flex-basis: 100%; }

@media (max-width: 600px) {
  .checks li { grid-template-columns: 14px minmax(0, 1fr); }
  .check-value, .check-time { grid-column: 2; }
  .add-form { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 6px; }
}

/* The welcome email, to copy into DreamHost's webmail. */
.welcome { background: var(--surface2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.welcome h3 { margin: 0; }
.welcome-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.welcome-row .label { margin: 0; min-width: 4.5em; }
.welcome-value { overflow-wrap: anywhere; }
.welcome-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; font-size: 14px;
                background: var(--surface); border-radius: 8px; padding: 10px 12px; max-height: 320px; overflow-y: auto; }
