* { box-sizing: border-box; }
body {
  font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0; background: #f7f7f8; color: #222;
}
header {
  background: #1e293b; color: #fff; padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
header .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 18px; }
header nav { display: flex; gap: 16px; align-items: center; }
header nav a { color: #fff; text-decoration: none; }
main { max-width: 1600px; margin: 24px auto; padding: 0 24px; }

.topbar { display: flex; align-items: baseline; gap: 24px; margin-bottom: 16px; }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar form.period { display: flex; gap: 8px; align-items: center; }
.topbar form.period input { width: 80px; }

.meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; color: #475569; }

.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 24px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 60px auto; }

label { display: block; margin-bottom: 12px; }
input, button, select {
  font: inherit; padding: 8px 12px; border-radius: 6px;
  border: 1px solid #cbd5e1; background: #fff;
}
button { background: #334155; color: #fff; border: 0; cursor: pointer; }
button.primary { background: #16a34a; }
button:hover { opacity: 0.9; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.flash--error { background: #fee2e2; color: #991b1b; }
.flash--success { background: #dcfce7; color: #166534; }

table.grid { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; font-size: 13px; }
table.grid th { background: #f1f5f9; text-align: left; padding: 8px; font-weight: 600; }
table.grid td { padding: 6px 8px; border-top: 1px solid #f1f5f9; }
table.grid td.day { text-align: center; width: 24px; padding: 4px 2px; font-size: 11px; }
table.grid td.day.ok { background: #16a34a; color: #fff; }
table.grid td.day.miss { background: #dc2626; color: #fff; }

.cal-head { text-align: center; }

table.kv th { width: 200px; text-align: left; padding: 6px 12px; color: #475569; }
table.kv td { padding: 6px 12px; }

.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fee2e2; color: #991b1b; }
.badge.muted { background: #e2e8f0; color: #475569; }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; }
.day-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-weight: 600;
}
.day-cell.ok { background: #16a34a; color: #fff; }
.day-cell.miss { background: #dc2626; color: #fff; }

.qr { display: block; margin: 16px auto; max-width: 240px; }
.muted { color: #64748b; }
.small { font-size: 12px; }
pre.small { white-space: pre-wrap; margin: 0; font-size: 12px; }
