/* costs.css — Seite "Kosten" */

/* Zeitraum-Auswahl (Segmented-Control) + Datums-/Monats-/Jahresauswahl,
   mittig auf der Seite positioniert. */
.costs-period-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(14px, 2.2vh, 24px);
}
.costs-page .segmented { max-width: 640px; width: 100%; }

.scope-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.scope-input {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 600;
  font-family: inherit;
}
/* Monat/Jahr sind <select>-Dropdowns (native Touch-Auswahl statt
   Zahlen-/Kalender-Eingabe) — genug Breite für "September 2026" & Co.,
   min-height für ein komfortables Tap-Ziel auf dem Touchscreen. */
.scope-select {
  min-width: 11em;
  min-height: 40px;
  cursor: pointer;
}
#scopeYear.scope-select { min-width: 8em; }
.scope-reset {
  border: none;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.scope-reset:active { background: var(--accent-soft); color: var(--accent); }

/* Etwas Abstand zwischen der Kosten&Erträge-Tabelle und den beiden
   Diagrammen darunter. */
.costs-summary-card { margin-bottom: clamp(16px, 2.4vh, 26px); }

.costs-two-col { grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 1000px) {
  .costs-two-col { grid-template-columns: 1fr; }
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Volle Seitenbreite nutzen: "Aktueller Durchfluss" links, "Verbrauch
   heute" an den rechten Rand geschoben (statt beide schmal links gestaucht). */
.water-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(10px, 1.4vw, 18px);
  margin-bottom: clamp(16px, 2.4vh, 26px);
}
.water-stat-row .stat-tile { flex: 0 1 340px; }
.water-stat-row .stat-tile:last-child { text-align: right; align-items: flex-end; }
@media (max-width: 700px) {
  .water-stat-row { flex-direction: column; }
  .water-stat-row .stat-tile:last-child { text-align: left; align-items: stretch; }
}
