/* =================================================================
   SABESUS CRM — Oberfläche nach der Figma-Vorlage „Dashboard Liquid Glass“
   Dunkles Glas, ein Akzent (SABESUS-Petrol), Inter, keine Haarlinien
   außer Glas-Lichtkanten. Grundschrift 15 px, nichts unter 12 px.
   ================================================================= */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-var.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-var-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --schrift: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --bg: #04070a;
  --text: #fafafa;
  --text-2: rgba(250, 250, 250, .74);
  --text-3: rgba(250, 250, 250, .52);
  --text-4: rgba(250, 250, 250, .34);

  --akzent: #16d0ab;
  --akzent-tief: #05806a;
  --akzent-hell: #6cf3d6;
  --akzent-tinte: #03211b;

  --ok: #3ddc84;
  --warn: #f5b942;
  --gefahr: #ff6b5e;
  --info: #4da3ff;

  --glas: linear-gradient(135deg, rgba(19, 19, 19, .88) 0%, rgba(26, 26, 26, .34) 100%);
  --glas-hell: linear-gradient(135deg, rgba(40, 40, 40, .7) 0%, rgba(40, 40, 40, .25) 100%);
  --glas-kante: rgba(255, 255, 255, .07);
  --glas-kante-hell: rgba(255, 255, 255, .13);
  --glas-innen: inset 0 1px 0 rgba(255, 255, 255, .08);
  --lichtkante: linear-gradient(90deg, rgba(223, 232, 255, .55) 0%, rgba(188, 197, 211, .12) 100%);

  --r-shell: 20px;
  --r-karte: 12px;
  --r-klein: 8px;
  --r-eckig: 4px;

  --sl-breite: 286px;
  --sl-schmal: 76px;
  --abstand: 16px;

  --schatten: 0 24px 60px -30px rgba(0, 0, 0, .8);
  --dauer: .18s;
  --kurve: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.47 var(--schrift);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
p { margin: 0 0 .6em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; font-weight: 600; }
small { font-size: 12px; }
strong { font-weight: 600; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
kbd { font: 500 12px/1 var(--schrift); padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-3); }
hr { border: 0; height: 2px; background: var(--lichtkante); opacity: .35; margin: 16px 0; }
.icon { flex: none; vertical-align: -3px; }
.gedaempft { color: var(--text-3); }
.leise { color: var(--text-4); }
.rechts { text-align: right; }
.mitte { text-align: center; }
.zahl, .tabellen-zahl, td.zahl, .geld { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.nur-mobil { display: none !important; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .gefahr { color: var(--gefahr); } .info { color: var(--info); } .akzent { color: var(--akzent); }
.versteckt { display: none !important; }
[hidden] { display: none !important; }

/* ---------- Hintergrund mit Glanz ---------- */
.hintergrund { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 50% 110%, #06141a 0%, var(--bg) 60%); }
.hintergrund .glanz { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.hintergrund .g1 { width: 46vw; height: 46vw; left: -14vw; top: -18vw; background: radial-gradient(circle, rgba(10,166,134,.55), rgba(10,166,134,0) 65%); }
.hintergrund .g2 { width: 40vw; height: 40vw; right: -12vw; top: 28vh; background: radial-gradient(circle, rgba(5,128,106,.42), rgba(5,128,106,0) 65%); }
.hintergrund .g3 { width: 30vw; height: 30vw; left: 30vw; bottom: -16vw; background: radial-gradient(circle, rgba(22,208,171,.22), rgba(22,208,171,0) 65%); }

/* ---------- Grundraster ---------- */
body.app { display: grid; grid-template-columns: var(--sl-breite) minmax(0, 1fr); gap: var(--abstand); padding: 15px 16px; align-items: start; }
body.app.sl-zu { grid-template-columns: var(--sl-schmal) minmax(0, 1fr); }
.hauptbereich { display: flex; flex-direction: column; gap: var(--abstand); min-width: 0; }

/* ---------- Glasflächen ---------- */
.glas, .seitenleiste, .kopfzeile, .inhalt, .karte, .kennzahl, .dropdown-menue, .dialog, .anmelde-karte, .sl-karte, .suche-ergebnis, .hinweis {
  background: var(--glas);
  border: 1px solid var(--glas-kante);
  box-shadow: var(--glas-innen), var(--schatten);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- Seitenleiste ---------- */
.seitenleiste { position: sticky; top: 15px; height: calc(100vh - 30px); border-radius: var(--r-shell); display: flex; flex-direction: column; overflow: hidden; transition: width var(--dauer) var(--kurve); }
.sl-kopf { display: flex; align-items: center; gap: 12px; padding: 15px 16px; background: var(--glas-hell); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.sl-profil { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.sl-name { display: flex; flex-direction: column; min-width: 0; }
.sl-name small { color: var(--text-2); font-size: 13px; line-height: 18px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-name strong { font-size: 20px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-suche { padding: 24px 16px 0; position: relative; }
.suche { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--glas-kante); transition: border-color var(--dauer); }
.suche:focus-within { border-color: rgba(22,208,171,.45); box-shadow: 0 0 0 3px rgba(22,208,171,.12); }
.suche .icon { color: var(--text-2); }
.suche input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 4px 0; color: var(--text); }
.suche input::placeholder { color: var(--text-3); }
.suche kbd { background: rgba(255,255,255,.06); padding: 6px 9px; }
.suche-ergebnis { position: absolute; left: 16px; right: 16px; top: calc(100% + 6px); z-index: 30; border-radius: 12px; max-height: 60vh; overflow: auto; padding: 6px; }
.suche-ergebnis a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; }
.suche-ergebnis a:hover { background: rgba(255,255,255,.06); }
.suche-ergebnis small { color: var(--text-3); }
.suche-ergebnis .se-gruppe { padding: 8px 10px 2px; font-size: 12px; font-weight: 500; color: var(--text-4); text-transform: none; }
.sl-nav { display: flex; flex-direction: column; gap: 1px; padding: 20px 0 8px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.sl-zelle { position: relative; display: flex; align-items: center; gap: 8px; height: 56px; padding: 10px 16px; color: var(--text); transition: background var(--dauer); flex: none; }
.sl-zelle:hover { background: rgba(255,255,255,.035); }
.sl-zelle.aktiv { background: var(--glas-hell); }
.sl-zelle.aktiv::before { content: ''; position: absolute; left: 0; top: 10px; width: 4px; height: 36px; border-radius: 0 3px 3px 0; background: #fff; box-shadow: 1px 0 7px rgba(255,255,255,.6), 1px 0 3px rgba(255,255,255,.3), inset -1px 0 2px rgba(255,255,255,.5); }
.sl-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--text); flex: none; background: rgba(255,255,255,.04); }
.sl-zelle.aktiv .sl-icon { background: var(--glas-hell); box-shadow: var(--glas-innen); }
.sl-label { font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-zahl { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; font-size: 13px; font-weight: 500; background: var(--akzent); color: var(--akzent-tinte); }
.sl-trenner { display: block; height: 2px; margin: 6px 0; background: var(--lichtkante); opacity: .28; }
.sl-fuss { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: none; }
@media (max-height: 840px) { .sl-karte { display: none; } }
.sl-karte { border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--glas-innen); }
.sl-karte strong { font-size: 16px; letter-spacing: .01em; }
.sl-karte p { font-size: 13px; color: var(--text-2); margin: 0 0 6px; line-height: 1.4; }
.sl-marke { display: flex; align-items: center; gap: 10px; color: var(--text-4); font-size: 12px; padding: 2px 4px; }
.sl-marke img { width: 56px; height: auto; opacity: .85; filter: saturate(.9); }
.sl-zu { margin-left: auto; flex: none; }

/* schmale Seitenleiste */
body.sl-zu .seitenleiste { width: var(--sl-schmal); }
body.sl-zu .sl-name, body.sl-zu .sl-suche, body.sl-zu .sl-label, body.sl-zu .sl-karte, body.sl-zu .sl-marke span { display: none; }
body.sl-zu .sl-kopf { justify-content: center; padding: 15px 8px; flex-direction: column; gap: 10px; }
body.sl-zu .sl-profil { flex: none; }
body.sl-zu .sl-zu { margin: 0; transform: rotate(180deg); }
body.sl-zu .sl-zelle { justify-content: center; padding: 14px 8px; }
body.sl-zu .sl-zahl { position: absolute; top: 10px; right: 8px; min-width: 20px; height: 20px; font-size: 11px; padding: 0 5px; }
body.sl-zu .sl-marke { justify-content: center; }
body.sl-zu .sl-nav { padding-top: 16px; }

/* ---------- Kopfzeile ---------- */
/* position + z-index: die Kopfzeile bildet durch backdrop-filter einen eigenen Stapelkontext – ohne z-index würde der
   Inhaltsbereich darunter (ebenfalls Glas) die Dropdowns für Sicht, Timer und Benachrichtigungen überdecken. */
.kopfzeile { position: relative; z-index: 20; height: 66px; border-radius: var(--r-shell); display: flex; align-items: center; gap: 22px; padding: 0 24px; }
.kz-links { display: flex; align-items: baseline; gap: 22px; min-width: 0; flex: 1; }
.kz-links h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brotkrumen { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--text-4); white-space: nowrap; }
.brotkrumen a { color: var(--text-4); }
.brotkrumen a:hover { color: var(--text); }
.brotkrumen span { color: var(--text); }
.brotkrumen .icon { color: var(--text-4); }
.kz-unter { font-size: 13px; color: var(--text-3); }
.kz-rechts { display: flex; align-items: center; gap: 14px; flex: none; }
.kz-glocke { position: relative; }
.punkt { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--akzent); border: 1.5px solid #0d0f10; }
.kz-konto { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; font-size: 13px; transition: background var(--dauer); }
.kz-konto:hover { background: rgba(255,255,255,.06); }
.kz-konto .icon { color: var(--text-3); }

/* ---------- Inhalt ---------- */
.inhalt { border-radius: var(--r-shell); padding: 16px; display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - 30px - 66px - 16px); }
.inhalt-frei { display: grid; place-items: center; min-height: calc(100vh - 30px); }

/* ---------- Avatare, Chips, Badges ---------- */
.avatar { --avatar-farbe: var(--akzent); position: relative; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: #04120f; background: var(--avatar-farbe); flex: none; }
.avatar-mittel { width: 32px; height: 32px; font-size: 12px; }
.avatar-gross { width: 56px; height: 56px; font-size: 18px; box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 0 0 6px color-mix(in srgb, var(--avatar-farbe) 30%, transparent); }
.avatar .online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--akzent); border: 1.5px solid #0d0f10; box-shadow: 0 0 6px var(--akzent); }
.firma-chip { --chip: var(--akzent); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 99px; font-size: 12px; font-weight: 500; background: color-mix(in srgb, var(--chip) 14%, transparent); color: color-mix(in srgb, var(--chip) 75%, #fff); white-space: nowrap; }
.firma-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--chip); box-shadow: 0 0 6px var(--chip); }
.firma-chip.klein { font-size: 11px; padding: 2px 7px 2px 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.badge-ok { background: rgba(61,220,132,.1); color: var(--ok); }
.badge-warn { background: rgba(245,185,66,.12); color: var(--warn); }
.badge-gefahr { background: rgba(255,107,94,.12); color: var(--gefahr); }
.badge-info { background: rgba(77,163,255,.12); color: var(--info); }
.badge-akzent { background: rgba(22,208,171,.12); color: var(--akzent); }
.badge-neutral { background: rgba(255,255,255,.07); color: var(--text-2); }
.badge-gross { font-size: 13px; padding: 5px 11px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; font-weight: 500; font-size: 15px; line-height: 1; white-space: nowrap; background: var(--glas-hell); border: 1px solid var(--glas-kante); box-shadow: var(--glas-innen); color: var(--text-2); transition: background var(--dauer), color var(--dauer), border-color var(--dauer), transform var(--dauer); }
.btn:hover { color: var(--text); background: rgba(255,255,255,.1); border-color: var(--glas-kante-hell); }
.btn:active { transform: translateY(1px); }
.btn .icon { opacity: .8; }
.btn-primaer { background: linear-gradient(135deg, var(--akzent) 0%, var(--akzent-tief) 120%); color: #02231c; border-color: rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 24px -10px rgba(22,208,171,.7); }
.btn-primaer:hover { color: #02231c; background: linear-gradient(135deg, var(--akzent-hell) 0%, var(--akzent) 120%); }
.btn-primaer .icon { opacity: 1; }
.btn-gefahr { color: var(--gefahr); }
.btn-gefahr:hover { background: rgba(255,107,94,.14); color: #ffb0a8; }
.btn-leise { background: transparent; border-color: transparent; box-shadow: none; }
.btn-leise:hover { background: rgba(255,255,255,.06); }
.btn-klein { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn-breit { width: 100%; }
.btn-pille { border-radius: 99px; height: 52px; padding: 6px 6px 6px 18px; justify-content: space-between; font-weight: 500; color: var(--text); }
.btn-pille i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--glas-hell); box-shadow: var(--glas-innen); }
.btn-rund { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--glas-hell); border: 1px solid var(--glas-kante); box-shadow: var(--glas-innen); color: var(--text); flex: none; transition: background var(--dauer); }
.btn-rund:hover { background: rgba(255,255,255,.12); }
.btn-rund.klein { width: 32px; height: 32px; color: var(--text-2); }
.btn-eckig { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--r-eckig); background: var(--glas-hell); border: 1px solid var(--glas-kante); color: var(--text-3); font-size: 13px; font-weight: 500; }
.btn-eckig:hover { color: var(--text); }
.btn-eckig.aktiv { color: var(--text); background: rgba(255,255,255,.12); }
.btn-eckig.inaktiv { opacity: .4; pointer-events: none; }
.btn-gruppe { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn[disabled], .btn.inaktiv { opacity: .45; pointer-events: none; }

/* ---------- Segment (Filter-Pillen) ---------- */
.segment { display: inline-flex; gap: 0; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--glas-kante); flex-wrap: wrap; }
.segment a, .segment button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-3); transition: background var(--dauer), color var(--dauer); }
.segment a:hover, .segment button:hover { color: var(--text); }
.segment .aktiv { background: var(--glas-hell); box-shadow: var(--glas-innen); color: var(--text); }
.segment .zaehler { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--text-3); }

/* ---------- Reiter ---------- */
.reiter { display: flex; gap: 4px; flex-wrap: wrap; }
.reiter a { padding: 8px 14px; border-radius: 10px; font-weight: 500; color: var(--text-3); font-size: 14px; }
.reiter a.aktiv { background: var(--glas-hell); color: var(--text); box-shadow: var(--glas-innen); }
.reiter a:hover { color: var(--text); }

/* ---------- Werkzeugleiste über Listen ---------- */
.werkzeuge { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.werkzeuge-links, .werkzeuge-rechts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-feld { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--glas-kante); color: var(--text-3); }
.filter-feld input, .filter-feld select { background: none; border: 0; outline: 0; color: var(--text); min-width: 0; height: 100%; }
.filter-feld select { appearance: none; padding-right: 18px; cursor: pointer; }
.filter-feld select option { background: #161a1d; color: #fafafa; }
.filter-feld input::placeholder { color: var(--text-3); }
.filter-feld:focus-within { border-color: rgba(22,208,171,.45); }

/* ---------- Karten ---------- */
.karte { border-radius: var(--r-karte); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.karte-kopf h2, .karte-kopf h3 { display: flex; align-items: center; gap: 8px; }
.karte-kopf .btn-rund { color: var(--text-2); }
.karte-aktionen { display: flex; align-items: center; gap: 8px; }
.karte-dicht { gap: 8px; }
.karte-ohne { padding: 0; }
.karten-raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster-3-1 { display: grid; gap: 16px; grid-template-columns: minmax(0, 3fr) minmax(280px, 1.4fr); align-items: start; }
.raster-2-1 { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.raster-1-2 { display: grid; gap: 16px; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); align-items: start; }
.spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lichtkante { height: 2px; background: var(--lichtkante); opacity: .35; border-radius: 2px; }

/* ---------- Kennzahlen ---------- */
.kennzahlen { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kennzahlen-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1560px) { .kennzahlen-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kennzahl { border-radius: var(--r-karte); padding: 16px; display: flex; flex-direction: column; gap: 16px; transition: border-color var(--dauer), transform var(--dauer); }
a.kennzahl:hover { border-color: var(--glas-kante-hell); transform: translateY(-1px); }
.kz-kopf { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); letter-spacing: .01em; }
.kz-wert { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.kz-wert strong { font-size: 22px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.kz-trend { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.kz-trend small { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ---------- Tabellen ---------- */
.tabelle-rahmen { border-radius: var(--r-karte); overflow: hidden; background: rgba(255,255,255,.025); }
.tabelle { width: 100%; }
.tabelle th { text-align: left; font-size: 13px; font-weight: 500; color: var(--text-3); padding: 14px 16px; background: #131313; white-space: nowrap; }
.tabelle th a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.tabelle th a:hover, .tabelle th a.aktiv { color: var(--text); }
.tabelle td { padding: 12px 16px; vertical-align: middle; font-size: 14px; }
.tabelle tbody tr { transition: background var(--dauer); }
.tabelle tbody tr:nth-child(even) { background: linear-gradient(90deg, rgba(19,19,19,.7), rgba(26,26,26,.25)); }
.tabelle tbody tr:hover { background: rgba(255,255,255,.05); }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle td.haupt { font-weight: 500; color: var(--text); }
.tabelle td.gedaempft, .tabelle .gedaempft { color: var(--text-3); }
.tabelle td.aktionen { text-align: right; white-space: nowrap; }
.tabelle .zelle-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tabelle .zelle-person > div { min-width: 0; display: flex; flex-direction: column; }
.tabelle .zelle-person small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabelle .zelle-person strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle-leer td { padding: 0; }
.tabelle-kompakt th, .tabelle-kompakt td { padding: 8px 12px; }
.tabelle-scroll { overflow-x: auto; }

/* ---------- Listen / Details ---------- */
.liste { display: flex; flex-direction: column; }
.liste-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.liste-zeile + .liste-zeile { box-shadow: 0 -1px 0 rgba(255,255,255,.05); }
.liste-zeile .wachsen { flex: 1; min-width: 0; }
.liste-zeile strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-zeile small { color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-zeile.klickbar { cursor: pointer; border-radius: 8px; padding: 10px 8px; margin: 0 -8px; }
.liste-zeile.klickbar:hover { background: rgba(255,255,255,.05); }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; align-items: baseline; }
.details dt { color: var(--text-3); font-size: 14px; }
.details dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.details dd.gedaempft { font-weight: 400; }
.zeilen-paar { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.zeilen-paar span:first-child { color: var(--text-3); }
.zeilen-paar strong { font-weight: 500; text-align: right; }
.zeilen-paare { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: 16px; }
.feld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feld > span { color: var(--text-3); font-size: 14px; letter-spacing: .01em; }
.feld input, .feld select, .feld textarea, .eingabe { width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--glas-hell); border: 1px solid var(--glas-kante); box-shadow: var(--glas-innen); color: var(--text); outline: 0; transition: border-color var(--dauer), box-shadow var(--dauer); }
.feld textarea { height: auto; min-height: 110px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus, .eingabe:focus { border-color: rgba(22,208,171,.5); box-shadow: var(--glas-innen), 0 0 0 3px rgba(22,208,171,.14); }
.feld input::placeholder, .feld textarea::placeholder { color: var(--text-4); }
.feld select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fafafa' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer; }
.feld select option { background: #161a1d; color: #fafafa; }
.feld input[type="date"] { color-scheme: dark; }
.feld input:disabled, .feld select:disabled { opacity: .5; }
.feld .feld-hinweis { font-size: 12px; color: var(--text-4); }
.feld.fehler input, .feld.fehler select { border-color: rgba(255,107,94,.6); }
.feld-reihe { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.feld-reihe-fest { display: grid; gap: 16px; grid-template-columns: repeat(var(--spalten, 2), minmax(0, 1fr)); }
.feld-klein input, .feld-klein select, .feld-klein .eingabe { height: 38px; padding: 0 12px; border-radius: 10px; }
.feld-klein > span { font-size: 13px; }
.feld-inline { display: flex; align-items: center; gap: 10px; }
.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); font-size: 14px; }
.schalter input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid var(--glas-kante); position: relative; transition: background var(--dauer); flex: none; margin: 0; }
.schalter input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--dauer); }
.schalter input:checked { background: var(--akzent); border-color: transparent; }
.schalter input:checked::after { transform: translateX(18px); background: var(--akzent-tinte); }
.option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); }
.option input { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(250,250,250,.5); background: var(--glas-hell); margin: 0; display: grid; place-items: center; }
.option input[type="checkbox"] { border-radius: 6px; }
.option input::after { content: ''; width: 10px; height: 10px; border-radius: inherit; background: var(--akzent); transform: scale(0); transition: transform var(--dauer); }
.option input:checked { border-color: var(--akzent); }
.option input:checked::after { transform: scale(1); }
.formular-fuss { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; align-items: center; }
.formular-fuss .links { margin-right: auto; }
.abschnitt-titel { font-size: 18px; font-weight: 600; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
legend { padding: 0; font-weight: 600; font-size: 16px; margin-bottom: 8px; }

/* ---------- Hinweise (Flash) ---------- */
.hinweis { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.hinweis span { flex: 1; }
.hinweis button { color: var(--text-3); }
.hinweis-ok { border-color: rgba(61,220,132,.3); color: #c7f5da; }
.hinweis-ok .icon:first-child { color: var(--ok); }
.hinweis-fehler { border-color: rgba(255,107,94,.35); color: #ffd3cf; }
.hinweis-fehler .icon:first-child { color: var(--gefahr); }
.hinweis-info { border-color: rgba(77,163,255,.3); color: #d6e8ff; }
.hinweis-info .icon:first-child { color: var(--info); }
.hinweis-warn { border-color: rgba(245,185,66,.35); color: #ffe9bd; }
.hinweis-warn .icon:first-child { color: var(--warn); }
.hinweis-inline { font-size: 13px; padding: 10px 12px; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menue { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 40; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(135deg, rgba(20, 22, 23, .97) 0%, rgba(26, 28, 29, .94) 100%); box-shadow: var(--glas-innen), 0 30px 70px -30px rgba(0,0,0,.9); }
.dropdown-menue.links { right: auto; left: 0; }
.dropdown-breit { min-width: 320px; max-width: 90vw; }
.dd-kopf { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px; font-size: 13px; }
.dd-kopf a { color: var(--akzent); font-size: 12px; }
.dd-eintrag { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); flex-wrap: wrap; }
.dd-eintrag:hover { background: rgba(255,255,255,.07); color: var(--text); }
.dd-eintrag.ungelesen { color: var(--text); }
.dd-eintrag.ungelesen::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--akzent); flex: none; }
.dd-eintrag span { flex: 1 1 100%; }
.dd-eintrag small { color: var(--text-4); }
.dd-leer { padding: 10px; font-size: 13px; }
.dd-trenner { height: 1px; background: rgba(255,255,255,.08); margin: 4px 6px; }

/* ---------- Dialog ---------- */
.dialog-hintergrund { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); z-index: 90; }
.dialog { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; z-index: 100; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; }
.dialog-gross { width: min(900px, calc(100vw - 32px)); }

/* ---------- Leer-Zustand ---------- */
.leer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--text-3); }
.leer .icon { color: var(--text-4); margin-bottom: 4px; }
.leer strong { color: var(--text-2); }
.leer p { max-width: 420px; margin: 0; font-size: 14px; }
.leer .btn { margin-top: 8px; }

/* ---------- Blättern ---------- */
.blaettern { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; font-size: 13px; }
.blaettern-knoepfe { display: flex; gap: 8px; }

/* ---------- Stepper (Pipeline) ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stepper li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 0 0 18px 0; color: var(--text-3); font-size: 14px; }
.stepper li::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: -2px; width: 2px; background: rgba(255,255,255,.08); }
.stepper li:last-child::before { display: none; }
.stepper li i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); flex: none; display: grid; place-items: center; background: #101315; margin-top: 1px; }
.stepper li.erledigt { color: var(--text-2); }
.stepper li.erledigt i { border-color: var(--akzent); background: var(--akzent); }
.stepper li.erledigt i::after { content: ''; width: 6px; height: 10px; border: solid var(--akzent-tinte); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.stepper li.erledigt::before { background: var(--akzent); opacity: .5; }
.stepper li.aktuell { color: var(--text); font-weight: 500; }
.stepper li.aktuell i { border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(22,208,171,.18), 0 0 12px rgba(22,208,171,.5); }
.stepper li.aktuell i::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); }
.stepper li span { flex: 1; }
.stepper li small { color: var(--text-4); white-space: nowrap; }
.stepper-ausserhalb { padding: 4px 0 0 32px; }

/* ---------- Pipeline-Balken (Verteilung) ---------- */
.verteilung { display: flex; height: 23px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.06); }
.verteilung span { display: block; min-width: 2px; transition: width .6s var(--kurve); }
.legende { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; color: var(--text-2); }
.legende span { display: inline-flex; align-items: center; gap: 8px; }
.legende i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.fortschritt { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.fortschritt span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--akzent-tief), var(--akzent)); }

/* ---------- Balkendiagramm (CSS) ---------- */
.balken-diagramm { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 0 4px; }
.balken { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.balken .staebe { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.balken .stab { width: 12px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #384254, #0d1019); transition: height .6s var(--kurve); min-height: 2px; }
.balken .stab.akzent { background: linear-gradient(180deg, var(--akzent), var(--akzent-tief)); box-shadow: 0 0 12px rgba(22,208,171,.35); }
.balken small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.balken-basis { height: 2px; background: var(--lichtkante); opacity: .4; border-radius: 2px; margin: 0 4px; }
.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 36px; }
.sparkline span { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: rgba(22,208,171,.5); }
.sparkline span.heute { background: var(--akzent); }

/* ---------- Zeitleiste (Verlauf) ---------- */
.zeitleiste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.zeitleiste li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 14px; position: relative; }
.zeitleiste li i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--text-2); margin-top: 1px; }
.zeitleiste li i .icon { width: 11px; height: 11px; }
.zeitleiste li div { min-width: 0; }
.zeitleiste li small { color: var(--text-4); display: block; }

/* ---------- Notizen ---------- */
.notizen { display: flex; flex-direction: column; gap: 12px; }
.notiz { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); display: flex; flex-direction: column; gap: 6px; }
.notiz-kopf { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-3); }
.notiz-kopf strong { color: var(--text-2); font-weight: 500; }
.notiz-kopf .spacer, .wachsen { flex: 1; }
.notiz-text, .notiz-editor { line-height: 1.5; font-size: 14px; }
.notiz-text p, .notiz-editor p { margin: 0 0 .4em; }
.notiz-text ul, .notiz-text ol, .notiz-editor ul, .notiz-editor ol { margin: .2em 0 .5em; padding-left: 1.4em; }
.notiz-text mark, .notiz-editor mark { background: rgba(245,185,66,.35); color: inherit; border-radius: 3px; padding: 0 2px; }
.ta-c { text-align: center; } .ta-r { text-align: right; }
.notiz-editor { min-height: 100px; padding: 12px 16px; border-radius: 12px; background: var(--glas-hell); border: 1px solid var(--glas-kante); outline: 0; }
.notiz-editor:focus { border-color: rgba(22,208,171,.5); }
.notiz-editor:empty::before { content: attr(data-platzhalter); color: var(--text-4); }
.format-leiste { display: flex; gap: 4px; flex-wrap: wrap; }
.format-leiste button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.format-leiste button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.format-leiste .trenner { width: 1px; background: rgba(255,255,255,.1); margin: 6px 4px; }

/* ---------- Leads ---------- */
.eingang-liste { display: flex; flex-direction: column; gap: 8px; }
.eingang { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.03); transition: background var(--dauer); align-items: start; }
.eingang:hover { background: rgba(255,255,255,.06); }
.eingang.neu { background: linear-gradient(90deg, rgba(22,208,171,.08), rgba(255,255,255,.03)); }
.eingang.aktiv { outline: 1px solid rgba(22,208,171,.5); }
.eingang .e-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eingang .e-kopf strong { font-weight: 600; }
.eingang .e-text { color: var(--text-2); font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eingang .e-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-3); }
.eingang .e-meta span { display: inline-flex; align-items: center; gap: 5px; }
.eingang .e-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.website-marke { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: 13px; background: var(--glas-hell); box-shadow: var(--glas-innen); color: var(--text-2); }
.dublette { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.2); font-size: 14px; }

/* ---------- Kontakt-Kopf ---------- */
.objekt-kopf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.objekt-kopf .objekt-titel { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.objekt-kopf h2 { font-size: 22px; }
.objekt-kopf .objekt-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }

/* ---------- Positionen (Angebot/Rechnung) ---------- */
.positionen { width: 100%; min-width: 820px; }
.positionen th { font-size: 13px; font-weight: 500; color: var(--text-3); text-align: left; padding: 10px 8px; background: #131313; }
.positionen th:first-child { border-radius: 10px 0 0 10px; }
.positionen th:last-child { border-radius: 0 10px 10px 0; }
.positionen td { padding: 8px 6px; vertical-align: top; }
.positionen input, .positionen select, .positionen textarea { width: 100%; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--glas-hell); border: 1px solid var(--glas-kante); color: var(--text); outline: 0; }
.positionen textarea { height: auto; min-height: 38px; padding: 8px 10px; resize: vertical; font-size: 13px; }
.positionen input:focus, .positionen textarea:focus, .positionen select:focus { border-color: rgba(22,208,171,.5); }
.positionen input.zahl { text-align: right; }
.positionen .griff { cursor: grab; color: var(--text-4); }
.positionen tr.leer-zeile td { color: var(--text-4); font-size: 13px; }
.positionen .pos-schalter { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; }
.positionen .pos-schalter .option { gap: 6px; color: var(--text-3); }
.positionen .pos-schalter .option input { width: 16px; height: 16px; border-radius: 5px; }
.positionen tr.pos-ueberschrift [data-feld=menge], .positionen tr.pos-ueberschrift [data-feld=einheit], .positionen tr.pos-ueberschrift [data-feld=einzelpreis], .positionen tr.pos-ueberschrift [data-feld=rabatt], .positionen tr.pos-ueberschrift [data-feld=mwst] { opacity: .25; pointer-events: none; }
.positionen tr.pos-ueberschrift [data-feld=bezeichnung] { font-weight: 600; color: var(--akzent); }
.positionen tr.pos-optional [data-feld=netto] { color: var(--text-3); font-weight: 400; }
.summen { display: flex; flex-direction: column; gap: 8px; margin-left: auto; width: min(100%, 380px); }
.summen .summen-rabatt .feld-inline { gap: 6px; }
.verlauf-mini { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }

/* Arbeitsprotokolle: Prüfpunkte */
.pruefpunkte { display: flex; flex-direction: column; gap: 10px; }
.pruefpunkt { border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--glas-kante); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pp-kopf { display: flex; align-items: center; gap: 8px; }
.pp-nr { width: 26px; flex: none; font-size: 12px; color: var(--text-3); text-align: center; }
.pruefpunkt .pp-kategorie { width: 150px; flex: none; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); }
.pruefpunkt .pp-text { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 9px; }
.pp-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 34px; }
.pruefpunkt .pp-notiz { flex: 1 1 220px; min-width: 0; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13px; }
.pp-status { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--glas-kante); flex-wrap: wrap; }
.pp-wahl { position: relative; cursor: pointer; }
.pp-wahl input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pp-wahl span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-3); transition: background var(--dauer), color var(--dauer); white-space: nowrap; }
.pp-wahl:hover span { color: var(--text); }
.pp-wahl.ok:has(input:checked) span { background: rgba(61,220,132,.16); color: var(--ok); }
.pp-wahl.warnung:has(input:checked) span { background: rgba(245,185,66,.18); color: var(--warn); }
.pp-wahl.problem:has(input:checked) span { background: rgba(255,107,94,.18); color: var(--gefahr); }
.pp-wahl.entfaellt:has(input:checked) span { background: rgba(255,255,255,.1); color: var(--text); }
.pp-wahl.vertagt:has(input:checked) span { background: rgba(77,163,255,.18); color: var(--info); }
.pruefpunkt:has(.pp-wahl.problem input:checked) { border-color: rgba(255,107,94,.35); }
.pruefpunkt:has(.pp-wahl.warnung input:checked) { border-color: rgba(245,185,66,.3); }
.ergebnis-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pruefpunkt input[disabled] { opacity: .85; }
@media (max-width: 720px) { .pp-kopf { flex-wrap: wrap; } .pruefpunkt .pp-kategorie { width: calc(100% - 34px); margin-left: 34px; order: 3; } .pp-fuss { padding-left: 0; } }

/* Unterschriften-Feld (In-App, dunkler Dialog) */
.dialog-breit { width: min(760px, calc(100vw - 32px)); }
.signatur-feld { position: relative; border-radius: 14px; background: #fcfdfd; border: 1px dashed rgba(0,0,0,.25); touch-action: none; }
.signatur-feld canvas { display: block; width: 100%; height: 200px; border-radius: 14px; }
.signatur-feld .signatur-linie { position: absolute; left: 24px; right: 24px; bottom: 40px; border-top: 1px solid #c9cfcd; pointer-events: none; }
.signatur-feld .signatur-tipp { position: absolute; left: 24px; bottom: 14px; font-size: 12px; color: #999; pointer-events: none; }
.signatur-feld button { position: absolute; right: 10px; top: 10px; background: #fff; color: #111; border-color: #d5d9d8; }

/* Protokoll-Druckansicht */
.protokoll-druck .pd-ergebnis { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 12.5px; color: #444; }
.protokoll-druck .pd-ergebnis span { display: inline-flex; align-items: center; gap: 6px; }
.protokoll-druck .pd-ergebnis span::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--f); }
.protokoll-druck .pd-ergebnis b { color: #111; }
.protokoll-druck .pd-status { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--f); white-space: nowrap; }
.protokoll-druck .pd-h3 { font-size: 14px; margin: 26px 0 6px; color: #111; }
.protokoll-druck .pd-zeiten { margin: 8px 0 0; font-size: 12.5px; }
.protokoll-druck .pd-unterschriften { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.protokoll-druck .pd-linie { height: 80px; border-bottom: 1px solid #111; display: flex; align-items: flex-end; }
.protokoll-druck .pd-linie img { height: 76px; width: auto; }
.protokoll-druck .pd-digital { font-size: 11px; color: #555; padding-bottom: 6px; }
.protokoll-druck .pd-unterschriften small { display: block; margin-top: 6px; font-size: 11.5px; color: #444; }
@media print { .protokoll-druck .pd-unterschriften { break-inside: avoid; } }

/* Sicht-Umschalter (Gruppe | Firma | Marke) */
.sicht-knopf { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--glas-kante); color: var(--text); cursor: pointer; max-width: 260px; }
.sicht-knopf:hover { background: rgba(255,255,255,.08); }
.sicht-knopf > i, .sicht-eintrag > i { width: 10px; height: 10px; border-radius: 50%; background: var(--chip); box-shadow: 0 0 8px var(--chip); flex: none; }
.sicht-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; text-align: left; }
.sicht-text small { font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.sicht-text strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sicht-menue { right: auto; left: 0; max-height: min(70vh, 560px); overflow: auto; }
.sicht-eintrag { display: flex; align-items: center; gap: 10px; }
.sicht-eintrag.sicht-marke { padding-left: 30px; font-size: 13px; color: var(--text-2); }
.sicht-eintrag.sicht-firma { margin-top: 2px; font-weight: 500; }
.sicht-eintrag.aktiv { background: rgba(22,208,171,.12); color: var(--text); }
@media (max-width: 1180px) { .sicht-text { display: none; } .sicht-knopf { padding: 0 10px; gap: 6px; } }

/* Marken in den Einstellungen */
.marken-firma { padding: 10px 0 4px; }
.marken-firma + .marken-firma { box-shadow: 0 -1px 0 rgba(255,255,255,.05); }
.marken-firma-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.marken-firma-kopf .wachsen { flex: 1; }
.marke-zeile { display: flex; align-items: center; gap: 12px; padding: 7px 0 7px 22px; }
.marke-logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.marke-logo img { width: 30px; height: 30px; object-fit: contain; }
.marke-logo.leer { background: color-mix(in srgb, var(--chip) 18%, transparent); color: var(--chip); font-weight: 700; font-size: 13px; }
.marke-zeile .wachsen { flex: 1; min-width: 0; }
.marke-zeile strong { font-weight: 500; }
.marke-zeile small { display: block; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marke-vorschau { display: flex; align-items: center; gap: 12px; }

/* Timer in der Kopfzeile */
.timer { display: flex; align-items: center; gap: 6px; }
.timer-start { color: var(--akzent); }
.timer-pille { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 99px; background: rgba(22,208,171,.1); border: 1px solid rgba(22,208,171,.3); color: var(--text); font-size: 13px; cursor: pointer; }
.timer-pille strong { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; color: var(--akzent); }
.timer-pille span { color: var(--text-2); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); box-shadow: 0 0 0 0 rgba(22,208,171,.5); animation: timer-puls 1.6s ease-out infinite; }
.timer.pausiert .timer-punkt { background: var(--warn); animation: none; }
.timer.pausiert .timer-pille { background: rgba(245,185,66,.1); border-color: rgba(245,185,66,.3); }
.timer.pausiert .timer-pille strong { color: var(--warn); }
.timer-knopf { width: 34px; height: 34px; }
.timer-stopp { color: var(--gefahr); }
.timer-form { gap: 10px; }
.timer .dropdown-menue { right: 0; }
@keyframes timer-puls { 0% { box-shadow: 0 0 0 0 rgba(22,208,171,.45); } 70% { box-shadow: 0 0 0 8px rgba(22,208,171,0); } 100% { box-shadow: 0 0 0 0 rgba(22,208,171,0); } }
@media (prefers-reduced-motion: reduce) { .timer-punkt { animation: none; } }
@media (max-width: 1180px) { .timer-pille span { display: none; } .timer-pille { padding: 0 10px; } }

/* Tarif-Matrix (Einstellungen) */
.tarif-matrix input { width: 88px; height: 34px; padding: 0 8px; border-radius: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.tarif-matrix th, .tarif-matrix td { padding: 6px 8px; }
.tarif-matrix .zeile-standard td { font-weight: 500; }
.gz-zeile { display: grid; grid-template-columns: 110px 28px 1fr 20px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.gz-zeile input[type=time] { height: 34px; padding: 0 8px; border-radius: 9px; }
.gz-zeile.aus { opacity: .5; }
.zeit-euro { font-variant-numeric: tabular-nums; }
.zeit-offen { color: var(--warn); }

/* IT-Dokumentation */
.pw-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; padding: 2px 7px; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--text); letter-spacing: .02em; }
.pw-feld { display: inline-flex; align-items: center; gap: 4px; }
.btn-rund.ok { color: var(--ok); border-color: rgba(61,220,132,.4); }
details.anleitung { border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--glas-kante); padding: 10px 14px; margin-bottom: 8px; }
details.anleitung summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; list-style: none; }
details.anleitung summary::-webkit-details-marker { display: none; }
details.anleitung summary small { font-size: 12px; white-space: nowrap; }
details.anleitung .anleitung-text { margin: 12px 0 10px; font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: normal; }
.unterschrift-bild { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; }
.unterschrift-bild img { height: 64px; width: auto; display: block; }
.summen .zeilen-paar.gesamt { font-size: 18px; padding-top: 8px; }
.summen .zeilen-paar.gesamt strong { color: var(--akzent); font-weight: 600; }

/* ---------- Anmeldung ---------- */
.hauptbereich.anmeldung { grid-column: 1 / -1; }
body.app:has(.anmeldung) { grid-template-columns: 1fr; }
.anmelde-karte { width: min(440px, 100%); border-radius: 20px; padding: 36px 32px 28px; display: flex; flex-direction: column; gap: 20px; }
.anmelde-marke { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.anmelde-marke img { width: 150px; }
.anmelde-marke h1 { font-size: 22px; margin-top: 8px; }
.anmelde-fuss { font-size: 12px; text-align: center; margin: 0; }

/* ---------- Statistik-Zahlenband ---------- */
.zahlenband { display: flex; gap: 32px; flex-wrap: wrap; }
.zahlenband > div { display: flex; flex-direction: column; gap: 4px; }
.zahlenband small { color: var(--text-2); font-size: 12px; }
.zahlenband strong { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---------- Druck (Angebot/Rechnung-Ansicht) ---------- */
.beleg-vorschau { background: #fff; color: #111; border-radius: 12px; padding: 48px 56px; font-size: 13.5px; line-height: 1.5; box-shadow: var(--schatten); max-width: 860px; }
.beleg-vorschau h2 { color: #111; font-size: 22px; margin-bottom: 4px; }
.beleg-vorschau .beleg-kopf { display: flex; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.beleg-vorschau .beleg-absender { font-size: 11px; color: #666; margin-bottom: 8px; }
.beleg-vorschau table { width: 100%; margin: 24px 0; }
.beleg-vorschau th { text-align: left; font-size: 12px; color: #666; padding: 8px 6px; border-bottom: 2px solid #111; }
.beleg-vorschau td { padding: 8px 6px; vertical-align: top; }
.beleg-vorschau tbody tr:nth-child(even) td { background: #f6f6f4; }
.beleg-vorschau .zahl { text-align: right; white-space: nowrap; }
.beleg-vorschau .beleg-summen { margin-left: auto; width: 320px; }
.beleg-vorschau .beleg-summen div { display: flex; justify-content: space-between; padding: 4px 0; }
.beleg-vorschau .beleg-summen .gesamt { font-weight: 700; font-size: 16px; border-top: 2px solid #111; margin-top: 6px; padding-top: 8px; }
.beleg-vorschau .beleg-fuss { margin-top: 40px; font-size: 11px; color: #666; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.beleg-vorschau .beleg-meta { font-size: 12.5px; color: #333; }
.beleg-vorschau .beleg-meta div { display: flex; gap: 12px; }
.beleg-vorschau .beleg-meta span:first-child { color: #777; min-width: 110px; }
.beleg-vorschau tr.beleg-ueberschrift td { padding-top: 18px; font-size: 13px; background: none !important; }
.beleg-vorschau tr.beleg-optional td { color: #777; }
.beleg-vorschau tr.beleg-optional.gewaehlt td { color: #111; }
.beleg-marke { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 6px; background: #eef1f0; color: #555; margin-left: 6px; vertical-align: middle; }
@media print {
  body.app { display: block; padding: 0; background: #fff; }
  .seitenleiste, .kopfzeile, .hintergrund, .nicht-drucken, .hinweis { display: none !important; }
  .inhalt { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; }
  .beleg-vorschau { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 1280px) {
  .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  body.app { grid-template-columns: var(--sl-schmal) minmax(0, 1fr); }
  body.app:not(.sl-offen) .seitenleiste { width: var(--sl-schmal); }
  body.app:not(.sl-offen) .sl-name, body.app:not(.sl-offen) .sl-suche, body.app:not(.sl-offen) .sl-label, body.app:not(.sl-offen) .sl-karte, body.app:not(.sl-offen) .sl-marke span { display: none; }
  body.app:not(.sl-offen) .sl-kopf { justify-content: center; padding: 15px 8px; flex-direction: column; gap: 10px; }
  body.app:not(.sl-offen) .sl-profil { flex: none; }
  body.app:not(.sl-offen) .sl-zu { margin: 0; transform: rotate(180deg); }
  body.app:not(.sl-offen) .sl-zelle { justify-content: center; padding: 14px 8px; }
  body.app:not(.sl-offen) .sl-zahl { position: absolute; top: 10px; right: 8px; min-width: 20px; height: 20px; font-size: 11px; padding: 0 5px; }
  body.app:not(.sl-offen) .sl-marke { justify-content: center; }
  body.app.sl-offen .seitenleiste { position: fixed; left: 15px; top: 15px; z-index: 60; width: var(--sl-breite); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
  .raster-3-1, .raster-2-1, .raster-1-2 { grid-template-columns: minmax(0, 1fr); }
  .kz-unter { display: none; }
}
@media (max-width: 860px) {
  body.app { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .seitenleiste { position: fixed; left: 10px; top: 10px; height: calc(100vh - 20px); width: var(--sl-breite) !important; z-index: 60; transform: translateX(calc(-100% - 20px)); transition: transform .25s var(--kurve); }
  body.app.sl-offen .seitenleiste { transform: none; }
  body.app:not(.sl-offen) .sl-name, body.app:not(.sl-offen) .sl-suche, body.app:not(.sl-offen) .sl-label, body.app:not(.sl-offen) .sl-karte, body.app:not(.sl-offen) .sl-marke span { display: initial; }
  body.app:not(.sl-offen) .sl-kopf { flex-direction: row; padding: 15px 16px; }
  body.app:not(.sl-offen) .sl-zelle { justify-content: flex-start; padding: 14px 16px; }
  body.app:not(.sl-offen) .sl-zu { transform: none; margin-left: auto; }
  .sl-zu { display: none; }
  .nur-mobil { display: inline-grid !important; }
  .nur-desktop { display: none !important; }
  .kopfzeile { padding: 0 12px; gap: 10px; height: 58px; }
  .kz-links { min-width: 0; }
  .kz-links h1 { font-size: 17px; }
  .kz-unter, .brotkrumen { display: none; }
  .kz-rechts { gap: 8px; }
  .kz-rechts > .btn { display: none; }
  .kz-trend small { white-space: normal; text-align: right; }
  .inhalt { padding: 12px; border-radius: 16px; }
  .raster-2, .raster-3, .karten-raster { grid-template-columns: minmax(0, 1fr); }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabelle th, .tabelle td { padding: 10px 10px; }
  .tabelle .verbergen-mobil { display: none; }
  .eingang { grid-template-columns: minmax(0, 1fr); }
  .eingang .e-rechts { flex-direction: row; align-items: center; }
  .website-marke { display: none; }
  .beleg-vorschau { padding: 24px 18px; }
  .dialog { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Kundenportal in der Zentrale (Nachrichten, Zugänge) ---------- */
.nachrichten-verlauf { display: flex; flex-direction: column; gap: 10px; }
.nachricht { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.nachricht-kunde { align-self: flex-start; border-left: 3px solid var(--akzent); }
.nachricht-firma { align-self: flex-end; background: rgba(22,208,171,.08); }
.nachricht.ungelesen { background: rgba(22,208,171,.14); }
.nachricht-kopf { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.nachricht-kopf strong { color: var(--text-2); font-weight: 500; }
.nachricht-kopf small { margin-left: auto; }
.nachricht-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.nachricht-datei { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--akzent); }
.pw-code { font: 600 15px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.1); user-select: all; }

/* ---------- Service-Modul (Tickets, SLA) ---------- */
.kennzahlen-5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.prio-punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--text-4); flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.prio-punkt.prio-gross { width: 18px; height: 18px; margin: 10px 4px 0 0; }
.prio-kritisch { background: var(--gefahr); box-shadow: 0 0 0 3px rgba(255,107,94,.25), 0 0 14px rgba(255,107,94,.6); }
.prio-hoch { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,185,66,.22); }
.prio-normal { background: var(--info); box-shadow: 0 0 0 3px rgba(77,163,255,.2); }
.prio-niedrig { background: var(--text-4); }
.sla { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--text-2); }
.sla-ok { color: var(--ok); background: rgba(61,220,132,.1); }
.sla-bald { color: var(--warn); background: rgba(245,185,66,.14); }
.sla-ueber { color: #fff; background: var(--gefahr); }
.sla-spaet { color: var(--gefahr); background: rgba(255,107,94,.14); }
.sla-erledigt { color: var(--ok); }
.sla-pause { color: var(--text-3); border: 1px dashed var(--glas-kante-hell); }
.sla-keine { color: var(--text-4); }
.ticket-verlauf { display: flex; flex-direction: column; gap: 10px; }
.ticket-eintrag { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); display: flex; flex-direction: column; gap: 6px; }
.ticket-eintrag.te-intern { border-left: 3px solid var(--warn); background: rgba(245,185,66,.06); }
.ticket-eintrag.te-kunde { border-left: 3px solid var(--akzent); background: rgba(22,208,171,.07); }
.ticket-eintrag.te-status, .ticket-eintrag.te-system { background: transparent; border: 1px dashed var(--glas-kante); }
.te-kopf { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.te-kopf strong { color: var(--text-2); font-weight: 500; }
.te-kopf small { margin-left: auto; }
.te-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.sla-matrix input { width: 90px; padding: 6px 8px; border-radius: 8px; background: var(--glas-hell); border: 1px solid var(--glas-kante); color: var(--text); text-align: right; }

/* ---------- Bühnen-Motiv (Szene 0 „Wasserringe“ aus dem SABESUS-Website-Film, 27.10.2026) ---------- */
/* Hinter allen Seiten: weichgezeichnet und abgedunkelt, die Glanzkreise bleiben darüber. */
.hintergrund::before { content: ''; position: absolute; inset: -60px; background: url('../img/buehne/wasserringe-1600.webp') center 42% / cover no-repeat; filter: blur(22px) saturate(1.15) brightness(.8); opacity: .42; transform: scale(1.04); }
.hintergrund .glanz { position: absolute; }
/* Anmeldeseite: das Motiv scharf und vollflächig, Karte rechts daneben, damit das Nilpferd sichtbar bleibt. */
body.anmeldung-seite .hintergrund::before { inset: 0; transform: none; filter: none; opacity: 1; background-image: url('../img/buehne/wasserringe-2560.webp'); background-position: center; }
body.anmeldung-seite .hintergrund::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,7,10,.35) 0%, rgba(4,7,10,.1) 45%, rgba(4,7,10,.75) 100%); }
body.anmeldung-seite .hintergrund .glanz { display: none; }
body.anmeldung-seite .anmelde-karte { box-shadow: var(--glas-innen), 0 40px 90px -30px rgba(0,0,0,.9); }
@media (min-width: 1100px) { body.anmeldung-seite .inhalt-frei { place-items: center end; padding-right: 8vw; } }
/* Karte unten in der Seitenleiste */
.sl-karte { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(4,7,10,.2) 0%, rgba(4,7,10,.86) 100%), url('../img/buehne/wasserringe-1600.webp') center 45% / cover no-repeat; border-color: var(--glas-kante-hell); }
.sl-karte strong, .sl-karte p { text-shadow: 0 1px 2px rgba(0,0,0,.6); }
/* Kopf der Übersicht */
.buehne-kopf { position: relative; overflow: hidden; border-radius: var(--r-shell); min-height: 160px; padding: 22px 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: url('../img/buehne/wasserringe-2560.webp') center 40% / cover no-repeat; border: 1px solid var(--glas-kante); box-shadow: var(--schatten); }
.buehne-kopf::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,7,10,.9) 0%, rgba(4,7,10,.6) 42%, rgba(4,7,10,.12) 100%); }
.buehne-kopf > * { position: relative; }
.buehne-kopf small { display: block; color: var(--text-3); font-size: 13px; margin-bottom: 6px; }
.buehne-kopf h2 { font-size: 26px; font-weight: 650; letter-spacing: -.015em; }
.buehne-kopf p { color: var(--text-2); margin: 6px 0 0; max-width: 62ch; font-size: 14.5px; }
.buehne-kopf .btn-gruppe { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .buehne-kopf { min-height: 130px; padding: 16px; } .buehne-kopf h2 { font-size: 22px; } }

/* ---------- Zwei-Faktor-Anmeldung ---------- */
.mfa-code { font: 600 24px/1.2 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .18em; text-align: center; }
.qr-feld { display: inline-block; padding: 14px; background: #fff; border-radius: 14px; line-height: 0; }
.qr-feld img, .qr-feld canvas { display: block; width: 200px; height: 200px; }
.mfa-schluessel { font: 500 15px/1.6 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .12em; word-break: break-all; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.06); user-select: all; }
.notfallcodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.notfallcodes code { display: block; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.08); font: 600 15px/1.3 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .08em; text-align: center; user-select: all; }
.mfa-einrichtung { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 720px) { .mfa-einrichtung { grid-template-columns: 1fr; } }
