/* Team app: simple, readable on a phone at night, printable. */
:root {
  --bg: #0f2638; --panel: #163249; --fg: #eef2f0; --muted: #a7bfca;
  --line: #244559; --accent: #e9c46a; --link: #a6d6ea; --danger: #e98a6a;
  font-family: system-ui, sans-serif; font-size: 17px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.brand { color: var(--fg); text-decoration: none; font-weight: 700; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 16px; flex: 1; }
.signout { display: flex; align-items: center; gap: 10px; margin: 0; }
.who { color: var(--muted); font-size: .9rem; }
.main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }
h1 { margin: 0 0 1rem; font-size: 1.8rem; }
h2 { margin: 0 0 .8rem; font-size: 1.25rem; color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin: 0 0 20px; }
.narrow { max-width: 30rem; margin: 10vh auto; }
.muted { color: var(--muted); }
.alert { border-left: 3px solid var(--danger); padding: 8px 12px; background: rgba(233, 138, 106, .1); }
.button, button { display: inline-block; font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 4px; border: 0; cursor: pointer; text-decoration: none; background: var(--accent); color: var(--bg); }
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--muted); font-weight: 400; }
button.link { background: none; color: var(--link); padding: 0; font-weight: 400; text-decoration: underline; }
.stack { display: grid; gap: .35rem; }
.stack label { margin-top: .5rem; font-weight: 700; }
.stack input { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.stack button { justify-self: start; margin-top: .8rem; }
.small { font-size: .9rem; }
.dev { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 8px; }
.dev p { width: 100%; margin: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 400; font-size: .9rem; }
.pager { display: flex; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.notice { border-left: 3px solid var(--accent); padding: 8px 12px; background: rgba(233, 196, 106, .1); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.actions form { margin: 0; }
.button.danger, button.danger { background: var(--danger); color: var(--bg); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline select, .stack select, .stack textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.messages { border: 1px solid var(--line); border-radius: 4px; display: grid; gap: .35rem; margin-top: .8rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
h1 small { font-size: 1.1rem; font-weight: 400; color: var(--muted); }
tr.past td { color: var(--muted); }
.status-cancelled, tr.status-cancelled td:first-child a { color: var(--danger); }
tr.reg-cancelled td, tr.reg-expired td { color: var(--muted); text-decoration: line-through; }
.totals { font-size: 1.1rem; margin: 0 0 12px; }
.roster { width: 100%; border-collapse: collapse; font-size: 1.15rem; margin-bottom: 24px; }
.roster th { text-align: left; color: var(--muted); font-weight: 400; font-size: .9rem; padding: 6px 8px; }
.roster td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.roster .tick { width: 4rem; }
.roster .tick form { margin: 0; display: flex; gap: 6px; align-items: center; }
.roster .people { width: 4rem; text-align: right; font-variant-numeric: tabular-nums; }
.check input { width: 1.8rem; height: 1.8rem; accent-color: var(--accent); }
tr.present td.name { color: var(--accent); }
.waiting { color: var(--muted); }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin: 0 6px 0 0; }
.short { width: 5rem; }
.inline input[type="text"], .inline input[type="number"] { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.links li { margin: .4rem 0; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table td { display: block; border: 0; padding: 2px 0; }
}
@media print {
  :root { --bg: #fff; --panel: #fff; --fg: #000; --muted: #444; --line: #999; }
  .bar, .no-print { display: none; }
  .roster { font-size: 12pt; }
  .check input { width: 1rem; height: 1rem; }
  tr.present td.name { color: #000; font-weight: 700; }
  .card { border: 0; padding: 0; }
}
/* Logbook */
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px 14px; margin: 0 0 12px; display: grid; gap: .35rem; }
legend { color: var(--accent); font-weight: 700; padding: 0 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 8px 16px; }
.grid label, .filters label { display: grid; gap: .25rem; font-weight: 700; }
.filters label { font-weight: 400; }
.grid input, .grid select, .filters input, .filters select { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.check-line { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; }
.pre { white-space: pre-wrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.issue { border-bottom: 1px solid var(--line); padding: 8px 0 14px; }
.issue h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.issue p { margin: .2rem 0; }
.inline-choice { display: inline-flex; margin-right: 16px; }
tr.detail td:first-child { padding-left: 1.5rem; color: var(--muted); }
.table tfoot th { color: var(--fg); font-weight: 700; border-top: 1px solid var(--muted); }
.chart svg { display: block; max-width: 100%; }
.bar-visits { fill: var(--link); }
.bar-adults, .key.adults { fill: var(--accent); color: var(--accent); }
.bar-children, .key.children { fill: var(--danger); color: var(--danger); }
.settings input[type="text"], .settings input[type="number"], .settings select { font: inherit; font-size: .9rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; max-width: 14rem; }
.settings form { margin: 0; }
.tiny { width: 4rem; }
.card.wide { overflow-x: auto; }
.table .num { text-align: right; padding-right: 16px; }
tr.reg-cancelled td.row-actions { text-decoration: none; }
.code { width: 8rem; }
