:root {
  --paper: #f7f8f7;
  --banner: #101312;
  --ink: #171a18;
  --muted: #6d756f;
  --lime: #b8f03a;
  --gold: #b8963e;
  --green: #2a6b32;
  --green-2: #3d8f45;
  --pale: #f3f9e8;
  --line: #c6ccc7;
  --white: #ffffff;
  --red: #e04f3e;
  --orange: #dc7b2f;
  --radius: 8px;
  --admin-bg: #0b0d0c;
  --admin-ink: #f7f4ea;
  --admin-panel: #111611;
  --admin-lime: #a7e35a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, input, textarea { font: inherit; }

.masthead {
  background: var(--banner);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.masthead img { width: 52px; height: 52px; object-fit: contain; }
.masthead h1 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  font-weight: 800;
}
.masthead .sub {
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.banner-note {
  background: #3a2208;
  color: #f4c74d;
  font-size: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #5a3a10;
}

.wrap { padding: 12px 12px 96px; max-width: 720px; margin: 0 auto; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label.tiny { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

select.attestor, select.filter {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}
.tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font-weight: 700;
}
.tabs button.on { background: var(--banner); color: #fff; border-color: var(--banner); }

.job {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 0 0 10px;
}
.job.t1 { opacity: 0.92; border-style: dashed; }
.job.other { border-color: var(--gold); background: #faf6e9; }
.job h2 { margin: 0 0 4px; font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; line-height: 1.35; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--pale);
  border: 1px solid #d7e7b8;
}
.chip.hollow { background: #fff; border-style: dashed; color: var(--muted); }
.chip.lunch { background: #fae7c4; }
.chip.bad { background: #fde8e6; border-color: #f0b4ad; }
.chip.loan { background: #e8f1fb; }

.btn {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
}
.btn.primary { background: var(--lime); color: var(--banner); width: 100%; margin-top: 10px; }
.btn.ghost { background: #fff; border: 1px solid var(--line); }
.btn.warn { background: var(--gold); color: var(--banner); }
.btn.danger { background: var(--red); color: #fff; }
.btn.green { background: var(--green); color: #fff; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(16,19,18,0.55);
  z-index: 40;
  display: none;
  align-items: flex-end;
}
.sheet.open { display: flex; }
.sheet .panel {
  background: #fff;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 16px;
}
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.people label {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 48px;
  background: #fff;
}
.people label.on { border-color: var(--green); background: var(--pale); }
.people input { width: 18px; height: 18px; }

.gps {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}
.gps.off { color: var(--orange); font-weight: 700; }

.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.timeline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 10px;
}
.tl-site { font-weight: 800; margin-bottom: 6px; }
.tl-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.who-bar { margin-bottom: 10px; }
.who-bar[hidden] { display: none; }

.hub-section { margin: 18px 0 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.hub-card { cursor: pointer; }
.hub-card h2 { pointer-events: none; }
.wall-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}
.wall-item .when { font-size: 11px; color: var(--muted); }
.wall-item h3 { margin: 4px 0 6px; font-size: 15px; }
.who-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.who-row .on-site { color: var(--green-2); font-weight: 700; }
.who-row .off { color: var(--muted); }

.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--banner);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr;
  align-items: end;
  z-index: 15;
  padding-bottom: env(safe-area-inset-bottom);
}
.dock button {
  background: none;
  border: 0;
  color: #cfd4cf;
  min-height: 56px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dock button.on { color: var(--lime); }
.dock-stream {
  background: var(--lime) !important;
  color: #101312 !important;
  min-height: 64px !important;
  border-radius: 18px 18px 0 0;
  font-size: 12px !important;
  margin: 0 4px;
}
.dock-stream.on { color: #101312 !important; }

body.admin { background: var(--admin-bg); color: var(--admin-ink); }
body.admin .wrap { max-width: 980px; }
.admin-card {
  background: var(--admin-panel);
  border: 1px solid #243024;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.admin-card h3 { margin: 0 0 8px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #243024; }
.ok { color: var(--admin-lime); }
.warn { color: #f4c74d; }
.bad { color: #e04f3e; }

input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 48px;
}
