/* Wahlbezirke dashboard — brand + layout overrides */

/* ── Brand colours ── */
:root {
  --brand-red:       #cc0000;
  --brand-red-hover: #aa0000;
  --brand-red-light: #ffeaea;
  --brand-warn:      #e67e22;
  --brand-warn-light:#fff3e0;
}

/* Override Pico primary accent with brand red */
[data-theme="light"] {
  --pico-primary:            var(--brand-red);
  --pico-primary-hover:      var(--brand-red-hover);
  --pico-primary-background: var(--brand-red);
  --pico-primary-border:     var(--brand-red);
  --pico-primary-underline:  rgba(204,0,0,.25);
}

/* ── Nav ── */
nav.container-fluid {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}

/* ── Footer ── */
footer.container {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pico-muted-border-color);
  color: var(--pico-muted-color);
}

/* ── KPI cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.5rem;
  background: var(--pico-card-background-color, #fff);
}

.kpi-card--warning {
  border-color: var(--brand-warn);
  background: var(--brand-warn-light);
}

.kpi-number {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brand-red);
  line-height: 1.1;
}

.kpi-number--warn {
  color: var(--brand-warn);
}

.kpi-total {
  font-size: 1rem;
  font-weight: 400;
  color: var(--pico-muted-color);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  margin: 0.2rem 0 0;
}

.kpi-pct {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* ── Progress bars ── */
.progress-bar-track {
  background: var(--pico-muted-border-color);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--brand-red);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill--warn {
  background: var(--brand-warn);
}

/* ── Bundesland rows ── */
.bl-row {
  display: grid;
  grid-template-columns: 14rem 1fr 10rem;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.bl-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bl-meta {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}

.bl-reply-rate {
  color: var(--brand-red);
  font-weight: 600;
}

/* ── Compact table (category breakdown) ── */
.compact-table td, .compact-table th {
  padding: 0.3rem 0.5rem;
  font-size: 0.9rem;
}

/* ── Status badges ── */
.status-badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  border-radius: 0.25em;
  font-size: 0.8em;
  font-weight: bold;
  background: var(--pico-muted-background-color);
}

.status-sent, .status-info      { background: #d1e7dd; color: #0a3622; }
.status-classified, .status-done { background: #cfe2ff; color: #084298; }
.status-needs_human_review, .status-warning { background: #fff3cd; color: #664d03; }
.status-bounced, .status-error  { background: #f8d7da; color: #58151c; }
.status-imported                { background: #e2e3e5; color: #41464b; }
.status-replied                 { background: #d0f0c0; color: #155724; }

/* ── Code blocks ── */
pre {
  background: var(--pico-code-background-color);
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
}
