/* Atisk Plattform – Design-System (Grün-Palette, Segoe UI) */
:root {
  --gruen-900: #14301b;
  --gruen-800: #1d4023;
  --gruen-700: #2c5f2d;
  --gruen-500: #4c8c2b;
  --gruen-300: #97bc62;
  --gruen-100: #e8f0e0;
  --creme: #f7f8f4;
  --weiss: #ffffff;
  --text: #21301f;
  --text-muted: #5f6f5c;
  --linie: #dde5d6;
  --warn: #b85042;
  --gelb: #e0a800;
  --radius: 10px;
  --schatten: 0 1px 3px rgba(20, 48, 27, .08), 0 4px 16px rgba(20, 48, 27, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--creme);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--gruen-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; font-weight: 650; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 650; margin: 0 0 10px; }
.untertitel { color: var(--text-muted); margin: 0 0 22px; }

/* ---------- App-Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--gruen-900), var(--gruen-800));
  color: #dfe9d8; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo {
  font-size: 22px; font-weight: 700; color: var(--weiss);
  padding: 22px 20px 4px; letter-spacing: .5px;
}
.sidebar .logo span { color: var(--gruen-300); }
.sidebar .betrieb-name {
  padding: 0 20px 18px; font-size: 12.5px; color: #a8bda0;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px;
}
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.nav a {
  color: #cfdec6; padding: 9px 12px; border-radius: 8px;
  font-size: 14.5px; display: flex; gap: 10px; align-items: center;
}
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.aktiv { background: var(--gruen-500); color: var(--weiss); font-weight: 600; }
.sidebar .fuss {
  margin-top: auto; padding: 14px 20px; font-size: 12.5px; color: #93a98b;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar .fuss a { color: #c4d6ba; }
.sidebar .fuss a.aktiv { color: var(--weiss); font-weight: 600; }
/* min-width:0 ist Pflicht: ohne das weigert sich .inhalt als Flex-Kind, unter die
   Inhaltsbreite zu schrumpfen. Ein breites Kind (Zeitstrahl, weite Tabelle) blaeht
   dann die ganze Seite auf, statt in seinem eigenen overflow-x zu scrollen -
   rechts stehende Bedienelemente rutschen aus dem Fenster. */
.inhalt { flex: 1; min-width: 0; padding: 30px 38px 60px; max-width: 1600px; }

/* ---------- Karten/Boxen ---------- */
.kachel {
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px;
}
.kachel + .kachel { margin-top: 18px; }
.raster { display: grid; gap: 16px; }
/* display:grid würde sonst das hidden-Attribut aushebeln (z. B. „4 · Gabe" in karten.html) */
.raster[hidden] { display: none; }
/* Im Raster regelt der grid-gap den Abstand; der Geschwister-Abstand wuerde
   alle Kacheln ausser der ersten nach unten schieben (unbuendige Kanten). */
.raster > .kachel + .kachel { margin-top: 0; }
.raster.k4 { grid-template-columns: repeat(4, 1fr); }
.raster.k3 { grid-template-columns: repeat(3, 1fr); }
.raster.k2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .raster.k4, .raster.k3 { grid-template-columns: repeat(2, 1fr); } }

/* Wachstumskurve links, Schädlings-/Unkraut-Panel rechts; bricht schmal um */
.wachstum-split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.wachstum-split > div { min-width: 0; }   /* Canvas darf die Spalte nicht aufblähen */
@media (max-width: 1000px) { .wachstum-split { grid-template-columns: 1fr; } }

/* Dialog-Overlay: Schädling-/Unkraut-Detail, Ebenen löschen, Beregnung.
   z-index über allem, was auf und an Karten liegt: Leaflet (Ebenen 400,
   Knöpfe bis 1000), schwebender Vollbild-Knopf 1200, Ebenen-Picker 1500 und
   das Vollbild selbst (5000, „Vollbild verlassen" 5300) — „Ebene löschen"
   steht auch im Vollbild des Ebenen-Viewers. Darüber nur #busy-overlay (9999). */
.sr-overlay { position: fixed; inset: 0; background: rgba(20,28,18,.55); display: none;
  align-items: center; justify-content: center; z-index: 6000; padding: 20px; }
.sr-overlay.auf { display: flex; }
.sr-dialog { background: var(--weiss); border-radius: var(--radius); max-width: 560px; width: 100%;
  max-height: 86vh; overflow-y: auto; box-shadow: var(--schatten); padding: 22px 24px; }
/* Restrisiko-Overlay scharf (pixelgenau) auf dem Satellitenbild */
.restrisiko-overlay { image-rendering: pixelated; image-rendering: crisp-edges; }

.kpi .wert { font-size: 30px; font-weight: 700; color: var(--gruen-700); }
.kpi .label { font-size: 13px; color: var(--text-muted); }

/* ---------- Dubletten-Hinweis (Katalog-Anlegeformulare, aehnlich.js) ----------
   Liegt als absolutes Panel unter dem Namensfeld ÜBER dem Seiteninhalt —
   verschiebt nichts. z-index über Tabellen-Sticky-Köpfen (3) und der
   Anbauplan-Kopfzeile (5), unter Dialog-Overlays (6000). */
.aehnlich-panel {
  position: absolute; z-index: 1300; max-width: 460px;
  background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 4px 0; font-size: 13px;
}
.aehnlich-kopf { padding: 6px 12px 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.aehnlich-kopf.warn { color: var(--warn); }
.aehnlich-zeile { padding: 5px 12px; display: flex; gap: 8px; align-items: baseline; }
.aehnlich-zeile b { white-space: nowrap; }
.aehnlich-zeile span { color: var(--text-muted); font-size: 12px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aehnlich-zeile.klickbar { cursor: pointer; }
.aehnlich-zeile.klickbar:hover { background: var(--gruen-100); }

/* ---------- Tabellen ---------- */
/* border-collapse: separate (statt collapse), damit die Kopf-Unterkante beim Sticky-
   Scrollen mitwandert — bei collapse bleibt der Rahmen an der alten Position hängen. */
table.liste { width: 100%; border-collapse: separate; border-spacing: 0; }
table.liste th {
  text-align: left; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-muted); font-weight: 600;
  padding: 8px 10px; border-bottom: 2px solid var(--linie);
}
/* Spaltenköpfe bleiben beim Scrollen oben stehen (wie eine fixierte Zeile in Excel).
   Seiten mit eigener Sticky-Leiste (z. B. Parameter: Speichern-Leiste) setzen
   --tabelle-kopf-top auf deren Höhe, damit die Köpfe DARUNTER andocken.
   In horizontalen Scroll-Wrappern (overflow-x) wirkt Sticky nicht — dort bleibt
   die Tabelle unverändert. */
table.liste thead th {
  position: sticky; top: var(--tabelle-kopf-top, 0px);
  background: var(--creme); z-index: 3;
}
.kachel table.liste thead th, .sr-dialog table.liste thead th { background: var(--weiss); }
table.liste td { padding: 9px 10px; border-bottom: 1px solid var(--linie); }
table.liste tr:hover td { background: var(--gruen-100); }

/* ---------- Status-Pillen ---------- */
.pille {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pille.gruen { background: var(--gruen-100); color: var(--gruen-700); }
.pille.grau { background: #eceeea; color: var(--text-muted); }
.pille.gelb { background: #fdf3d7; color: #8a6d00; }
.pille.rot { background: #fbe4e1; color: var(--warn); }

/* ---------- Formulare & Buttons ---------- */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--linie);
  border-radius: 8px; font: inherit; background: var(--weiss); color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gruen-300); border-color: var(--gruen-500);
}
/* Einheitliches Suchfeld (überall gleiches Aussehen & Verhalten): Lupen-Icon links.
   Selektor `input.suche` (gleiche Spezifität wie input[type=search], danach notiert). */
input.suche {
  -webkit-appearance: none; appearance: none;
  max-width: 300px; padding: 9px 12px 9px 34px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%238a8f86" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="20.5" y1="20.5" x2="16.5" y2="16.5"/></svg>');
  background-repeat: no-repeat; background-position: 11px center;
}
input.suche::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
label { font-size: 13px; font-weight: 600; color: var(--text-muted); display: block; margin: 12px 0 4px; }
.btn {
  display: inline-block; background: var(--gruen-700); color: var(--weiss);
  border: none; border-radius: 8px; padding: 10px 18px; font: inherit;
  font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--gruen-500); text-decoration: none; color: var(--weiss); }
.btn.sekundaer { background: var(--weiss); color: var(--gruen-700); border: 1px solid var(--gruen-500); }
.btn.klein { padding: 6px 12px; font-size: 13px; }
.btn-link {
  background: none; border: none; padding: 2px 4px; font: inherit; cursor: pointer;
  color: var(--gruen-700); text-decoration: underline; text-underline-offset: 2px;
}
.btn-link:hover { color: var(--gruen-500); }
.fehlerbox {
  background: #fbe4e1; color: var(--warn); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 14px;
}

/* ---------- Oeffentliche Seiten ---------- */
.public-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--gruen-900) 0%, var(--gruen-700) 60%, var(--gruen-500) 100%);
  padding: 30px;
}
.public-card {
  background: var(--weiss); border-radius: 16px; padding: 38px 42px;
  width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.public-card .logo { font-size: 30px; font-weight: 700; color: var(--gruen-800); }
.public-card .logo span { color: var(--gruen-500); }
.landing-hero { max-width: 760px; color: var(--weiss); text-align: center; }
.landing-hero .logo { font-size: 54px; font-weight: 700; letter-spacing: 1px; }
.landing-hero .logo span { color: var(--gruen-300); }
.landing-hero h1 { font-size: 30px; font-weight: 600; margin: 10px 0 14px; color: var(--weiss); }
.landing-hero p { font-size: 17px; color: #e3ecd9; margin: 0 0 30px; }
.landing-punkte {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 34px 0; text-align: left;
}
.landing-punkte div {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; padding: 16px; font-size: 14px; color: #eef4e7;
}
.landing-punkte b { display: block; margin-bottom: 4px; color: var(--weiss); }

/* ---------- Schlag-Karte (SVG) ---------- */
.karte-wrap { background: #f0f3ec; border-radius: var(--radius); overflow: hidden; }
.karte-wrap svg { display: block; width: 100%; height: auto; }
.feld-poly { fill: var(--gruen-300); stroke: var(--gruen-800); stroke-width: 1; opacity: .75; cursor: pointer; }
.feld-poly:hover { fill: var(--gruen-500); opacity: 1; }
.feld-poly.ohne-grid { fill: #c9cfc2; }

/* ---------- Raster-Viewer ---------- */
.viewer { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
@media (max-width: 1000px) { .viewer { grid-template-columns: 1fr; } }
.viewer .bild {
  background: #2a3328; border-radius: var(--radius); min-height: 420px;
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.viewer .bild img { max-width: 100%; max-height: 560px; image-rendering: pixelated; }
.legende { height: 12px; border-radius: 6px; margin: 8px 0 4px;
  background: linear-gradient(90deg,#a50026,#f46d43,#ffffbf,#a6d96a,#006837); }
.legende-werte { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

/* ---------- Pipeline ---------- */
.stationen { display: flex; align-items: center; gap: 0; margin: 10px 0 18px; flex-wrap: wrap; }
.station { display: flex; align-items: center; }
.station .punkt {
  background: var(--gruen-100); color: var(--gruen-700); border: 2px solid var(--gruen-300);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600;
}
.station .pfeil { color: var(--gruen-300); padding: 0 8px; font-size: 18px; }
details.ds-log { border: 1px solid var(--linie); border-radius: 8px; margin-bottom: 8px; background: var(--weiss); }
details.ds-log summary {
  cursor: pointer; padding: 10px 14px; display: flex; gap: 12px; align-items: center;
  list-style: none; flex-wrap: wrap;
}
details.ds-log summary::-webkit-details-marker { display: none; }
.ds-log .log-zeilen { padding: 4px 16px 12px; border-top: 1px solid var(--linie); }
.ds-log .log-zeilen div { font-size: 13.5px; padding: 4px 0; color: var(--text-muted); }
.ds-log .log-zeilen b { color: var(--gruen-700); }
.mono { font-family: Consolas, monospace; font-size: 13px; }

/* ---------- Icon-Badges (statt Emojis) ---------- */
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--gruen-100); color: var(--gruen-700);
  font-weight: 700; font-size: 13px; letter-spacing: .5px;
}
.icon-badge.klein { width: 26px; height: 26px; font-size: 10.5px; border-radius: 7px; }

/* ---------- Drop-Zone ---------- */
.dropzone {
  border: 2px dashed var(--gruen-300); border-radius: var(--radius);
  background: var(--gruen-100); padding: 44px 24px; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.aktiv { background: #dcebc9; border-color: var(--gruen-500); }
.dropzone .gross { font-size: 17px; font-weight: 650; color: var(--gruen-800); }
.dropzone .klein { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Suche ---------- */
.suchfeld { max-width: 340px; }

/* ---------- Leaflet-Karte ---------- */
#karte.leaflet-container, #wkarte.leaflet-container { height: 520px; border-radius: var(--radius); }

/* ---------- Operations-Center-Layout (Liste links, Karte rechts) ---------- */
.oc-layout { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .oc-layout { grid-template-columns: 1fr; } }
.oc-liste { padding: 14px; }
/* Im Grid stehen die Kacheln nebeneinander – kein vertikaler Abstand zwischen ihnen. */
.oc-layout > .kachel + .kachel { margin-top: 0; }
.oc-scroll { max-height: 640px; overflow-y: auto; }
.oc-layout #karte.leaflet-container { height: 700px; }
.oc-zeile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-bottom: 1px solid var(--linie); border-radius: 8px;
}
.oc-zeile:hover { background: var(--gruen-100); }
.oc-zeile.oc-aktiv { background: var(--gruen-100); box-shadow: inset 0 0 0 2px var(--gruen-500); }
.leaflet-container .feld-tooltip { font-family: "Segoe UI", sans-serif; }

/* ---------- Schnittstellen ---------- */
.quelle-karte { display: flex; gap: 14px; }
.quelle-karte .icon { font-size: 30px; }
.quelle-karte h3 { margin: 0 0 2px; font-size: 16px; }
.quelle-karte p { margin: 4px 0 10px; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Mehrfach-Auswahl-Dropdown „Verbotene Produkte" ---------- */
/* Geschlossen wie ein <select> (gleiche Größe wie Wunsch-Produkt), Pfeil klappt auf/zu. */
.vp { position: relative; display: inline-block; }
.vp-trigger {
  width: 170px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 3px 6px; font: inherit; font-size: 13px; line-height: 1.5;
  background: #fff; color: var(--text); border: 1px solid var(--linie);
  border-radius: 4px; cursor: pointer; text-align: left;
}
.vp-trigger:hover { border-color: var(--gruen-300); }
.vp.open .vp-trigger { border-color: var(--gruen-500); box-shadow: 0 0 0 2px var(--gruen-100); }
.vp-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1 1 auto; }
.vp-label:empty::before { content: "\00a0"; }
.vp-arrow { flex: none; font-size: 10px; color: var(--text-muted); transition: transform .12s; }
.vp.open .vp-arrow { transform: rotate(180deg); }
.vp-panel {
  display: none; position: absolute; top: calc(100% + 2px); left: 0; z-index: 30;
  min-width: 100%; width: max-content; max-width: 300px; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid var(--linie); border-radius: 4px;
  box-shadow: var(--schatten); padding: 3px;
}
.vp.open .vp-panel { display: block; }
.vp-opt {
  display: block; padding: 5px 9px;
  font-size: 13px; border-radius: 3px; cursor: pointer; user-select: none;
}
.vp-opt:hover { background: var(--gruen-100); }
.vp-opt.aktiv, .vp-opt.aktiv:hover { background: #0b70d1; color: #fff; }
.vp-opt input { display: none; }
.vp-opt span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Ebenen-Picker (Referenz-/Vergleichsebene): Ordner statt flacher Liste.
   Gruppe = Quelle; ein Upload/Vorgang = EIN Eintrag "Aufnahme <Datum>", seine
   Attribut-Layer stehen im .ep-attr-Dropdown rechts daneben (ASK-26).
   Bedient ein verstecktes <select>; Auswahl blau wie beim .vp-Picker. ---------- */
.ep { position: relative; display: inline-block; min-width: 280px; }
.ep-knopf {
  width: 100%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 4px 8px; font: inherit; font-size: 13.5px; line-height: 1.5;
  background: #fff; color: var(--text); border: 1px solid var(--linie);
  border-radius: 4px; cursor: pointer; text-align: left;
}
.ep-knopf:hover { border-color: var(--gruen-300); }
.ep-wert { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1 1 auto; }
.ep-pfeil { flex: none; width: 0; height: 0; border-left: 4px solid transparent;
  border-right: 4px solid transparent; border-top: 5px solid var(--text-muted); }
.ep-panel {
  /* fixed statt absolute: die Ribbon-Container scrollen/clippen (overflow),
     ein absolutes Panel wuerde abgeschnitten. Position setzt das JS beim
     Oeffnen und fuehrt sie beim Scrollen nach. z-index ueber den
     Leaflet-Controls (+/- Zoom liegt bei 1000). */
  position: fixed; z-index: 1500;
  width: max-content; max-width: 380px;
  background: #fff; border: 1px solid var(--linie); border-radius: 6px;
  box-shadow: var(--schatten); padding: 6px;
}
.ep-suche {
  width: 100%; box-sizing: border-box; margin-bottom: 5px;
  padding: 4px 8px; font: inherit; font-size: 13px;
  border: 1px solid var(--linie); border-radius: 4px;
}
.ep-liste { max-height: 300px; overflow-y: auto; }
.ep-gruppe > summary, .ep-ordner > summary {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; font-size: 13px; font-weight: 600; color: var(--gruen-800);
  border-radius: 3px; cursor: pointer; user-select: none; list-style: none;
}
.ep-gruppe > summary::-webkit-details-marker,
.ep-ordner > summary::-webkit-details-marker { display: none; }
.ep-gruppe > summary::before, .ep-ordner > summary::before {
  content: ""; width: 0; height: 0; flex: none;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 5px solid var(--text-muted); transition: transform .12s;
}
.ep-gruppe[open] > summary::before, .ep-ordner[open] > summary::before {
  transform: rotate(90deg);
}
.ep-gruppe > summary:hover, .ep-ordner > summary:hover { background: var(--gruen-100); }
.ep-ordner { margin-left: 12px; }
.ep-ordner > summary { font-weight: 500; color: var(--text); }
.ep-anzahl {
  margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--text-muted);
  background: var(--gruen-100); border-radius: 8px; padding: 0 7px;
}
.ep-eintrag {
  padding: 4px 8px 4px 24px; font-size: 13px; border-radius: 3px;
  cursor: pointer; user-select: none;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ep-ordner .ep-eintrag { padding-left: 34px; }
.ep-panel > .ep-liste > .ep-eintrag { padding-left: 8px; }
.ep-eintrag:hover { background: var(--gruen-100); }
.ep-eintrag.aktiv, .ep-eintrag.aktiv:hover { background: #0b70d1; color: #fff; }
.ep-vorgang { display: flex; align-items: center; gap: 6px; }
.ep-vorgang .ep-etikett { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-vorgang.aktiv .ep-anzahl { background: rgba(255,255,255,.25); color: #fff; }
/* Attribut-Dropdown rechts neben dem Picker: erscheint nur, wenn der gewaehlte
   Eintrag ein Vorgang mit mehreren Attribut-Layern ist (Erntekarte = Ertrag +
   Feuchte, Bodenscanner = 12 Parameter). Kompakt wie der .ep-knopf, nicht die
   100%-Breite der Formular-Selects. */
select.ep-attr {
  width: auto; max-width: 260px; padding: 4px 8px;
  font-size: 13.5px; line-height: 1.5; border-radius: 4px; background: #fff;
}

/* ---- Vollbild-Kartenansicht (ASK-36) ---------------------------------- */
/* Der Wrapper (Kachel oder Karten-Div) wird fixed ueber den Bildschirm
   gelegt; das DOM bleibt an Ort und Stelle, damit Picker/Vergleich/Regler
   im Vollbild unveraendert funktionieren. */
.vollbild-aktiv {
  position: fixed !important; inset: 0; z-index: 5000;
  margin: 0 !important; max-width: none !important; width: auto !important;
  border-radius: 0; overflow: auto;
  background: var(--bg, #f6f8f4); padding: 14px 18px;
}
body.vb-offen { overflow: hidden; }
.vb-knopf-schwebend {
  position: absolute; top: 10px; right: 10px; z-index: 1200;
  box-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.vb-schliessen {
  position: fixed; top: 12px; right: 16px; z-index: 5300;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.vb-panel {
  /* Auf der jeweiligen Karte verankert (ziel = Karten-Container): beim
     Ebenen-Vergleich traegt so JEDE Karte ihr eigenes Statistik-Fenster. */
  position: absolute; top: 10px; right: 10px; z-index: 1100;
  width: 270px; max-height: calc(100% - 60px); overflow: auto;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--gruen-100, #dde8d4);
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.28);
  padding: 10px 14px 12px; cursor: default;
}
.vb-panel-kopf { display: flex; justify-content: space-between;
  align-items: baseline; font-size: 14px; }
.vb-panel .vb-zu { border: 0; background: none; cursor: pointer;
  font-size: 17px; line-height: 1; color: var(--text-muted); }
.vb-panel h3 { font-size: 13px; margin: 10px 0 4px; color: var(--gruen-700, #2c5f2d); }
.vb-panel table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vb-panel td { padding: 2.5px 0; border-bottom: 1px solid var(--gruen-50, #f3f8ee); }
.vb-panel td:last-child { text-align: right; font-variant-numeric: tabular-nums;
  padding-left: 10px; white-space: nowrap; }
.vb-panel .vb-leer { color: var(--text-muted); font-size: 12.5px; margin: 8px 0 0; }

/* ---- Eigener Standort auf Leaflet-Karten (standort.js) ---------------- */
.standort-knopf { display: flex; align-items: center; justify-content: center; }
.standort-knopf svg { display: block; }
.standort-knopf.aktiv { color: #1a73e8; }
.standort-knopf.sucht svg { animation: standort-suche 1.1s ease-in-out infinite; }
@keyframes standort-suche { 50% { opacity: .25; } }
.standort-icon { background: none; border: none; }
.standort-punkt {
  width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%;
  background: #1a73e8; border: 2.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(26,115,232,.35), 0 1px 6px rgba(0,0,0,.45);
}
.standort-meldung {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 1150; max-width: calc(100% - 32px); pointer-events: none;
  background: rgba(32,33,36,.88); color: #fff; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; width: max-content;
  text-align: center; line-height: 1.45;
}

/* =====================================================================
   Atisk Office - Ergaenzungen zum gemeinsamen Design-System (Kopie von
   agronomy/webapp/static/atisk.css, Stand 09.10.2026). Office importiert
   keinen Code aus Agronomy; die Palette ist bewusst identisch.
   ===================================================================== */
.sidebar .logo small { font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--gruen-300); margin-left: 8px; vertical-align: middle; }
.public-card .logo small { font-size: 13px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--gruen-500); margin-left: 8px; vertical-align: middle; }

/* Unterreiter-Leiste (Flaechen & Pacht: Karte | Flurstuecke | ...) */
.unterreiter { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 18px;
  border-bottom: 1px solid var(--linie); }
.unterreiter a { padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 14px;
  color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.unterreiter a:hover { background: var(--gruen-100); text-decoration: none; }
.unterreiter a.aktiv { color: var(--gruen-800); font-weight: 600; border-bottom-color: var(--gruen-500); }
.unterreiter a .bald { font-size: 10.5px; color: var(--text-muted); margin-left: 5px;
  text-transform: uppercase; letter-spacing: .4px; }

/* Kennzahlen-Wand der Uebersicht */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-grid .kachel { display: flex; flex-direction: column; gap: 4px; min-height: 128px; }
.kpi-grid .kachel .titel { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 600; }
.kpi-grid .kachel .wert { font-size: 30px; font-weight: 700; color: var(--gruen-700); line-height: 1.1; }
.kpi-grid .kachel .wert.leer { color: #b5bdb0; }
.kpi-grid .kachel .sub { font-size: 13px; color: var(--text-muted); }
.kpi-grid .kachel .link { margin-top: auto; font-size: 13px; }

/* Platzhalter fuer noch nicht gebaute Reiter: ehrlich, nicht leer */
.platzhalter { max-width: 760px; }
.platzhalter .phase { display: inline-block; background: var(--gruen-100); color: var(--gruen-700);
  border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.platzhalter ul { margin: 10px 0 0 18px; padding: 0; color: var(--text); }
.platzhalter li { margin: 4px 0; }

/* Hinweis- und Statuszeilen */
.hinweis { background: var(--gruen-100); border-radius: 8px; padding: 10px 14px; font-size: 14px;
  color: var(--gruen-800); margin-bottom: 14px; }
.hinweis.warn { background: #fdf3d7; color: #8a6d00; }
.hinweis.fehler { background: #fbe4e1; color: var(--warn); }
.status-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #b5bdb0; margin-right: 6px; vertical-align: middle; }
.status-punkt.ok { background: var(--gruen-500); }
.status-punkt.fehler { background: var(--warn); }
.status-punkt.warn { background: var(--gelb); }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }
.spiegel-hinweis { font-size: 12.5px; color: var(--text-muted); }
.spiegel-hinweis b { color: var(--gruen-700); }

/* Flaechen-Karte: Liste links, Karte rechts (wie Agronomy oc-layout) */
.fl-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .fl-layout { grid-template-columns: 1fr; } }
.fl-layout > .kachel + .kachel { margin-top: 0; }
.fl-layout #karte.leaflet-container { height: 680px; }
.fl-liste { max-height: 640px; overflow-y: auto; }
.fl-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-bottom: 1px solid var(--linie); border-radius: 8px; cursor: pointer; }
.fl-zeile:hover, .fl-zeile.aktiv { background: var(--gruen-100); }
.fl-zeile .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-zeile .ha { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ebenen-wahl { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; margin: 0 0 10px; }
.ebenen-wahl label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 500; color: var(--text); }
.legende-punkt { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
