:root {
  --stone: #5c4a3a;
  --stone-d: #3d3128;
  --ink: #1c1714;
  --muted: #6b5e54;
  --line: #e4d9ce;
  --paper: #f7f3ee;
  --card: #fffdf9;
  --accent: #8a6a3c;
  --accent-2: #2f5d50;
  --good: #1f7a4d;
  --warn: #9a4b16;
  --bad: #9b2c2c;
  --shadow: 0 1px 2px rgba(28,23,20,.06), 0 8px 24px rgba(28,23,20,.06);
  --font: "Source Serif 4", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 48px; }
header.app {
  background: var(--stone-d);
  color: #f4efe8;
  border-bottom: 4px solid var(--accent);
}
header.app .bar { display: flex; align-items: center; gap: 18px; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.wordmark { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.wordmark:hover { text-decoration: none; color: inherit; }
.wordmark img { height: 40px; width: auto; max-width: 160px; object-fit: contain; background: #fffdf9; border-radius: 4px; padding: 2px; }
.wordmark .name {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: .04em;
  line-height: 1.1;
}
.wordmark .sub { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; opacity: .75; font-weight: 500; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; font-size: .92rem; }
nav.main a { color: #f4efe8; opacity: .82; padding: 4px 0; }
nav.main a:hover, nav.main a.active { opacity: 1; text-decoration: none; border-bottom: 2px solid var(--accent); }
nav.main .who { opacity: .7; margin-left: 8px; }
.flash { background: #efe3c8; color: var(--stone-d); padding: 10px 14px; border-radius: 8px; margin: 16px 0; }
.flash.error, .error { background: #f8e2e2; color: var(--bad); padding: 10px 14px; border-radius: 8px; }
h1 { font-family: var(--font); font-weight: 600; font-size: 1.7rem; margin: 22px 0 8px; }
h2 { font-family: var(--font); font-weight: 600; font-size: 1.2rem; margin: 22px 0 8px; }
.lead { color: var(--muted); max-width: 60ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); margin: 16px 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=date], input[type=month],
input[type=email], input[type=file], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); min-width: 0; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #c9b08a; border-color: var(--accent); }
.field { min-width: 140px; flex: 1; }
.field.narrow { flex: 0 0 140px; }
button, .btn {
  font: inherit; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  background: var(--stone); color: #f4efe8; display: inline-block;
}
button:hover, .btn:hover { background: var(--stone-d); text-decoration: none; color: #fff; }
.btn.ghost, button.ghost { background: transparent; color: var(--stone); border: 1px solid var(--line); }
.btn.good { background: var(--accent-2); }
.btn.warn { background: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tr:hover td { background: #f3ece3; }
.flag { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.flag.late, .flag.early { background: #f7e3d0; color: var(--warn); }
.flag.absent, .flag.missed { background: #f8e2e2; color: var(--bad); }
.muted { color: var(--muted); }
.hours { font-variant-numeric: tabular-nums; font-weight: 600; }
.thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; background: #eee; }
.pager { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #3d3128 0%, #2a221c 100%);
  padding: 24px;
}
.auth .panel { width: 100%; max-width: 420px; background: var(--card); border-radius: 16px; padding: 32px 28px 28px; box-shadow: var(--shadow); }
.auth .mark { text-align: center; margin-bottom: 20px; }
.auth .mark .name { font-family: var(--font); font-size: 2rem; color: var(--stone-d); letter-spacing: .03em; }
.auth .mark .sub { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.auth .field { width: 100%; flex: none; }
.auth input { width: 100%; display: block; }
.auth form button { width: 100%; margin-top: 8px; padding: 10px; }
.steps { counter-reset: s; padding-left: 0; list-style: none; }
.steps li { margin: 0 0 12px; padding-left: 36px; position: relative; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--stone); color: #fff; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: #efe8de; padding: 1px 5px; border-radius: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.checks label { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: .9rem; }
@media (max-width: 720px) {
  header.app .bar { flex-wrap: wrap; }
  nav.main { margin-left: 0; width: 100%; }
  table { font-size: .85rem; }
}

table.roster { font-size: .82rem; }
table.roster th, table.roster td { min-width: 88px; max-width: 130px; vertical-align: top; }
table.roster td.hol { background: #efe3c8; }
table.roster td.off { background: #f3ece3; }
table.roster td.mute { color: var(--muted); }
form.tiny { margin-top: 4px; }
form.tiny select { font-size: .75rem; padding: 2px 4px; width: 100%; margin-top: 2px; }

.fetch-old { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e6ddd2; }
.fetch-old h3 { margin: 0 0 6px; font-size: 1.05rem; }
.fetch-status { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #f4efe8; }
.fetch-status.queued, .fetch-status.waiting { background: #f3ead4; }
.fetch-status.importing { background: #e6f0e2; }
.fetch-status.done { background: #e7f3ea; }
.fetch-status.stalled { background: #f8e6de; }
.fetch-status .note { margin: 8px 0 0; }
.tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.tab { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #efe8de; color: var(--ink); text-decoration: none; }
.tab.on { background: var(--stone); color: #fff; }
table.preview { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.preview th, table.preview td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eadfd3; vertical-align: top; }
table.preview tr.err { background: #fbecea; }
table.preview tr.dup { background: #f7f1e3; }
.bad { color: #9b2c1a; }
.map-row .field.narrow { min-width: 140px; }
.card.warn { background: #fbecea; }
a.btn { display: inline-block; margin-left: 8px; padding: 8px 14px; text-decoration: none; }
