:root {
  --surface: #F4F5F7; --raised: #FFFFFF; --line: #E3E5EA; --ink: #0E0F13; --muted: #5B5F6B;
  --brand: #1C1F26; --on-brand: #FFFFFF; --brand-soft: #E8EAEE; --accent: #C8F24B; --danger: #C4281C;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 24px; margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 12px; } .muted { color: var(--muted); } .small { font-size: 13px; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--brand-soft); min-height: 40px; }
button.primary { background: var(--brand); color: var(--on-brand); font-weight: 600; }
button.danger { background: var(--danger); color: #fff; font-weight: 600; }
button.link { background: none; padding: 0; min-height: 0; text-decoration: underline; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 10px 12px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.narrow { max-width: 420px; margin: 10vh auto 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; }
header.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav button[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; background: var(--brand-soft); }
.badge.lime { background: var(--accent); } .badge.red { background: var(--danger); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi b { display: block; font-size: 22px; line-height: 28px; white-space: nowrap; }
.kpi span { font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface); }
.chart { width: 100%; height: 160px; display: block; }
.chart rect.bar { fill: var(--brand); } .chart rect.bar.today { fill: #8A9A3E; }
.chart text { font-size: 10px; fill: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.notice { background: var(--accent); border-radius: var(--radius); padding: 10px 14px; }
dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: 460px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(14, 15, 19, .45); }
.qr { width: 200px; height: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
code { background: var(--brand-soft); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); font-size: 13px; } dd { margin: 0; }
