/* ═══════════════════════════════════════════════════════════════════════════
   Reporting-Bereich — Tabs, Filter, KPI-Kacheln, Balken, Funnel
   Pairs with /static/app-reporting.js. Tabellen kommen aus hive-components.css
   (.hv-table), hier steht nur, was es dort noch nicht gibt.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Kopfzeile: der aktive Report kommt aus der Sidebar, hier steht nur noch der
   Titel neben den beiden Filtern (Simon 13.08.2026) */
.rep-head-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.rep-head-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.rep-filter {
  font-size: 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
}
.rep-filter:focus { border-color: var(--green); }

/* KPI-Zeile */
.rep-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.rep-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.rep-kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.rep-kpi-value {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

/* Karte */
.rep-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 14px;
  margin-bottom: 14px;
}
.rep-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.rep-card-sub {
  font-weight: 400;
  color: var(--text-3);
  margin-left: 8px;
  font-size: 11px;
}
.rep-card .hv-table-scroll { margin: 0 -14px -14px; }

.rep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rep-grid .rep-card { margin-bottom: 14px; }

.rep-note {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 10px;
}
.rep-card .rep-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Aufgeklappte Report-Zeilen in der Kostenliste */
.hv-table tr.rep-subrow td {
  background: var(--sidebar-bg);
  font-size: 11.5px;
  color: var(--text-2);
}
.hv-table tr.rep-subrow a { color: var(--green); text-decoration: none; }
.hv-table tr.rep-subrow a:hover { text-decoration: underline; }

/* Säulendiagramm (Monats-Intake) */
.rep-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding-top: 16px;
}
.rep-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
}
.rep-col-value { font-size: 9.5px; color: var(--text-3); line-height: 1; height: 10px; }
.rep-col-bar {
  width: 100%;
  background: var(--green);
  border-radius: 2px 2px 0 0;
  min-height: 1px;
  opacity: 0.85;
}
.rep-col:hover .rep-col-bar { opacity: 1; }
.rep-col-label { font-size: 9px; color: var(--text-3); line-height: 1; white-space: nowrap; }

/* Horizontale Verteilungsbalken */
.rep-bars { display: flex; flex-direction: column; gap: 6px; }
.rep-bar-row { display: flex; align-items: center; gap: 10px; }
.rep-bar-label {
  width: 150px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-bar-track { flex: 1; height: 14px; background: var(--sidebar-bg); border-radius: 3px; overflow: hidden; }
.rep-bar-fill  { height: 100%; background: var(--green); opacity: 0.8; border-radius: 3px; }
.rep-bar-count { width: 34px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--text); }

/* Funnel */
.rep-funnel { display: flex; flex-direction: column; gap: 7px; }
.rep-funnel-row { display: flex; align-items: center; gap: 10px; }
.rep-funnel-label {
  width: 190px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text);
}
.rep-funnel-track { flex: 1; height: 24px; background: var(--sidebar-bg); border-radius: 4px; }
.rep-funnel-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 26px;
}
.rep-funnel-fill span { font-size: 11px; font-weight: 600; color: #fff; }
.rep-funnel-pct { width: 78px; text-align: right; font-size: 11px; color: var(--text-2); }
.rep-funnel-pct.strong { color: var(--text); font-weight: 600; }
/* Kopfzeile über den beiden Prozentspalten */
.rep-funnel-head { margin-bottom: 2px; }
.rep-funnel-head .rep-funnel-track { height: 0; background: none; }
.rep-funnel-head .rep-funnel-pct {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 900px) {
  .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-grid { grid-template-columns: 1fr; }
  .rep-bar-label { width: 110px; }
  .rep-funnel-label { width: 118px; }
  .rep-funnel-pct { width: 52px; }
  /* 24 Monatslabels passen auf dem iPhone nicht nebeneinander — nur jedes
     dritte zeigen, die Säulen selbst bleiben alle stehen */
  .rep-col:not(.keep-label) .rep-col-label { visibility: hidden; }
  .rep-col-value { display: none; }
}
