/* Siteclok manager screen. The Tool Case look Andy approved on 5 October 2026
   (docs/prototype/siteclok-prototype.html, "manager board"): dark case, orange tread band,
   chunky wide headings, one-tap buttons. Phone first: Aleks uses it on site. */
:root {
  --bg: #1C2025; --surface: #272C33; --soft: #30363E; --ink: #F3F0EA; --muted: #A9AFB7; --line: #3A414A;
  --accent: #FF7A1A; --accent-ink: #1C2025;
  --ok: #2BD46B; --ok-ink: #0E1411; --warn: #FFB21F; --warn-ink: #1C2025; --out: #FF4A3D; --out-ink: #FFFFFF;
  --focus: #6AAEFF;
  --radius: 16px;
  --head: "Archivo", "Arial Black", sans-serif; --body: "Archivo", Arial, sans-serif;
  --band: repeating-linear-gradient(45deg, #FF7A1A 0 10px, #E0620A 10px 20px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.4; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.band { height: 12px; background: var(--band); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 16px; }
.loading, .empty { color: var(--muted); font-weight: 700; margin: 0; }

.h { font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; font-weight: 900; font-stretch: 125%; line-height: 1.05; margin: 0; text-wrap: balance; }
.eyebrow { font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }

/* top bar */
.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.logo { font-family: var(--head); font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; font-size: 1.1rem; }
.logo span { color: var(--accent); }
.who { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--muted); font-size: .9rem; }
.link { background: none; border: 0; padding: 0; min-height: 40px; color: var(--ink); text-decoration: underline; font-weight: 700; cursor: pointer; }

.head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.title { font-size: 2.1rem; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }

.btn { font-weight: 800; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; font-size: .95rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.small { min-height: 38px; font-size: .88rem; }

.banner { border-radius: 12px; padding: 12px 14px; font-weight: 800; background: var(--warn); color: var(--warn-ink); }

/* headline numbers */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; align-content: start; }
.tile .num { font-family: var(--head); font-weight: 900; font-stretch: 125%; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .lbl { font-weight: 800; color: var(--muted); }
.tile.ok .num { color: var(--ok); }
.tile.warn { background: var(--warn); color: var(--warn-ink); }
.tile.alert { background: var(--out); color: var(--out-ink); }
.tile.warn .lbl, .tile.alert .lbl { color: inherit; }

.grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel h2 { font-size: 1.35rem; }
.panel .sub { margin: -6px 0 0; color: var(--muted); font-weight: 700; font-size: .88rem; }

/* needs you */
.items { display: grid; gap: 10px; }
.item { display: grid; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--soft); border-left: 6px solid var(--warn); min-width: 0; }
.item.info { border-left-color: var(--line); }
.item.req { border-left-color: var(--accent); }
.item .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.item .worker { font-weight: 900; font-size: 1.05rem; }
.item .where { font-weight: 800; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.item .what { font-weight: 600; overflow-wrap: anywhere; }
.item .status { font-weight: 700; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.more { color: var(--muted); font-weight: 800; font-size: .85rem; margin: 4px 0 0; }

/* who's where */
.sites { display: grid; gap: 16px; }
.site h3 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.site .addr { color: var(--muted); font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(243, 240, 234, .13); }
.row .nm { font-weight: 800; overflow-wrap: anywhere; }
.row .why { grid-column: 1 / -1; font-size: .82rem; font-weight: 800; color: var(--muted); }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.on { background: var(--ok); color: var(--ok-ink); }
.pill.late { background: var(--warn); color: var(--warn-ink); }
.pill.early { background: var(--out); color: var(--out-ink); }
.pill.done { background: var(--soft); color: var(--ink); }

/* hours this week */
.table-wrap { overflow-x: auto; }
table.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 10px 8px; text-align: right; border-bottom: 1px solid rgba(243, 240, 234, .13); white-space: nowrap; }
.hours th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hours th:first-child, .hours td:first-child { text-align: left; }
.hours td:first-child { font-weight: 800; }
.hours td.tot { font-weight: 900; }
.hours td.mark { color: var(--warn); font-weight: 900; }
.hours td.abs { color: var(--muted); font-weight: 800; text-transform: lowercase; }
.hours th.today { color: var(--accent); }

.recent { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.recent li { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.recent time { color: var(--muted); font-weight: 800; margin-right: 6px; font-variant-numeric: tabular-nums; }

/* sign-in */
.card { max-width: 440px; width: 100%; margin: 6vh auto 0; background: var(--surface); border-radius: 20px; padding: 22px; display: grid; gap: 14px; }
.card .h { font-size: 1.7rem; }
.field { display: grid; gap: 6px; }
.field label, .legend { font-weight: 800; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.note { color: var(--muted); font-weight: 700; font-size: .86rem; margin: 0; }
.error { color: var(--out); font-weight: 800; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--soft); font-weight: 700; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); }

dialog { border: 0; border-radius: 20px; padding: 0; background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog form { padding: 20px; display: grid; gap: 14px; }
dialog .h { font-size: 1.4rem; }
.dlg-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 800; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); z-index: 10; }
.toast.bad { background: var(--out); color: var(--out-ink); }

@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title { font-size: 1.7rem; }
  .tile .num { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
