:root {
  --hfm-anthrazit: #686868;
  --hfm-anthrazit-dark: #2D2D2D;
  --hfm-anthrazit-mid: #878787;
  --hfm-anthrazit-light: #b2b2b2;
  --hfm-anthrazit-pale: #e9e9e9;
  --hfm-analytics-blue: #00a7e1;
  --hfm-red: #f5333f;
  --hfm-positiv: #274c26;
  --hfm-negativ: #783f3f;
  --hfm-warnung: #c77b00;
  --hfm-plan: #00a7e1;
  /* Kontrastfarben für Plan-/Prognosewerte (Text), Light-Mode dunkler */
  --hfm-plan-text: #0a76a0;
  --hfm-prog-pos: #0a76a0;
  --hfm-prog-neg: #cc1f2a;
  --hfm-ist: #686868;
  --hfm-white: #ffffff;
  --hfm-bg: #f5f5f5;
  --sidebar-width: 240px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.8) inset;
  --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.8) inset;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: 1px solid rgba(255,255,255,0.9);
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Grundfarbe deckend auf <html>: verhindert weißes Durchblitzen */
html { background: #d8dce2; }

html, body {
  height: 100%;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
  min-height: 100vh;
}

/* Gradient als fixiertes Pseudo-Element statt background-attachment: fixed —
   das Zusammenspiel von backdrop-filter (Cards) und fixed-Background löst in
   Chromium beim Scrollen weiße Repaint-Artefakte aus. */
body { background: transparent; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(0,167,225,0.12) 0%, transparent 55%),
    linear-gradient(135deg, #c8cdd4 0%, #c0c5cc 50%, #c8cdd4 100%);
}

/* --- SCROLLBALKEN --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,167,225,0.40);
}

h1, h2, h3, h4, .page-title, .card-title, .modal-title {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}

/* --- LAYOUT --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-right: 1px solid rgba(0,167,225,0.10);
  box-shadow: 4px 0 32px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  padding: 28px 20px 24px;
  border-bottom: 1px solid rgba(0,167,225,0.12);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

/* --- NAV --- */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  color: var(--hfm-anthrazit);
  font-weight: 400;
  font-size: 14px;
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(0,167,225,0.07);
  color: var(--hfm-anthrazit-dark);
  padding-left: 12px;
}

.nav-item.active {
  background: rgba(0,167,225,0.12);
  color: var(--hfm-analytics-blue);
  border-left: 3px solid var(--hfm-analytics-blue);
  border-radius: 0 10px 10px 0;
  font-weight: 600;
}

.nav-item.active:hover {
  padding-left: 14px;
  color: var(--hfm-analytics-blue);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.sidebar-footer-text {
  font-size: 11px;
  font-weight: 300;
  color: var(--hfm-anthrazit-light);
  line-height: 1.5;
}

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px;
  overflow-y: auto;
}

/* --- PAGE --- */
.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 20px;
  /* Über der Filterleiste, damit das "Regeln anwenden"-Dropdown nicht hinter
     ihr verschwindet (backdrop-filter erzeugt eigenen Stacking-Context). */
  position: relative;
  z-index: 1000;
  background: rgba(235,238,242,0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.90);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

.page-title {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--hfm-anthrazit-dark);
  line-height: 1.2;
}

.page-subtitle {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: var(--hfm-anthrazit-mid);
  margin-top: 4px;
  font-weight: 300;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* --- CARDS (Glassmorphism) --- */
.card {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.98);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,1.0) inset;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.card-title {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--hfm-anthrazit-dark);
  margin-bottom: 16px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header-row .card-title { margin-bottom: 0; }

/* --- KPI CARDS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Dashboard hat 5 Cards (inkl. Kontostand) */
#kpi-grid { grid-template-columns: repeat(5, 1fr); }

/* Kontostand-Card im unkonfigurierten Zustand: ausgegraut, klickbar */
#kpi-kontostand-card.kpi-nicht-konfiguriert { cursor: pointer; }

#kpi-kontostand-card.kpi-nicht-konfiguriert:hover {
  border-color: rgba(0,167,225,0.5);
}

#kpi-kontostand-card.kpi-nicht-konfiguriert .kpi-value {
  color: #b2b2b2;
  font-size: 16px;
}

#kpi-kontostand-card.kpi-nicht-konfiguriert .kpi-betriebe-badge {
  color: var(--hfm-analytics-blue);
  cursor: pointer;
}

/* Kontostand-Warnbanner unter den KPI-Cards */
.kontostand-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: -8px 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(245,51,63,0.08);
  border: 1px solid rgba(245,51,63,0.20);
  color: #c22631;
}

.kontostand-banner.banner-gelb {
  background: rgba(186,117,23,0.08);
  border-color: rgba(186,117,23,0.25);
  color: #9a6312;
}

html.dark .kontostand-banner { color: #f7888f; }
html.dark .kontostand-banner.banner-gelb { color: #e0a85a; }

.kpi-card {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255,255,255,1.0);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,1.0) inset;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,1.0) inset;
}

.kpi-card.kpi-accent {
  border-color: rgba(0,167,225,0.3);
  background: rgba(0,167,225,0.06);
}

.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon svg { width: 20px; height: 20px; }

.kpi-green { background: rgba(0,167,225,0.10); color: var(--hfm-analytics-blue); }
.kpi-red { background: rgba(245,51,63,0.10); color: var(--hfm-red); }
.kpi-blue { background: rgba(0,167,225,0.08); color: var(--hfm-analytics-blue); }
.kpi-orange { background: rgba(186,117,23,0.10); color: #ba7517; }

.kpi-label {
  font-family: 'Open Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.kpi-value {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--hfm-anthrazit-dark);
  line-height: 1;
}

/* --- CHARTS --- */
.charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card { margin-bottom: 0; }

.chart-wrapper {
  height: 220px;
  position: relative;
}

.chart-pie-wrapper {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- TABLES --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--hfm-anthrazit-dark);
}

.data-table thead th {
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hfm-anthrazit-mid);
  background: rgba(0,167,225,0.06);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.data-table thead th:first-child { border-top-left-radius: 8px; }
.data-table thead th:last-child { border-top-right-radius: 8px; }

.data-table tbody tr {
  background: rgba(248,250,252,0.80);
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.95);
}

.data-table tbody tr:hover {
  background: rgba(0,167,225,0.05);
}

.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}

.text-right { text-align: right !important; }

.amount-einnahme { color: var(--hfm-analytics-blue); font-weight: 600; }
.amount-ausgabe { color: var(--hfm-red); font-weight: 600; }

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.badge-blue { background: rgba(0,167,225,0.10); color: #0096cc; }
.badge-gray { background: var(--hfm-anthrazit-pale); color: var(--hfm-anthrazit); }
.badge-offen { background: rgba(245,51,63,0.08); color: #d42535; }
.badge-orange { background: rgba(186,117,23,0.10); color: #ba7517; }
.badge-green { background: rgba(0,167,225,0.10); color: #0096cc; }
.badge-red { background: rgba(245,51,63,0.08); color: #d42535; }
.badge-eigen { background: rgba(186,117,23,0.10); color: #ba7517; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--hfm-analytics-blue);
  color: var(--hfm-white);
  padding: 8px 18px;
  box-shadow: 0 2px 12px rgba(0,167,225,0.30);
}

.btn-primary:hover {
  background: #0096cc;
  box-shadow: 0 4px 18px rgba(0,167,225,0.40);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--hfm-anthrazit-dark);
  border: 1px solid rgba(0,0,0,0.10);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,167,225,0.30);
}

.btn-danger {
  background: rgba(245,51,63,0.08);
  color: var(--hfm-red);
  border: 1px solid rgba(245,51,63,0.2);
}

.btn-danger:hover { background: rgba(245,51,63,0.16); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-large { padding: 13px 28px; font-size: 15px; }

.btn-icon {
  padding: 6px;
  background: transparent;
  border: 1px solid var(--hfm-anthrazit-pale);
  color: var(--hfm-anthrazit);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(0,167,225,0.08);
  border-color: var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
}

.btn-icon svg { width: 14px; height: 14px; display: block; }

/* --- FORMS --- */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 9px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  background: rgba(248,250,252,0.90);
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--hfm-analytics-blue);
  box-shadow: 0 0 0 3px rgba(0,167,225,0.12);
  outline: none;
}

select.form-input { cursor: pointer; }

select.form-input:disabled {
  background: var(--hfm-anthrazit-pale);
  color: var(--hfm-anthrazit-light);
  cursor: not-allowed;
}

.filter-card {
  padding: 20px;
  margin-bottom: 16px;
  /* Unter der page-header (Dropdown-Overlay), siehe .page-header */
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-group-wide { grid-column: span 2; }

/* Zwischenüberschrift für Formular-Abschnitte (z.B. Betrieb-Modal) */
.form-section-title {
  grid-column: span 2;
  margin-top: 8px;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.form-section-title:first-child { margin-top: 0; }

.form-hinweis {
  font-size: 12px;
  color: var(--hfm-anthrazit-mid);
}

/* Logo-Bereich im Betrieb-Modal */
.logo-vorschau-zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
}

.logo-vorschau-zeile img {
  max-height: 64px;
  max-width: 180px;
  padding: 4px;
  background: var(--hfm-white);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 9px;
}

.logo-button-zeile { display: flex; gap: 8px; }

.form-check-group {
  justify-content: flex-end;
  align-self: end;
  padding-bottom: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--hfm-anthrazit);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--hfm-analytics-blue);
  cursor: pointer;
}

.filter-actions { display: flex; gap: 10px; }

/* --- DROPZONE --- */
.dropzone {
  border: 2px dashed rgba(104,104,104,0.25);
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: rgba(255,255,255,0.3);
}

.dropzone.dragover {
  border-color: var(--hfm-analytics-blue);
  background: rgba(0,167,225,0.05);
}

.dropzone-icon { color: var(--hfm-anthrazit-light); margin-bottom: 16px; }
.dropzone-text { font-size: 16px; font-weight: 600; font-family: 'Source Sans 3', sans-serif; color: var(--hfm-anthrazit); margin-bottom: 6px; }
.dropzone-hint { font-size: 13px; color: var(--hfm-anthrazit-light); margin-bottom: 14px; }
.dropzone-formats { font-size: 11px; color: var(--hfm-anthrazit-light); margin-top: 14px; }

.import-actions { display: flex; gap: 12px; margin-top: 20px; align-items: center; }

/* --- IMPORT RESULT --- */
.result-grid {
  display: flex;
  gap: 20px;
  margin: 16px 0 20px;
}

.result-item {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.result-green { background: rgba(0,167,225,0.06); border: 1px solid rgba(0,167,225,0.2); }
.result-orange { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2); }
.result-blue { background: rgba(0,167,225,0.06); border: 1px solid rgba(0,167,225,0.2); }

.result-value { font-family: 'Source Sans 3', sans-serif; font-size: 32px; font-weight: 600; }
.result-label { font-size: 12px; color: var(--hfm-anthrazit-mid); margin-top: 4px; }

.result-green .result-value { color: var(--hfm-analytics-blue); }
.result-orange .result-value { color: #f59e0b; }
.result-blue .result-value { color: var(--hfm-analytics-blue); }

.error-list {
  margin: 12px 0;
  padding: 12px;
  background: rgba(245,51,63,0.05);
  border-radius: 8px;
  border: 1px solid rgba(245,51,63,0.15);
  font-size: 12px;
  color: var(--hfm-red);
  max-height: 120px;
  overflow-y: auto;
}

/* --- MODAL --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(32px) saturate(2);
  -webkit-backdrop-filter: blur(32px) saturate(2);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.98);
  box-shadow: 0 24px 64px rgba(0,0,0,0.20);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-sm { max-width: 420px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-title {
  font-size: 18px;
  color: var(--hfm-anthrazit-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--hfm-anthrazit-light);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover { background: var(--hfm-anthrazit-pale); color: var(--hfm-anthrazit); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* --- PAGINATION --- */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.6);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pagination button:hover, .pagination button.active {
  background: var(--hfm-analytics-blue);
  border-color: var(--hfm-analytics-blue);
  color: white;
}

/* --- STAMMDATEN --- */
.stammdaten-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(45,45,45,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.25s ease;
}

.toast.toast-success { background: rgba(0,167,225,0.95); }
.toast.toast-error { background: rgba(245,51,63,0.95); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- EMPTY STATE --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--hfm-anthrazit-light);
}

.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 13px; }

/* --- LOADING --- */
.loading-row td { text-align: center; padding: 32px; color: var(--hfm-anthrazit-light); }

/* --- KOMPAKTE INPUTS (Page-Header) --- */
.form-input-sm {
  padding: 7px 10px;
  font-size: 12px;
  max-width: 170px;
}

/* --- FILTER-BADGE --- */
.filter-badge {
  align-self: center;
  font-size: 12px;
  padding: 5px 12px;
}

/* --- TOGGLE (Prognose-Monate) --- */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.toggle-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--hfm-anthrazit-pale);
  background: rgba(255,255,255,0.6);
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--hfm-anthrazit);
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn:hover {
  border-color: var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
}

.toggle-btn.active {
  background: var(--hfm-analytics-blue);
  border-color: var(--hfm-analytics-blue);
  color: white;
}

/* --- PROGNOSE --- */
.prognose-row {
  background: rgba(104,104,104,0.05);
}

.prognose-row td {
  color: var(--hfm-anthrazit-mid);
}

.badge-prognose {
  background: transparent;
  border: 1.5px dashed var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
  padding: 2px 9px;
}

.konfidenz-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.konfidenz-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.07);
  border-radius: 3px;
  overflow: hidden;
  max-width: 90px;
}

.konfidenz-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.konfidenz-text {
  font-size: 11px;
  font-weight: 600;
  min-width: 32px;
}

.hinweis-banner {
  font-size: 11px;
  font-weight: 300;
  color: var(--hfm-anthrazit-light);
  text-align: center;
  padding: 8px 0 16px;
}

/* --- MARKTDATEN: volle Fläche ohne Page-Header --- */
/* Auf der Marktdaten-Seite verliert der Content-Bereich sein Padding
   komplett; die globale Topbar bekommt eine exakte 50px-Zone. */
.main-content:has(#page-marktdaten.active) {
  padding: 0 !important;
  margin-left: var(--sidebar-width);
}

.main-content:has(#page-marktdaten.active) .global-topbar {
  height: 50px;
  padding: 8px 32px;
  margin-bottom: 0;
  box-sizing: border-box;
}

/* Leerzustand-Card nicht randlos kleben lassen */
.main-content:has(#page-marktdaten.active) #marktdaten-leer {
  margin: 24px 32px;
}

/* Kein Wrapper-Abstand um den iframe */
#marktdaten-frame-wrap {
  margin: 0 !important;
  padding: 0 !important;
}

#marktdaten-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 50px);
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
  vertical-align: top;
}

/* --- ADMIN: TAB-NAVIGATION --- */
.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px 14px 0 0;
  overflow-x: auto;
}

.admin-tab {
  padding: 12px 16px;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--hfm-anthrazit-mid);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.admin-tab:hover {
  color: var(--hfm-anthrazit-dark);
}

.admin-tab.active {
  background: rgba(0,167,225,0.10);
  color: var(--hfm-analytics-blue);
  border-bottom: 2px solid var(--hfm-analytics-blue);
  font-weight: 600;
  border-radius: 8px 8px 0 0;
}

/* --- ADMIN: ÜBERSICHT --- */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.admin-stat-card {
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.055);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.admin-stat-card:hover {
  border-color: rgba(0,167,225,0.35);
  transform: translateY(-2px);
}

.admin-aktivitaeten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.admin-sub-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.admin-aktiv-eintrag {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 12px;
  color: var(--hfm-anthrazit-dark);
}

.admin-aktiv-leer {
  font-size: 12px;
  color: var(--hfm-anthrazit-light);
}

/* --- SIDEBAR: MANDANT --- */
.sidebar-logo { flex-direction: column; align-items: flex-start; gap: 4px; }

.sidebar-mandant {
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
}

/* --- ADMIN: STATISTIKEN --- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.admin-stat {
  text-align: center;
  padding: 6px 0;
}

.admin-stat-wert {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--hfm-anthrazit-dark);
  white-space: nowrap;
}

.admin-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

/* --- ADMIN: TRANSAKTIONEN LÖSCHEN --- */
.loesch-warnung {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(0,0,0,0.04);
  color: var(--hfm-anthrazit);
  line-height: 1.5;
}

.loesch-warnung-rot {
  background: rgba(245,51,63,0.07);
  border: 1px solid rgba(245,51,63,0.2);
  color: #d42535;
}

/* --- ADMIN / MARKTDATEN --- */
.nav-item-bottom {
  margin-top: auto;
}

.dropzone-blue {
  border: 2px dashed var(--hfm-analytics-blue);
  background: rgba(255,255,255,0.3);
}

.dropzone-blue:hover,
.dropzone-blue.dragover {
  background: rgba(0,167,225,0.06);
  border-color: var(--hfm-analytics-blue);
}

.admin-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-sm);
}

.admin-file-name {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
}

.admin-file-meta {
  font-size: 12px;
  color: var(--hfm-anthrazit-mid);
}

/* --- MEHRFACHAUSWAHL --- */
.th-check {
  width: 36px;
  text-align: center !important;
}

.hfm-check {
  width: 16px;
  height: 16px;
  accent-color: var(--hfm-analytics-blue);
  cursor: pointer;
  vertical-align: middle;
}

.data-table tbody tr.row-selected,
.data-table tbody tr.row-selected:hover {
  background: rgba(0,167,225,0.08);
}

/* --- BULK-AKTIONSLEISTE --- */
.bulk-bar {
  position: fixed;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,167,225,0.2);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  animation: bulkBarIn 0.2s ease;
}

@keyframes bulkBarIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.bulk-count {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
}

.bulk-actions {
  display: flex;
  gap: 10px;
}

/* --- REGELVORSCHLAG --- */
.vorschlag-treffer {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0,167,225,0.06);
  border: 1px solid rgba(0,167,225,0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--hfm-anthrazit);
}

.vorschlag-treffer strong {
  color: var(--hfm-analytics-blue);
  font-family: 'Source Sans 3', sans-serif;
}

/* --- SORTIERBARE SPALTEN --- */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

th.sortable:hover {
  color: var(--hfm-analytics-blue);
}

th.sortable.sort-active {
  color: var(--hfm-analytics-blue);
}

.sort-icon {
  font-size: 9px;
  vertical-align: middle;
}

/* --- ZEILEN-INTERAKTION --- */
#table-transaktionen tbody tr[data-id] {
  cursor: pointer;
}

#table-transaktionen tbody tr[data-id]:hover {
  background: rgba(0,167,225,0.04);
}

#table-transaktionen tbody tr.row-active,
#table-transaktionen tbody tr.row-active:hover {
  background: rgba(0,167,225,0.08);
}

#table-transaktionen tbody tr.row-focused {
  outline: 2px solid rgba(0,167,225,0.5);
  outline-offset: -2px;
}

#table-transaktionen td.th-check,
#table-transaktionen th.th-check {
  cursor: default;
}

#table-transaktionen.lasso-dragging {
  user-select: none;
  -webkit-user-select: none;
}

/* --- KONTEXT-MENÜ --- */
.context-menu {
  position: fixed;
  z-index: 8000;
  min-width: 200px;
  padding: 6px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  animation: contextIn 0.12s ease;
}

@keyframes contextIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.context-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.context-item:hover {
  background: rgba(0,167,225,0.08);
  color: var(--hfm-analytics-blue);
}

.context-item-disabled,
.context-item-disabled:hover {
  color: var(--hfm-anthrazit-light);
  background: none;
  cursor: not-allowed;
}

.context-sep {
  height: 1px;
  margin: 5px 8px;
  background: rgba(0,0,0,0.07);
}

/* --- DETAIL-MODAL --- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 24px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.detail-row dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.detail-row dd {
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  margin: 0;
  word-break: break-word;
}

/* --- LASSO --- */
#lasso {
  position: fixed;
  z-index: 9999;
  border: 2px solid var(--hfm-analytics-blue);
  background: rgba(0,167,225,0.08);
  border-radius: 4px;
  pointer-events: none;
}

/* --- BULK-BAR FLASH --- */
.bulk-bar-flash {
  animation: bulkFlash 0.6s ease;
}

@keyframes bulkFlash {
  0%, 100% { box-shadow: 0 -4px 24px rgba(0,0,0,0.08); }
  35% { box-shadow: 0 -4px 32px rgba(0,167,225,0.45); border-top-color: var(--hfm-analytics-blue); }
}

/* --- LIVE-FILTER --- */
.form-input.filter-active {
  border: 1px solid var(--hfm-analytics-blue);
}

.spinner-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(0,167,225,0.2);
  border-top-color: var(--hfm-analytics-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- BETRIEBSZWEIG-CARDS --- */
.bz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.bz-card {
  position: relative;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: var(--transition);
}

.bz-card:hover {
  border-color: rgba(0,167,225,0.30);
}

.bz-card.bz-aktiv {
  border: 2px solid var(--hfm-analytics-blue);
  background: rgba(0,167,225,0.06);
  box-shadow: 0 2px 16px rgba(0,167,225,0.15);
  padding: 13px 15px; /* Ausgleich für dickeren Rahmen */
}

.bz-card.bz-fixed {
  cursor: default;
}

.bz-card-name {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
  margin-bottom: 2px;
  padding-right: 40px;
}

.bz-card-meta {
  font-size: 11px;
  color: var(--hfm-anthrazit-mid);
}

.bz-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 19px;
  border-radius: 10px;
  background: var(--hfm-anthrazit-pale);
  transition: var(--transition);
}

.bz-toggle.on {
  background: var(--hfm-analytics-blue);
}

.bz-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.bz-toggle.on .bz-toggle-knob {
  left: 17px;
}

/* --- ADMIN-KATEGORIEN-TABELLE --- */
tr.kat-inaktiv td {
  opacity: 0.45;
}

.kat-custom-name {
  cursor: pointer;
  min-width: 140px;
}

.kat-custom-name:hover {
  color: var(--hfm-analytics-blue);
}

.inline-edit {
  padding: 4px 8px;
  font-size: 12px;
  width: 100%;
}

/* --- CHART-TYP-UMSCHALTER --- */
.chart-type-toggle {
  display: flex;
  gap: 3px;
}

.icon-toggle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hfm-anthrazit-pale);
  border-radius: 7px;
  background: rgba(255,255,255,0.6);
  color: var(--hfm-anthrazit-mid);
  cursor: pointer;
  transition: var(--transition);
}

.icon-toggle svg { width: 14px; height: 14px; }

.icon-toggle:hover {
  border-color: var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
}

.icon-toggle.active {
  background: rgba(0,167,225,0.15);
  border-color: rgba(0,167,225,0.3);
  color: var(--hfm-analytics-blue);
}

.chart-table {
  height: 100%;
  overflow-y: auto;
}

.kat-balken {
  height: 10px;
  border-radius: 5px;
  min-width: 3px;
  opacity: 0.8;
}

/* --- PIVOT-TABELLE --- */
.pivot-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pivot-scroll {
  overflow-x: auto;
  max-height: 75vh;
  overflow-y: auto;
}

/* Auswertungs-Seite: Tabelle füllt die Höhe, eigener Scrollbereich */
.auswertung-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.auswertung-toolbar .auswertung-export { margin-left: auto; }
.auswertung-scroll { max-height: calc(100vh - 140px); }

.pivot-table {
  font-size: 12px;
  white-space: nowrap;
}

.pivot-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef7fb;
}

.pivot-name-col {
  min-width: 240px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255,255,255,0.96);
}

.pivot-table thead .pivot-name-col { z-index: 4; background: #eef7fb; }

.pivot-gesamt-col,
td[data-gesamt] {
  font-weight: 700 !important;
  border-left: 2px solid rgba(0,167,225,0.20) !important;
  background-color: rgba(0,167,225,0.03);
}

/* Aktueller Monat: ganze Spalte (Datenzellen) leicht blau hinterlegen */
.pivot-table tbody td.pivot-zelle-aktuell {
  background-color: rgba(0,167,225,0.04);
}
html.dark .pivot-table tbody td.pivot-zelle-aktuell {
  background-color: rgba(0,167,225,0.10);
}

/* Plan/Ist-Toggle-Button */
#btn-pivot-plan.btn-plan-aktiv {
  background: #00a7e1 !important;
  color: #fff !important;
  border-color: #00a7e1 !important;
}
#btn-pivot-plan.btn-plan-leer {
  opacity: 0.5;
}

/* Plan/Ist: Badges in der Bezeichnungsspalte */
.pivot-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.pivot-badge-ist  { background: rgba(104,104,104,0.10); color: var(--hfm-ist); border-radius: 4px; }
.pivot-badge-plan { background: rgba(0,167,225,0.10); color: var(--hfm-plan); }
.pivot-badge-abw  { background: transparent; color: #b2b2b2; }

/* Plan/Ist: IST-Hauptzeile, Plan- und Abweichungszeilen (kompakte Hierarchie) */
.pivot-table tbody tr.pivot-ist-row > td { font-size: 13px; }
.pivot-table tbody tr.pivot-plan-row > td {
  background-color: rgba(0,167,225,0.05);
  font-size: 13px;
  color: var(--hfm-plan-text);
  font-weight: 500;
}
.pivot-table tbody tr.pivot-abw-row > td {
  background-color: transparent;
  font-size: 12px;
  border-bottom: 2px solid rgba(0,0,0,0.04);
  padding-bottom: 5px;           /* Gruppenabstand nach jeder ABW-Zeile */
}
html.dark .pivot-table tbody tr.pivot-plan-row > td { background-color: rgba(0,167,225,0.06); }
html.dark .pivot-badge-ist  { background: rgba(255,255,255,0.10); color: #b0b0b0; }

/* Plan/Ist: Betriebszweig-Gesamtzeilen (IST/PLAN/ABW) hervorgehoben + fett */
.pivot-table tbody tr.pivot-grp-bz > td {
  background-color: rgba(0,167,225,0.04);
  font-weight: 600;
}

/* Ampel als farbiger Punkt (Corporate-Farben) */
.pivot-ampel-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

/* Spalten-Streifen: jede ungerade Spalte leicht getönt (Header + Daten).
   Als background-image, damit Zeilen-Hintergründe darunter durchscheinen. */
#pivot-table thead th:nth-child(odd):not(.pivot-name-col),
#pivot-table tbody td:nth-child(odd):not(.pivot-name-col) {
  background-image: linear-gradient(rgba(0,0,0,0.025), rgba(0,0,0,0.025));
}

html.dark #pivot-table thead th:nth-child(odd):not(.pivot-name-col),
html.dark #pivot-table tbody td:nth-child(odd):not(.pivot-name-col) {
  background-image: linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02));
}

/* Beträge: fester Abstand zum rechten Zellenrand */
#pivot-table th.text-right,
#pivot-table td.text-right { padding-right: 16px; }

tr.pivot-bz {
  cursor: pointer;
  font-weight: 600;
}

tr.pivot-bz td {
  background: rgba(0,167,225,0.04);
  border-top: 1px solid rgba(0,167,225,0.15);
  padding-top: 8px;
}

tr.pivot-bz .pivot-name-col {
  background: #e9f5fb;
}

/* "Ohne Betriebszweig": dezent rötlich, zurückgenommene Schrift */
tr.pivot-ohne-bz td {
  background: rgba(245,51,63,0.03);
  color: #686868;
}

tr.pivot-ohne-bz .pivot-name-col { background: #f6eeee; }

html.dark tr.pivot-ohne-bz td {
  background: rgba(245,51,63,0.05);
  color: #a0a0a0;
}

tr.pivot-hk {
  cursor: pointer;
  font-weight: 500;
}

tr.pivot-hk td {
  background: rgba(0,0,0,0.02);
  color: var(--hfm-anthrazit-dark);
}

tr.pivot-uk td {
  background: transparent;
  font-weight: 300;
  color: #2D2D2D;
}

html.dark tr.pivot-uk td { color: #c0c0c0; }

.pivot-chevron {
  display: inline-block;
  width: 14px;
  color: var(--hfm-analytics-blue);
  font-size: 10px;
}

.pivot-leer {
  color: var(--hfm-anthrazit-light);
}

/* --- PIVOT: PROGNOSE --- */
.pivot-prog {
  background: rgba(135,135,135,0.06);
  font-style: italic;
}

.pivot-prog.prog-amber { background: rgba(186,117,23,0.06); }
.pivot-prog.prog-rot { background: rgba(245,51,63,0.06); }

/* Prognose-Textfarbe (kontraststark, theme-abhängig) */
.pivot-prog.prog-pos { color: var(--hfm-prog-pos); }
.pivot-prog.prog-neg { color: var(--hfm-prog-neg); }

.pivot-prog-first {
  border-left: 2px dashed rgba(0,167,225,0.5) !important;
}

.pivot-prog-header {
  font-style: italic;
  color: var(--hfm-anthrazit-mid) !important;
  text-transform: none !important;
}

.heute-label {
  color: var(--hfm-analytics-blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

/* --- PIVOT: LIQUIDITÄT --- */
.pivot-liq {
  border-left: 2px solid rgba(0,167,225,0.2) !important;
  font-weight: 700;
}

th.pivot-liq-header {
  color: var(--hfm-analytics-blue) !important;
  font-weight: 700;
}

.pivot-ampel {
  text-align: center;
  font-size: 13px;
  width: 36px;
}

/* --- PIVOT: BEMERKUNGEN --- */
.pivot-bem-col,
.pivot-bem-col-header {
  min-width: 130px;
  max-width: 220px;
}

.pivot-bem-col {
  cursor: pointer;
  white-space: normal;
}

.bem-add {
  width: 20px;
  height: 20px;
  border: 1px dashed var(--hfm-anthrazit-light);
  border-radius: 6px;
  background: none;
  color: var(--hfm-anthrazit-light);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.4;
}

tr:hover .bem-add { opacity: 1; }

.bem-add:hover {
  border-color: var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
}

.bem-text {
  font-size: 11px;
  font-style: italic;
  color: #ba7517;
}

.bem-eye {
  border: none;
  background: none;
  color: var(--hfm-anthrazit-mid);
  cursor: pointer;
  padding: 1px 3px;
  vertical-align: middle;
  border-radius: 4px;
  transition: var(--transition);
}

.bem-eye:hover { color: var(--hfm-analytics-blue); background: rgba(0,167,225,0.08); }

/* Zeitraum-Markierung */
td.bem-mark {
  background: rgba(186,117,23,0.08) !important;
  border-top: 2px solid rgba(186,117,23,0.25);
}

td.bem-mark-start { border-left: 2px solid rgba(186,117,23,0.40); }
td.bem-mark-ende { border-right: 2px solid rgba(186,117,23,0.40); }

/* Popover */
.bem-popover {
  position: fixed;
  z-index: 8500;
  width: 320px;
  padding: 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.98);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  animation: contextIn 0.12s ease;
}

.bem-pop-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  margin-bottom: 10px;
}

.bem-popover textarea {
  width: 100%;
  resize: vertical;
  margin-bottom: 10px;
}

.bem-form-daten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.bem-form-aktionen {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.bem-eintrag {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.bem-eintrag-text {
  font-size: 12px;
  color: var(--hfm-anthrazit-dark);
  margin-bottom: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bem-eintrag-zeit {
  font-size: 11px;
  color: #ba7517;
  margin-bottom: 4px;
}

.bem-eintrag-aktionen {
  display: flex;
  gap: 6px;
}

/* Kommentar-Icon in Monatszellen */
td.pivot-zelle {
  position: relative;
}

/* --- PIVOT-KONTEXTMENÜ (Rechtsklick) --- */
.pivot-kontext {
  position: fixed;
  z-index: 9999;
  min-width: 240px;
  padding: 6px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  animation: contextIn 0.12s ease;
}

.pivot-kontext-info {
  background: rgba(0,167,225,0.04);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.pivot-kontext-info-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
}

.pivot-kontext-info-betrag {
  font-size: 13px;
  color: var(--hfm-anthrazit-mid);
  margin-top: 2px;
}

.pivot-kontext-sep {
  border-top: 1px solid rgba(0,0,0,0.06);
  margin: 4px 6px;
}

.pivot-kontext-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.pivot-kontext-item:hover {
  background: rgba(0,167,225,0.08);
  color: var(--hfm-analytics-blue);
}

.zell-bem-icon {
  position: absolute;
  top: 1px;
  right: 2px;
  color: var(--hfm-analytics-blue);
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: flex-start;
}

.zell-bem-anzahl {
  font-size: 9px;
  font-weight: 700;
  font-style: normal;
  margin-left: 1px;
  color: var(--hfm-analytics-blue);
}

/* Klickbare Monats-Header */
th.pivot-monat-header {
  cursor: pointer;
  transition: color 0.15s ease;
  border-right: 1px solid rgba(0,0,0,0.06);
}

th.pivot-monat-header:hover {
  color: var(--hfm-analytics-blue) !important;
}

/* Aktueller Monat im Header hervorheben */
.pivot-table thead th.pivot-monat-aktuell {
  background: rgba(0,167,225,0.06);
  background-color: #e3f2fa; /* sticky Header braucht deckende Farbe */
  font-weight: 700;
  color: var(--hfm-analytics-blue) !important;
}

html.dark .pivot-table thead th.pivot-monat-aktuell {
  background-color: #1c3440 !important;
}

/* --- PIVOT: GESAMTLIQUIDITÄT --- */
tr.pivot-gesamtliq td {
  background: rgba(0,167,225,0.08);
  border-top: 2px solid var(--hfm-analytics-blue);
}

tr.pivot-gesamtliq .pivot-name-col {
  background: #dceffa;
}

.pivot-gesamtliq-label {
  color: var(--hfm-analytics-blue) !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- GLOBALE TOPBAR / WETTER-WIDGET --- */
.global-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
  min-height: 34px;
}

#wetter-widget { position: relative; }

.wetter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.wetter-pill:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.wetter-pill-leer { color: var(--hfm-anthrazit-mid); }

/* --- WETTER-POPOVER --- */
.wetter-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 420px;
  z-index: 9999;
  padding: 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  animation: contextIn 0.15s ease;
  text-align: left;
}

.wetter-pop-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wetter-pop-standort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
}

.wetter-pop-link {
  font-size: 12px;
  color: var(--hfm-analytics-blue);
  text-decoration: none;
}

.wetter-pop-link:hover { text-decoration: underline; }

.wetter-pop-regen {
  text-align: center;
  font-size: 13px;
  color: var(--hfm-anthrazit-mid);
  padding: 8px 0 12px;
}

.wetter-pop-regen strong {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--hfm-analytics-blue);
}

.wetter-kein-regen strong { color: #3a9c3f; }

.wetter-pop-sep {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 10px 0;
}

.wetter-tag {
  display: grid;
  grid-template-columns: 56px 30px 76px 1fr 48px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.wetter-tag-name { font-weight: 600; color: var(--hfm-anthrazit-dark); }
.wetter-tag-icon { text-align: center; }
.wetter-tag-temp { color: var(--hfm-anthrazit); }

.wetter-tag-balken {
  height: 9px;
  background: rgba(0,0,0,0.05);
  border-radius: 5px;
  overflow: hidden;
  display: block;
}

.wetter-balken {
  display: block;
  height: 100%;
  border-radius: 5px;
  min-width: 2px;
}

.wetter-tag-mm { text-align: right; color: var(--hfm-analytics-blue); font-size: 12px; }

.wetter-pop-summe {
  font-size: 13px;
  color: var(--hfm-anthrazit);
}

.wetter-pop-summe strong { color: var(--hfm-anthrazit-dark); }

.wetter-pop-vergleich {
  margin-left: 8px;
  font-size: 12px;
}

.wetter-pop-fuss {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
  font-size: 11px;
  color: var(--hfm-anthrazit-light);
}

/* --- STANDORT-SUCHE --- */
.standort-treffer {
  margin-top: 4px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 9px;
  background: rgba(255,255,255,0.97);
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}

.standort-eintrag {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.standort-eintrag:hover {
  background: rgba(0,167,225,0.08);
}

/* --- PIVOT: KONTOSTAND-ZEILE (unter Gesamtliquidität) --- */
tr.pivot-kontostand td {
  background: rgba(16,185,129,0.05);
  border-top: 2px solid rgba(16,185,129,0.25);
  font-size: 12px;
}

tr.pivot-kontostand .pivot-name-col,
.pivot-kontostand-label {
  background: #e9f8f2;
  font-weight: 700;
}

.pivot-ks-limit {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #f5333f;
}

html.dark tr.pivot-kontostand td { background: rgba(16,185,129,0.07); }
html.dark tr.pivot-kontostand,
html.dark tr.pivot-kontostand:hover { background: rgba(16,185,129,0.07) !important; }
html.dark tr.pivot-kontostand .pivot-name-col { background: #16332a !important; }

/* --- STAMMDATEN: Schnellnavigation --- */
.stamm-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 12px;
  margin-bottom: 4px;
  background: rgba(196,201,208,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stamm-nav-pill {
  border: 1px solid var(--hfm-anthrazit-pale);
  background: var(--hfm-white);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hfm-anthrazit-dark);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.stamm-nav-pill:hover {
  border-color: var(--hfm-analytics-blue);
  color: var(--hfm-analytics-blue);
}

/* Sticky-Leiste beim Anspringen der Sektionen nicht überdecken */
#admin-tab-stammdaten .card { scroll-margin-top: 64px; }

html.dark .stamm-nav { background: #1a1a1a; }
html.dark .stamm-nav-pill { background: rgba(35,35,35,0.9); }

/* --- KONTO-MODAL: Hinweistexte --- */
.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--hfm-anthrazit-mid);
}

/* --- LETZTER IMPORT (Transaktionen-Untertitel) --- */
.trans-subtitle-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-right: 16px;
}

.trans-subtitle-row .page-subtitle { margin-top: 0; }

.trans-letzter-import {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  color: var(--hfm-anthrazit-mid);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* --- REGELN: PRIORITÄTS-BADGES --- */
.badge.prio-hoch { background: #00a7e1; color: #ffffff; }
.badge.prio-mittel { background: rgba(0,167,225,0.6); color: #ffffff; }
.badge.prio-niedrig { background: #878787; color: #ffffff; }

/* --- MARKTDATEN-MODUL (Toggle / Upgrade-Seite) --- */
.nav-item.nav-gesperrt {
  color: #b2b2b2 !important;
  cursor: not-allowed;
}

.nav-item.nav-gesperrt:hover {
  background: none;
  padding-left: 14px;
}

.upgrade-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 50px);
  padding: 32px;
}

.upgrade-card {
  max-width: 440px;
  text-align: center;
  padding: 40px 36px;
  margin-bottom: 0;
}

.upgrade-icon { font-size: 44px; margin-bottom: 12px; }

.upgrade-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--hfm-anthrazit-dark);
  margin-bottom: 12px;
}

.upgrade-text {
  font-size: 14px;
  color: var(--hfm-anthrazit-mid);
  line-height: 1.6;
  margin-bottom: 20px;
}

.upgrade-features {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-bottom: 24px;
}

.upgrade-features li {
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
  padding: 4px 0;
}

.upgrade-mail {
  font-size: 12px;
  color: var(--hfm-anthrazit-mid);
  margin-top: 14px;
}

/* --- PROGNOSE: LIQUIDITÄTSBANNER --- */
.prognose-banner {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
}

.prognose-banner-rot {
  background: rgba(245,51,63,0.08);
  border: 1px solid rgba(245,51,63,0.20);
  color: #d42535;
}

.prognose-banner-gelb {
  background: rgba(186,117,23,0.08);
  border: 1px solid rgba(186,117,23,0.20);
  color: #ba7517;
}

/* --- PROGNOSE: BETRIEBSZWEIG-KARTEN --- */
.bz-prog-karte {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.bz-prog-kopf {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bz-prog-kopf:hover { background: rgba(0,167,225,0.04); }

.bz-prog-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--hfm-anthrazit-dark);
  min-width: 160px;
}

.bz-prog-saldo { font-weight: 600; font-size: 13px; flex: 1; }
.bz-prog-ampel { font-size: 12px; color: var(--hfm-anthrazit-mid); }

.bz-prog-koerper {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 12px 16px;
}

.bz-prog-monat {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.bz-prog-monat-name { font-weight: 600; min-width: 56px; }
.bz-prog-konf { font-size: 12px; font-weight: 600; }

.bz-prog-tops {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 10px;
  font-size: 13px;
  color: var(--hfm-anthrazit);
}

html.dark .bz-prog-karte { border-color: rgba(255,255,255,0.08); }
html.dark .bz-prog-koerper { border-top-color: rgba(255,255,255,0.06); }

/* --- SZENARIO-SIMULATOR --- */
.sim-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sim-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0,167,225,0.25);
  background: rgba(0,167,225,0.06);
  color: var(--hfm-analytics-blue);
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sim-chip:hover { background: rgba(0,167,225,0.14); }
.sim-chip-neu { border-style: dashed; }

.sim-chip-x {
  font-size: 13px;
  opacity: 0.6;
  padding: 0 2px;
}

.sim-chip-x:hover { opacity: 1; color: #f5333f; }

.sim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) { .sim-grid { grid-template-columns: repeat(2, 1fr); } }

.sim-slider-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sim-slider-kopf label {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: var(--hfm-anthrazit-dark);
  font-weight: 600;
}

.sim-badge {
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: var(--hfm-anthrazit-pale);
  color: var(--hfm-anthrazit-mid);
}

.sim-badge-pos { background: rgba(0,167,225,0.10); color: #00a7e1; }
.sim-badge-neg { background: rgba(245,51,63,0.10); color: #f5333f; }

.sim-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #e9e9e9 50%, #e9e9e9 50%);
  outline: none;
  cursor: pointer;
}

.sim-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--hfm-analytics-blue);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.sim-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.sim-basis { opacity: 0.65; }

.sim-zeile {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sim-zeile-saldo {
  font-weight: 700;
  border-bottom: none;
}

.sim-delta {
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
  background: rgba(0,0,0,0.03);
}

.sim-delta-rot {
  background: rgba(245,51,63,0.08);
  border: 1px solid rgba(245,51,63,0.20);
  color: #d42535;
}

.sim-delta-blau {
  background: rgba(0,167,225,0.08);
  border: 1px solid rgba(0,167,225,0.20);
  color: #0096cc;
}

html.dark .sim-slider input[type="range"]::-webkit-slider-thumb { background: #2a2a2a; }
html.dark .sim-zeile { border-bottom-color: rgba(255,255,255,0.06); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .stammdaten-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DARK MODE
   ============================================================ */

body { transition: color 0.3s ease; }
body::before { transition: background 0.3s ease; }

/* Mode-Toggle-Button */
.mode-toggle {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.90);
  border-radius: 50%;
  color: var(--hfm-anthrazit);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-toggle:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  color: var(--hfm-analytics-blue);
}

.global-topbar { align-items: center; }

/* Marktdaten-Hinweis (nur im Dark Mode sichtbar) */
.marktdaten-hellmodus-hinweis {
  display: none;
  font-size: 11px;
  color: var(--hfm-anthrazit-light);
  text-align: center;
  padding: 6px 0;
}

html.dark .marktdaten-hellmodus-hinweis { display: block; }

/* --- Variablen-Redefinition: deckt Texte, Labels und viele Borders ab --- */
html.dark {
  --hfm-anthrazit: #c0c0c0;
  --hfm-anthrazit-dark: #e8e8e8;
  --hfm-anthrazit-mid: #a0a0a0;
  --hfm-anthrazit-light: #686868;
  --hfm-anthrazit-pale: rgba(255,255,255,0.10);
  /* Dark-Mode: hellere Plan-/Prognosefarben für Kontrast auf dunklem Grund */
  --hfm-plan-text: #5cc6ef;
  --hfm-prog-pos: #5cc6ef;
  --hfm-prog-neg: #ff6b73;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.30);
  --shadow-card-hover: 0 8px 36px rgba(0,0,0,0.40);
  --glass-bg: rgba(35,35,35,0.75);
  --glass-border: 1px solid rgba(255,255,255,0.08);
}

html.dark { background: #1a1a1a; }

html.dark body {
  color: #e8e8e8;
  background: transparent;
}

html.dark body::before {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(0,167,225,0.07) 0%, transparent 55%),
    linear-gradient(135deg, #1a1a1a 0%, #212121 50%, #1a1a1a 100%);
}

/* Sidebar */
html.dark .sidebar {
  background: rgba(25,25,25,0.85);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 4px 0 32px rgba(0,0,0,0.40);
}

html.dark .sidebar-logo { border-bottom-color: rgba(0,167,225,0.15); }

html.dark .nav-item { color: #a0a0a0; }
html.dark .nav-item:hover { background: rgba(0,167,225,0.08); color: #e8e8e8; }
html.dark .nav-item.active { background: rgba(0,167,225,0.15); color: #00a7e1; }

html.dark .sidebar-footer { border-top-color: rgba(255,255,255,0.06); }

/* Page Header */
html.dark .page-header {
  background: rgba(28,28,28,0.80);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* Cards */
html.dark .card {
  background: rgba(32,32,32,0.78);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 24px rgba(0,0,0,0.30);
}

html.dark .kpi-card {
  background: rgba(35,35,35,0.80);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.30);
}

html.dark .kpi-card:hover {
  box-shadow: 0 8px 36px rgba(0,0,0,0.45);
}

html.dark .kpi-card.kpi-accent { background: rgba(0,167,225,0.10); }

/* Tabellen */
html.dark .data-table thead th {
  background: rgba(0,167,225,0.06);
  color: #a0a0a0;
  border-bottom-color: rgba(255,255,255,0.06);
}

html.dark .data-table tbody td { border-bottom-color: rgba(255,255,255,0.04); }
html.dark .data-table tbody tr:hover { background: rgba(0,167,225,0.06); }

/* Inputs & Dropdowns */
html.dark .form-input {
  background: rgba(40,40,40,0.80);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e8e8e8;
}

html.dark .form-input:focus { border-color: #00a7e1; }
html.dark select.form-input:disabled { background: rgba(255,255,255,0.06); color: #686868; }
html.dark .form-input::placeholder { color: #686868; }

/* Buttons */
html.dark .btn-secondary {
  background: rgba(50,50,50,0.80);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e8e8e8;
}

html.dark .btn-secondary:hover {
  background: rgba(60,60,60,0.90);
  border-color: rgba(0,167,225,0.30);
}

html.dark .btn-icon { border-color: rgba(255,255,255,0.12); color: #a0a0a0; }
html.dark .icon-toggle,
html.dark .toggle-btn,
html.dark .pagination button {
  background: rgba(50,50,50,0.80);
  border-color: rgba(255,255,255,0.10);
  color: #a0a0a0;
}

html.dark .toggle-btn.active,
html.dark .pagination button.active,
html.dark .pagination button:hover {
  background: var(--hfm-analytics-blue);
  border-color: var(--hfm-analytics-blue);
  color: #ffffff;
}

html.dark .icon-toggle.active {
  background: rgba(0,167,225,0.20);
  border-color: rgba(0,167,225,0.35);
  color: #00a7e1;
}

/* Badges */
html.dark .badge-blue, html.dark .badge-green { background: rgba(0,167,225,0.15); }
html.dark .badge-offen, html.dark .badge-red { background: rgba(245,51,63,0.15); }
html.dark .badge-gray { background: rgba(255,255,255,0.10); color: #c0c0c0; }
html.dark .badge-eigen, html.dark .badge-orange { background: rgba(186,117,23,0.18); }

/* Filter-Leiste */
html.dark .filter-card {
  background: rgba(35,35,35,0.70);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Modals */
html.dark .modal-backdrop { background: rgba(0,0,0,0.60); }

html.dark .modal {
  background: rgba(30,30,30,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 64px rgba(0,0,0,0.50);
}

html.dark .modal-header, html.dark .modal-footer { border-color: rgba(255,255,255,0.07); }

/* Kontextmenüs & Popovers */
html.dark .context-menu,
html.dark .pivot-kontext,
html.dark .bem-popover,
html.dark .wetter-popover {
  background: rgba(30,30,30,0.95);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.50);
}

html.dark .context-item, html.dark .pivot-kontext-item { color: #e8e8e8; }
html.dark .pivot-kontext-info { background: rgba(0,167,225,0.08); }
html.dark .standort-treffer { background: rgba(35,35,35,0.97); border-color: rgba(255,255,255,0.10); }

/* Wetter-Pill */
html.dark .wetter-pill, html.dark .mode-toggle {
  background: rgba(35,35,35,0.80);
  border: 1px solid rgba(255,255,255,0.08);
}

html.dark .wetter-tag-balken { background: rgba(255,255,255,0.08); }

/* Admin */
html.dark .admin-tabs {
  background: rgba(32,32,32,0.70);
  border-color: rgba(255,255,255,0.07);
  border-bottom-color: rgba(255,255,255,0.06);
}

html.dark .admin-stat-card {
  background: rgba(35,35,35,0.78);
  border: 1px solid rgba(255,255,255,0.07);
}

html.dark .bz-card {
  background: rgba(35,35,35,0.75);
  border: 1px solid rgba(255,255,255,0.07);
}

html.dark .bz-card.bz-aktiv {
  border: 2px solid #00a7e1;
  background: rgba(0,167,225,0.08);
}

html.dark .bz-toggle { background: rgba(255,255,255,0.12); }
html.dark .bz-toggle.on { background: var(--hfm-analytics-blue); }
html.dark .admin-file-info { background: rgba(45,45,45,0.60); border-color: rgba(255,255,255,0.08); }
html.dark .loesch-warnung { background: rgba(255,255,255,0.05); }

/* Dropzones */
html.dark .dropzone { background: rgba(40,40,40,0.40); border-color: rgba(255,255,255,0.15); }
html.dark .dropzone-blue { border-color: rgba(0,167,225,0.5); }

/* Pivot: sticky Spalten und Sonderzeilen */
html.dark .pivot-table thead th { background: #1d2b33; }
html.dark .pivot-table thead .pivot-name-col { background: #1d2b33; }
html.dark .pivot-name-col { background: rgba(32,32,32,0.97); }
html.dark tr.pivot-bz td { background: rgba(0,167,225,0.07); }
html.dark tr.pivot-bz .pivot-name-col { background: #1c2930; }
html.dark tr.pivot-gesamtliq td { background: rgba(0,167,225,0.10); }
html.dark tr.pivot-gesamtliq .pivot-name-col { background: #16323f; }
html.dark .pivot-prog { background: rgba(255,255,255,0.04); }
html.dark .vorschlag-treffer { background: rgba(0,167,225,0.10); border-color: rgba(0,167,225,0.25); }

/* Bulk-Leiste */
html.dark .bulk-bar {
  background: rgba(28,28,28,0.95);
  border-top: 1px solid rgba(0,167,225,0.25);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.40);
}

/* Detail-Modal & Sonstiges */
html.dark .detail-row { border-bottom-color: rgba(255,255,255,0.06); }
html.dark .result-item { background: rgba(255,255,255,0.04); }
html.dark .kat-inaktiv td { opacity: 0.4; }
html.dark .inline-edit { background: rgba(50,50,50,0.95); }
html.dark .konfidenz-bar { background: rgba(255,255,255,0.10); }

/* Scrollbalken */
html.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); }
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(0,167,225,0.40); }

/* Marktdaten-iframe: bleibt hell, auch im Dark Mode randlos */
html.dark #marktdaten-frame {
  background: #ffffff;
  border-radius: 0;
}

/* ------------------------------------------------------------
   Dark Mode: defensive Überschreibungen gegen hardcodierte
   Farben (Tabellen-Zeilen, Inline-Styles, Sticky-Spalten)
   ------------------------------------------------------------ */

/* Tabellen-Zeilen: nie zurück auf hell kippen */
html.dark table tbody tr {
  background: transparent !important;
  color: #e8e8e8 !important;
}

html.dark table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02) !important;
}

html.dark table tbody tr:hover {
  background: rgba(0,167,225,0.06) !important;
}

/* Auswahl-/Aktiv-Zustände müssen über den Zebra-Regeln liegen */
html.dark table tbody tr.row-selected,
html.dark table tbody tr.row-selected:hover {
  background: rgba(0,167,225,0.12) !important;
}

html.dark table tbody tr.row-active,
html.dark table tbody tr.row-active:hover {
  background: rgba(0,167,225,0.10) !important;
}

/* Pivot-Sonderzeilen wieder über die generischen Zeilen-Regeln heben */
html.dark tr.pivot-bz,
html.dark tr.pivot-bz:hover { background: rgba(0,167,225,0.07) !important; }
html.dark tr.pivot-gesamtliq,
html.dark tr.pivot-gesamtliq:hover { background: rgba(0,167,225,0.10) !important; }

/* Hardcodierte weiße Hintergründe in Inline-Styles */
html.dark [style*="background: white"],
html.dark [style*="background: #fff"],
html.dark [style*="background: #ffffff"],
html.dark [style*="background-color: white"],
html.dark [style*="background-color: #fff"] {
  background: rgba(35,35,35,0.80) !important;
}

/* Hardcodierte dunkle Textfarben in Inline-Styles */
html.dark [style*="color: #2D2D2D"],
html.dark [style*="color: #333"],
html.dark [style*="color: black"] {
  color: #e8e8e8 !important;
}

/* Zebra-Streifen deaktivieren */
html.dark .table-striped tbody tr:nth-child(odd) {
  background: transparent !important;
}

/* Sticky/Fixed Elemente: deckender dunkler Hintergrund */
html.dark .sticky-col,
html.dark th[style*="position: sticky"],
html.dark td[style*="position: sticky"] {
  background: #212121 !important;
}

html.dark .pivot-name-col { background: #212121 !important; }
html.dark .pivot-table thead th,
html.dark .pivot-table thead .pivot-name-col { background: #1d2b33 !important; }
html.dark tr.pivot-bz .pivot-name-col { background: #1c2930 !important; }
html.dark tr.pivot-gesamtliq .pivot-name-col { background: #16323f !important; }

/* Pagination */
html.dark .pagination button,
html.dark .page-btn {
  background: rgba(40,40,40,0.80) !important;
  color: #e8e8e8 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

html.dark .pagination button.active,
html.dark .pagination button:hover {
  background: var(--hfm-analytics-blue) !important;
  border-color: var(--hfm-analytics-blue) !important;
  color: #ffffff !important;
}

/* Scrollbar-Track */
html.dark ::-webkit-scrollbar-track {
  background: rgba(20,20,20,0.50) !important;
}

/* ============================================================
   Betrieb-Switcher (Sidebar) & Betriebe-Verwaltung
   ============================================================ */

.betrieb-switcher-wrap {
  position: relative;
  margin: 4px 14px 14px;
}

.betrieb-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,167,225,0.15);
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #2D2D2D;
  cursor: pointer;
  transition: border-color 0.15s ease;
  text-align: left;
}

.betrieb-switcher:hover {
  border-color: #00a7e1;
}

.betrieb-switcher-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.betrieb-switcher-chevron {
  color: var(--hfm-anthrazit-mid);
  font-size: 11px;
}

.betrieb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: -40px;
  min-width: 230px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,167,225,0.12);
  padding: 6px;
  z-index: 1000;
}

.betrieb-dropdown-eintrag {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: #2D2D2D;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.betrieb-dropdown-eintrag:hover {
  background: rgba(0,167,225,0.06);
}

.betrieb-dropdown-eintrag.betrieb-alle {
  color: #00a7e1;
  font-weight: 600;
}

.betrieb-dropdown-eintrag.betrieb-aktiv {
  font-weight: 700;
}

.betrieb-dropdown-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--hfm-anthrazit-light);
  flex-shrink: 0;
  position: relative;
}

.betrieb-dropdown-eintrag.betrieb-aktiv .betrieb-dropdown-radio {
  border-color: #00a7e1;
}

.betrieb-dropdown-eintrag.betrieb-aktiv .betrieb-dropdown-radio::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #00a7e1;
}

.betrieb-dropdown-haken {
  margin-left: auto;
  color: #00a7e1;
  font-weight: 700;
}

.betrieb-dropdown-sep {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 4px 8px;
}

.betrieb-dropdown-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark Mode */
.dark .betrieb-switcher {
  background: rgba(45,45,45,0.85);
  border-color: rgba(0,167,225,0.25);
  color: #e8e8e8;
}

.dark .betrieb-dropdown {
  background: rgba(35,35,35,0.97);
  border-color: rgba(255,255,255,0.10);
}

.dark .betrieb-dropdown-eintrag {
  color: #e8e8e8;
}

.dark .betrieb-dropdown-eintrag:hover {
  background: rgba(0,167,225,0.12);
}

.dark .betrieb-dropdown-sep {
  background: rgba(255,255,255,0.10);
}

/* KPI-Badge "N Betriebe" (Konsolidierungsansicht) */
.kpi-betriebe-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 1px 8px;
}

.dark .kpi-betriebe-badge {
  background: rgba(255,255,255,0.08);
  color: #a0a0a0;
}

/* Pivot: Betrieb-Gruppenzeile (Konsolidierung) */
.pivot-betrieb td {
  background: rgba(0,167,225,0.14);
  font-weight: 700;
  cursor: pointer;
}

.dark .pivot-betrieb td {
  background: rgba(0,167,225,0.18);
}

.pivot-konsolidiert-header td {
  background: rgba(0,167,225,0.04);
  font-weight: 600;
  color: #00a7e1;
  border-top: 1px solid rgba(0,167,225,0.20);
  border-bottom: 1px solid rgba(0,167,225,0.20);
}

/* Legacy-Regeln-Import: Zeilenstatus in der Vorschau */
.legacy-ok td { background: rgba(16,185,129,0.07); }
.legacy-dup td { background: rgba(245,158,11,0.12); }
.legacy-rot td { background: rgba(245,51,63,0.08); }

.dark .legacy-ok td { background: rgba(16,185,129,0.12); }
.dark .legacy-dup td { background: rgba(245,158,11,0.16); }
.dark .legacy-rot td { background: rgba(245,51,63,0.14); }

/* Regel-Betriebe-Chips (zugewiesen blau, nicht zugewiesen grau) */
.regel-betrieb-chip {
  display: inline-block;
  margin: 1px 3px 1px 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.regel-betrieb-chip.chip-aktiv {
  background: rgba(0,167,225,0.10);
  color: #00a7e1;
}

.regel-betrieb-chip.chip-inaktiv {
  background: rgba(0,0,0,0.05);
  color: var(--hfm-anthrazit-light);
}

.dark .regel-betrieb-chip.chip-inaktiv {
  background: rgba(255,255,255,0.07);
  color: #808080;
}

/* Betrieb-Badge in der Transaktionstabelle */
.trans-betrieb-badge {
  display: inline-block;
  background: rgba(0,167,225,0.06);
  color: #686868;
  border-radius: 6px;
  font-size: 11px;
  padding: 2px 8px;
  white-space: nowrap;
}

.dark .trans-betrieb-badge {
  background: rgba(0,167,225,0.12);
  color: #a0a0a0;
}

/* Auge-Button im Transaktionen-Tabellenkopf */
#th-betrieb .bem-eye {
  vertical-align: middle;
  margin-left: 2px;
}

/* ============================================================
   Betrieb-Kontext: Switcher-Card, Header-Badge, Banner, Streifen
   ============================================================ */

/* Switcher-Card (ersetzt das kleine Badge) */
.betrieb-card {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(0,167,225,0.08);
  border: 1px solid rgba(0,167,225,0.25);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.betrieb-card:hover {
  border-color: #00a7e1 !important;
  background: rgba(0,167,225,0.12);
}

.betrieb-card-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #878787;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.betrieb-card-zeile {
  display: flex;
  align-items: center;
  gap: 7px;
}

.betrieb-card-name {
  flex: 1;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #2D2D2D;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.betrieb-card-chevron {
  color: #00a7e1;
  flex-shrink: 0;
}

.betrieb-card-meta {
  font-size: 11px;
  color: #878787;
  margin-top: 2px;
}

.dark .betrieb-card {
  background: rgba(0,167,225,0.12);
  border-color: rgba(0,167,225,0.35);
}

.dark .betrieb-card-name { color: #e8e8e8; }

/* Dropdown: Eintrag mit Meta-Zeile */
.betrieb-dropdown-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.betrieb-dropdown-meta {
  font-size: 11px;
  color: var(--hfm-anthrazit-mid);
  font-weight: 400;
}

/* Farbstreifen am linken Sidebar-Rand (aktiver Betrieb) */
.sidebar.betrieb-streifen::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--betrieb-farbe, #00a7e1);
  z-index: 10;
}

/* Betrieb-Badge neben den Seitentiteln */
.betrieb-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  border: 1px solid rgba(0,167,225,0.20);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* Info-Banner "Du siehst Daten für: …" */
.betrieb-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 4px 16px;
  margin: -12px 0 20px;
  background: rgba(0,167,225,0.06);
  border-bottom: 1px solid rgba(0,167,225,0.12);
  border-radius: 8px;
  font-size: 12px;
  color: #686868;
}

.betrieb-banner-link {
  color: #00a7e1;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.betrieb-banner-link:hover {
  text-decoration: underline;
}

.dark .betrieb-banner {
  background: rgba(0,167,225,0.10);
  border-bottom-color: rgba(0,167,225,0.20);
  color: #a0a0a0;
}

/* Betrieb-Switcher: Pfeil-Navigation */
.betrieb-card-pfeil {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #00a7e1;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s ease;
}

.betrieb-card-pfeil:hover {
  background: rgba(0,167,225,0.10);
}

.betrieb-card-pfeil.pfeil-deaktiviert {
  color: #b2b2b2;
  cursor: not-allowed;
}

.betrieb-card-pfeil.pfeil-deaktiviert:hover {
  background: none;
}

.betrieb-card-mitte {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  transition: opacity 150ms ease;
}

.betrieb-card-mitte.betrieb-fade {
  opacity: 0;
}

.dark .betrieb-card-pfeil.pfeil-deaktiviert {
  color: #555555;
}

/* Prognose: Konsolidierungsansicht */
.bz-prog-gesamt-ampel {
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(0,167,225,0.06);
  border: 1px solid rgba(0,167,225,0.15);
  border-radius: 10px;
  font-size: 13px;
}

.bz-prog-betrieb {
  border: 1.5px solid rgba(0,167,225,0.3);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.bz-prog-betrieb .bz-prog-kopf {
  padding: 10px 14px;
}

.bz-prog-betrieb .bz-prog-koerper {
  padding: 4px 14px 10px;
}

.sim-chip-betrieb {
  font-size: 10px;
  color: var(--hfm-anthrazit-mid);
  font-weight: 400;
}

.dark .bz-prog-gesamt-ampel {
  background: rgba(0,167,225,0.10);
  border-color: rgba(0,167,225,0.25);
}

/* Sidebar-Footer: "Powered by Heute fuer Morgen GmbH" */
.sidebar-powered {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-powered-label {
  font-size: 10px;
  color: #b2b2b2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}

.sidebar-powered-name {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #878787;
  transition: all 0.2s ease;
}

.sidebar-powered:hover .sidebar-powered-label,
.sidebar-powered:hover .sidebar-powered-name {
  color: #00a7e1;
}

/* ============================================================
   Szenarien & Plan (Prognose-Modus)
   ============================================================ */

.plan-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.plan-helfer {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(0,167,225,0.05);
  border: 1px solid rgba(0,167,225,0.15);
  border-radius: 10px;
}

.plan-helfer-label {
  font-size: 12px;
  font-weight: 600;
  color: #686868;
}

.plan-helfer-trenner {
  width: 1px;
  height: 20px;
  background: rgba(104,104,104,0.25);
  margin: 0 4px;
}

/* Tabelle */
#table-plan .plan-row { cursor: pointer; }
#table-plan .plan-row-bz > td { background: rgba(0,167,225,0.06); font-size: 14px; }
#table-plan .plan-row-hk > td { background: rgba(0,167,225,0.02); }
#table-plan .plan-row:hover > td { background: rgba(0,167,225,0.10); }

.plan-edit-hint {
  color: #b0b0b0;
  font-size: 12px;
  margin-left: 4px;
}
.plan-row-uk:hover .plan-edit-hint { color: #00a7e1; }

.plan-editor-row > td { background: rgba(0,167,225,0.03); padding: 10px 14px; }

.plan-monate {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.plan-monat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plan-monat label {
  font-size: 11px;
  font-weight: 600;
  color: #686868;
}
.plan-monat input { width: 100%; }
.plan-monat-ref { font-size: 10px; min-height: 13px; }

/* Jahressummen-Spalte (ganz rechts) */
.plan-gesamt {
  background: rgba(0,167,225,0.06);
  border-left: 2px solid rgba(0,167,225,0.15);
  border-radius: 4px;
  padding: 2px 8px;
}
.plan-gesamt label { color: #2D2D2D; font-weight: 700; }
.plan-gesamt-wert { font-weight: 700; font-size: 14px; padding: 5px 0; }

/* Dark Mode */
html.dark .plan-helfer {
  background: rgba(0,167,225,0.08);
  border-color: rgba(0,167,225,0.20);
}
html.dark #table-plan .plan-row-bz > td { background: rgba(0,167,225,0.10); }
html.dark #table-plan .plan-row-hk > td { background: rgba(0,167,225,0.05); }
html.dark .plan-editor-row > td { background: rgba(255,255,255,0.03); }

/* ===== Atlas-Mapping (Admin) ===== */
.atlas-stat-card {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.atlas-stat-zahlen { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: #2D2D2D; }
.atlas-stat-item { display: inline-flex; align-items: center; gap: 6px; }
.atlas-stat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

#admin-tab-atlas .table-scroll { overflow-x: auto; }
.atlas-table th, .atlas-table td { vertical-align: top; }
.atlas-kat-name { font-weight: 600; color: #2D2D2D; }
.atlas-kat-hk { font-size: 12px; color: #878787; }
.atlas-bz-badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: rgba(104,104,104,0.10); color: #686868;
}
.atlas-codes-cell { max-width: 340px; white-space: normal; }
.atlas-code-badge {
  display: inline-block; background: rgba(0,167,225,0.08); color: #00a7e1;
  font-size: 11px; border-radius: 4px; padding: 2px 6px; margin: 1px 0;
}
.atlas-status {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.atlas-status-best { background: rgba(39,76,38,0.12); color: #274c26; }
.atlas-status-vor  { background: rgba(199,123,0,0.12); color: #c77b00; }
.atlas-status-fehl { background: rgba(120,63,63,0.12); color: #783f3f; }
.atlas-aktionen { display: flex; gap: 6px; white-space: nowrap; }

/* Atlas Bearbeiten-Modal */
.atlas-modal-info {
  background: rgba(0,167,225,0.05); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 14px; font-size: 14px; line-height: 1.5;
}
.atlas-modal-codes {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-top: 4px;
  padding: 8px; border: 1px solid rgba(0,0,0,0.08); border-radius: 8px;
}
.atlas-code-removable { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; }
.atlas-code-removable button {
  border: none; background: none; color: #00a7e1; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0;
}
.atlas-suche-dropdown {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50; margin-top: 2px;
  background: #fff; border: 1px solid rgba(0,0,0,0.12); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 240px; overflow-y: auto;
}
.atlas-suche-item { padding: 8px 10px; cursor: pointer; font-size: 13px; }
.atlas-suche-item:hover { background: rgba(0,167,225,0.08); }
.atlas-suche-leer { padding: 10px; color: #888; font-size: 13px; }

html.dark .atlas-suche-dropdown { background: #1d2b33; border-color: rgba(255,255,255,0.12); }
html.dark .atlas-modal-info { background: rgba(0,167,225,0.10); }
html.dark .atlas-stat-zahlen { color: #e8e8e8; }

/* ============================================================
   Auswertung: Berichts-Umschalter (Liquidität / GuV)
   ============================================================ */
.bericht-umschalter { display: flex; gap: 8px; margin-bottom: 18px; }
.bericht-tab {
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 15px;
  padding: 10px 28px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.80); color: #686868;
  border: 1px solid rgba(0,0,0,0.10); transition: all 0.15s ease;
}
.bericht-tab:hover { border-color: #00a7e1; color: #00a7e1; }
.bericht-tab.active {
  background: #00a7e1; color: #fff; border-color: #00a7e1;
  box-shadow: 0 2px 12px rgba(0,167,225,0.30);
}

/* Fade beim Umschalten */
.auswertung-view { animation: guv-fade 0.15s ease; }
@keyframes guv-fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   GuV-Tabelle
   ============================================================ */
.guv-position td.pivot-name-col { font-family: 'Source Sans 3', sans-serif; font-weight: 600; }

/* Zwischenergebnis-Zeilen */
.guv-zwischen-row td {
  background: rgba(0,167,225,0.06);
  border-top: 2px solid rgba(0,167,225,0.20);
  border-bottom: 2px solid rgba(0,167,225,0.20);
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 14px;
}
.guv-zwischen-name { line-height: 1.25; }
.guv-zwischen-titel { font-weight: 700; }
.guv-zwischen-sub { font-size: 11px; font-weight: 400; color: #909090; }
.guv-zwischen-pos { color: var(--hfm-positiv); }
.guv-zwischen-neg { color: var(--hfm-negativ); }
.guv-afa-hinweis { font-size: 10px; color: #b2b2b2; font-style: italic; }

/* Abschreibungs-Zeile (n.v.) */
.guv-afa-row td { background: rgba(178,178,178,0.04); color: #b2b2b2; }
.guv-afa-row .pivot-name-col { color: #b2b2b2; }
.guv-afa-zelle { color: #b2b2b2; }

/* Jahresergebnis-Hinweis */
.guv-jahres-row td { color: #b2b2b2; font-style: italic; font-size: 12px; background: transparent; }

/* Stern-Fußnote */
.guv-fussnote { margin-top: 10px; font-size: 11px; color: #b2b2b2; font-style: italic; }

/* Info-Icon + Tooltip */
.guv-info { color: #b2b2b2; cursor: help; font-size: 13px; position: relative; }
.guv-info:hover { color: #00a7e1; }
.guv-info::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: 140%;
  transform: translateX(-50%); width: max-content; max-width: 280px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10); padding: 10px 14px;
  font-family: 'Open Sans', sans-serif; font-weight: 300; font-size: 13px;
  color: #2D2D2D; white-space: normal; text-align: left; line-height: 1.4;
  opacity: 0; visibility: hidden; transition: opacity 0.12s ease; z-index: 50;
  pointer-events: none;
}
.guv-info:hover::after { opacity: 1; visibility: visible; }

/* Atlas-Admin: GuV-Position-Dropdown */
.atlas-guv-select { font-size: 12px; padding: 4px 6px; min-width: 150px; }
.atlas-guv-select.atlas-guv-null { color: #b2b2b2; }
.atlas-guv-leer { color: #b2b2b2; font-size: 12px; }

html.dark .bericht-tab { background: rgba(255,255,255,0.06); color: #b8b8b8; border-color: rgba(255,255,255,0.12); }
html.dark .bericht-tab.active { background: #00a7e1; color: #fff; }
html.dark .guv-zwischen-row td { background: rgba(0,167,225,0.10); }
html.dark .guv-info::after { background: #1d2b33; color: #e8e8e8; border-color: rgba(255,255,255,0.12); }

/* ============================================================
   Betriebsspiegel
   ============================================================ */
.bs-toolbar { gap: 8px; align-items: center; flex-wrap: wrap; }
.bs-hinweis { color: var(--hfm-anthrazit); font-size: 14px; line-height: 1.5; }
.bs-gruppe { margin-bottom: 18px; border-radius: 12px; overflow: hidden; }
.bs-gruppe-titel {
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 14px;
  padding: 10px 14px;
}
.bs-tier { background: rgba(0,167,225,0.06); }
.bs-flaeche { background: rgba(39,76,38,0.06); }
.bs-energie { background: rgba(199,123,0,0.06); }
.bs-sonstige { background: rgba(104,104,104,0.06); }
.bs-tier .bs-gruppe-titel { background: rgba(0,167,225,0.12); color: #0a6e96; }
.bs-flaeche .bs-gruppe-titel { background: rgba(39,76,38,0.12); color: var(--hfm-positiv); }
.bs-energie .bs-gruppe-titel { background: rgba(199,123,0,0.12); color: #c77b00; }
.bs-sonstige .bs-gruppe-titel { background: rgba(104,104,104,0.12); color: var(--hfm-anthrazit); }
.bs-tabelle { background: transparent; }
.bs-tabelle th, .bs-tabelle td { padding: 8px 14px; }
.bs-aktion { display: flex; gap: 6px; }
.bs-leer { color: var(--hfm-anthrazit-light); text-align: center; padding: 14px; font-style: italic; }
.bs-summen {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 12px; background: rgba(0,167,225,0.10);
  font-weight: 600; color: var(--hfm-anthrazit-dark);
}
.bs-summen span { color: var(--hfm-anthrazit); font-weight: 400; margin-right: 6px; }
.bs-summen-hinweis { font-weight: 400; font-size: 12px; color: var(--hfm-anthrazit-light); font-style: italic; }
.bs-kennzahlen { margin-top: 4px; }

/* Betriebsspiegel: Hinweis + Betriebs-Blöcke */
.bs-alle-hinweis {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 12px;
  background: rgba(0,167,225,0.06); border: 1px solid rgba(0,167,225,0.15);
  color: var(--hfm-anthrazit); font-size: 13px;
}
.bs-alle-hinweis svg { flex-shrink: 0; color: #00a7e1; }
.bs-betrieb-block { margin-bottom: 24px; }
.bs-betrieb-titel {
  display: flex; align-items: center; gap: 9px;
  font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 17px;
  padding-bottom: 10px; margin-bottom: 16px;
}
.bs-betrieb-punkt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bs-block-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 12px;
}
.bs-block-summen {
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--hfm-anthrazit-dark);
}

/* Gesamtübersicht (KPI-Kacheln) */
.bs-gesamt-titel {
  font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 16px;
  margin-bottom: 14px;
}
.bs-gesamt-sub { font-weight: 400; font-size: 13px; color: var(--hfm-anthrazit); margin-left: 6px; }
.bs-kpi-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.bs-kpi {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(104,104,104,0.05); border: 1px solid rgba(0,0,0,0.06);
}
.bs-kpi-ic { font-size: 24px; line-height: 1; }
.bs-kpi-val { font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 20px; color: var(--hfm-anthrazit-dark); }
.bs-kpi-label { font-size: 12px; color: var(--hfm-anthrazit); }
.bs-kpi-flaeche { background: rgba(39,76,38,0.06); border-color: rgba(39,76,38,0.15); }
.bs-kpi-tier { background: rgba(0,167,225,0.06); border-color: rgba(0,167,225,0.15); }
.bs-kpi-energie { background: rgba(199,123,0,0.06); border-color: rgba(199,123,0,0.15); }

.bs-import-summary { display: flex; gap: 10px; margin-bottom: 12px; }
.bs-imp { padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.bs-imp.gruen { background: rgba(39,76,38,0.10); color: var(--hfm-positiv); }
.bs-imp.gelb { background: rgba(199,123,0,0.12); color: #c77b00; }
.bs-imp.rot { background: rgba(245,51,63,0.10); color: #d42535; }
tr.bs-imp-gruen td { background: rgba(39,76,38,0.05); }
tr.bs-imp-gelb td { background: rgba(199,123,0,0.07); }
tr.bs-imp-rot td { background: rgba(245,51,63,0.06); color: var(--hfm-anthrazit-light); }

/* ============================================================
   BZA – Betriebszweigauswertung
   ============================================================ */
.bza-hinweis {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 12px;
  background: rgba(0,167,225,0.06); border: 1px solid rgba(0,167,225,0.12);
  color: var(--hfm-anthrazit); font-size: 13px;
}
.bza-bezugsbasis { font-size: 12px; color: var(--hfm-anthrazit-mid); }
.bza-betrieb-head {
  font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 18px;
  margin: 8px 2px 12px;
}
/* Zweispaltiges Raster je Betrieb; Betrieb-Überschrift bleibt volle Breite */
.bza-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; align-items: stretch; margin-bottom: 20px;
}
@media (max-width: 1200px) { .bza-grid { grid-template-columns: 1fr; } }
.bza-block {
  margin-bottom: 0; display: flex; flex-direction: column;
}
.bza-span2 { grid-column: 1 / -1; }   /* Allgemein / lange Blöcke über volle Breite */
.bza-block-titel {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 16px;
  margin-bottom: 10px;
}
.bza-block-icon { font-size: 18px; }
.bza-block-menge { font-weight: 400; font-size: 13px; color: var(--hfm-anthrazit); }
.bza-ohne-menge { font-size: 12px; color: var(--hfm-anthrazit-mid); margin-bottom: 10px; }
.bza-gruppe-label {
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em; margin: 8px 0 1px;
}
.bza-gruppe-label.bza-erloese { color: #274c26; }
.bza-gruppe-label.bza-kosten { color: #783f3f; }
.bza-tabelle th, .bza-tabelle td { padding: 6px 12px; font-size: 13px; }
.bza-tabelle th { font-size: 11px; }
.bza-tabelle.bza-erloese td.text-right { color: #274c26; }
.bza-tabelle.bza-kosten td.text-right { color: #783f3f; }
.bza-je { font-weight: 600; }
.bza-leer { color: var(--hfm-anthrazit-light); }
.bza-saldo {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: auto; padding: 10px 14px; border-radius: 12px;
  background: rgba(0,167,225,0.06);
  border-top: 2px solid rgba(0,167,225,0.20); border-bottom: 2px solid rgba(0,167,225,0.20);
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 14px;
}
.bza-saldo.bza-pos { color: var(--hfm-positiv); }
.bza-saldo.bza-neg { color: var(--hfm-negativ); }
.bza-saldo-werte { display: flex; gap: 14px; align-items: baseline; }

/* ============================================================
   LOGIN-SEITE & Sichtbarkeit App / Login
   ============================================================ */

/* Sichtbarkeitsstatus über Body-Klasse (in auth.js gesetzt):
   auth-checking = noch nichts zeigen, show-login = Login, show-app = App */
body.auth-checking .app-layout,
body.show-login .app-layout { display: none; }

#login-overlay { display: none; }
body.show-login #login-overlay { display: flex; }

#login-overlay {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(0,167,225,0.10) 0%, transparent 55%),
    linear-gradient(135deg, #cdd0d4 0%, #bdc1c6 50%, #cdd0d4 100%);
}

.login-card {
  width: 100%;
  max-width: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 36px 28px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Rotierendes HfM-Symbol: 9s langsame Drehung um die senkrechte Achse
   (3D, wie eine Münze) mit kurzem Stopp */
.login-symbol-wrap {
  margin-bottom: 18px;
  perspective: 700px;
}

.login-symbol {
  width: 168px;
  height: 168px;
  display: block;
  animation: hfm-dreh 9s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: visible;
}

@keyframes hfm-dreh {
  0%   { transform: rotateY(0deg); }
  78%  { transform: rotateY(360deg); }
  100% { transform: rotateY(360deg); }  /* kurzer Stopp */
}

@media (prefers-reduced-motion: reduce) {
  .login-symbol { animation: none; }
}

.login-titel {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--hfm-anthrazit);   /* Grau wie das Symbol, nicht blau */
}

.login-untertitel {
  font-size: 13px;
  font-weight: 300;
  color: var(--hfm-anthrazit-mid);
  margin: 4px 0 26px;
}

.login-label {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--hfm-anthrazit-mid);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--hfm-anthrazit-pale);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.85);
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: var(--hfm-anthrazit-dark);
  transition: var(--transition);
}

.login-input:focus {
  outline: none;
  border-color: var(--hfm-analytics-blue);
  box-shadow: 0 0 0 3px rgba(0,167,225,0.15);
}

.login-fehler {
  width: 100%;
  min-height: 18px;
  font-size: 12.5px;
  color: var(--hfm-red);
  text-align: left;
  margin: -6px 0 12px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--hfm-analytics-blue);
  color: var(--hfm-white);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.login-btn:hover { background: #0093c7; }
.login-btn:disabled { opacity: 0.6; cursor: default; }
.login-btn.lädt { opacity: 0.7; cursor: progress; }

.login-vergessen {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--hfm-analytics-blue);
  text-decoration: none;
}
.login-vergessen:hover { text-decoration: underline; }

.login-trenner {
  width: 100%;
  height: 1px;
  margin: 22px 0 16px;
  background: var(--hfm-anthrazit-pale);
}

.login-powered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.login-powered-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hfm-anthrazit-light);
}
.login-powered-name {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hfm-anthrazit-mid);
  text-decoration: none;
}
a.login-powered-name:hover { color: var(--hfm-analytics-blue); }

/* Sidebar: User + Abmelden */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.sidebar-user-icon { font-size: 14px; }
.sidebar-user-name {
  font-weight: 600;
  color: var(--hfm-anthrazit-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.sidebar-logout {
  font-size: 11.5px;
  color: var(--hfm-anthrazit-mid);
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-logout:hover { color: var(--hfm-analytics-blue); text-decoration: underline; }

/* Dark Mode */
html.dark #login-overlay {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(0,167,225,0.08) 0%, transparent 55%),
    linear-gradient(135deg, #1a1a1a 0%, #212121 50%, #1a1a1a 100%);
}
html.dark .login-card {
  background: rgba(40,40,40,0.7);
  border: 1px solid rgba(255,255,255,0.10);
}
html.dark .login-titel { color: #f0f0f0; }
html.dark .login-untertitel { color: var(--hfm-anthrazit-light); }
html.dark .login-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #e8e8e8;
}
html.dark .login-symbol { filter: brightness(1.6) contrast(1.1); }
html.dark .sidebar-user-name { color: #e8e8e8; }
html.dark .login-trenner { background: rgba(255,255,255,0.12); }
html.dark .login-powered-name { color: var(--hfm-anthrazit-light); }
