/* Solarkonzepte CRM — Designsystem
   Werkstatt-Weiß, Energie-Grün, Typ-Farben: PV = Solar-Amber, WP = Wärme-Koralle.
   Keine externen Fonts/CDNs (DSGVO, offlinefähig auf Kundenserver). */

:root {
  --bg: #F3F5F2;
  --panel: #FFFFFF;
  --ink: #1C2B24;
  --ink-soft: #5F6E66;
  --linie: #E1E6E0;
  --aktion: #1F7A5C;
  --aktion-dunkel: #17604A;
  --sidebar: #14342A;
  --sidebar-hell: #E8F0EB;
  --pv: #E8A020;
  --wp: #D4633B;
  --warn-bg: #FBF0DA;  --warn-ink: #8A5B12;
  --rot-bg: #F9E4E1;   --rot-ink: #A03227;
  --ok-bg: #E2F0E9;    --ok-ink: #1F7A5C;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(20, 40, 30, .06), 0 2px 8px rgba(20, 40, 30, .05);
  --schrift: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--schrift); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--aktion); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--aktion); outline-offset: 2px; }

/* ------------------------------------------------------------ Grundgerüst */
.layout { display: flex; min-height: 100vh; }
.hauptbereich { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inhalt { padding: 28px 32px 48px; max-width: 1400px; width: 100%; }

/* --------------------------------------------------------------- Sidebar */
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-hell);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.marke { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.marke-zeichen { width: 30px; height: 30px; color: var(--pv); flex-shrink: 0; }
.marke-name { display: block; font-weight: 700; letter-spacing: .02em; font-size: 15px; }
.marke-sub { display: block; font-size: 11px; opacity: .65; letter-spacing: .06em; text-transform: uppercase; }
.marke-dunkel { color: var(--ink); }
.marke-dunkel .marke-zeichen { color: var(--pv); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1;
  min-height: 0; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--sidebar-hell); opacity: .82; font-weight: 500;
}
.nav-link:hover { background: rgba(255,255,255,.07); text-decoration: none; opacity: 1; }
.nav-link.ist-aktiv { background: var(--aktion); opacity: 1; font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .9;
  background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.nav-icon-home   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 11.5 12 4l9 7.5V21h-6v-6h-6v6H3z"/></svg>'); }
.nav-icon-funnel { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4h18l-7 8v6l-4 2v-8z"/></svg>'); }
.nav-icon-kanban { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 4h4v16H4zM10 4h4v10h-4zM16 4h4v7h-4z"/></svg>'); }
.nav-icon-people { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="8" r="4"/><path d="M2 20c0-4 3-6 7-6s7 2 7 6zM17 9a3 3 0 1 0 0-1z"/><path d="M16 14c3.5 0 6 1.8 6 5h-4"/></svg>'); }
.nav-icon-check  { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 12l6 6L20 6" fill="none" stroke="black" stroke-width="4"/></svg>'); }
.nav-icon-gear   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm9 4-2 1.2.3 2.3-2.1 1.2-1.6-1.7-2.3.9-.6 2.1h-2.4l-.6-2.1-2.3-.9-1.6 1.7-2.1-1.2.3-2.3L2 12l2-1.2-.3-2.3 2.1-1.2 1.6 1.7 2.3-.9.6-2.1h2.4l.6 2.1 2.3.9 1.6-1.7 2.1 1.2-.3 2.3z"/></svg>'); }
.nav-icon-leaf   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 4C10 4 4 10 4 17c0 1.5.3 2.6.3 2.6S5 20 7 20c7 0 13-6 13-16zM4.3 19.6C8 13 14 9 18 8"/></svg>'); }
.nav-icon-box    { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2 3 6.5v11L12 22l9-4.5v-11zM12 6l5 2.4-5 2.5-5-2.5z"/></svg>'); }
.nav-icon-euro   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 5.5A7 7 0 0 0 7.3 9H5v2h1.8a7.4 7.4 0 0 0 0 2H5v2h2.3A7 7 0 0 0 17 18.5l-1-1.9A5 5 0 0 1 9.6 15H14v-2H9a5.4 5.4 0 0 1 0-2h5V9H9.6A5 5 0 0 1 16 7.4z"/></svg>'); }
.nav-icon-mail   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 5h20v14H2zm2 2.5V17h16V7.5l-8 5.5z"/></svg>'); }
.nav-icon-folder { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 5h8l2 2.5h10V20H2z"/></svg>'); }
.nav-icon-book   { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 4h9a3 3 0 0 1 3 3v13a4 4 0 0 0-3-1.3H4zM20 4h-1a3 3 0 0 0-3 3v11.7A4 4 0 0 1 19 20h1z"/></svg>'); }
.nav-icon-calendar { --icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 5h18v16H3zm0 5h18M8 2v4M16 2v4" fill="none" stroke="black" stroke-width="2"/></svg>'); }

.global-suche { padding: 6px 14px 10px; }
.global-suche { flex-shrink: 0; }
.global-suche input { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 14px; }
.global-suche input::placeholder { color: rgba(255,255,255,.55); }
.global-suche input:focus { outline: 2px solid var(--aktion); background: rgba(255,255,255,.14); }

.kat-suche { display: inline-block; }
.kat-suche input { padding: 7px 11px; border: 1px solid var(--linie); border-radius: 8px;
  background: var(--panel); color: var(--ink); font-size: 14px; min-width: 190px; }
.kat-suche input:focus { outline: 2px solid var(--aktion); }

.karte-vertriebler { font-size: 11px; font-weight: 600; color: var(--aktion);
  background: var(--ok-bg); padding: 1px 7px; border-radius: 10px; }
.karte-offen { font-size: 11px; font-weight: 600; color: var(--warn-ink);
  background: var(--warn-bg); padding: 1px 7px; border-radius: 10px; }
.karte-beanspruchen { margin-top: 6px; }
.karte-beanspruchen .knopf { width: 100%; }

.gewerk-form { border-top: 1px solid var(--linie); padding: 10px 0; }
.gewerk-form strong { display: block; margin-bottom: 6px; }
.gewerk-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.gewerk-check { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.gewerk-liste { display: flex; flex-direction: column; gap: 10px; }
.gewerk-zeile { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--linie); }
.gewerk-name { font-weight: 600; font-size: 13px; }
.gewerk-subs { display: flex; flex-wrap: wrap; gap: 4px; }
.gewerk-offen { color: var(--ink-soft); font-size: 12px; }
.chip-sub { display: inline-flex; align-items: center; gap: 3px; }
.chip-x { background: none; border: none; cursor: pointer; color: var(--rot-ink); font-weight: 700;
  font-size: 15px; line-height: 1; padding: 0 2px; }
@media (max-width: 640px) { .gewerk-zeile { grid-template-columns: 1fr; } }
.gewerk-chat { grid-column: 1 / -1; margin-top: 4px; }
.gewerk-chat > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--aktion);
  padding: 4px 0; }
.gewerk-chat[open] > summary { margin-bottom: 6px; }

/* Subunternehmer-Chat */
.kern-hinweis { border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
.kern-hinweis.kern-offen { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #E6C878; }
.kern-hinweis.kern-vollstaendig { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #9FD3BE; }
.kern-liste { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.kern-liste li { font-weight: 600; }
.kern-liste li.kern-da { color: var(--ok-ink); }
.kern-liste li.kern-fehlt { color: var(--warn-ink); }

.chat-verlauf { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin-bottom: 10px; }
.chat-nachricht { background: #F3F5F2; border-radius: 8px; padding: 7px 10px; max-width: 85%; align-self: flex-start; }
.chat-nachricht.chat-eigen { background: var(--ok-bg); align-self: flex-end; }
.chat-kopf { font-size: 11px; color: var(--ink-soft); margin-bottom: 2px; }
.chat-body { font-size: 14px; white-space: pre-wrap; }
.chat-formular { display: flex; gap: 8px; align-items: flex-end; }
.chat-formular textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; }
.chat-nachricht { padding: 7px 10px; border-radius: 8px; font-size: 14px; max-width: 85%; }
.chat-intern { background: var(--ok-bg); align-self: flex-end; }
.chat-extern { background: var(--panel); border: 1px solid var(--linie); align-self: flex-start; }
.chat-autor { display: block; font-weight: 600; font-size: 12px; color: var(--ink-soft); }
.chat-text { display: block; white-space: pre-wrap; }
.chat-zeit { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; padding: 8px; border: 1px solid var(--linie); border-radius: 8px; font-family: inherit; resize: vertical; }

.sidebar-fuss { padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nutzer-name { display: block; font-weight: 600; font-size: 13.5px; }
.nutzer-rolle { display: block; font-size: 11px; opacity: .6; }
.abmelden { color: var(--sidebar-hell); opacity: .7; font-size: 13px; }
.abmelden:hover { opacity: 1; }

/* Mobilkopf */
.mobilkopf { display: none; }

/* -------------------------------------------------------------- Seitenkopf */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.seitenkopf h1 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.eyebrow { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.eyebrow a { color: var(--ink-soft); }
.untertitel { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.seitenkopf-aktionen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Knöpfe */
.knopf { background: var(--aktion); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.knopf:hover { background: var(--aktion-dunkel); }
.knopf-leise { background: transparent; color: var(--ink); border: 1px solid var(--linie); }
.knopf-leise:hover { background: var(--bg); }
.knopf-klein { padding: 6px 12px; font-size: 13px; }
.knopf-voll { width: 100%; }
.knopf-rot { background: var(--rot-ink); }
.knopf-rot:hover { background: #7E2118; }

.umschalter { display: inline-flex; background: #E9EDE8; border-radius: 8px; padding: 3px; }
.umschalter a { padding: 6px 12px; border-radius: 6px; color: var(--ink-soft); font-size: 13.5px; font-weight: 500; }
.umschalter a:hover { text-decoration: none; color: var(--ink); }
.umschalter a.ist-aktiv { background: var(--panel); color: var(--ink); box-shadow: var(--schatten); font-weight: 600; }

/* ------------------------------------------------------------------ Panels */
.panel { background: var(--panel); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 18px 20px; margin-bottom: 20px; }
.panel-titel { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.panel-kopfzeile { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-kopfzeile .panel-titel { margin-bottom: 0; }
.leer { color: var(--ink-soft); font-size: 14px; margin: 6px 0; }

.spaltenzeile { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.spaltenzeile-haupt { min-width: 0; }
.spaltenzeile-seite { min-width: 0; }
@media (min-width: 900px) { .spaltenzeile:has(.spaltenzeile-haupt) { grid-template-columns: 1.7fr 1fr; } }

/* ----------------------------------------------------------------- Kacheln */
.kachelzeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 24px; }
.kachel { background: var(--panel); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 16px 18px; color: var(--ink); position: relative; }
.kachel:hover { text-decoration: none; border-color: var(--aktion); }
.kachel-zahl { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kachel-label { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.kachel-hinweis { position: absolute; top: 14px; right: 14px; background: var(--ok-bg); color: var(--ok-ink);
  font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 9px; }
.kachel-hinweis-rot { background: var(--rot-bg); color: var(--rot-ink); }

/* ------------------------------------------------------------------- Board */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px;
  scroll-snap-type: x proximity; }
.spalte { flex: 0 0 265px; scroll-snap-align: start; background: #EBEFEA;
  border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.spalte-verloren { background: #F0EAE8; }
.spalte-fertig { background: #E5EEE9; }
.spalte-kopf { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; }
.spalte-kopf h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); }
.spalte-anzahl { font-size: 12px; font-weight: 700; color: var(--ink-soft);
  background: rgba(0,0,0,.06); border-radius: 99px; padding: 1px 8px; }
.spalte-karten { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 8px; min-height: 60px; }
.spalte.ist-dropziel { outline: 2px dashed var(--aktion); outline-offset: -4px; }

.karte { background: var(--panel); border: 1px solid var(--linie); border-radius: 8px;
  box-shadow: var(--schatten); padding: 10px 12px; cursor: grab; }
.karte:active { cursor: grabbing; }
.karte.wird-gezogen { opacity: .45; }
.karte-kopf { display: flex; align-items: center; gap: 8px; }
.karte-kunde { font-weight: 600; color: var(--ink); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-fuss { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px;
  font-size: 12.5px; color: var(--ink-soft); }

.typpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.typ-pv { background: var(--pv); }
.typ-wp { background: var(--wp); }
.typ-kombi { background: linear-gradient(90deg, var(--pv) 50%, var(--wp) 50%); }

.stau-badge { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.stau-gelb { background: var(--warn-bg); color: var(--warn-ink); }
.stau-rot { background: var(--rot-bg); color: var(--rot-ink); }
.stau-gross { font-size: 13px; padding: 6px 14px; }

/* ---------------------------------------------------------- Stationsleiste */
.stationsleiste { display: flex; gap: 0; background: var(--panel); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 16px 14px;
  margin-bottom: 14px; overflow-x: auto; }
.station { flex: 1; min-width: 86px; text-align: center; position: relative; }
.station::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%;
  height: 3px; background: var(--linie); }
.station:first-child::before { display: none; }
.station.ist-vorbei::before, .station.ist-aktuell::before { background: var(--aktion); }
.station-punkt { display: block; width: 16px; height: 16px; margin: 0 auto; border-radius: 50%;
  background: var(--panel); border: 3px solid var(--linie); position: relative; z-index: 1; }
.station.ist-vorbei .station-punkt { background: var(--aktion); border-color: var(--aktion); }
.station.ist-aktuell .station-punkt { border-color: var(--aktion);
  box-shadow: 0 0 0 4px rgba(31, 122, 92, .18); }
.station-label { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 6px;
  line-height: 1.25; }
.station.ist-aktuell .station-label { color: var(--ink); font-weight: 700; }
.station-verloren .station-punkt { border-color: var(--rot-ink); }

.statusleiste-aktionen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 22px; font-size: 13.5px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- Tabellen */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-soft); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 11px 10px; border-bottom: 1px solid var(--linie); }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover { background: #F6F8F5; }
.tabelle tbody tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- Aufgaben */
.aufgabenliste { list-style: none; margin: 0; padding: 0; }
.aufgabe { display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--linie); }
.aufgabe:last-child { border-bottom: 0; }
.aufgabe-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aufgabe-projekt { font-size: 12.5px; color: var(--ink-soft); }
.aufgabe-frist { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.aufgabe.ist-ueberfaellig .aufgabe-frist { color: var(--rot-ink); font-weight: 700; }
.aufgabe.ist-erledigt .aufgabe-text { text-decoration: line-through; opacity: .55; }
.abhaken { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linie);
  background: var(--panel); cursor: pointer; flex-shrink: 0; }
.abhaken:hover { border-color: var(--aktion); }
.abhaken.ist-an { background: var(--aktion); border-color: var(--aktion); position: relative; }
.abhaken.ist-an::after { content: ""; position: absolute; inset: 4px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 12l6 6L20 6" fill="none" stroke="white" stroke-width="4"/></svg>') center / contain no-repeat; }

/* --------------------------------------------------------- Listen & Daten */
.datenliste { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.datenliste dt { color: var(--ink-soft); }
.datenliste dd { margin: 0; }
.einfachliste { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; }
.einfachliste li { padding: 4px 0; }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { padding: 7px 0 7px 16px; border-left: 2px solid var(--linie); position: relative; }
.verlauf li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--aktion); }
.verlauf-status { display: block; font-weight: 600; font-size: 13.5px; }
.verlauf-meta { font-size: 12px; color: var(--ink-soft); }
.stauliste { list-style: none; margin: 0; padding: 0; }
.stau-eintrag { display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--linie); color: var(--ink); }
.stau-eintrag:hover { text-decoration: none; background: #F6F8F5; }
.stau-kunde { font-weight: 600; flex: 1; }
.stau-status { color: var(--ink-soft); font-size: 13px; }
.notizliste { list-style: none; margin: 14px 0 0; padding: 0; }
.notizliste li { border-top: 1px solid var(--linie); padding: 10px 2px; }
.notizliste p { margin: 0 0 4px; white-space: pre-wrap; }
.notiz-meta { font-size: 12px; color: var(--ink-soft); }

/* -------------------------------------------------------------- Formulare */
.formular { display: flex; flex-direction: column; gap: 12px; }
.formular h2 { font-size: 17px; margin-bottom: 4px; }
.formular label { display: flex; flex-direction: column; gap: 4px; font-size: 13px;
  font-weight: 600; color: var(--ink-soft); }
.formular input, .formular select, .formular textarea, .suchfeld input {
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  border: 1px solid var(--linie); border-radius: 8px; padding: 9px 11px; background: var(--panel); }
.formular input:focus, .formular select:focus, .formular textarea:focus, .suchfeld input:focus {
  outline: 2px solid var(--aktion); outline-offset: 0; border-color: var(--aktion); }
.formular-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zeilen-formular { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.zeilen-formular select { flex: 1; border: 1px solid var(--linie); border-radius: 8px; padding: 7px 9px; font-size: 13.5px; }
.notiz-formular { display: flex; gap: 8px; align-items: flex-end; }
.notiz-formular textarea { flex: 1; resize: vertical; border: 1px solid var(--linie);
  border-radius: 8px; padding: 9px 11px; font-family: inherit; font-size: 14px; }
.suchfeld input { min-width: 220px; }
.hinweis { border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.hinweis-fehler { background: var(--rot-bg); color: var(--rot-ink); }

/* ---------------------------------------------------------------- Dialoge */
.dialog { border: 0; border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 30, 22, .25);
  padding: 22px 24px; width: min(480px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(15, 30, 22, .45); }
.dialog-schmal { width: min(400px, calc(100vw - 32px)); }
.dialog-aktionen { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.dialog-untertitel { color: var(--ink-soft); font-size: 14px; margin: 4px 0 12px; }
.statuswahl { display: flex; flex-direction: column; gap: 6px; }
.statuswahl-knopf { text-align: left; background: var(--bg); border: 1px solid var(--linie);
  border-radius: 8px; padding: 11px 14px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.statuswahl-knopf:hover { border-color: var(--aktion); background: var(--ok-bg); }

/* ------------------------------------------------------------------ Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--sidebar); }
.login-karte { background: var(--panel); border-radius: 16px; padding: 30px 32px;
  width: min(380px, calc(100vw - 32px)); box-shadow: 0 16px 50px rgba(0,0,0,.35); }
.login-karte .marke { padding: 0 0 20px; }
.login-karte .formular { margin-top: 4px; }

/* --------------------------------------------- Unterlagen & Anforderungen */
.anforderungsliste { list-style: none; margin: 0; padding: 0; }
.anforderung { display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--linie); }
.anforderung:last-child { border-bottom: 0; }
.anforderung-punkt { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--linie); background: var(--panel); }
.status-erhalten .anforderung-punkt { border-color: var(--warn-ink); background: var(--warn-bg); }
.status-geprueft .anforderung-punkt { border-color: var(--aktion); background: var(--aktion); }
.optional { color: var(--ink-soft); font-style: normal; font-size: 12px; }
.knopfgruppe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-formular { display: inline; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  background: #EDF1EC; border-radius: 99px; padding: 2px 9px; }
.fortschritt-offen { color: var(--warn-ink); font-weight: 700; }
.fortschritt-ok { color: var(--ok-ink); font-weight: 700; }
.zeile-warnung td { background: #FDF7F0; }
.tabelle-still th { display: none; }
.formular-kompakt input { padding: 7px 9px; font-size: 13.5px; }
.hinweis-text { white-space: pre-wrap; }

/* ----------------------------------------------------------------- Galerie */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin-bottom: 12px; }
.galerie-bild { position: relative; display: block; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--linie); aspect-ratio: 4/3; background: #EDF1EC; }
.galerie-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie-label { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px;
  padding: 3px 6px; background: rgba(20, 40, 30, .65); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dateiliste { list-style: none; margin: 0 0 12px; padding: 0; }
.dateiliste li { display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.dateiliste li:last-child { border-bottom: 0; }
.upload-formular { flex-wrap: wrap; }
.upload-formular input[type="file"] { flex: 1; min-width: 180px; font-size: 13px; }
.mappe-kopf { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--linie); }
.foerder-formular { border-bottom: 1px solid var(--linie); padding-bottom: 12px; margin-bottom: 12px; }
.foerder-formular:last-of-type { border-bottom: 0; }

/* ---------------------------------------------- Formulare & Unterschrift */
.f-abschnitt { padding: 0; overflow: hidden; }
.f-abschnitt-titel { cursor: pointer; font-weight: 700; font-size: 15px;
  padding: 16px 20px; list-style: none; position: relative; }
.f-abschnitt-titel::after { content: "▾"; position: absolute; right: 20px;
  color: var(--ink-soft); transition: transform .15s; }
.f-abschnitt:not([open]) .f-abschnitt-titel::after { transform: rotate(-90deg); }
.f-felder { padding: 4px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.f-feld { display: flex; flex-direction: column; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--ink-soft); border: 0; margin: 0; padding: 0; }
.f-feld legend { padding: 0; margin-bottom: 6px; }
.f-feld input[type="text"], .f-feld input[type="date"], .f-feld textarea {
  font-family: inherit; font-size: 15px; color: var(--ink); border: 1px solid var(--linie);
  border-radius: 8px; padding: 10px 12px; background: var(--panel); font-weight: 400; }
.f-optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.f-option { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--linie);
  border-radius: 99px; padding: 8px 14px; cursor: pointer; font-weight: 500;
  color: var(--ink); background: var(--panel); font-size: 14px; }
.f-option:has(input:checked) { border-color: var(--aktion); background: var(--ok-bg);
  font-weight: 600; }
.f-option input { accent-color: var(--aktion); margin: 0; }
.f-bestaetigung { display: flex; gap: 10px; align-items: flex-start; background: #F6F8F5;
  border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; font-size: 13.5px;
  cursor: pointer; }
.f-bestaetigung input { accent-color: var(--aktion); width: 18px; height: 18px;
  flex-shrink: 0; margin-top: 1px; }
.f-bestaetigung.ist-pflicht { border-color: #D9C9A3; }
.f-hinweistext { font-size: 12.5px; color: var(--ink-soft); font-weight: 400;
  margin: 2px 0 0; }
.f-tabellenzeile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 8px; }
.f-tabellenzeile input, .f-tabellenzeile select { border: 1px solid var(--linie);
  border-radius: 8px; padding: 8px 10px; font-size: 13.5px; font-family: inherit; }
.sig-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; }
.sig-feld { display: flex; flex-direction: column; gap: 6px; }
.sig-canvas { width: 100%; max-width: 420px; aspect-ratio: 3 / 1; border: 1.5px dashed var(--linie);
  border-radius: 10px; background: #FCFDFC; cursor: crosshair; }
.sig-bild { max-width: 320px; border: 1px solid var(--linie); border-radius: 10px;
  background: #fff; }
.sig-loeschen { align-self: flex-start; }
.hinweis-offline { background: var(--warn-bg); color: var(--warn-ink); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qr-bild { display: block; width: 220px; margin: 0 auto; }
.formular-status { font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.formular-status.entwurf { background: var(--warn-bg); color: var(--warn-ink); }
.formular-status.signiert { background: var(--ok-bg); color: var(--ok-ink); }
.formular-gruppe-titel { font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); font-weight: 700; margin: 14px 0 2px; }
.formular-gruppe-titel:first-of-type { margin-top: 4px; }
@media (max-width: 760px) {
  .f-tabellenzeile { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------- Lead-OCR */
.ocr-zone { background: var(--ok-bg); border: 1.5px dashed var(--aktion); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ocr-knopf { font-weight: 700; color: var(--aktion-dunkel); cursor: pointer; font-size: 14px; }
.ocr-knopf:hover { text-decoration: underline; }
.ocr-status { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------------------------------------------- Kunden-Upload-Portal */
.upload-body { background: var(--bg); min-height: 100vh; padding: 20px 14px 48px;
  display: flex; justify-content: center; }
.upload-karte { width: 100%; max-width: 560px; }
.upload-karte h1 { font-size: 22px; margin: 14px 0 8px; letter-spacing: -.01em; }
.upload-intro { color: var(--ink-soft); margin: 0 0 20px; }
.upload-liste { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 12px; }
.upload-eintrag { background: var(--panel); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px 16px; }
.upload-eintrag-kopf { display: flex; gap: 10px; align-items: flex-start; }
.upload-eintrag-kopf .anforderung-punkt { margin-top: 4px; }
.upload-beschreibung { margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.upload-eintrag-formular { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.upload-eintrag-formular input[type="file"] { flex: 1; min-width: 160px; font-size: 13px; }
.upload-status { display: inline-block; margin-top: 10px; font-weight: 600;
  color: var(--warn-ink); font-size: 14px; }
.upload-status-ok { color: var(--ok-ink); }
.upload-fuss { color: var(--ink-soft); font-size: 12.5px; margin-top: 22px; }
.upload-eintrag.status-geprueft, .upload-eintrag.status-erhalten { opacity: .82; }

/* ------------------------------------------------------------------ Mobil */
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 40; height: 100vh; left: 0; top: 0;
    transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-offen .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .mobilkopf { display: flex; align-items: center; gap: 12px; background: var(--sidebar);
    color: var(--sidebar-hell); padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
  .mobilkopf-titel { font-weight: 700; }
  .hamburger { background: none; border: 0; padding: 4px; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px; }
  .hamburger span { width: 20px; height: 2.5px; background: var(--sidebar-hell); border-radius: 2px; }
  .inhalt { padding: 18px 14px 40px; }
  .seitenkopf h1 { font-size: 21px; }
  .spaltenzeile { grid-template-columns: 1fr; }
  .spalte { flex-basis: 82vw; }
  .karte { cursor: pointer; }
  .formular-zeile { grid-template-columns: 1fr; }
  .kachel-zahl { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}