:root {
  --as-bg: #f4f6fb;
  --as-surface: #ffffff;
  --as-border: #e6e9f2;
  --as-text: #1f2937;
  --as-muted: #6b7280;
  --as-accent: #0aa2c0;
  --as-primary: #0d6efd;
  --as-primary-soft: #e5efff;
  --as-primary-soft-border: #cfe0ff;
  --as-navbar-h: 3.5rem;
  --as-sidebar-w: 16.5rem;

  /* Rundere, modernere Ecken für Buttons, Felder, Karten, Pagination … */
  --bs-border-radius: 0.6rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 0.85rem;
  --bs-border-radius-xl: 1rem;
  --bs-border-radius-pill: 50rem;
}

html {
  font-size: 15px;
  height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--as-bg);
  color: var(--as-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* App shell: full-height, fixed navbar + sidebar, inner-scrolling main */
body.app-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

/* Buttons: rund, etwas kräftiger, weiche Übergänge (Bootstrap 5.1 → explizit) */
.btn { border-radius: 0.6rem; font-weight: 500; transition: background-color .12s, border-color .12s, box-shadow .12s, transform .04s; }
.btn:active { transform: translateY(1px); }
.btn-sm, .btn-group-sm > .btn { border-radius: 0.5rem; }
.btn-lg { border-radius: 0.85rem; }
.form-control, .form-select { border-radius: 0.55rem; }
.form-control-sm, .form-select-sm { border-radius: 0.5rem; }
.card { border-radius: 0.85rem; }
.alert { border-radius: 0.6rem; }
.dropdown-menu { border-radius: 0.7rem; }
.page-item:first-child .page-link { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }
.page-item:last-child .page-link { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

/* ---------- Navbar ---------- */
.app-navbar {
  flex: 0 0 auto;
  background: var(--as-surface);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  border-bottom: 1px solid var(--as-border);
  min-height: var(--as-navbar-h);
  padding-top: 0;
  padding-bottom: 0;
  z-index: 1030;
}
/* Logo-Spalte links deckt sich mit der Sidebar; Menü beginnt bündig am Hauptpanel. */
.app-navbar .container-fluid { padding-left: 0; padding-right: 1rem; }
.app-body > header { flex: 0 0 auto; }

/* ---------- App shell (sidebar + main) ---------- */
.app-shell {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}
.app-sidebar {
  flex: 0 0 var(--as-sidebar-w);
  width: var(--as-sidebar-w);
  background: var(--as-bg);
  border-right: 1px solid var(--as-border);
  overflow-y: auto;
  padding: 0.9rem 0.8rem;
}
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;           /* Fallback: normale Seiten dürfen scrollen, wenn Inhalt zu hoch ist */
  padding: 1.35rem 1.5rem 1.35rem;
  /* Flex-Spalte: Vollhöhen-Panels (Tabelle/Karte) füllen mit flex:1 den Restplatz und
     scrollen nur intern → die Hauptseite scrollt nie. */
  display: flex;
  flex-direction: column;
}

/* ---------- Sidebar blocks ---------- */
/* Versions-Banner oben */
.sb-version {
  background: linear-gradient(135deg, var(--as-primary) 0%, #3b82f6 100%);
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}
.sb-version-cap {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 0.1rem;
}
.sb-version-month {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sb-version-month .bi { font-size: 1rem; opacity: 0.9; }

/* Jeder Block als klar abgegrenzte Karte */
.sb-block {
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: 0.75rem;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.sb-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--as-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--as-border);
}
.sb-label .bi { font-size: 0.95rem; color: var(--as-primary); opacity: 0.85; }
.sb-note { color: var(--as-muted); font-size: 0.85rem; font-style: italic; }
.sb-disabled { opacity: 0.6; }

/* Auswahl-Liste (Radio) – selektierter Eintrag hervorgehoben statt Dropdown */
.sb-options { display: flex; flex-direction: column; gap: 0.2rem; }
.sb-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--as-text);
  user-select: none;
  transition: background-color .12s, color .12s, border-color .12s;
}
.sb-option input { position: absolute; opacity: 0; pointer-events: none; }
.sb-option:hover { background: #f0f4fc; }
.sb-option-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-option-check { flex: 0 0 auto; opacity: 0; color: var(--as-primary); font-size: 1rem; }
.sb-option:has(input:checked) {
  background: var(--as-primary-soft);
  border-color: var(--as-primary-soft-border);
  color: var(--as-primary);
  font-weight: 600;
}
.sb-option:has(input:checked) .sb-option-check { opacity: 1; }
.sb-option:has(input:focus-visible) { box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2); }

/* Fahrzeugarten als moderne Toggle-Switches */
/* Karten-Ebenen: Checkbox (anzeigen) · Name · Farbwahl · Linienstärke */
.sb-layers { display: flex; flex-direction: column; gap: 0.3rem; }
.sb-layer { display: flex; align-items: center; gap: 0.45rem; }
.sb-layer-check { flex: 0 0 auto; width: 1.05em; height: 1.05em; margin: 0; cursor: pointer; }
.sb-layer-check:checked { background-color: var(--as-primary); border-color: var(--as-primary); }
.sb-layer-name {
  flex: 1 1 auto; min-width: 0; font-size: 0.9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-layer-color {
  flex: 0 0 auto; width: 1.6rem; height: 1.5rem; padding: 0;
  border: 1px solid var(--as-border, #ccc); border-radius: 4px; background: none; cursor: pointer;
}
.sb-layer-color::-webkit-color-swatch { border: none; border-radius: 3px; }
.sb-layer-color::-webkit-color-swatch-wrapper { padding: 2px; }
.sb-layer-weight {
  flex: 0 0 auto; width: 3rem; height: 1.5rem; font-size: 0.85rem;
  padding: 0 0.25rem; border: 1px solid var(--as-border, #ccc); border-radius: 4px;
}

.sb-switches { display: flex; flex-direction: column; gap: 0.4rem; }
.sb-switches .form-check { min-height: auto; margin-bottom: 0; padding-left: 3em; }
.sb-switches .form-check-input {
  width: 2.2em;
  height: 1.15em;
  margin-left: -3em;
  cursor: pointer;
}
.sb-switches .form-check-input:checked {
  background-color: var(--as-primary);
  border-color: var(--as-primary);
}
.sb-switches .form-check-label {
  cursor: pointer;
  font-size: 0.9rem;
  padding-top: 0.05rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--as-sidebar-w);   /* deckt sich mit der Sidebar-Spalte → Logo füllt das linke Rechteck */
  height: var(--as-navbar-h);
  padding: 0.2rem 0.5rem;
  margin: 0;
}
.app-logo {
  height: 100%;
  width: 100%;
  max-width: 100%;
  object-fit: contain;          /* so groß wie möglich, ohne Verzerrung */
  display: block;
}
/* Ab XL (Sidebar sichtbar): Logo-Block = Sidebar-Breite mit fortgeführter Trennlinie,
   Menü rückt dadurch bündig an die linke Kante des Hauptpanels. */
@media (min-width: 1200px) {
  .app-brand {
    flex: 0 0 var(--as-sidebar-w);
    width: var(--as-sidebar-w);
    align-self: stretch;
    padding-left: 0.8rem;
    border-right: 1px solid var(--as-border);
  }
  .app-nav { padding-left: 0.8rem; }
}

.app-nav .nav-link {
  color: #55607a;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.45rem;
  white-space: nowrap;
  transition: background-color 0.12s, color 0.12s;
}
.app-nav .nav-link .bi { font-size: 1.05rem; opacity: 0.75; }
.app-nav .nav-link:hover { color: var(--as-primary); background: #eef4ff; }
.app-nav .nav-link.active { color: var(--as-primary); background: #e5efff; font-weight: 600; }
.app-nav .nav-link.active .bi { opacity: 1; }

.app-user .avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--as-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.app-user .nav-link { color: #55607a; font-weight: 500; }

/* ---------- Content ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 650; margin: 0; }
.page-subtitle { color: var(--as-muted); font-size: 0.9rem; }

/* ---------- Cards / panels ---------- */
.card {
  border: 1px solid var(--as-border);
  border-radius: 0.65rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.panel {
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: 0.65rem;
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* ---------- Tables ---------- */
.table thead th {
  font-size: 0.8rem;
  color: var(--as-muted);
  font-weight: 600;
  border-bottom-width: 1px;
}
.table-sm > :not(caption) > * > * { padding: 0.4rem 0.55rem; }

/* ---------- Empty state ---------- */
.empty-state { padding: 4rem 1rem; text-align: center; }
.empty-state .empty-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto;
  border-radius: 1rem;
  background: #eef4ff;
  color: var(--as-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state .empty-icon .bi { font-size: 2.1rem; }

/* ---------- Startbereich der Tabellenseite (statt Auto-Modal) ---------- */
.start-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-self: center;          /* horizontal zentriert im Flex-Panel */
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 2rem 0.5rem;
}
.start-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.start-recent-title {
  font-size: 0.95rem; font-weight: 600; color: var(--as-muted);
  margin: 0 0 0.7rem;
}
.start-recent-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.rt-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--as-border); border-radius: 0.6rem;
  background: #fff; color: var(--as-text); text-decoration: none;
  transition: background-color .12s, border-color .12s;
}
.rt-link:hover { background: var(--as-primary-soft); border-color: var(--as-primary-soft-border); }
.rt-icon { color: var(--as-primary); flex: 0 0 auto; }
.rt-name { font-weight: 500; }
.rt-group { margin-left: auto; font-size: 0.8rem; color: var(--as-muted); white-space: nowrap; }

/* ---------- Login ---------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #eaf0f9 0%, #e3e9f4 100%);
}
.login-box {
  background: var(--as-surface);
  padding: 2.25rem 2.5rem;
  border-radius: 0.85rem;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.14);
  width: 370px;
  border: 1px solid var(--as-border);
}
.login-brand { text-align: center; margin-bottom: 0.4rem; }
.login-brand .bi { font-size: 2.4rem; color: var(--as-accent); }
.login-logo { height: 3.4rem; width: auto; max-width: 100%; display: inline-block; }
.login-box h1 { font-size: 1.35rem; font-weight: 650; text-align: center; margin: 0.3rem 0 0.15rem; }
.login-sub { text-align: center; color: var(--as-muted); font-size: 0.82rem; margin-bottom: 1.5rem; }

/* Login: Karte + Fußzeile untereinander, gemeinsam zentriert */
.login-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; width: 100%; }
.login-footer { text-align: center; }
.login-links { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; justify-content: center; }
.login-links a { color: var(--as-muted); font-size: 0.8rem; }
.login-links a:hover { color: var(--as-primary); }
.login-copy { color: var(--as-muted); font-size: 0.78rem; margin-top: 0.45rem; }

/* ---------- Map ---------- */
/* Der Panel-Wrapper der Kartenseite füllt (wie das Tabellen-Panel) den Restplatz von
   .app-main; die Karte selbst füllt den Wrapper → keine feste vh-Höhe, kein globales Scrollen. */
.map-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#karten-map {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--as-border);
}

/* ---------- Ergebnis-Tabellen (Excel-Stil) ---------- */
/* Breite richtet sich nach dem Inhalt (Bootstrap-Default width:100% würde die
   Spalten unnötig auseinanderziehen und die Lesbarkeit verschlechtern). */
.as-grid { --bs-table-bg: transparent; font-size: 0.85rem; width: auto; max-width: 100%; }
/* Schriftgröße je Tabelle (Toolbar) – Panel setzt --tbl-fs (Server-Startwert + JS-Änderung) */
.table-panel .as-grid { font-size: var(--tbl-fs, 0.85rem); }
.as-grid > :not(caption) > * > * {
  /* Etwas dunklerer Rahmen, damit die Zelllinien auch auf den blau getönten
     oberen Baum-Ebenen sichtbar bleiben (var(--as-border) war zu hell). */
  border: 1px solid #bcc7d8;
  padding: 0.4rem 0.65rem;
  vertical-align: middle;
}
.as-grid thead th {
  background-color: #33455f;
  color: #fff;
  font-weight: 600;
  border-color: #fff;
  white-space: nowrap;
}
/* Außenrahmen des Kopfes entfernen (obere + seitliche Außenkanten);
   innere Spaltentrenner und die untere Kante zur Tabelle bleiben. */
.as-grid thead th { border-top: 0; }
.as-grid thead tr > th:first-child { border-left: 0; }
.as-grid thead tr > th:last-child { border-right: 0; }
/* Icons/Sortierpfeile im dunklen Kopf hell halten */
.as-grid thead th .col-menu-btn { color: #c7d3e6; }
.as-grid thead th .col-menu-btn:hover { background: #4a5f80; color: #fff; }
.as-grid thead th .col-sortarrow { color: #9ec2ff; }
.as-grid tbody tr:hover > td { background-color: #f1f5ff; }
/* Gesamtzeile ("Всего") kräftig hervorheben: dunkler als die 1. Ebene,
   weißer Text, schwarzer Balken links. Farbe liegt auf der Zeile, die Zellen
   sind transparent (damit auch die Berechnungszellen den Ton übernehmen). */
.as-grid tbody tr.fw-bold,
.as-grid tbody tr.table-light { background-color: #3a527d; }
.as-grid tbody tr.fw-bold > td,
.as-grid tbody tr.table-light > td { background-color: transparent; color: #fff; font-weight: 600; }
.as-grid tbody tr.fw-bold:hover > td,
.as-grid tbody tr.table-light:hover > td { background-color: rgba(255, 255, 255, 0.08); }
.as-grid tbody tr.fw-bold > td:first-child,
.as-grid tbody tr.table-light > td:first-child { box-shadow: inset 4px 0 0 #000; }
/* Zu breite Tabellen scrollen für sich, nicht die ganze Seite */
.grid-wrap { max-width: 100%; overflow-x: auto; }

/* Baum-Fußzeile: Zeilen je Ebene (mit dezenten Trennpunkten zwischen den Ebenen) */
.level-counts { display: inline-flex; flex-wrap: wrap; align-items: baseline; }
.level-counts .level-count { white-space: nowrap; margin-left: 0.6rem; }
.level-counts .level-count:not(:first-of-type)::before {
  content: "·"; margin-right: 0.6rem; color: #b8c4d6;
}
.level-counts .level-count-name { color: var(--as-muted); }
.level-counts .level-count strong { color: #33455f; }

/* ---------- Tabellen-Toolbar (Ansicht/Gesamtzeile/Auf-Zuklappen/Schriftgröße) ---------- */
.table-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.tt-group {
  display: inline-flex; align-items: center;
  border: 1px solid var(--as-border); border-radius: 0.5rem;
  overflow: hidden; background: #fff;
}
.tt-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 0.3rem 0.55rem; font-size: 0.82rem; color: #4a5568;
  display: inline-flex; align-items: center; gap: 0.3rem; line-height: 1.2;
}
.tt-btn + .tt-btn { border-left: 1px solid var(--as-border); }
.tt-btn:hover { background: var(--as-primary-soft); color: var(--as-primary); }
.tt-btn.active { background: var(--as-primary); color: #fff; }
.tt-btn:disabled { opacity: 0.5; cursor: default; }
.tt-btn.tt-busy i { animation: tt-spin 0.8s linear infinite; }
@keyframes tt-spin { to { transform: rotate(360deg); } }
.tt-fs-label {
  padding: 0 0.35rem; color: #4a5568; font-size: 0.82rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 3.4ch; font-variant-numeric: tabular-nums;
}
.tt-topn .tt-fs-label { min-width: 0; padding-left: 0.5rem; }
.tt-select {
  border: 0; background: transparent; cursor: pointer;
  padding: 0.3rem 0.4rem; font-size: 0.82rem; color: #4a5568; outline: none;
}
.tt-select:hover { color: var(--as-primary); }

/* Gesamtzeile ausgeblendet (Toolbar-Umschalter) */
.table-panel.totals-hidden .as-grid tbody tr.fw-bold.table-light { display: none; }
/* Zebra nur in flachen Tabellen (im Baum stört es die Hierarchie) */
.as-grid.flat-grid tbody tr:nth-of-type(even) > td { background-color: #fafbfd; }

/* ---------- Baum: Ebenen nach Tiefe einfärben ----------
   Die Einfärbung liegt auf der Zeile (tr); die Zellen (td) sind transparent,
   sodass der Ton durchscheint — auch durch die halbtransparenten calc-Zellen.
   Obere Ebenen deutlich kräftiger, tiefere heller; ab Tiefe 4 komplett weiß.
   Ein kräftiger Farbbalken am linken Rand markiert jede Ebene mit eigener Farbe. */
.as-grid.tree-grid tbody tr.tree-row[data-depth="0"],
.as-grid.tree-grid tbody tr.tree-more[data-depth="0"] { background-color: #cbdcf4; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="1"],
.as-grid.tree-grid tbody tr.tree-more[data-depth="1"] { background-color: #dfeafa; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="2"],
.as-grid.tree-grid tbody tr.tree-more[data-depth="2"] { background-color: #edf3fc; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="3"],
.as-grid.tree-grid tbody tr.tree-more[data-depth="3"] { background-color: #f7fafe; }
/* Tiefe ≥ 4: komplett weiß (keine Regel nötig) */

/* Dünner Farbbalken links, je Ebene eine eigene Farbe (blau→violett→grün→
   orange→pink), damit die Ebenen klar unterscheidbar sind. */
.as-grid.tree-grid tbody tr.tree-row[data-depth="0"] > td.tree-name { box-shadow: inset 3px 0 0 #1d4ed8; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="1"] > td.tree-name { box-shadow: inset 3px 0 0 #7c3aed; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="2"] > td.tree-name { box-shadow: inset 3px 0 0 #059669; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="3"] > td.tree-name { box-shadow: inset 3px 0 0 #ea580c; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="4"] > td.tree-name { box-shadow: inset 3px 0 0 #db2777; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="5"] > td.tree-name { box-shadow: inset 3px 0 0 #0891b2; }

/* Obere Ebenen dezent fetter, damit Gruppenzeilen als solche lesbar sind */
.as-grid.tree-grid tbody tr.tree-row[data-depth="0"] > td.tree-name { font-weight: 600; }
.as-grid.tree-grid tbody tr.tree-row[data-depth="1"] > td.tree-name { font-weight: 500; }

/* Die unterste Ebene = Blätter ohne Kinder → IMMER weiß und normal gewichtet,
   egal auf welcher Tiefe sie liegen (hängt von der Zahl der Dimensionen ab).
   Muss nach den Tiefen-Regeln stehen, um sie zu überschreiben. */
.as-grid.tree-grid tbody tr.tree-row[data-haschildren="false"] { background-color: #fff; }
.as-grid.tree-grid tbody tr.tree-row[data-haschildren="false"] > td.tree-name { font-weight: 400; }

/* ---------- Baum: Aufklapp-Box (+/−), immer eine Zeile ---------- */
td.tree-name { white-space: nowrap; }
.tree-toggle {
  position: relative;
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  padding: 0;
  margin-right: 0.4rem;
  border: 1px solid #aebdd6;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
}
.tree-toggle:hover { background: #e5efff; border-color: var(--as-primary); }
/* +/− exakt mittig per CSS gezeichnet */
.tree-toggle::before,
.tree-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #34507a;
}
.tree-toggle::before { width: 0.58rem; height: 2px; }
.tree-toggle::after { width: 2px; height: 0.58rem; }
.tree-toggle.open::after { display: none; }
.tree-toggle.loading { opacity: 0.45; }
.tree-spacer { display: inline-block; width: 1.05rem; margin-right: 0.4rem; }
.tree-name > span { vertical-align: middle; }

/* ---------- Spaltenkopf: Sortier-/Funktions-Menü + Drag-Umsortierung ---------- */
.as-grid th[data-token] { cursor: grab; }
.as-grid th.col-dragover { box-shadow: inset 3px 0 0 var(--as-primary); }
.col-h { display: inline-flex; align-items: center; gap: 0.25rem; }
.col-sortarrow { color: var(--as-primary); font-size: 0.7rem; }
.col-menu-btn {
  border: 0; background: transparent; padding: 0 0.15rem;
  color: var(--as-muted); cursor: pointer; line-height: 1;
  border-radius: 3px; font-size: 0.85rem;
}
.col-menu-btn:hover { background: #dbe6fb; color: var(--as-primary); }
.col-menu .dropdown-menu { font-size: 0.85rem; min-width: 11rem; }

/* ---------- Ein einzelnes „+“ ganz rechts (wie eine inaktive Spaltenzelle) ----------
   Zusätzliche Platzhalter-Kopfzelle rechts vom letzten Spaltenkopf. Der Tabellenkörper
   hat dort keine Zellen → die Spalte bleibt leer/„inaktiv“. Klick auf das „+“ hängt eine
   neue Spalte rechts an. */
.as-grid thead th.col-add-slot {
  background: #eef1f6;
  border: 1px dashed #b8c4d6;
  box-shadow: none !important;   /* schlägt die Sticky-Linien-Regeln (höhere Spezifität) */
  text-align: center;
  vertical-align: middle;
  width: 3rem;
  padding: 0.25rem;
}
.col-add {
  position: relative;
  display: inline-block;
  width: 1.7rem; height: 1.7rem; padding: 0;
  border: 1px dashed #9aa8c2; border-radius: 6px;
  background: #fff; color: #5a6b8c;
  font-size: 0;   /* Text-„+“ verstecken – das Zeichen wird per CSS gezeichnet (exakt mittig) */
  cursor: pointer;
}
/* „+“ als zwei Balken, absolut in der Mitte des Quadrats (wie .tree-toggle) */
.col-add::before, .col-add::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); background: currentColor;
}
.col-add::before { width: 0.8rem; height: 2px; }   /* waagerecht */
.col-add::after  { width: 2px; height: 0.8rem; }    /* senkrecht */
.col-add:hover { background: var(--as-primary); color: #fff; border-color: var(--as-primary); border-style: solid; }
/* Popover mit den einfügbaren Spalten */
.col-add-pop {
  position: absolute; z-index: 1090;
  background: #fff; border: 1px solid #d3dae8; border-radius: 0.5rem;
  box-shadow: 0 6px 24px rgba(16, 24, 40, .18);
  padding: 0.35rem; min-width: 11rem; max-height: 60vh; overflow: auto;
}
.col-add-list { display: flex; flex-direction: column; }
.col-add-item {
  border: 0; background: transparent; text-align: left; white-space: nowrap;
  padding: 0.35rem 0.55rem; border-radius: 0.35rem;
  font-size: 0.85rem; color: #2f3e5c; cursor: pointer;
}
.col-add-item:hover { background: var(--as-primary-soft); color: var(--as-primary); }
.col-add-item { display: flex; align-items: center; gap: 0.45rem; width: 100%; }
.col-add-ic { color: var(--as-muted); font-size: 0.85rem; flex: 0 0 auto; }
.col-add-item:hover .col-add-ic { color: var(--as-primary); }
.col-add-sep { height: 1px; background: var(--as-border); margin: 0.25rem 0.3rem; }
.col-add-calcbtn { color: #6b3fd0; font-style: italic; }
.col-add-empty { padding: 0.5rem 0.6rem; color: var(--as-muted); font-size: 0.85rem; }
/* Berechnungs-Ansicht im „+“-Popover */
.col-add-calc { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.3rem; min-width: 13rem; }
.col-add-calc .cac-title { font-weight: 600; font-size: 0.85rem; color: #6b3fd0; margin-bottom: 0.15rem; }
.col-add-calc .cac-lbl { font-size: 0.72rem; color: var(--as-muted); margin: 0.15rem 0 0; }
.col-add-calc .cac-actions { display: flex; justify-content: space-between; gap: 0.4rem; margin-top: 0.5rem; }

/* ---------- Berechnungsspalten ---------- */
.as-grid th.calc-th { background-color: #3d3a63; color: #d9ccff; font-style: italic; }
/* Halbtransparent, damit im Baum die Ebenen-Einfärbung der Zeile durchscheint
   (über weißem Grund in flachen Tabellen wirkt es wie zuvor der zarte Blauton). */
.as-grid td.calc-td { background-color: rgba(122, 146, 198, 0.085); color: #2f3e5c; font-variant-numeric: tabular-nums; }
/* Berechnungs-Chips im Периоды-Block (lila), temporär hellgrau während der Eingabe */
.calc-chip {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.35rem;
  padding: 0.32rem 0.65rem; font-size: 0.85rem; font-weight: 500; white-space: nowrap;
  background: #f0e9ff; color: #6b3fd0; border: 1px solid #dcc9ff; border-radius: 0.55rem;
  user-select: none;
}
.ctor-drop .calc-chip { width: 100%; cursor: grab; }
.ctor-drop .calc-chip:active { cursor: grabbing; }
.calc-chip.dragging { opacity: 0.4; }
.calc-chip-temp { background: #f1f3f6; color: #7a8698; border: 1px dashed #c4ccd8; font-style: italic; }
.calc-chip .calc-x {
  border: 0; background: transparent; color: #9b7fd0; cursor: pointer;
  line-height: 1; font-size: 1rem; padding: 0 0.15rem; border-radius: 0.3rem;
}
.calc-chip .calc-x:hover { background: #e3d6ff; color: #c0392b; }

/* ×-Kreuz auf Feld-Chips (Zeitraum/Gruppe) — nur in den Ablagezonen sichtbar */
.chip-x {
  border: 0; background: transparent; color: currentColor; opacity: 0.5;
  cursor: pointer; line-height: 1; font-size: 1rem; padding: 0 0.15rem; border-radius: 0.3rem;
}
.chip-x:hover { opacity: 1; color: #c0392b; }
.ctor-drop .field-chip .chip-x { margin-left: auto; }
.ctor-bin .field-chip .chip-x { display: none; }

/* Filter-Symbol (Trichter) auf grünen Chips — nur in den Ablagezonen */
.chip-filter {
  display: none; border: 0; background: transparent; color: #6c7a92; opacity: 0.7;
  cursor: pointer; padding: 0 0.15rem; line-height: 1; font-size: 0.85rem; border-radius: 0.3rem;
}
.chip-filter:hover { opacity: 1; color: var(--as-primary); }
.ctor-drop .field-chip .chip-filter { display: inline-flex; align-items: center; margin-left: auto; }
.ctor-drop .field-chip .chip-filter ~ .chip-x { margin-left: 0.1rem; }
.field-chip.filtered { box-shadow: inset 0 0 0 1.5px var(--as-primary); }
.field-chip.filtered .chip-filter { color: var(--as-primary); opacity: 1; }

/* „Мои таблицы"-Browser: Gruppen + Tabellen */
.tbl-pane { margin-bottom: 0.85rem; }
.tbl-pane:last-child { margin-bottom: 0; }
.tbl-pane-head {
  font-weight: 600; font-size: 0.78rem; color: var(--as-muted);
  text-transform: uppercase; letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}
/* Feste Höhe (nicht max-height): Dialog springt beim Gruppenwechsel nicht,
   beide Listen scrollen bei beliebig vielen Einträgen für sich. */
.tbl-list {
  height: clamp(130px, 21vh, 230px); overflow-y: auto;
  border: 1px solid var(--as-border); border-radius: 0.5rem; padding: 0.25rem;
}
.tbl-list-lv { height: clamp(190px, 34vh, 380px); padding-top: 0; }
.tbl-grp {
  display: flex; align-items: center; width: 100%; gap: 0.3rem;
  background: none; border: 0; text-align: left; color: var(--as-text);
  padding: 0.25rem 0.5rem; border-radius: 0.45rem;
  cursor: pointer; user-select: none;
}
.tbl-grp:hover { background: #f0f4fc; }
.tbl-grp.active { background: var(--as-primary); color: #fff; }
.tbl-grp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-count {
  flex: 0 0 auto; font-size: 0.75rem; font-weight: 600;
  background: rgba(0, 0, 0, 0.06); color: var(--as-muted);
  border-radius: 0.75rem; padding: 0 0.4rem; min-width: 1.4rem; text-align: center;
}
.tbl-grp.active .tbl-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
/* Stift/Kreuz auf der aktiven (blauen) Gruppe lesbar halten */
.tbl-grp.active .btn { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.tbl-grp.active .btn:hover { background: rgba(255, 255, 255, 0.2); border-color: #fff; }
/* Popover für Umbenennen/Löschen im „Мои таблицы"-Dialog */
.tbl-pop {
  position: fixed; z-index: 1080; width: 17rem;
  background: #fff; border: 1px solid var(--as-border); border-radius: 0.6rem;
  box-shadow: 0 6px 24px rgba(16, 24, 40, .18); padding: 0.7rem 0.75rem;
}
.tbl-pop-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; }
.tbl-pop-text { font-size: 0.85rem; color: var(--as-muted); word-break: break-word; }

/* ListView der Tabellen: Name + Erstellungsdatum, Kopf sortierbar */
.tbl-lv { width: 100%; border-collapse: collapse; }
.tbl-lv thead th {
  position: sticky; top: 0; z-index: 1; background: #fff;
  font-weight: 600; font-size: 0.78rem; color: var(--as-muted);
  padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--as-border); white-space: nowrap;
}
.lv-sort { cursor: pointer; user-select: none; }
.lv-sort:hover { color: var(--as-primary); }
.lv-sort.active { color: var(--as-text); }
.lv-arrow { font-size: 0.7rem; }
.lv-row > td { padding: 0; border-bottom: 1px solid #f1f4fa; vertical-align: middle; }
.lv-row:hover > td { background: #f0f4fc; }
.lv-date { width: 1%; white-space: nowrap; color: var(--as-muted); font-size: 0.85rem; padding: 0 0.5rem; }
.lv-actions { width: 1%; padding: 0 0.4rem; text-align: right; white-space: nowrap; }
.tbl-item-name { display: block; text-decoration: none; color: var(--as-text); padding: 0.35rem 0.5rem; }
.tbl-item-name:hover { color: var(--as-primary); }
/* Abstand am Knopf selbst (nicht als Zell-Padding): wirkt unabhängig von der Spaltenbreite. */
.tbl-act, .tbl-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; padding: 0; line-height: 1; vertical-align: middle;
  margin-left: 0.35rem;
}
.lv-actions .tbl-act:first-child { margin-left: 2.5rem; }   /* Abstand zur Datumsspalte */
.tbl-grp .tbl-act { margin-left: 0.5rem; }

/* Filter-Modal: Mitglieder-Liste */
.filter-list { max-height: 42vh; overflow-y: auto; border: 1px solid var(--as-border); border-radius: 0.5rem; padding: 0.25rem; }
.filter-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.22rem 0.4rem; border-radius: 0.4rem; cursor: pointer; font-size: 0.88rem; }
.filter-item:hover { background: #f0f4fc; }
.filter-item input { flex: 0 0 auto; }

/* Konsolidierter Filter-Dialog: Akkordeon je Zeilen-/Spalten-Dimension */
.tf-sections { display: flex; flex-direction: column; gap: 0.45rem; }
.tf-section { border: 1px solid var(--as-border); border-radius: 0.55rem; overflow: hidden; }
.tf-head {
  width: 100%; display: flex; align-items: center; gap: 0.5rem;
  background: #f6f8fb; border: 0; padding: 0.5rem 0.7rem; cursor: pointer; text-align: left;
}
.tf-head:hover { background: #eef3fc; }
.tf-caret { color: var(--as-muted); font-size: 0.8rem; }
.tf-title { font-weight: 600; color: #33455f; }
.tf-role { font-size: 0.72rem; color: var(--as-muted); }
.tf-badge {
  margin-left: auto; font-size: 0.72rem; color: #4a5568;
  background: #e7ecf3; border-radius: 999px; padding: 0.05rem 0.55rem;
}
.tf-badge.on { color: #fff; background: var(--as-primary); }
.tf-body { padding: 0.5rem 0.7rem; border-top: 1px solid var(--as-border); background: #fff; }
.tf-actions { display: flex; align-items: center; gap: 0.4rem; margin: 0.4rem 0; }
.tf-list { max-height: 38vh; overflow-y: auto; border: 1px solid var(--as-border); border-radius: 0.5rem; padding: 0.25rem; }

/* Einfüge-Linie beim Ziehen (zeigt die künftige Position) */
.drop-line {
  height: 3px; align-self: stretch; border-radius: 2px;
  background: var(--as-primary); box-shadow: 0 0 4px rgba(13, 110, 253, 0.5);
  pointer-events: none;
}

/* „+ Добавить вычисление"-Link + Eingabe-Popover */
.ctor-calc-add-link {
  display: inline-block; margin-top: 0.4rem; font-size: 0.8rem;
  color: #6b3fd0; text-decoration: none; cursor: pointer;
}
.ctor-calc-add-link:hover { text-decoration: underline; }
.calc-pop {
  position: fixed; z-index: 1080; width: 15rem;
  background: #fff; border: 1px solid #d3dae8; border-radius: 0.6rem;
  box-shadow: 0 6px 24px rgba(16, 24, 40, .18); padding: 0.7rem 0.75rem;
}
.calc-pop-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; color: #6b3fd0; }

/* Berechnete Ergebnis-Spalten im dunklen Kopf hell-violett tönen */
.as-grid th.calc-th { color: #cbb8ff; }

/* ---------- Tabellen-Konstruktor (Modal) ---------- */
/* Großes Modal; Body als Flex-Spalte, damit alles ohne Seiten-Scroll passt */
@media (min-width: 768px) {
  .ctor-dialog { max-width: 1280px; width: 95vw; height: 90vh; margin: 5vh auto; }
  .ctor-dialog .modal-content { height: 100%; }
}
.ctor-dialog .modal-body { display: flex; flex-direction: column; gap: 0.7rem; overflow: hidden; background: #eef1f6; }
.ctor-hint { color: var(--as-muted); font-size: 0.85rem; }
.ctor-tree-mark { color: var(--as-primary); font-weight: 700; }
.ctor-cap {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--as-muted); margin-bottom: 0.4rem;
}
.ctor-cap .bi { color: var(--as-primary); }
/* Mini-Umschalter Плоская/Дерево neben der „Предпросмотр"-Beschriftung (Buttonhöhe ~ Schrifthöhe) */
.ctor-view-mini .btn {
  padding: 0.05rem 0.45rem; font-size: 0.68rem; line-height: 1.2; font-weight: 500;
  text-transform: none; letter-spacing: 0;
}

/* Perioden & Gruppen: je ein kompakter horizontaler Streifen (Label links) */
/* Konstruktor: hellgrauer Modal-Hintergrund, die drei Bereiche als weiße Karten */
.ctor-pool, .ctor-zones, .ctor-section {
  background: #fff;
  border: 1px solid #e6ebf4;
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.ctor-section-preview { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.ctor-pool { display: flex; flex-direction: column; gap: 0.5rem; }
.ctor-pool-col { display: flex; align-items: center; gap: 0.6rem; }
.ctor-pool-col .ctor-cap { flex: 0 0 auto; min-width: 5.5rem; margin-bottom: 0; }
.ctor-bin {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: nowrap; gap: 0.4rem;
  min-height: 2.7rem; padding: 0.45rem 0.55rem;
  overflow-x: auto; overflow-y: hidden;
  background: #fff; border: 1px solid var(--as-border); border-radius: 0.6rem;
}
.ctor-bin .field-chip { flex: 0 0 auto; }

.ctor-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.ctor-zone-head {
  display: flex; align-items: center; gap: 0.4rem;
  font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem;
}
.ctor-zone-head .bi { color: var(--as-primary); }
/* Umschalter/Swap im Столбцы-Kopf kompakt (~Höhe der Beschriftung) */
.ctor-zone-head .btn { padding: 0.1rem 0.45rem; font-size: 0.72rem; line-height: 1.3; }
.ctor-drop {
  display: flex; flex-direction: column; gap: 0.35rem;
  min-height: 5rem; max-height: 26vh; overflow-y: auto; padding: 0.55rem;
  border: 1.5px dashed var(--as-border); border-radius: 0.65rem;
  background: #fff; transition: border-color .12s, background-color .12s;
}
.ctor-drop.drop-hot { border-color: var(--as-primary); background: #eef4ff; }
.ctor-colzones { display: flex; flex-direction: column; }
.ctor-colzones .sz-group { order: 1; }
.ctor-colzones .sz-period { order: 2; }
.ctor-colzones.period-outer .sz-group { order: 2; }
.ctor-colzones.period-outer .sz-period { order: 1; }
.ctor-subzone { margin-bottom: 0.5rem; }
.ctor-subzone:last-child { margin-bottom: 0; }
.ctor-lvl-num { color: var(--as-primary); font-weight: 700; }
.ctor-sublabel { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--as-muted); margin-bottom: 0.2rem; }
.ctor-drop-sm { min-height: 3rem; max-height: 8rem; }
.ctor-drop:empty::before {
  content: 'сюда'; color: var(--as-muted); font-size: 0.8rem; font-style: italic;
  align-self: center; margin: auto;
}

/* Feld-Chips */
.field-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.65rem; border-radius: 50rem;
  font-size: 0.85rem; font-weight: 500; white-space: nowrap;
  border: 0px solid transparent; cursor: grab; user-select: none;
  transition: box-shadow .12s, opacity .12s;
}
.field-chip:hover { box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12); }
.field-chip:active { cursor: grabbing; }
.field-chip.dragging { opacity: 0.4; }
.fc-col { background: #e5efff; color: #0d6efd; border-color: #cfe0ff; }
.fc-row { background: #e2f6f2; color: #0a8f9c; border-color: #c3ebe6; }
.ctor-drop .field-chip { width: 100%; justify-content: flex-start; border-radius: 0.55rem; }
.ctor-drop .field-chip::before {
  content: '\2630'; opacity: 0.4; font-size: 0.75rem; margin-right: 0.1rem;
}

.ctor-preview { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ctor-preview-table { margin-bottom: 0.4rem; }
.ctor-preview-table th { white-space: nowrap; }
.ctor-preview-table td, .ctor-preview-table th { padding: 0.3rem 0.5rem; font-size: 0.85rem; }

/* Ergebnis-Panel der Tabellenseite: füllt den Restplatz von .app-main (Flex-Spalte).
   Nur .grid-wrap scrollt, Info-Zeile und Blätterleiste bleiben stehen. Keine feste
   vh-Höhe mehr → die Hauptseite scrollt nie (robust gegen Kopfhöhen-Änderungen). */
.table-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
}
.table-panel > * { flex: 0 0 auto; }
.table-panel .grid-wrap {
  flex: 1 1 auto;
  min-height: 0;              /* sonst wächst der Flex-Kasten über das Panel hinaus */
  overflow: auto;             /* senkrecht UND waagerecht innerhalb des Panels */
  border-radius: 0.45rem;
}
.table-panel > .empty-state { margin: auto; }   /* Leer-Zustand mittig im hohen Panel */

/* Tabellenkopf bleibt beim Scrollen im Panel stehen. Wegen border-collapse verlieren
   sticky-Zellen ihre Rahmen – daher die Linien per inset-Schatten nachziehen.
   Bei zweizeiligem Kopf (Kreuztabelle) setzt das JS `top` der zweiten Zeile. */
.table-panel .as-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  /* Nur die UNTERE Trennlinie zum Körper per Schatten (überlebt das Scrollen). Die
     senkrechten Spalten-Trenner kommen aus echten 1px-Rahmen (siehe unten) – sie sitzen
     exakt auf der Spaltengrenze und fluchten damit mit den Körper-/Gesamtzeilen-Zellen. */
  box-shadow: inset 0 -1px 0 #bcc7d8;
}
/* Senkrechte Kopf-Trenner = echte 1px-Rahmen in Körperfarbe → bündig mit dem Tabellenkörper
   (der Schatten-Ansatz zeichnete sie 1px versetzt nach innen). Platzhalter-Zelle ausgenommen. */
.table-panel .as-grid thead th:not(.col-add-slot) { border-color: #bcc7d8; }
/* Letzte Kopfspalte: keine rechte Außenlinie (Außenrahmen entfernt) */
.table-panel .as-grid thead tr > th:last-child { box-shadow: inset 0 -1px 0 #bcc7d8; }

@media (max-width: 720px) {
  .ctor-pool, .ctor-zones { grid-template-columns: 1fr; }
}

/* Fortschritts-Overlay während der Export erstellt wird */
.export-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 32, 51, 0.45);
}
.export-box {
  background: #fff;
  border-radius: 0.6rem;
  padding: 1.5rem 2rem;
  min-width: 18rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.export-box .spinner-border { width: 2.5rem; height: 2.5rem; }
.export-msg { margin-top: 0.9rem; font-weight: 600; color: #1f2a44; }
.export-sub { margin-top: 0.25rem; font-size: 0.85rem; color: #6a7384; }

/* PDF-Ausrichtungswahl mit Vorschau-Karten */
.orient-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.orient-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  border: 1.5px solid #d3dae8;
  border-radius: 0.6rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.orient-card:hover, .orient-card:focus-visible {
  border-color: #4c6ef5;
  background: #f5f8ff;
  box-shadow: 0 3px 12px rgba(76, 110, 245, 0.15);
  outline: none;
}
.orient-card svg { width: 92px; height: 76px; }
.orient-title { font-weight: 600; color: #1f2a44; }
.orient-sub { font-size: 0.8rem; color: #6a7384; }

/* Karten: Lade-Overlay über der Leaflet-Karte */
.map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  color: #1f2a44;
  font-weight: 500;
}
.map-hint {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  background: rgba(31, 42, 68, 0.88);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
