:root {
  --fg: #111;
  --muted: #666;
  --border: #d0d0d0;
  --bg: #fafafa;
  --accent: #b91c1c;        /* feuerwehr-rot */
  --accent-dark: #7f1d1d;
  --ok: #166534;
  --warn: #c2410c;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent); color: #fff; padding: 10px 16px;
}
.topbar .brand { color: #fff; text-decoration: none; font-weight: 600; }
.topbar nav a, .topbar nav .link {
  color: #fff; text-decoration: none; margin-left: 14px;
  background: transparent; border: 0; cursor: pointer; font: inherit;
}
.topbar nav a:hover { text-decoration: underline; }

h1 { margin: 0 0 8px; font-size: 22px; }
h2 { margin: 18px 0 8px; font-size: 17px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
p.muted { color: var(--muted); }

button, .btn {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--border);
  background: #fff; color: var(--fg); border-radius: 6px; cursor: pointer;
  font: inherit; text-decoration: none;
}
button.primary, .btn.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
button.primary:hover { background: var(--accent-dark); }
button.ghost { background: transparent; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="number"], input[type="date"], input[type="password"], textarea, select {
  font: inherit; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 4px; background: #fff; width: 100%;
}
textarea { min-height: 80px; }

table.checklist {
  width: 100%; border-collapse: collapse; background: #fff;
  margin-top: 8px;
}
table.checklist th, table.checklist td {
  border: 1px solid var(--border); padding: 4px 6px; text-align: left;
  vertical-align: top; font-size: 14px;
}
table.checklist thead th { background: #f0f0f0; }
table.checklist tr.category-row td {
  background: #eef2ff; font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
table.checklist input[type="checkbox"] { transform: scale(1.2); }
table.checklist input[type="number"] { width: 60px; }
table.checklist input[type="date"] { width: 130px; }
table.checklist input.note-input { width: 100%; }
table.checklist td.row-shop { white-space: nowrap; }
table.checklist .qty-warn { color: var(--warn); font-weight: 600; }

.login-card {
  max-width: 360px; margin: 80px auto; background: #fff; padding: 24px;
  border: 1px solid var(--border); border-radius: 8px;
}
.login-card h1 { margin-bottom: 16px; }
.error { color: var(--accent); margin-top: 8px; }
.success { color: var(--ok); margin-top: 8px; }

.report-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.report-meta label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

dialog {
  border: 1px solid var(--border); border-radius: 8px; padding: 16px; max-width: 480px;
}
dialog::backdrop { background: rgba(0,0,0,0.5); }

canvas.signature {
  border: 1px dashed var(--border); border-radius: 6px;
  width: 100%; height: 160px; touch-action: none; background: #fff;
}

.share-banner {
  background: #fff7ed; border: 1px solid #fdba74; padding: 8px 12px;
  border-radius: 6px; margin: 12px 0;
}

ul.report-list { list-style: none; padding: 0; }
ul.report-list li {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px; margin-bottom: 8px; display: flex; justify-content: space-between;
  align-items: center;
}
.badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.badge.open  { background: #fef3c7; color: #92400e; }
.badge.done  { background: #dcfce7; color: #166534; }

.shopping-list .group { margin-bottom: 18px; }
.shopping-list h3 { margin-bottom: 6px; font-size: 15px; }
