
:root {
  --red: #B11F24;
  --red-dark: #8C1418;
  --gold: #FFC600;
  --mittelgrau: #A09F9F;
  --mittelrot: #B93C3C;
  --hellrot: #D75A5A;
  --mati: #00ABE4;
  --dunkelgrau: #808080;
  --hellgrau: #E6E7E8;
  --ink: #414042;
  --ink-soft: #6B6A68;
  --line: #E6E7E8;
  --line-soft: #F1F1F0;
  --surface: #FFFFFF;
  --panel: #FAFAF9;
  --panel-2: #F4F4F3;
  --teal: #0F6E56;
  --teal-bg: #E7F3EF;
  --amber: #8A5A0B;
  --amber-bg: #FBF1DE;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--panel-2);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.app { display:flex; flex-direction:column; height:100vh; }

/* Kopfzeile */
header.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display:flex; align-items:center; justify-content:space-between;
  position: sticky; top:0; z-index:50;
}
.brand { display:flex; align-items:center; gap:12px; position:relative; z-index:1; }
.brand svg { height: 28px; width:auto; display:block; }
.brand .title { font-size:15px; font-weight:600; color:var(--ink); letter-spacing:.01em; }
/* Wolken-Logo vor dem Titel öffnet das Info-Fenster */
.info-btn { border:0; background:none; padding:0; margin:0 8px 0 0; cursor:pointer; border-radius:4px;
  display:inline-flex; vertical-align:middle; }
.info-btn:focus-visible { outline:2px solid var(--mati); outline-offset:2px; }
.info-dialog { width:min(440px, calc(100vw - 32px)); padding:18px 20px 14px; border:1px solid var(--line); border-radius:10px;
  color:var(--ink); font-size:13px; line-height:1.45; }
.info-dialog::backdrop { background:rgba(30,30,30,.35); }
.info-kopf { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.info-kopf img { height:30px; width:auto; }
.info-kopf > div { flex:1; }
.info-kopf h2 { font-size:15px; margin:0; }
.info-version { font-size:11px; font-weight:600; color:var(--red); border:1px solid currentColor; border-radius:4px; padding:0 5px; }
.info-zu { border:0; background:none; font-size:16px; color:var(--ink-soft); cursor:pointer; align-self:flex-start; }
.info-dialog h3 { font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-soft); margin:12px 0 2px; }
.info-dialog p { margin:0 0 4px; }
.info-hinweis { margin-top:12px !important; font-size:12px; color:var(--ink-soft); }
.info-fuss { margin-top:12px; padding-top:8px; border-top:1px solid var(--line); font-size:11.5px; color:var(--ink-soft); }
.brand .version { font-size:11px; font-weight:600; color:var(--red); border:1px solid currentColor; border-radius:4px; padding:0 5px; margin-left:6px; vertical-align:2px; }
.brand .sub { font-size:10.5px; color:var(--ink-soft); margin-top:1px; }
.brand .title { display:flex; align-items:center; }
.brand .title-icon { height:22px; width:auto; display:block; }
.brand .sub-sep { color:var(--line); margin:0 4px; }
/* Skyline unter dem Logo: Hauptbild rechts fest, links füllt die Verlängerung
   (wiederholt, rechtsbündig) die restliche Breite. Höhe der Verlängerung = 11/71
   der Haupthöhe, damit die Graslinie in beiden Bildern gleich dick ist. */
.skyline {
  --sky-h: clamp(32px, 2.6vw, 56px);
  /* nach oben ziehen: der leere Himmel des Bildes liegt hinter der Logo-Zeile */
  width: calc(100% + 56px); margin: calc(-12px - var(--sky-h) * 0.55) -28px 0;
  position:relative; z-index:0; pointer-events:none;
  display:flex; align-items:flex-end; height: var(--sky-h);
}
.skyline-main { height:100%; width:auto; display:block; flex:none; }
.skyline-ext {
  flex:1; min-width:0; height: calc(var(--sky-h) * 11 / 71);
  background: url("../img/skyline_verl%C3%A4ngerung.png") repeat-x right bottom / auto 100%;
}
/* Navigation der Eingabebereiche */
header.topbar { flex-wrap:wrap; row-gap:12px; padding-bottom:0; }
.topnav { display:flex; padding:0 6px; background:var(--panel-2); border-bottom:1px solid var(--line); }
/* gleich breite Bereichs-Tabs: Icon über Kurztext, alle sechs passen ab ca. 300 px */
.tn-zelle { position:relative; flex:1 1 0; min-width:0; display:flex; }
.topnav-tab {
  flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:8px 2px 7px; background:none; border:none; border-bottom:2px solid transparent;
  font:inherit; color:var(--ink-soft); cursor:pointer;
}
.topnav-tab:hover:not(.active) { color:var(--ink); background:var(--line); }
.topnav-tab:focus-visible { outline:2px solid var(--mati); outline-offset:-2px; }
.topnav-tab.active { color:var(--ink); background:var(--surface); border-bottom-color:var(--red); }
.topnav-tab.active .tn-icon { color:var(--red); }
.tn-label { max-width:100%; font-size:11px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-titel { font-size:15px; font-weight:600; color:var(--ink); margin-bottom:14px; display:flex; flex-direction:column; }
.sidebar-kopf { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.btn-icon { width:36px; height:36px; padding:0; display:inline-flex; align-items:center; justify-content:center; flex:none; }
.btn-icon svg { flex:none; width:18px; height:18px; }
.btn-icon.dreht svg { animation:dreht 1s linear infinite; }
@keyframes dreht { to { transform:rotate(360deg); } }
.sidebar-titel span { font-size:11.5px; font-weight:400; color:var(--ink-soft); margin-top:2px; }

/* Layout */
.layout { display:flex; flex:1; min-height:0; }
/* Linke Spalte: Szenario-Leiste, Bereichs-Tabs und Eingaben, eigene Scrollfläche */
.links {
  width: 570px; flex-shrink:0;
  display:flex; flex-direction:column; min-height:0;
  background: var(--surface);
}
.sidebar {
  flex:1; min-height:0;
  overflow-y: auto;
  padding: 18px 18px 90px 18px;
}
.layout.sb-anim .links { transition: width .2s ease, min-width .2s ease; }
.layout.sidebar-zu .links { width:0 !important; min-width:0; overflow:hidden; }
.layout.sidebar-zu .links > * { visibility:hidden; }
.layout.sidebar-zu .sb-toggle { left:4px; transform:none; }
/* Aus-/Einblenden oben auf der Trennlinie */
.sb-toggle { position:absolute; top:10px; left:50%; z-index:5; transform:translateX(-50%);
  display:flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0;
  color:var(--ink-soft); background:var(--surface); border:1px solid var(--line); border-radius:50%; cursor:pointer; }
.sb-toggle:hover { color:var(--ink); border-color:var(--dunkelgrau); }
.sb-toggle:focus-visible { outline:2px solid var(--mati); outline-offset:1px; }
.sb-toggle svg { transition:transform .2s; }
.sb-toggle[aria-expanded="false"] svg { transform:scaleX(-1); }
.sidebar-resizer {
  width: 8px; flex-shrink:0;
  background: transparent;
  position: relative;
}
.sidebar-resizer::after {
  content: '';
  position: absolute; top:0; bottom:0; left:3px; width:2px;
  background: var(--line);
}
.content {
  flex:1; min-width:0;
  padding: 24px 32px 60px 32px;
  overflow-y:auto;
}

/* Sidebar-Bereiche */
.tabs { display:flex; gap:2px; background:var(--panel-2); border-radius:8px; padding:3px; margin-bottom:18px; }
.tab {
  flex:1; text-align:center; padding:7px 4px; font-size:11.5px; font-weight:600;
  color:var(--ink-soft); border-radius:6px; cursor:pointer; user-select:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tab.active { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.panel { display:none; }
.panel.active { display:block; }

/* Formularelemente */
.field-group { margin-bottom: 16px; }
.field-group-title {
  font-size: 11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color: var(--ink-soft); margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid var(--line-soft);
}
.field { margin-bottom: 10px; }
.field label {
  display:block; font-size:12px; font-weight:500; color:var(--ink); margin-bottom:3px;
}
/* Hinweistexte (.hint, .help-text, .batt-hint) */
.hint, .help-text, .batt-hint { font-size:10.5px; font-weight:400; color:var(--ink-soft); line-height:1.45; margin-top:2px; }
.field input[type=text], .field input[type=number], .field select {
  width:100%; padding:7px 9px; font-size:13px; font-family:var(--font);
  border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink);
}
.field input:focus, .field select:focus { outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(177,31,36,.1); }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }

.checkbox-row { display:flex; align-items:center; gap:8px; padding:8px 0; cursor:pointer; }
.checkbox-row input[type=checkbox] { width:16px; height:16px; accent-color:var(--red); cursor:pointer; }
.checkbox-row .cb-label { font-size:13px; font-weight:500; cursor:pointer; }
.checkbox-row .cb-desc { font-size:11px; color:var(--ink-soft); }

.mode-pills { display:flex; gap:6px; margin-bottom:4px; }
.mode-pill {
  flex:1; text-align:center; padding:9px 6px; border:1px solid var(--line); border-radius:7px;
  font-size:12px; font-weight:600; cursor:pointer; color:var(--ink-soft); background:var(--surface);
}
.mode-pill.active { border-color:var(--red); background:#FDEEEE; color:var(--red-dark); }

.upload-box {
  border: 1.5px dashed var(--line); border-radius:8px; padding:16px; text-align:center;
  cursor:pointer; background:var(--panel); transition: border-color .15s;
}
.upload-box:hover { border-color:var(--red); }
.upload-box.has-file { border-style:solid; border-color:var(--teal); background:var(--teal-bg); }
.upload-box .label { font-size:12.5px; font-weight:600; }
.upload-box .filename { font-size:11px; color:var(--ink-soft); margin-top:4px; word-break:break-all; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 18px; border-radius:7px; font-size:13.5px; font-weight:600;
  border:none; cursor:pointer; transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background:var(--red); color:#fff; }
.btn-primary:hover { background:var(--red-dark); }
.btn-primary:disabled { background:#D8B8B9; cursor:not-allowed; }
.btn-secondary { background:var(--panel-2); color:var(--ink); border:1px solid var(--line); }
.btn-secondary:hover { background:var(--line-soft); }
.btn-block { width:100%; }
.btn-sm { padding:6px 12px; font-size:12px; }

/* KPI-Karten */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px,1fr)); gap:12px; margin-bottom:22px; }
.kpi-card {
  background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px 16px;
}
.kpi-card .kpi-label { font-size:11px; color:var(--ink-soft); font-weight:600; text-transform:uppercase; letter-spacing:.03em; margin-bottom:6px; }
.kpi-card .kpi-value { font-size:22px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.kpi-card .kpi-value.sum { color:var(--red); font-weight:800; }
.kpi-card .kpi-unit { font-size:12px; color:var(--ink-soft); font-weight:500; margin-left:3px; }

.section-title {
  font-size:16px; font-weight:700; color:var(--ink); margin: 26px 0 12px 0;
  display:flex; align-items:center; gap:8px;
}
.section-title .badge {
  font-size:10.5px; font-weight:700; color:var(--red); background:#FDEEEE;
  padding:2px 8px; border-radius:99px; text-transform:uppercase; letter-spacing:.03em;
}

table.data-table { width:100%; border-collapse:collapse; font-size:12.5px; background:var(--surface); border-radius:8px; overflow:hidden; border:1px solid var(--line); }
table.data-table th { background:var(--panel-2); text-align:right; padding:9px 12px; font-weight:600; color:var(--ink-soft); font-size:11px; text-transform:uppercase; letter-spacing:.02em; border-bottom:1px solid var(--line); }
table.data-table th:first-child { text-align:left; }
table.data-table td { text-align:right; padding:8px 12px; border-bottom:1px solid var(--line-soft); font-variant-numeric:tabular-nums; }
table.data-table td:first-child { text-align:left; font-weight:500; }
table.data-table tr:last-child td { border-bottom:none; }
table.data-table tr.total-row td { font-weight:800; color:var(--red); border-top:2px solid var(--line); background:#FDF7F7; }
table.data-table tr:hover td { background: var(--panel); }
table.data-table tr.total-row:hover td { background:#FBEDED; }

.empty-state {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding: 80px 20px; text-align:center; color:var(--ink-soft);
}
.empty-state .icon { font-size:40px; margin-bottom:14px; opacity:.5; }
.empty-state h3 { font-size:16px; color:var(--ink); margin:0 0 6px 0; }
.empty-state p { font-size:13px; max-width:360px; margin:0; }

/* SOC-Zonen als Batterie (SVG) */
.batt-preview { margin-top:12px; padding:8px 12px; text-align:left; max-width:780px; width:100%; }
/* weißer Hintergrund nur im PNG-Export */
#soc-batterie-svg .batt-bg { fill:transparent; }
.batt-preview .chart-card-header { margin-bottom:8px; }

.progress-wrap { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:24px; margin-bottom:20px; }
.progress-bar-bg { height:8px; background:var(--line-soft); border-radius:99px; overflow:hidden; margin:10px 0; }
.progress-bar-fill { height:100%; background:var(--red); border-radius:99px; transition:width .25s; }
.progress-label { font-size:13px; font-weight:600; display:flex; justify-content:space-between; }

.chart-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:18px; }
.chart-card .chart-title { font-size:13px; font-weight:700; margin-bottom:10px; color:var(--ink); }

.tag { display:inline-block; font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:99px; }

.error-box { background:#FDEEEE; border:1px solid #F0C7C7; color:var(--red-dark); padding:12px 14px; border-radius:8px; font-size:12.5px; margin-bottom:14px; }

.export-bar { display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap; }

@media (max-width: 900px) {
  .layout { flex-direction:column; }
  .sidebar { width:100%; border-right:none; border-bottom:1px solid var(--line); }
}

/* Diagramme */
.period-selector {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--panel); border:1px solid var(--line); border-radius:8px;
  padding:10px 14px; margin-bottom:14px;
}
.period-selector .seg-group { display:flex; gap:2px; background:var(--panel-2); border-radius:6px; padding:2px; }
.period-selector .seg { padding:5px 12px; font-size:11.5px; font-weight:600; border-radius:5px; cursor:pointer; color:var(--ink-soft); }
.period-selector .seg.active { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.period-selector input[type=date] { padding:5px 8px; font-size:12px; border:1px solid var(--line); border-radius:5px; }
.period-selector label { font-size:11.5px; color:var(--ink-soft); font-weight:600; }

.plotly-chart { width:100%; }
.tab-modus { display:flex; gap:6px; margin-bottom:16px; }
.tab-modus .pill { padding:7px 16px; border-radius:7px; font-size:12.5px; font-weight:600; cursor:pointer; border:1px solid var(--line); color:var(--ink-soft); background:var(--surface); }
.tab-modus .pill.active { border-color:var(--red); background:#FDEEEE; color:var(--red-dark); }

.subsection-title { font-size:13px; font-weight:700; color:var(--ink); margin:18px 0 8px 0; }

/* Energiefluss-Tabelle */
.flow-table {
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:4px 0; margin-bottom:16px; font-size:13px;
}
.flow-row {
  display:flex; align-items:center; padding:7px 16px; gap:10px;
  border-bottom:1px solid var(--line-soft);
}
.flow-row:last-child { border-bottom:none; }
.flow-row.flow-total { font-weight:700; background:var(--panel-2); }
.flow-from { width:80px; font-weight:600; color:var(--ink-soft); font-size:12px; }
.flow-arrow { color:var(--red); font-size:14px; flex-shrink:0; }
.flow-to { flex:1; color:var(--ink); }
.flow-val { font-variant-numeric:tabular-nums; font-weight:600; color:var(--ink); text-align:right; min-width:120px; }

/* Wirtschaftlichkeit */
.wirt-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:14px; margin-bottom:20px;
}
.wirt-block { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px; }
.wirt-block-total { border-color:var(--red); background:#FDF7F7; }
.wirt-title { font-size:12.5px; font-weight:700; color:var(--ink); margin-bottom:10px; text-transform:uppercase; letter-spacing:.02em; }

/* Diagrammkopf mit PNG-Button */
.chart-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.btn-png {
  font-size:11px; padding:3px 9px; border:1px solid var(--line);
  border-radius:5px; background:var(--panel-2); color:var(--ink-soft);
  cursor:pointer; white-space:nowrap;
}
.btn-png:hover { background:var(--line); }

/* Zwischenüberschrift */
.subsection-title {
  font-size:12.5px; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; color:var(--ink-soft);
  margin:16px 0 8px 0;
}

/* Cashflow-Tabelle (quer) */
.cf-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.cf-table th, .cf-table td { white-space: nowrap; text-align: right; padding: 4px 10px; }
.cf-table .cf-label { position: sticky; left: 0; z-index: 1; text-align: left;
  background: var(--bg-card, var(--bg, #fff)); font-weight: 600; min-width: 220px; white-space: normal; }
.cf-table .cf-zeitraum td { font-size: 0.75em; opacity: 0.7; line-height: 1.2; }
.cf-table .cf-neg { color: #c0392b; }
.cf-gliederung td.cf-label { white-space: nowrap; }
.cf-gliederung .cf-logik { text-align: left; font-size: 0.8em; opacity: 0.8; }
.cf-gliederung tr.cf-summe td { font-weight: 700; text-decoration: underline;
  padding-top: 14px; border-top: 2px solid var(--border, #ccc); }
.cf-gliederung tr.cf-gruppe td { font-weight: 600; padding-top: 8px; }
.cf-gliederung tr.cf-posten td.cf-label { padding-left: 22px; }
.cf-gliederung tr.cf-info td { font-style: italic; opacity: 0.55; }
.cf-gliederung tr.cf-info td.cf-label { padding-left: 22px; }
.cf-gliederung tr.cf-fett td { font-weight: 700; }
/* Summenzeilen hellgrau hinterlegt, auch die fixierte erste Spalte */
.cf-gliederung tr.cf-summe td, .cf-gliederung tr.cf-gruppe td { background: #EDEDED; }
.cf-gliederung tr.cf-gesamt td { background: #D9D9D9; }
.cf-gliederung thead tr:first-child th { background: #BFBFBF; }
.cf-table tr.cf-linie td { border-bottom: 3px solid var(--text, #333); }
.cf-table tr.cf-soh td { font-weight: 700; color: #c0392b; }

/* Projekt / Schaltschema */
.ok-box { background:var(--teal-bg); color:var(--teal); border:1px solid #BFE0D5; border-radius:8px; padding:8px 12px; font-size:12.5px; margin-top:8px; }
.projektbild-mini { max-width:100%; max-height:120px; border-radius:6px; display:block; margin:0 auto; }
.projekt-view { display:flex; flex-direction:column; gap:16px; }
.projekt-view .card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.projekt-view .card-title { font-size:13px; font-weight:600; margin-bottom:10px; color:var(--ink); }
.projekt-kopf { display:flex; gap:18px; align-items:stretch; flex-wrap:wrap; }
.pk-bild { width:260px; height:190px; border-radius:10px; background:var(--panel-2); display:flex; align-items:center; justify-content:center; overflow:hidden; color:var(--ink-soft); font-size:12px; flex-shrink:0; }
.pk-bild img { width:100%; height:100%; object-fit:cover; }
.pk-daten { flex:1; min-width:240px; }
.pk-titel-zeile { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.pk-titel { font-size:20px; font-weight:600; }
/* Standort rechts im Projektkopf, so groß wie das Projektbild */
.pk-sub { color:var(--ink-soft); font-size:12.5px; margin:2px 0 12px; }
.pk-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:6px 18px; }
.pk-row { display:flex; justify-content:space-between; gap:8px; font-size:12.5px; border-bottom:1px solid var(--line-soft); padding:4px 0; }
.pk-row span { color:var(--ink-soft); }
.schaltschema { overflow-x:auto; }
.schaltschema svg { display:block; margin:0 auto; font-family:var(--font); }
.sch-line { stroke:var(--ink); stroke-width:2; fill:none; }
.sch-dot { fill:var(--ink); }
.sch-box { fill:var(--surface); stroke:var(--line); stroke-width:1.5; }
.sch-ic { fill:none; stroke:var(--ink); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.sch-ic-txt { fill:var(--ink); stroke:none; font-size:10px; font-weight:700; text-anchor:middle; }
.sch-label { fill:var(--ink); font-size:11.5px; font-weight:600; text-anchor:middle; }
.sch-sub { fill:var(--ink-soft); font-size:10.5px; text-anchor:middle; }
.sch-arrow { fill:var(--mati); stroke:none; }
.sch-flow { stroke:var(--mati); stroke-width:2; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.projekt-liste { width:100%; border-collapse:collapse; font-size:12.5px; }
.projekt-liste th { text-align:left; color:var(--ink-soft); font-weight:600; border-bottom:1px solid var(--line); padding:6px 8px; }
.projekt-liste td { border-bottom:1px solid var(--line-soft); padding:6px 8px; }
.projekt-liste tr.aktiv td { background:var(--teal-bg); }
/* Tabs bei schmaler Sidebar umbrechen */
.tabs { flex-wrap:wrap; }
.tab { flex:1 0 auto; padding:7px 8px; }

.projekt-karte { height:340px; border-radius:10px; overflow:hidden; background:var(--panel-2); position:relative; z-index:0; }
.karte-leer { display:flex; align-items:center; justify-content:center; height:100%; color:var(--ink-soft); font-size:12.5px; padding:0 16px; text-align:center; }

.topnav-tab:disabled { opacity:.45; cursor:not-allowed; background:none; }
.topnav-run .tn-icon { color:var(--teal); }
.topnav-run.active { border-bottom-color:var(--teal); }
.topnav-run.active .tn-icon { color:var(--teal); }
.run-row { display:flex; justify-content:space-between; gap:10px; font-size:12.5px; padding:5px 0; border-bottom:1px solid var(--line-soft); }
.run-row span { color:var(--ink-soft); white-space:nowrap; }
.run-row b { font-weight:600; text-align:right; }

/* Szenarien */
.sz-leiste { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:16px; }
.sz-zeile { display:flex; gap:6px; align-items:center; }
.sz-zeile select { flex:1; min-width:0; }
.sz-aktionen { margin-top:8px; gap:14px; font-size:12px; }
.sz-aktionen a { color:var(--mati); text-decoration:none; }
.sz-aktionen a:hover { text-decoration:underline; }
.sz-status { margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
.sz-badge { font-size:10.5px; font-weight:600; padding:2px 8px; border-radius:10px; white-space:nowrap; }
.sz-aktuell { background:var(--teal-bg); color:var(--teal); }
.sz-veraltet { background:var(--amber-bg); color:var(--amber); }
.sz-keins { background:var(--panel-2); color:var(--ink-soft); }
.sz-ungespeichert { background:#FDEEEE; color:var(--red-dark); }
.vgl-kopf { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; margin-bottom:10px; }
.vgl-auswahl { display:flex; flex-wrap:wrap; gap:6px 16px; }
.sz-check { display:flex; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; }
/* eigene Scrollfläche: Kopfzeile und die Spalten Kennwert/Einheit bleiben stehen (wie "Fenster fixieren") */
.vgl-scroll { overflow:auto; max-height:calc(100vh - 230px); border:1px solid var(--line); border-radius:8px; }
.vgl-tabelle { width:100%; background:#fff; border-collapse:separate; border-spacing:0; font-size:12.5px; }
.vgl-tabelle th { text-align:right; padding:6px 10px; border-bottom:2px solid var(--line); white-space:nowrap;
  position:sticky; top:0; z-index:2; background:#5F6873; color:#fff; }
.vgl-tabelle tr:not(.vgl-gruppe) td:first-child, .vgl-tabelle th:first-child { position:sticky; left:0; z-index:1;
  background:#E6E8EB; width:230px; min-width:230px; max-width:230px; }
.vgl-tabelle tr:not(.vgl-gruppe) td:nth-child(2), .vgl-tabelle th:nth-child(2) { position:sticky; left:230px; z-index:1; background:#E6E8EB;
  min-width:80px; box-shadow:inset -1px 0 0 var(--line); }
.vgl-tabelle th:first-child, .vgl-tabelle th:nth-child(2) { z-index:3; background:#5F6873; }
.vgl-tabelle tr.vgl-gruppe td { background:#9AA2AC; color:#fff; border-bottom:1px solid #7F8892; }
.vgl-tabelle tr.vgl-gruppe td > span { position:sticky; left:10px; }
.vgl-tabelle th:first-child, .vgl-tabelle th:nth-child(2) { text-align:left; }
.vgl-tabelle td { padding:4px 10px; border-bottom:1px solid var(--line-soft); }
.vgl-einheit { color:var(--ink-soft); white-space:nowrap; }
.vgl-wert { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.vgl-gruppe td { font-weight:700; font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; padding-top:8px; }

.vgl-tabelle tr.vgl-trenner td { border-bottom:2.5px solid var(--ink-soft); }
/* Kernkennwerte im Vergleich: fett/rot */
.vgl-tabelle tr.vgl-hervor td { color:#B11F24; font-weight:700; }
.vgl-tabelle tr.vgl-rot td { color:#FF0000; }
.vgl-tabelle tr.vgl-fett td { font-weight:700; }


.lg-dot { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:8px; vertical-align:middle; }

/* Anlagengrafik */
.anlage-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px,1fr)); gap:16px; }
.anlage-summe { font-size:12.5px; color:var(--ink-soft); margin:-4px 0 12px; }
.anlage-kachel.anlage-rest { display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:var(--ink-soft); min-height:66px; }

/* Menü "Datei" */
.topbar-links { display:flex; align-items:center; gap:18px; }
.datei-menu { position:relative; }
.datei-button { display:flex; align-items:center; justify-content:center; width:30px; height:30px; flex:none;
  padding:0; color:var(--ink); background:none; border:none; border-radius:6px; cursor:pointer; }
.datei-button:hover, .datei-button[aria-expanded="true"] { background:var(--panel-2); }

/* Szenario-Leiste: Umschalter für die Variante, Vergleich abgesetzt rechts */
.sz-bar { padding:10px 12px; display:flex; align-items:flex-start; gap:8px; border-bottom:1px solid var(--line); }
.sz-tabs { position:relative; display:flex; align-items:flex-start; gap:8px; min-width:0; flex:1; }
.sz-seg { display:flex; flex:none; gap:2px; padding:2px; min-width:0;
  background:var(--panel-2); border:1px solid var(--line); border-radius:7px; }
.sz-tab, .sz-seg-plus { display:flex; align-items:center; gap:6px; height:24px; padding:0 12px;
  font:inherit; font-size:12.5px; color:var(--ink-soft); background:none; border:none; border-radius:5px;
  cursor:pointer; white-space:nowrap; }
.sz-tab, .sz-seg-mehr { max-width:180px; overflow:hidden; text-overflow:ellipsis; }
.sz-seg-plus { padding:0 8px; }
.sz-seg-mehr { display:flex; align-items:center; height:24px; padding:0 9px; font:inherit; font-size:12px; font-weight:600;
  color:var(--ink-soft); background:none; border:none; border-radius:5px; cursor:pointer; white-space:nowrap; }
.sz-seg-mehr[aria-expanded="true"] { color:var(--ink); background:var(--line); }
.sz-tab[hidden], .sz-seg-mehr[hidden] { display:none; }
.sz-tab:hover:not(.active), .sz-seg-plus:hover, .sz-seg-mehr:hover { color:var(--ink); background:var(--line); }
.sz-menu { position:absolute; top:calc(100% + 4px); left:0; z-index:200; width:260px; padding:4px;
  background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.14); }
.sz-menu-suche { width:100%; box-sizing:border-box; margin:0 0 4px; padding:6px 8px; font:inherit; font-size:12.5px;
  border:1px solid var(--line); border-radius:5px; }
.sz-menu-liste { max-height:320px; overflow-y:auto; }
.sz-menu-eintrag { display:flex; justify-content:space-between; gap:12px; width:100%; padding:7px 10px; border:none;
  background:none; font:inherit; font-size:12.5px; color:var(--ink); text-align:left; border-radius:5px; cursor:pointer; }
.sz-menu-eintrag[hidden] { display:none; }
.sz-menu-eintrag span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sz-menu-eintrag:hover, .sz-menu-eintrag:focus { background:var(--panel-2); outline:none; }
.sz-menu-eintrag.aktiv { font-weight:600; }
.sz-menu-eintrag .hint { flex:none; font-weight:400; }
.sz-tab.active { color:var(--ink); font-weight:600; background:var(--surface); box-shadow:0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.06); }
.sz-tab-punkt { color:var(--red); font-size:9px; }
.sz-vgl { display:flex; align-items:center; gap:6px; height:30px; padding:0 10px; margin-left:auto; flex:none;
  font:inherit; font-size:12.5px; color:var(--ink); background:none; border:1px solid var(--line); border-radius:7px; cursor:pointer; }
.sz-vgl:hover:not(:disabled) { background:var(--panel-2); }
.sz-vgl.active { color:var(--red-dark); border-color:var(--red); background:#FDEEEE; font-weight:600; }
.sz-vgl:disabled { color:var(--ink-soft); opacity:.55; cursor:default; }
.sz-vgl.kompakt { padding:0 8px; }
.sz-vgl.kompakt span { display:none; }
.sz-tab:focus-visible, .sz-seg-plus:focus-visible, .sz-seg-mehr:focus-visible, .sz-vgl:focus-visible, .datei-button:focus-visible { outline:2px solid var(--mati); outline-offset:1px; }
.datei-dropdown { position:absolute; top:calc(100% + 4px); left:0; z-index:200; min-width:290px; padding:4px;
  background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.14); }
.datei-eintrag { display:flex; justify-content:space-between; gap:24px; width:100%; padding:8px 12px; border:none;
  background:none; font:inherit; font-size:13px; color:var(--ink); text-align:left; border-radius:5px; cursor:pointer; }
.datei-eintrag:hover, .datei-eintrag:focus { background:var(--panel-2); outline:none; }
.datei-kuerzel { color:var(--ink-soft); font-size:11.5px; }
.datei-trenner { height:1px; background:var(--line); margin:4px 2px; }
.datei-status { flex:none; padding:6px 14px; border-top:1px solid var(--line); background:var(--panel-2);
  font-size:12px; color:var(--ink-soft); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.datei-punkt { color:var(--red); margin-right:4px; }
.beendet { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; text-align:center; padding:16px; color:var(--ink); }
.beendet h2 { margin:14px 0 0; font-size:20px; }
.beendet p { margin:0 0 12px; color:var(--ink-soft); }

/* Speichern-Symbol in der Kopfzeile */
/* Speichern-Symbol als kleines Abzeichen oben rechts am Tab */
.topnav-save { position:absolute; top:3px; right:3px; display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; padding:0; border:1px solid var(--line); border-radius:5px;
  background:var(--surface); color:var(--red); cursor:pointer; }
.topnav-save svg { width:12px; height:12px; }
.topnav-save:hover:not(:disabled) { color:var(--red); border-color:var(--red); }
.topnav-save:disabled { opacity:.35; cursor:not-allowed; }

/* PV-Teilanlagen */
.pva-block { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface); }
.pva-kopf { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.wr-zeile { display: grid; grid-template-columns: 1fr 72px 56px 28px; gap: 4px; align-items: center; margin-bottom: 4px; }
.wr-zeile input { min-width: 0; }
.wr-titel { font-size: 0.75em; opacity: 0.7; margin-bottom: 2px; }
.wr-fuss { display: flex; gap: 8px; align-items: center; }

/* Betreiberstrategie: Karten und Zonenbalken */
.af-karte { border: 1px solid #ddd; border-left: 4px solid #ddd; border-radius: 6px; margin-bottom: 8px; background: #fff; }
.af-karte.aktiv { border-left-color: var(--af-farbe); }
.af-karte-kopf { padding: 6px 8px; margin: 0; }
.af-karte-inhalt { padding: 4px 10px 8px 12px; border-top: 1px dashed #e3e3e3; }
.soc-balken { display: flex; height: 22px; border: 1px solid #ccc; border-radius: 4px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 4px, #f0f0f0 4px, #f0f0f0 8px); }
.soc-balken-teil { height: 100%; }
.soc-balken-legende { margin-top: 6px; font-size: 12px; line-height: 1.6; }
.soc-balken-legende .leer { opacity: .5; }
.soc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; border: 1px solid #bbb; margin-right: 4px; vertical-align: middle; }

/* Ansichts- und Bearbeitungsmodus */
.bearb-btn { display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 10px; flex:none;
  font:inherit; font-size:12.5px; color:var(--ink); background:var(--surface); border:1px solid var(--line);
  border-radius:7px; cursor:pointer; white-space:nowrap; }
.bearb-btn:hover { background:var(--panel-2); }
.bearb-btn:focus-visible { outline:2px solid var(--mati); outline-offset:1px; }
.bearb-stift { width:30px; padding:0; justify-content:center; color:var(--ink-soft); }
.bearb-stift:hover { color:var(--ink); }
.bearb-ok { color:#fff; background:var(--red); border-color:var(--red); font-weight:600; }
.bearb-ok:hover { background:var(--red-dark); }
.sz-bearb { display:flex; gap:6px; flex:none; }
.pk-aktionen { display:flex; gap:6px; flex:none; }
/* Dialog "Zwischengespeicherte Projekte" */
.pl-dialog { width:min(960px, calc(100vw - 32px)); max-height:calc(100vh - 64px); padding:16px 18px;
  border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 48px rgba(0,0,0,.2); color:var(--ink); }
.pl-dialog::backdrop { background:rgba(30,30,30,.35); }
.pl-kopf { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.pl-kopf .card-title { font-size:15px; font-weight:600; }
.pl-inhalt { overflow:auto; max-height:calc(100vh - 160px); }
/* gesperrte Eingaben lesbar lassen */
#sidebar input:disabled, #sidebar select:disabled, #sidebar textarea:disabled {
  color:var(--ink); -webkit-text-fill-color:var(--ink); background:var(--panel); opacity:1; cursor:default; }
#sidebar .gesperrt { pointer-events:none; }
#sidebar .mode-pill.gesperrt:not(.active) { opacity:.55; }
#sidebar .upload-box.gesperrt { opacity:.7; }
#sidebar a.gesperrt { color:var(--ink-soft); text-decoration:none; }
/* laufende Bearbeitung: Markierung am Rand */
.links.in-bearbeitung { box-shadow:inset 3px 0 0 var(--mati); }
.field-group.in-bearbeitung { box-shadow:-10px 0 0 -7px var(--mati); }

/* Kontextmenü am Szenario-Tab, Löschen im Menü "+N" */
.sz-tab-pfeil { margin-left:2px; padding:0 2px; font-size:10px; color:var(--ink-soft); border-radius:3px; }
.sz-tab-pfeil:hover { color:var(--ink); background:var(--line); }
.sz-ctx { position:absolute; top:calc(100% + 4px); z-index:200; min-width:170px; padding:4px;
  background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.14); }
.sz-ctx-eintrag { display:block; width:100%; padding:7px 10px; border:none; background:none; font:inherit;
  font-size:12.5px; color:var(--ink); text-align:left; border-radius:5px; cursor:pointer; }
.sz-ctx-eintrag:hover, .sz-ctx-eintrag:focus { background:var(--panel-2); outline:none; }
.sz-ctx-del { color:var(--red); }
.sz-menu-zeile { display:flex; align-items:center; gap:2px; }
.sz-menu-zeile[hidden] { display:none; }
.sz-menu-zeile .sz-menu-eintrag { flex:1; min-width:0; }
.sz-menu-del { display:flex; align-items:center; justify-content:center; width:28px; height:28px; flex:none; padding:0;
  color:var(--ink-soft); background:none; border:none; border-radius:5px; cursor:pointer; opacity:0; }
.sz-menu-zeile:hover .sz-menu-del, .sz-menu-del:focus { opacity:1; }
.sz-menu-del:hover { color:var(--red); background:#FDEEEE; }

/* Übersicht gespeicherter Szenarien: geladene Dateien */
.haken-ok, .haken-fehlt { display:inline-block; width:16px; margin-right:4px; font-weight:700; }
.haken-ok { color:var(--teal); }
.haken-fehlt { color:var(--ink-soft); }
.pk-row b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:right; }

/* Detailansicht Tab System: alle Einheiten gleich groß */
.anlage-kacheln { display:grid; grid-template-columns:repeat(auto-fill, minmax(84px, 1fr)); gap:8px; }
.anlage-kachel { position:relative; border:1px solid var(--line); border-radius:8px; padding:6px; background:var(--panel); }
.anlage-kachel img, .anlage-kachel svg { width:100%; height:84px; object-fit:contain; display:block; }
.anlage-kachel span { position:absolute; top:3px; left:6px; font-size:10px; font-weight:700; color:var(--ink-soft); }
/* Batteriespeichersystem im Schaltschema */
.sch-bat .sch-box { stroke:var(--red); stroke-dasharray:4 3; fill:#FDEEEE; }
.sch-bat .sch-ic { stroke:var(--red-dark); }
.sch-bat .sch-label { fill:var(--red-dark); }
.sch-bat-line { stroke:var(--red); stroke-dasharray:6 4; }
.sch-bat-frame { fill:none; stroke:var(--red); stroke-width:1.5; stroke-dasharray:6 4; }
/* Gerätebild neben Eingaben bzw. über der Übersicht */
.geraet-zeile { display:flex; gap:12px; align-items:flex-start; }
.geraet-zeile > :last-child { flex:1; min-width:0; }
.geraet-bild { flex:none; width:50px; height:54px; border:1px solid var(--line); border-radius:8px; background:var(--panel);
  display:flex; align-items:center; justify-content:center; padding:4px; }
.geraet-bild img, .geraet-bild svg { max-width:100%; max-height:100%; object-fit:contain; }
.geraet-bild-gross { width:96px; height:96px; margin:0 0 8px; }

.chart-laedt { height:120px; display:flex; align-items:center; justify-content:center; color:var(--ink-soft); font-size:12px; }

/* Szenarien verschieben: Einfügestelle als Balken links bzw. rechts */
.sz-tab[draggable="true"], .vgl-sz-kopf, .sz-check[draggable="true"] { cursor:grab; }
.sz-griff { color:var(--ink-soft); font-size:11px; letter-spacing:-2px; margin-right:2px; }
.sz-check { padding:2px 6px; border-radius:6px; }
.sz-check.drop-vor { box-shadow:inset 3px 0 0 var(--red); }
.sz-check.drop-nach { box-shadow:inset -3px 0 0 var(--red); }
.wird-gezogen { opacity:.45; }
.sz-tab.drop-vor, .vgl-tabelle th.drop-vor { box-shadow:inset 3px 0 0 var(--red); }
.sz-tab.drop-nach, .vgl-tabelle th.drop-nach { box-shadow:inset -3px 0 0 var(--red); }

/* Benutzerkonto (Servermodus) */
.konto { position:relative; z-index:2; }
.konto-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:var(--panel-2);
  color:var(--ink); font-size:12.5px; font-weight:600; cursor:pointer; letter-spacing:.02em; }
.konto-btn:hover, .konto-btn[aria-expanded="true"] { border-color:var(--red); color:var(--red); }
.konto-menu { position:absolute; right:0; top:calc(100% + 6px); min-width:240px; background:var(--surface);
  border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:4px; z-index:60; }
.konto-menu button { display:block; width:100%; text-align:left; border:0; background:none; padding:7px 10px;
  border-radius:5px; font:inherit; font-size:13px; color:var(--ink); cursor:pointer; }
.konto-menu button:hover, .konto-menu button:focus-visible { background:var(--panel-2); }
.konto-wer { display:flex; flex-direction:column; gap:1px; padding:8px 10px 10px; font-size:12px; color:var(--ink-soft);
  border-bottom:1px solid var(--line); margin-bottom:4px; }
.konto-wer b { font-size:13.5px; color:var(--ink); }
.konto-rolle { align-self:flex-start; margin-top:4px; font-size:11px; font-weight:600; color:var(--red);
  border:1px solid currentColor; border-radius:4px; padding:0 5px; }

.konto-dialog { width:min(440px, calc(100vw - 32px)); padding:18px 20px; border:1px solid var(--line); border-radius:10px;
  color:var(--ink); font-size:13px; }
.konto-dialog.konto-breit { width:min(1040px, calc(100vw - 32px)); max-height:calc(100vh - 64px); }
.konto-dialog::backdrop { background:rgba(30,30,30,.35); }
.konto-kopf { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.konto-kopf h2 { font-size:15px; margin:0; }
.konto-form { display:flex; flex-direction:column; gap:10px; }
.konto-form label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--ink-soft); }
.konto-form input, .konto-form select { font:inherit; font-size:13px; padding:7px 9px; border:1px solid var(--line);
  border-radius:6px; color:var(--ink); background:var(--surface); }
.konto-form input:focus, .konto-form select:focus { outline:2px solid rgba(177,31,36,.25); border-color:var(--red); }
.konto-aktionen { display:flex; justify-content:flex-end; gap:8px; }
.konto-tabelle { width:100%; border-collapse:collapse; font-size:12.5px; }
.konto-tabelle th { text-align:left; font-weight:600; color:var(--ink-soft); padding:6px 8px; border-bottom:2px solid var(--line); white-space:nowrap; }
.konto-tabelle td { padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.konto-tabelle select { font:inherit; font-size:12.5px; padding:3px 6px; border:1px solid var(--line); border-radius:5px; }
.konto-tabelle tr.gesperrt td { color:var(--ink-soft); }
.konto-zeilen-aktionen { display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }
.konto-scroll { max-height:calc(100vh - 220px); overflow:auto; }
.konto-neu { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.konto-neu-felder { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
.konto-meldung { margin-top:10px; padding:8px 10px; border-radius:6px; background:#EEF6EF; color:#2C5E33; font-size:12.5px; }
.konto-liste { display:flex; flex-direction:column; gap:6px; max-height:300px; overflow:auto; }

/* Besitz und Rechte im Projektkopf */
.pk-zugriff { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:6px 0 2px; font-size:12px; color:var(--ink-soft); }
.pk-nurlesen { font-size:11px; font-weight:600; color:var(--ink); background:var(--panel-2); border:1px solid var(--line);
  border-radius:4px; padding:1px 6px; }
.pl-filter { display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; margin-bottom:10px; }
.pl-filter button { border:0; background:var(--surface); padding:5px 14px; font:inherit; font-size:12.5px; cursor:pointer; color:var(--ink-soft); }
.pl-filter button.aktiv { background:var(--panel-2); color:var(--ink); font-weight:600; }

/* Anmeldeseite */
.anmelde-seite { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--panel-2); margin:0; }
.anmelde-box { width:min(380px, calc(100vw - 32px)); background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:28px 28px 18px; box-shadow:0 10px 30px rgba(0,0,0,.06); }
.anmelde-marke { display:flex; flex-direction:column; align-items:flex-start; gap:10px; margin-bottom:22px; }
.anmelde-logo { height:24px; width:auto; }
.anmelde-titel { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:var(--ink); }
.anmelde-titel img { height:20px; width:auto; }
.anmelde-box form { display:flex; flex-direction:column; gap:12px; }
.anmelde-box form[hidden], .konto-form [hidden] { display:none; }
.anmelde-box h1 { font-size:18px; margin:0 0 2px; color:var(--ink); }
.anmelde-box label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--ink-soft); }
.anmelde-box input { font:inherit; font-size:14px; padding:9px 10px; border:1px solid var(--line); border-radius:6px; color:var(--ink); }
.anmelde-box input:focus { outline:2px solid rgba(177,31,36,.25); border-color:var(--red); }
.anmelde-box .hint { margin:0; }
.anmelde-fuss { margin-top:20px; padding-top:10px; border-top:1px solid var(--line); font-size:11px; color:var(--ink-soft); }

/* Meldungen und Erläuterungen */
.hinweis { display:flex; align-items:flex-start; gap:7px; font-size:11.5px; line-height:1.45; color:var(--ink-soft);
  background:var(--hinweis-bg, #F4F6F8); border-left:3px solid var(--hinweis-farbe, #8A949E); border-radius:4px;
  padding:7px 10px; margin:6px 0; }
.hinweis > svg { flex:none; margin-top:1px; color:var(--hinweis-farbe, #8A949E); }
.hinweis-warnung { --hinweis-farbe:#B9771E; --hinweis-bg:#FDF5E8; color:#6B4A12; }
.hinweis-ok { --hinweis-farbe:var(--teal); --hinweis-bg:var(--teal-bg); color:var(--teal); }
.hinweis-laeuft .spinner { flex:none; width:13px; height:13px; margin-top:1px; border:2px solid #C9CED3;
  border-top-color:var(--hinweis-farbe, #8A949E); border-radius:50%; animation:hinweis-dreh .8s linear infinite; }
@keyframes hinweis-dreh { to { transform:rotate(360deg); } }

.info-tip { display:inline-flex; align-items:center; justify-content:center; vertical-align:-3px; margin-left:4px;
  width:18px; height:18px; padding:0; border:0; border-radius:50%; background:none; color:#8A949E; cursor:pointer; }
.info-tip:hover, .info-tip[aria-expanded="true"] { color:var(--ink); background:#EEF0F2; }
.info-tip:focus-visible { outline:2px solid var(--teal); outline-offset:1px; }
.info-pop { position:fixed; z-index:1000; max-width:320px; padding:9px 12px; background:#fff; color:var(--ink);
  border:1px solid #D5DADF; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,.12); font-size:11.5px; line-height:1.5; }
.hint.erlaeuterung { margin:2px 0 8px; }
.bearb-symbol { width:30px; padding:0; justify-content:center; }
.konto-form label.loesch-merken { flex-direction:row; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; }

/* Ergebnisse: Diagramm-Auswahl */
.diag-auswahl { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); margin: 12px 0; }
.diag-auswahl > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--ink); }
.diag-auswahl-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; padding: 0 12px 12px; }
.diag-auswahl fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; margin: 0; }
.diag-auswahl legend { font-size: 12px; color: var(--ink-soft); padding: 0 4px; }
.diag-auswahl label { display: block; font-size: 13px; padding: 2px 0; cursor: pointer; }
.kpi-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: 3px; margin-top: 3px; }
.chart-knoepfe { display: flex; gap: 6px; }
.btn-tabelle { font-size: 14px; line-height: 1; }
.btn-tabelle.aktiv { border-color: var(--red); color: var(--red); background: #FDEEEE; }
.chart-tabelle:not(:empty) { margin-top: 12px; }
.feld-kopf { display:flex; align-items:center; }
.feld-kopf .info-tip { width:16px; height:16px; margin:-2px 0 -2px 4px; }
.bv-loeschen:hover { color:var(--red-dark); border-color:currentColor; }
.vgl-abschnitte { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; margin:0 0 6px; }
.vgl-abschnitte .btn { white-space:nowrap; }
.vgl-tabelle tr.vgl-gruppe { cursor:pointer; user-select:none; }
.vgl-tabelle tr.vgl-gruppe:hover td { background:#8C949E; }
.vgl-tabelle tr.vgl-gruppe:focus-visible { outline:2px solid var(--teal); outline-offset:-2px; }
.vgl-tabelle tr.vgl-gruppe td > span { display:inline-flex; align-items:center; gap:6px; }
.vgl-tabelle tr.vgl-gruppe svg { transition:transform .15s; }
.vgl-tabelle tr.vgl-gruppe[aria-expanded="true"] svg { transform:rotate(90deg); }
.vgl-tabelle th.vgl-sz-kopf { vertical-align:bottom; }
.vgl-sz-name { vertical-align:middle; }
.vgl-spalte-btn { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; margin-left:6px;
  padding:0; border:0; border-radius:3px; background:none; color:#fff; opacity:.75; cursor:pointer; vertical-align:middle; }
.vgl-spalte-btn:hover { opacity:1; background:rgba(255,255,255,.18); }
.vgl-spalte-btn svg { transform:rotate(180deg); }
.vgl-tabelle .vgl-spalte-zu { width:28px; min-width:28px; max-width:28px; padding-left:0; padding-right:0; }
.vgl-tabelle td.vgl-spalte-zu { font-size:0; background:#F3F4F6; }
.vgl-tabelle th.vgl-spalte-zu { cursor:pointer; text-align:center; }
.vgl-tabelle th.vgl-spalte-zu .vgl-sz-name { display:none; }
.vgl-tabelle th.vgl-spalte-zu .vgl-spalte-btn { margin:0; }
.vgl-tabelle th.vgl-spalte-zu .vgl-spalte-btn svg { transform:none; }

fieldset.speicher-aus { border: 0; padding: 0; margin: 0; min-width: 0; opacity: 0.45; }
.sparten-logos { display:flex; align-items:center; justify-content:center; min-height:100%; padding:24px; }
.sparten-logos img { width:120px; height:auto; mix-blend-mode:multiply; }
/* Gerätebild vergrößert */
img.bild-zoom { cursor:zoom-in; }
.bild-dialog { max-width:calc(100vw - 48px); max-height:calc(100vh - 48px); padding:36px 24px 18px;
  border:1px solid var(--line); border-radius:12px; background:var(--surface); text-align:center; }
.bild-dialog::backdrop { background:rgba(30,30,30,.55); }
.bild-dialog img { display:block; margin:0 auto; max-width:min(900px, calc(100vw - 96px));
  max-height:calc(100vh - 150px); object-fit:contain; }
.bild-dialog .bild-zu { position:absolute; top:8px; right:12px; }
.bild-titel { margin-top:12px; font-size:13px; font-weight:600; color:var(--ink); }
/* Standort-Knopf der Projektkarte */
.leaflet-bar.karte-standort a { display:flex; align-items:center; justify-content:center; color:var(--mati); }
.leaflet-bar.karte-standort a:hover { color:#0089B7; }
/* Standortkarte im Fenster */
.karte-oeffnen { display:inline-flex; align-items:center; vertical-align:-3px; margin-left:6px; padding:2px;
  border:0; background:none; color:var(--mati); cursor:pointer; border-radius:4px; }
.karte-oeffnen:hover { color:#0089B7; background:var(--panel-2); }
.karte-dialog { width:min(1000px, calc(100vw - 48px)); padding:14px 16px 16px; border:1px solid var(--line);
  border-radius:12px; background:var(--surface); }
.karte-dialog::backdrop { background:rgba(30,30,30,.55); }
.karte-kopf { display:flex; align-items:center; gap:4px; margin-bottom:10px; font-size:13px; color:var(--ink); }
.karte-kopf .info-zu { margin-left:auto; }
.karte-dialog .projekt-karte { height:min(640px, calc(100vh - 140px)); }

/* Projektbericht (Export) - Tabs Projekt, Run, Cashflow */
.bericht-leiste { display:flex; justify-content:flex-end; margin-bottom:12px; }
