/* The kit's staff screen. Built for a phone held in one hand. Dark by default, light when the system asks. */
:root {
  --bg: #121413; --bg-2: #1a1d1b; --line: #2a2e2b; --text: #f4f4ee; --soft: #a9ada4;
  --accent: #c8f53c; --btn-bg: #c8f53c; --btn-text: #121413; --warn: #ffb37a; --err: #ff9a8a;
  --r: 10px; color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f4ee; --bg-2: #ffffff; --line: #d4d4ca; --text: #121413; --soft: #565b54;
    --accent: #557200; --btn-bg: #121413; --btn-text: #f4f4ee; --warn: #9a4a08; --err: #a3301c;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, p { margin: 0; }
h1 { font-size: 24px; font-weight: 600; margin-bottom: 18px; }
h2 { font-size: 15px; font-weight: 600; color: var(--soft); margin-bottom: 10px; }
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 80px; }
.quiet { color: var(--soft); font-size: 14px; margin-top: 16px; }
.count { color: var(--soft); font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 0; }
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.brand img { height: 26px; width: auto; }
.me { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--soft); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand svg { width: 24px; height: 24px; }
.brand .out { stroke: var(--accent); }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.tabs button { white-space: nowrap; }
.tabs button { background: none; border: 0; color: var(--soft); font: inherit; padding: 8px 12px; border-radius: var(--r); cursor: pointer; }
.tabs button[aria-current="true"] { color: var(--text); background: var(--bg-2); }

.group { margin-bottom: 30px; }
.list { display: grid; gap: 10px; }
.empty { color: var(--soft); font-size: 15px; }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card.late { border-color: var(--warn); }
.top { display: flex; justify-content: space-between; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; }
.card a:not(.btn-2) { color: inherit; text-underline-offset: 3px; }
.who { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.wait { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.late .wait { color: var(--warn); }
.meta { color: var(--soft); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.msg { margin-top: 8px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ask { width: 100%; font-weight: 600; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--soft); margin-left: 6px; }
.badge.hot { color: var(--accent); border-color: var(--accent); }

.btn, .btn-2 { font: 600 16px/1 inherit; padding: 13px 18px; border-radius: var(--r); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn { background: var(--btn-bg); color: var(--btn-text); border: 0; }
.btn-2 { background: transparent; color: var(--text); border: 1px solid var(--soft); }
.btn:active, .btn-2:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; }

details { margin-top: 10px; }
summary { cursor: pointer; color: var(--soft); font-size: 14px; padding: 6px 0; }
.edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.edit .wide { grid-column: 1 / -1; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
label, legend { font-size: 14px; font-weight: 600; padding: 0; }
.opt { color: var(--soft); font-weight: 400; margin-left: 4px; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--soft); border-radius: var(--r); padding: 12px;
}
.card input:not([type=radio]):not([type=checkbox]), .card select, .card textarea { background: var(--bg); }
.err { color: var(--err); font-size: 14px; }
.status { min-height: 1.5em; }
.status.ok { color: var(--accent); font-weight: 600; }
.status.bad { color: var(--err); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pills input { position: absolute; opacity: 0; }
.pills span { display: block; padding: 10px 14px; border: 1px solid var(--soft); border-radius: 99px; font-weight: 500; cursor: pointer; }
.pills input:checked + span { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.pills input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 16px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.form .btn { justify-self: start; min-width: 130px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.tile b { display: block; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--soft); font-size: 14px; }
.tile.key b { color: var(--accent); }
.tile.alarm b { color: var(--warn); }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .edit { grid-template-columns: 1fr; } .tabs button { padding: 8px 9px; } }

/* History, team and per-person rows */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search { display: flex; gap: 8px; margin-bottom: 22px; }
.search input { flex: 1; min-width: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows b { font-variant-numeric: tabular-nums; }
.gap { margin-top: 30px; }
#export-row { margin-top: 20px; }
[hidden] { display: none !important; }
.tiles + .group { margin-top: 26px; }
