/* Olive-Zentrale – eigene App-Optik: hell, klar, ruhig. PC mit Seitenleiste und geteilten Ansichten,
   Handy wie eine App mit großen Titeln und Leiste unten. Schrift: die des Geräts (SF Pro auf Mac und iPhone). */

:root {
  --bg: #f5f5f6;
  --flaeche: #ffffff;
  --flaeche-2: #fafafa;
  --flaeche-3: #f2f2f4;
  --linie: #e7e7ea;
  --linie-2: #d8d8dd;
  --text: #121316;
  --text-2: #4b4e57;
  --text-3: #868a94;
  --akzent: #4f6b1d;
  --akzent-2: #3f5716;
  --akzent-hell: #eef4e2;
  --akzent-mittel: #d3e2b5;
  --blau: #2457c5; --blau-hell: #eaf0fd;
  --gelb: #94560a; --gelb-hell: #fdf3e2;
  --rot: #c0332b;  --rot-hell: #fdecea;
  --gruen: #1d7a3e; --gruen-hell: #e7f5ec;
  --schatten-1: 0 1px 2px rgba(18, 19, 22, 0.05);
  --schatten-2: 0 1px 2px rgba(18, 19, 22, 0.04), 0 6px 20px -8px rgba(18, 19, 22, 0.12);
  --schatten-3: 0 18px 50px -12px rgba(18, 19, 22, 0.28);
  --r: 12px;
  --r-klein: 8px;
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --leiste: 232px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--schrift); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 0.5em; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 1.55rem; font-weight: 700; line-height: 1.15; }
h2 { font-size: 0.95rem; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 650; }
button { font: inherit; color: inherit; }
.zahlen, .kpi-zahl, time { font-variant-numeric: tabular-nums; }
.klein { font-size: 0.82rem; color: var(--text-3); }
.grau { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.fett { font-weight: 650; }
.link { color: var(--akzent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nur-handy { display: none !important; }
.zeile-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zwischen { justify-content: space-between; }
.stapel-8 > * + * { margin-top: 8px; }
.stapel-16 > * + * { margin-top: 16px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.k { width: 15px; height: 15px; }

/* ---------- App-Gerüst ---------- */
.app { display: grid; grid-template-columns: var(--leiste) minmax(0, 1fr); min-height: 100vh; }
.seitenleiste {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 10px; background: var(--flaeche); border-right: 1px solid var(--linie);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.logo b { display: block; font-size: 0.95rem; letter-spacing: -0.01em; }
.logo small { display: block; font-size: 0.72rem; color: var(--text-3); margin-top: 1px; }
.suche-knopf {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; padding: 7px 10px; border-radius: var(--r-klein);
  border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text-3); cursor: pointer; text-align: left;
}
.suche-knopf:hover { border-color: var(--linie-2); color: var(--text-2); }
.suche-knopf kbd { margin-left: auto; font: 500 0.72rem/1 var(--schrift); padding: 3px 5px; border-radius: 5px; background: var(--flaeche); border: 1px solid var(--linie); }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-klein); color: var(--text-2); font-weight: 550; }
.nav:hover { background: var(--flaeche-3); color: var(--text); }
.nav.aktiv { background: var(--flaeche-3); color: var(--text); font-weight: 650; }
.nav.aktiv svg { color: var(--akzent); }
.nav .zahl { margin-left: auto; }
.nav-gruppe { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 4px; }
.seitenleiste .unten { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--linie); }
.ich { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.ich b { display: block; font-size: 0.85rem; }
.ich small { display: block; font-size: 0.75rem; color: var(--text-3); }

.haupt { min-width: 0; }
.inhalt { padding: 22px 28px 48px; max-width: 1240px; }
.inhalt.breit { max-width: none; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.seitenkopf .unter { color: var(--text-3); margin-top: 4px; }
.seitenkopf .aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-weight: 550; margin-bottom: 6px; }
.zurueck:hover { color: var(--text); }
.handy-kopf, .tabs { display: none; }

/* ---------- Bausteine ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: var(--schatten-1); }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.karte-kopf h2 { display: flex; align-items: center; gap: 8px; }
.karte-kopf .mehr { font-size: 0.82rem; color: var(--text-3); font-weight: 600; }
.karte-kopf .mehr:hover { color: var(--akzent); }
.karte-inhalt { padding: 4px 16px 16px; }
.stapel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.raster { display: grid; gap: 16px; }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-haupt { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.leer { color: var(--text-3); padding: 18px 16px; text-align: center; font-size: 0.9rem; }
.leer svg.i { width: 26px; height: 26px; display: block; margin: 0 auto 8px; color: var(--akzent); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: var(--r-klein); border: 1px solid var(--text); background: var(--text); color: #fff;
  font: 600 0.86rem/1 var(--schrift); cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.knopf:hover { background: #2a2c31; border-color: #2a2c31; }
.knopf:active { transform: translateY(1px); }
.knopf.gruen { background: var(--akzent); border-color: var(--akzent); }
.knopf.gruen:hover { background: var(--akzent-2); border-color: var(--akzent-2); }
.knopf.zweit { background: var(--flaeche); color: var(--text); border-color: var(--linie-2); box-shadow: var(--schatten-1); }
.knopf.zweit:hover { background: var(--flaeche-2); border-color: #c5c5cc; }
.knopf.leise { background: transparent; border-color: transparent; color: var(--text-2); }
.knopf.leise:hover { background: var(--flaeche-3); color: var(--text); }
.knopf.rot { background: var(--rot); border-color: var(--rot); }
.knopf.rot-leise { background: var(--flaeche); color: var(--rot); border-color: #f1c9c5; }
.knopf.rot-leise:hover { background: var(--rot-hell); }
.knopf.klein { height: 28px; padding: 0 10px; font-size: 0.8rem; }
.knopf.gross { height: 42px; padding: 0 18px; font-size: 0.95rem; border-radius: 10px; }
.knopf.voll { width: 100%; }
.knopf.rund { width: 34px; padding: 0; }
.knopf[disabled], .knopf.htmx-request { opacity: 0.55; pointer-events: none; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px;
  font: 600 0.72rem/1 var(--schrift); white-space: nowrap; background: var(--flaeche-3); color: var(--text-2);
}
.chip.gruen { background: var(--gruen-hell); color: var(--gruen); }
.chip.blau { background: var(--blau-hell); color: var(--blau); }
.chip.gelb { background: var(--gelb-hell); color: var(--gelb); }
.chip.rot { background: var(--rot-hell); color: var(--rot); }
.chip.dunkel { background: var(--text); color: #fff; }
.chip.akzent { background: var(--akzent-hell); color: var(--akzent-2); }
.chip.rand { background: var(--flaeche); border: 1px solid var(--linie); }
.zahl { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--flaeche-3); color: var(--text-2); font: 700 0.7rem/1 var(--schrift); }
.zahl.rot { background: var(--rot); color: #fff; }
.zahl.gruen { background: var(--akzent); color: #fff; }
.punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); display: inline-block; flex: none; }
.punkt.rot { background: var(--rot); } .punkt.grau { background: var(--linie-2); } .punkt.gelb { background: #e0a100; }

/* Avatare */
.ava { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font: 650 0.78rem/1 var(--schrift); letter-spacing: 0.02em; }
.ava.gross { width: 48px; height: 48px; font-size: 1rem; }
.ava.klein { width: 26px; height: 26px; font-size: 0.66rem; }
.ava-1 { background: #e7effd; color: #1d4fb8; } .ava-2 { background: #e5f4e9; color: #1d6a35; }
.ava-3 { background: #fdf0e0; color: #8a4a00; } .ava-4 { background: #f2e9fd; color: #6a2fa6; }
.ava-5 { background: #fde8ef; color: #a2224e; } .ava-6 { background: #e2f3f3; color: #116264; }
.ava-7 { background: #f0f1e3; color: #56601c; } .ava-8 { background: #eceef3; color: #3b4252; }

/* Status oben */
.status-leiste { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.status { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text-2); font-size: 0.82rem; font-weight: 550; }
a.status:hover { border-color: var(--linie-2); color: var(--text); }
.status.warn { background: var(--gelb-hell); border-color: #f2dcb4; color: var(--gelb); }
.status.alarm { background: var(--rot-hell); border-color: #f3c6c1; color: var(--rot); }
.alarm-band { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--rot-hell); border: 1px solid #f3c6c1; color: var(--rot); font-weight: 650; }
.hinweis { padding: 11px 14px; border-radius: var(--r); background: var(--akzent-hell); border: 1px solid var(--akzent-mittel); color: var(--akzent-2); margin-bottom: 16px; font-size: 0.9rem; }
.warnung { padding: 11px 14px; border-radius: var(--r); background: var(--gelb-hell); border: 1px solid #f2dcb4; color: #6e4300; margin-bottom: 16px; font-size: 0.9rem; }
.demo-band { padding: 7px 14px; background: #fff8e6; border-bottom: 1px solid #f2e2b8; color: #7a5300; font-size: 0.8rem; font-weight: 600; text-align: center; }

/* ---------- Cockpit ---------- */
.cockpit-raster { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.spalte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

/* Interesse (0–100) und Menschentyp */
.interesse { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.interesse .balken { width: 34px; height: 6px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; display: inline-block; }
.interesse .balken i { display: block; height: 100%; border-radius: 99px; background: #b9bcc4; }
.interesse.gruen .balken i { background: #1f9d4c; } .interesse.gruen b { color: var(--gruen); }
.interesse.akzent .balken i { background: var(--akzent); } .interesse.akzent b { color: var(--akzent-2); }
.interesse.gelb .balken i { background: #e0a100; } .interesse.gelb b { color: var(--gelb); }
.interesse.voll { height: 22px; padding: 0 9px 0 8px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); }
.interesse.voll .balken { width: 44px; }
.interesse em { font-style: normal; font-weight: 600; color: var(--text-3); }
.interesse .trend { display: inline-flex; }
.interesse .trend.hoch { color: var(--gruen); } .interesse .trend.runter { color: var(--rot); }
.interesse .trend svg.i { width: 13px; height: 13px; stroke-width: 2.2; }
.typ { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 3px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-size: 0.74rem; font-weight: 650; color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.typ b { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.62rem; color: #fff; }
.typ.typ-dominant b { background: #d2453b; } .typ.typ-initiativ b { background: #e5a000; }
.typ.typ-stetig b { background: #2f9a55; } .typ.typ-gewissenhaft b { background: #2f66cc; }
.eintrag-zeile .typ { height: 18px; padding: 0 3px; border: 0; background: none; }
.analyse-zeile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: baseline; padding-top: 7px; border-top: 1px solid var(--linie); }
.analyse-zeile > span { color: var(--text-3); font-size: 0.8rem; font-weight: 600; }
.analyse-zeile em { font-style: normal; color: var(--text-3); }
.analyse-kopf + .analyse-zeile { border-top: 0; }
.analyse-mehr { display: grid; gap: 6px; }
.analyse-mehr > summary { cursor: pointer; color: var(--text-3); font-size: 0.8rem; font-weight: 600; padding-top: 6px; border-top: 1px solid var(--linie); list-style: none; }
.analyse-mehr > summary::-webkit-details-marker { display: none; }
.analyse-mehr[open] > summary { display: none; }
.gruss h1 { font-size: 1.7rem; }
.gruss .datum { color: var(--text-3); margin-top: 4px; }
.wichtig { list-style: none; margin: 0; padding: 0 8px 8px; }
.wichtig li + li { border-top: 1px solid var(--linie); }
.wichtig-eintrag { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 10px; }
a.wichtig-eintrag:hover { background: var(--flaeche-2); }
.wichtig-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.wichtig-icon.gruen { background: var(--gruen-hell); color: var(--gruen); }
.wichtig-icon.blau { background: var(--blau-hell); color: var(--blau); }
.wichtig-icon.gelb { background: var(--gelb-hell); color: var(--gelb); }
.wichtig-icon.rot { background: var(--rot-hell); color: var(--rot); }
.wichtig-icon.grau { background: var(--flaeche-3); color: var(--text-2); }
.wichtig-text { flex: 1; min-width: 0; }
.wichtig-text b { display: block; font-weight: 650; }
.wichtig-text span { display: block; color: var(--text-3); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wichtig-pfeil { color: var(--text-3); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kpi { padding: 14px 16px; border-top: 1px solid var(--linie); }
.kpi:nth-child(odd) { border-right: 1px solid var(--linie); }
.kpi:nth-child(-n+2) { border-top: 0; }
.kpi-zahl { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-text { color: var(--text-3); font-size: 0.8rem; margin-top: 2px; }
.diagramm { padding: 6px 16px 14px; }
.diagramm svg { width: 100%; height: auto; display: block; }
.diagramm .legende { display: flex; gap: 14px; font-size: 0.76rem; color: var(--text-3); margin-top: 6px; }
.diagramm .legende i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.trichter { padding: 4px 16px 16px; display: grid; gap: 8px; }
.trichter a { display: grid; grid-template-columns: 110px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-2); }
.trichter a:hover { color: var(--text); }
.trichter .balken { height: 8px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; }
.trichter .balken i { display: block; height: 100%; border-radius: 99px; background: var(--akzent); }
.trichter b { text-align: right; font-weight: 650; }

/* ---------- Listen ---------- */
.liste { list-style: none; margin: 0; padding: 0; }
.eintrag { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; border-top: 1px solid var(--linie); position: relative; }
.liste > li:first-child > .eintrag, .liste > .eintrag:first-child { border-top: 0; }
a.eintrag:hover { background: var(--flaeche-2); }
.eintrag.aktiv { background: var(--akzent-hell); }
.eintrag.aktiv::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--akzent); }
.eintrag-haupt { flex: 1; min-width: 0; }
.eintrag-zeile { display: flex; align-items: center; gap: 8px; }
.eintrag-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag-zeit { margin-left: auto; flex: none; font-size: 0.78rem; color: var(--text-3); }
.eintrag-betreff { font-size: 0.86rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.eintrag-text { font-size: 0.84rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 1px; }
.eintrag-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ungelesen .eintrag-titel { font-weight: 750; }
.ungelesen .ava::after { content: ""; position: absolute; }
.ungelesen-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--blau); flex: none; }

.reiter { display: flex; gap: 4px; flex-wrap: wrap; }
.reiter a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; font-size: 0.84rem; font-weight: 600; color: var(--text-2); }
.reiter a:hover { background: var(--flaeche-3); color: var(--text); }
.reiter a.aktiv { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten-1), 0 0 0 1px var(--linie); }
.reiter .zahl { height: 17px; min-width: 17px; font-size: 0.66rem; }
.suchfeld { position: relative; }
.suchfeld svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; }
.suchfeld input { padding-left: 32px; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 5px; color: var(--text-2); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=time], input[type=date], input[type=search], select, textarea {
  width: 100%; font: 400 0.92rem/1.45 var(--schrift); color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie-2); border-radius: var(--r-klein); padding: 8px 11px; min-height: 36px;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px rgba(79, 107, 29, 0.14); }
::placeholder { color: #a5a8b0; }
.feld { margin-bottom: 14px; }
.feld small { display: block; color: var(--text-3); margin-top: 5px; font-size: 0.78rem; }
.schalter { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; color: var(--text); cursor: pointer; }
.schalter input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--linie-2); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.schalter input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.schalter input:checked { background: var(--akzent); }
.schalter input:checked::after { transform: translateX(16px); }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- Geteilte Ansicht (Postfach, Freigaben) ---------- */
.split { display: grid; grid-template-columns: 370px minmax(0, 1fr); height: 100vh; }
.mit-demo .split { height: calc(100vh - 33px); }
.split-liste { display: flex; flex-direction: column; min-height: 0; background: var(--flaeche); border-right: 1px solid var(--linie); }
.split-kopf { padding: 16px 16px 10px; border-bottom: 1px solid var(--linie); display: grid; gap: 10px; }
.split-kopf h1 { font-size: 1.25rem; }
.split-scroll { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.split-detail { overflow-y: auto; min-height: 0; background: var(--bg); }
.lese { padding: 20px 28px 40px; max-width: 980px; }
.lese-kopf { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.lese-kopf h1 { font-size: 1.35rem; }
.lese-kopf .aktionen { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lese-raster { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.leer-zustand { height: 100%; display: grid; place-items: center; color: var(--text-3); text-align: center; padding: 40px; }
.leer-zustand svg.i { width: 40px; height: 40px; color: var(--linie-2); margin-bottom: 10px; }

/* Verlauf als Chat */
.chat { display: grid; gap: 12px; }
.blase { max-width: 86%; border-radius: 16px; padding: 11px 14px 10px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten-1); }
.blase.ein { justify-self: start; border-bottom-left-radius: 6px; }
.blase.aus { justify-self: end; background: #f4f7ee; border-color: #e1e9cf; border-bottom-right-radius: 6px; }
.blase.auto { opacity: 0.8; box-shadow: none; background: var(--flaeche-2); }
.blase-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.76rem; color: var(--text-3); margin-bottom: 4px; }
.blase-kopf b { color: var(--text-2); font-weight: 650; }
.blase-betreff { font-size: 0.8rem; font-weight: 650; color: var(--text-2); margin-bottom: 3px; }
.blase-text { white-space: pre-wrap; word-wrap: break-word; font-size: 0.92rem; line-height: 1.55; }
.blase details { margin-top: 8px; font-size: 0.8rem; color: var(--text-3); }
.blase details summary { cursor: pointer; }
.blase details pre { white-space: pre-wrap; font: inherit; margin: 6px 0 0; }
.tag-trenner { text-align: center; font-size: 0.74rem; color: var(--text-3); font-weight: 600; margin: 6px 0; }

.analyse { border-radius: var(--r); background: var(--flaeche); border: 1px solid var(--linie); padding: 12px 14px; margin-bottom: 16px; display: grid; gap: 6px; font-size: 0.88rem; box-shadow: var(--schatten-1); }
.analyse-kopf { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.analyse-kopf svg.i { color: var(--akzent); }
.analyse b { font-weight: 650; }

/* Entwurf */
.entwurf { border-radius: 14px; background: var(--flaeche); border: 1px solid var(--akzent-mittel); box-shadow: var(--schatten-2); overflow: hidden; }
.entwurf.pruefen { border-color: #f0c9a0; }
.entwurf.erledigt { border-color: var(--linie); box-shadow: var(--schatten-1); }
.entwurf-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: linear-gradient(180deg, #f7faf0, #ffffff); border-bottom: 1px solid var(--linie); }
.entwurf.pruefen .entwurf-kopf { background: linear-gradient(180deg, #fdf6ec, #ffffff); }
.entwurf.erledigt .entwurf-kopf { background: var(--flaeche-2); }
.entwurf-kopf h3 { display: flex; align-items: center; gap: 7px; }
.entwurf-kopf h3 svg.i { color: var(--akzent); }
.entwurf-kopf .an { margin-left: auto; font-size: 0.8rem; color: var(--text-3); }
.entwurf-rumpf { padding: 14px 16px 16px; }
.entwurf-warum { font-size: 0.85rem; color: var(--akzent-2); background: var(--akzent-hell); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; }
.entwurf-befund { font-size: 0.85rem; color: #7a4200; background: var(--gelb-hell); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; }
.entwurf-notiz { font-size: 0.84rem; color: var(--text-2); background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; padding: 8px 11px; margin-bottom: 12px; }
.entwurf input[name=betreff] { font-weight: 650; margin-bottom: 8px; }
.entwurf textarea { min-height: 200px; border-color: var(--linie); }
.entwurf .unterschrift { white-space: pre-wrap; font-size: 0.8rem; color: var(--text-3); padding: 10px 2px 0; }
.entwurf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.entwurf-aktionen .hinweis-text { font-size: 0.78rem; color: var(--text-3); margin-left: auto; }
.neu-schreiben { display: flex; gap: 6px; margin-top: 12px; }
.neu-schreiben input { flex: 1; }
.wunsch-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wunsch-chips button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--linie-2); background: var(--flaeche); cursor: pointer; font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.wunsch-chips button:hover { border-color: var(--akzent); color: var(--akzent-2); background: var(--akzent-hell); }
.countdown { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--text); color: #fff; font-weight: 600; margin-bottom: 12px; }
.countdown .balken { flex: 1 1 100%; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); overflow: hidden; order: 3; }
.countdown .balken i { display: block; height: 100%; background: #fff; width: 100%; transition: width 0.25s linear; }
.countdown .knopf { margin-left: auto; background: #fff; color: var(--text); border-color: #fff; }
.laden { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--akzent-mittel); border-top-color: var(--akzent); animation: drehen 0.8s linear infinite; vertical-align: -2px; }
@keyframes drehen { to { transform: rotate(360deg); } }
.lesetext { white-space: pre-wrap; font-size: 0.92rem; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; }

.seitenkarte .karte-inhalt p { margin-bottom: 6px; }
.info-zeile { display: flex; gap: 8px; font-size: 0.86rem; padding: 6px 0; border-top: 1px solid var(--linie); }
.info-zeile:first-child { border-top: 0; }
.info-zeile > span:first-child { color: var(--text-3); width: 108px; flex: none; }
.info-zeile > :not(:first-child) { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Autopilot, Phasen, Briefing, Pipeline, Leitfaden ---------- */
.segment { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--flaeche-3); gap: 2px; flex-wrap: wrap; }
.segment button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 0.84rem; cursor: pointer; }
.segment button.aktiv { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten-1), 0 0 0 1px var(--linie); }
.segment button.aktiv.auto { color: var(--gruen); }
.autopilot-zeit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 10px; background: var(--gruen-hell); color: #13542a; margin-bottom: 12px; font-size: 0.88rem; }
.autopilot-zeit .knopf { margin-left: auto; }
.phasen { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.phasen::-webkit-scrollbar { display: none; }
.phasen li { flex: 1 0 auto; min-width: 92px; }
.phasen li span { display: block; padding: 7px 10px 6px; border-top: 3px solid var(--linie-2); font-size: 0.74rem; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.phasen li.erledigt span { border-top-color: var(--akzent-mittel); color: var(--text-2); }
.phasen li.jetzt span { border-top-color: var(--akzent); color: var(--akzent-2); font-weight: 750; }
.tipp { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; padding: 9px 11px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-2); font-size: 0.86rem; }
.tipp svg.i { margin-top: 2px; }
.pipeline-brett { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.pipeline-spalte { background: var(--flaeche-3); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.pipeline-spalte.verloren { opacity: 0.75; }
.pipeline-kopf { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; font-size: 0.86rem; }
.pipeline-karte { display: block; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 11px; box-shadow: var(--schatten-1); }
.pipeline-karte:hover { border-color: var(--akzent-mittel); }
.pipeline-karte .eintrag-zeile { gap: 8px; }
.trichter-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-2); }
.trichter-zeile .balken { height: 8px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; }
.trichter-zeile .balken i { display: block; height: 100%; border-radius: 99px; }
.trichter-zeile b { text-align: right; }
.leitfaden-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; line-height: 1.55; min-height: 260px; }
.beispiel { border-top: 1px solid var(--linie); padding-top: 10px; }
.beispiel:first-child { border-top: 0; padding-top: 0; }

/* ---------- Freigaben ---------- */
.fortschritt { height: 4px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; }
.fortschritt i { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.kontext { margin-bottom: 14px; }
.kontext .blase { max-width: 100%; }

/* ---------- Aufgaben ---------- */
.gruppe-titel { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 14px 16px 4px; }
.gruppe-titel.rot { color: var(--rot); }
.aufgabe { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--linie); }
.aufgabe:first-child { border-top: 0; }
.haken { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linie-2); background: var(--flaeche); cursor: pointer; flex: none; margin-top: 1px; display: grid; place-items: center; padding: 0; transition: background 0.15s, border-color 0.15s; }
.haken:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.aufgabe.erledigt .haken { background: var(--akzent); border-color: var(--akzent); }
.aufgabe.erledigt .haken::after, .wand-aufgabe .haken.fertig::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.aufgabe.erledigt .aufgabe-titel { text-decoration: line-through; color: var(--text-3); }
.aufgabe-haupt { flex: 1; min-width: 0; }
.aufgabe-titel { font-weight: 600; }
.aufgabe-titel a:hover { color: var(--akzent); }
.aufgabe-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: 0.78rem; color: var(--text-3); }
.aufgabe-meta .faellig.rot { color: var(--rot); font-weight: 650; }
.prio-1 .aufgabe-titel::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--rot); margin-right: 7px; vertical-align: 2px; }
.aufgabe-neu { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.aufgabe-neu input[name=titel] { flex: 3 1 220px; }
.aufgabe-neu input[type=date] { flex: 1 1 140px; }
.aufgabe-neu select { flex: 0 1 130px; }

/* ---------- Ereignisse ---------- */
.ereignisse { padding: 2px 16px 12px; }
.ereignis { display: flex; gap: 10px; padding: 8px 0; font-size: 0.85rem; border-top: 1px solid var(--linie); }
.ereignis:first-child { border-top: 0; }
.ereignis time { color: var(--text-3); flex: none; width: 58px; font-size: 0.78rem; padding-top: 1px; }
.ereignis .e-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--linie-2); flex: none; margin-top: 7px; }
.ereignis.mail_ein .e-punkt { background: var(--blau); } .ereignis.kaufsignal .e-punkt { background: var(--gruen); }
.ereignis.mail_aus .e-punkt, .ereignis.autopilot .e-punkt, .ereignis.uebergabe .e-punkt, .ereignis.angebot .e-punkt { background: var(--akzent); }
.ereignis.kunde .e-punkt { background: var(--text); } .ereignis.fehler .e-punkt, .ereignis.stop .e-punkt { background: var(--rot); }
.ereignis.fehler { color: var(--rot); }
.ereignis a:hover { color: var(--akzent); }

/* ---------- Tabellen ---------- */
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tabelle th { text-align: left; font-size: 0.74rem; font-weight: 650; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--linie); background: var(--flaeche-2); white-space: nowrap; }
.tabelle td { padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: var(--flaeche-2); }
.tabelle tr.problem td { background: var(--rot-hell) !important; }
.tabelle tr.hinweis td { background: #fffaf0 !important; }
.tabelle-huelle { overflow-x: auto; border-radius: 0 0 var(--r) var(--r); }
.name-zelle { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.spalte-wahl { width: 34px; }
.spalte-wahl input, .tabelle input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--akzent); cursor: pointer; }
.tabelle td.zeile-ende { text-align: right; width: 44px; }
.tabelle tr:has(input[name=ids]:checked) td { background: var(--akzent-hell); }
.name-zelle b { display: block; font-weight: 650; }
.name-zelle small { display: block; color: var(--text-3); font-size: 0.78rem; }

/* ---------- Einstellungen ---------- */
.einstellungen { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; }
.unter-nav { position: sticky; top: 20px; display: grid; gap: 2px; }
.unter-nav a { padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: 0.88rem; }
.unter-nav a:hover { background: var(--flaeche-3); color: var(--text); }
.abschnitt { scroll-margin-top: 16px; }
.abschnitt > .karte-kopf { padding-bottom: 4px; }
.abschnitt .beschreibung { color: var(--text-3); font-size: 0.86rem; padding: 0 16px 12px; }

/* ---------- Suche ---------- */
.such-dialog { border: 0; padding: 0; border-radius: 14px; width: min(620px, calc(100vw - 32px)); box-shadow: var(--schatten-3); margin: 12vh auto auto; }
.such-dialog::backdrop { background: rgba(18, 19, 22, 0.32); backdrop-filter: blur(2px); }
.such-dialog .suchfeld input { border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; height: 52px; font-size: 1rem; padding-left: 42px; box-shadow: none; }
.such-dialog .suchfeld svg.i { left: 15px; width: 18px; height: 18px; }
.such-ergebnis { max-height: 55vh; overflow-y: auto; padding: 6px 0; }
.such-ergebnis .gruppe-titel { padding-top: 8px; }
.such-ergebnis .eintrag { border-top: 0; padding: 8px 16px; }
.such-ergebnis .eintrag:hover, .such-ergebnis .eintrag.fokus { background: var(--flaeche-3); }
.such-ergebnis .eintrag > svg.i { width: 26px; height: 26px; padding: 4px; color: var(--text-3); }

/* ---------- Meldungen (Toasts) ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 12px; background: var(--text); color: #fff; font-weight: 600; font-size: 0.88rem; box-shadow: var(--schatten-3); animation: rein 0.25s ease-out; }
.toast svg.i { color: #b9d58a; }
.toast.weg { opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Anmelden ---------- */
.mitte { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, #eef3e4, transparent), var(--bg); }
.anmelde-karte { width: min(400px, 100%); padding: 28px 26px 24px; }
.anmelde-karte .logo { justify-content: center; padding-bottom: 6px; }
.anmelde-karte h1 { text-align: center; font-size: 1.35rem; margin: 6px 0 4px; }
.anmelde-karte .unter { text-align: center; color: var(--text-3); margin-bottom: 18px; }
.anmelde-karte .code-feld { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.hinweis-ok { background: var(--gruen-hell, #eef4e4); color: var(--gruen, #4f6b1d); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: .92rem; }

/* ---------- Mittelgroß ---------- */
@media (max-width: 1279px) {
  .lese-raster { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: 330px minmax(0, 1fr); }
}

/* ---------- Handy und Tablet hochkant ---------- */
@media (max-width: 1023px) {
  body { font-size: 15px; background: var(--bg); }
  .app { display: block; }
  .seitenleiste { display: none; }
  .nur-pc { display: none !important; }
  .nur-handy { display: revert !important; }
  .inhalt { padding: 6px 16px 104px; }
  .seitenkopf { margin-bottom: 14px; align-items: flex-start; }
  .seitenkopf .titel-pc { display: none; }
  .handy-kopf {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; min-height: 52px;
    padding: 8px 12px; background: rgba(245, 245, 246, 0.86); backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent;
  }
  .handy-kopf.mit-linie { border-bottom-color: var(--linie); }
  .handy-kopf .knopf.rund { height: 36px; width: 36px; border-radius: 50%; }
  .handy-kopf .mitte-titel { font-weight: 650; font-size: 1rem; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .handy-kopf .rechts { margin-left: auto; display: flex; gap: 6px; }
  .grosser-titel { font-size: 1.95rem; font-weight: 750; letter-spacing: -0.025em; margin: 2px 0 12px; }
  .tabs {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--linie);
  }
  .tabs a { display: grid; justify-items: center; gap: 3px; padding: 4px 0 2px; color: var(--text-3); font-size: 0.66rem; font-weight: 600; position: relative; }
  .tabs a svg.i { width: 23px; height: 23px; }
  .tabs a.aktiv { color: var(--akzent); }
  .tabs .zahl { position: absolute; top: -1px; left: calc(50% + 5px); height: 17px; min-width: 17px; font-size: 0.64rem; border: 2px solid #fff; box-sizing: content-box; }
  body.detail .tabs { display: none; }
  body.detail .inhalt { padding-bottom: 40px; }
  .raster-2, .raster-haupt, .lese-raster, .zweispaltig, .einstellungen, .cockpit-raster { grid-template-columns: minmax(0, 1fr); }
  .spalte { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
  .analyse-zeile { grid-template-columns: 96px minmax(0, 1fr); }
  .split { padding: 6px 16px 104px; }
  body.detail .split { padding-bottom: 24px; }
  .lese-kopf { margin-bottom: 14px; }
  .lese-kopf h1 { font-size: 1.3rem; }
  .unter-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .unter-nav a { white-space: nowrap; background: var(--flaeche); border: 1px solid var(--linie); }
  input[type=text], input[type=password], input[type=email], input[type=number], input[type=time], input[type=date], input[type=search], select, textarea { font-size: 16px; min-height: 42px; }
  .knopf { height: 40px; font-size: 0.92rem; border-radius: 10px; }
  .knopf.klein { height: 32px; }
  .karte { border-radius: 14px; }
  .eintrag { padding: 12px 14px; }
  .blase { max-width: 94%; }
  .gruss h1 { font-size: 1.85rem; }
  .status-leiste { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
  .status-leiste::-webkit-scrollbar { display: none; }
  .status { flex: none; }
  /* Geteilte Ansicht: am Handy entweder Liste oder Detail */
  .split { display: block; height: auto; }
  .split-liste { border: 0; background: transparent; }
  .split-kopf { padding: 0 0 12px; border: 0; }
  .split-scroll { overflow: visible; }
  .split-liste .liste { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; }
  .split.hat-auswahl .split-liste { display: none; }
  .split:not(.hat-auswahl) .split-detail { display: none; }
  .split-detail { background: transparent; overflow: visible; }
  .split-liste { overflow: visible; }
  .lese { padding: 0; }
  .lese-kopf .aktionen { display: none; }
  /* Entwurf: Aktionen bleiben am Handy unten erreichbar */
  .entwurf.einzeln .entwurf-aktionen {
    position: sticky; bottom: 0; z-index: 20; margin: 14px -16px -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--linie);
  }
  .entwurf.einzeln .entwurf-aktionen .knopf.gruen { flex: 1; }
  .entwurf.einzeln .entwurf-aktionen { flex-wrap: nowrap; }
  .entwurf.einzeln .entwurf-aktionen .hinweis-text, .pc-text { display: none; }
  .entwurf.einzeln { overflow: visible; }
  .entwurf-aktionen .hinweis-text { flex-basis: 100%; margin: 0; order: 9; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.detail .toasts { bottom: 24px; }
  .tabelle.handy-karten thead { display: none; }
  .tabelle.handy-karten tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--linie); }
  .tabelle.handy-karten td { display: block; border: 0; padding: 2px 0; background: none !important; }
  .tabelle.handy-karten td:empty, .tabelle.handy-karten td.nr { display: none; }
  .tabelle.handy-karten tr.problem { background: var(--rot-hell); }
  .tabelle.handy-karten tr.hinweis { background: #fffaf0; }
  .tabelle.handy-karten td.hinweis-zelle { margin-top: 4px; font-weight: 600; }
  .tabelle.handy-karten td.kompakt { display: inline-flex; align-items: center; margin: 6px 8px 0 0; vertical-align: middle; }
  .tabelle.handy-karten td.kompakt:empty { display: none; }
  .tabelle.handy-karten tr { position: relative; }
  .tabelle.handy-karten td.spalte-wahl { position: absolute; top: 12px; right: 14px; margin: 0; width: auto; }
  .tabelle.handy-karten td.spalte-wahl + td .name-zelle { padding-right: 28px; }
  .tabelle.handy-karten .name-zelle { min-width: 0; }
  .such-dialog { margin-top: 8px; width: calc(100vw - 16px); }
  .demo-band { font-size: 0.74rem; }
}

/* ---------- Wand (Tablet) ---------- */
body.wand { background: var(--bg); padding: 26px 30px; font-size: 17px; min-height: 100vh; }
.wand-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.wand-kopf .uhr { font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; text-align: right; }
.wand-kopf .datum { color: var(--text-3); text-align: right; margin-top: 4px; }
.wand-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.wand-kpis .karte { padding: 16px 18px; }
.wand-kpis b { display: block; font-size: 2.3rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.wand-kpis span { display: block; color: var(--text-3); margin-top: 6px; font-size: 0.9rem; }
.wand-raster { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.wand h2 { font-size: 1.15rem; }
.wand-aufgabe { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--linie); }
.wand-aufgabe:first-child { border-top: 0; }
.wand-aufgabe .haken { width: 34px; height: 34px; border-width: 2.5px; }
.wand-aufgabe .titel { flex: 1; font-weight: 650; }
.wand-aufgabe.prio-1 { box-shadow: inset 4px 0 0 var(--rot); }
@media (max-width: 760px) { .wand-raster, .wand-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wand-raster { grid-template-columns: 1fr; } }
