/* === VIDEOPLAN — helles, cleanes Dashboard === */
:root {
  --bg: #F6F6FA;
  --karte: #FFFFFF;
  --rand: #ECECF2;
  --rand-stark: #DEDEE8;
  --text: #1B1B2F;
  --text-gedimmt: #6A6A80;
  --text-leise: #9C9CB2;

  /* Marke: Lime als Fläche, nie als Textfarbe auf Weiß — dafür das dunkle Oliv */
  --akzent: #C4F048;
  --akzent-tief: #4E6B0A;
  --akzent-weich: #F3FBDF;
  --akzent-rand: #DCEFA8;

  --gruen: #4E6B0A;
  --gruen-weich: #F3FBDF;
  --rot: #E5484D;
  --rot-weich: #FDECEC;
  --amber: #D97706;
  --amber-weich: #FDF1E1;
  --blau: #0D74CE;
  --blau-weich: #E8F2FD;

  --radius: 16px;
  --radius-klein: 10px;
  --schatten: 0 1px 2px rgba(20,20,45,.04), 0 4px 14px rgba(20,20,45,.05);
  --schatten-hoch: 0 2px 4px rgba(20,20,45,.05), 0 12px 32px rgba(20,20,45,.08);
  --font-marke: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
.app { display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
  width: 244px; flex-shrink: 0; background: var(--karte);
  border-right: 1px solid var(--rand); padding: 22px 16px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-marke { display: flex; align-items: center; gap: 10px; padding: 4px 8px 26px; }
/* Markenzeichen: schwarzer Block mit Lime-Haken, wie auf der Website */
.marke-kreis {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: #0A0A0C;
  display: flex; align-items: center; justify-content: center;
}
.marke-name { font-family: var(--font-marke); font-weight: 800; font-size: 17px; letter-spacing: -.03em; }
.marke-punkt { color: var(--akzent); }

.nav-gruppe { font-size: 11px; font-weight: 600; color: var(--text-leise); padding: 0 10px 8px; letter-spacing: .02em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-punkt {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 11px; color: var(--text-gedimmt); font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; background: none; text-align: left;
  font-family: inherit; width: 100%; transition: background .15s ease, color .15s ease;
}
.nav-punkt:hover { background: #F4F4F8; color: var(--text); }
.nav-punkt.aktiv { background: var(--akzent-weich); color: var(--akzent-tief); font-weight: 600; }
.nav-punkt .icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }
.nav-kurz { display: none; }
.nav-zahl {
  margin-left: auto; font-size: 11px; font-weight: 700; border-radius: 99px;
  padding: 2px 8px; min-width: 22px; text-align: center;
  color: #fff; background: var(--rot);
}
.nav-zahl.ruhig { color: var(--text-gedimmt); background: #F0F0F5; }
.sidebar-fuss {
  font-size: 11px; color: var(--text-leise); padding: 14px 10px 0;
  border-top: 1px solid var(--rand); line-height: 1.6;
}

/* === INHALT === */
.inhalt { flex: 1; padding: 30px 34px 80px; min-width: 0; }
.kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.kopf h1 { font-size: 27px; font-weight: 600; letter-spacing: -.025em; }
.kopf-unter { color: var(--text-gedimmt); font-size: 14px; margin-top: 6px; }
.anim-rein { animation: rein .22s ease-out; }
@keyframes rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* === KARTEN === */
.karte {
  background: var(--karte); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--schatten);
}
.abschnitt { margin-bottom: 26px; }
.abschnitt-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.abschnitt-kopf h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.abschnitt-kopf .zahl {
  font-size: 11.5px; font-weight: 600; color: var(--text-gedimmt);
  background: #F0F0F5; border-radius: 99px; padding: 3px 9px;
}
.abschnitt-hinweis { font-size: 13px; color: var(--text-leise); margin-bottom: 14px; line-height: 1.5; }

/* === KENNZAHLEN === */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 14px; margin-bottom: 28px; }
.kennzahl {
  background: var(--karte); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten);
}
.kennzahl-hut { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kennzahl-icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.kennzahl-icon.lila { background: var(--akzent-weich); }
.kennzahl-icon.gruen { background: var(--gruen-weich); }
.kennzahl-icon.rot { background: var(--rot-weich); }
.kennzahl-icon.amber { background: var(--amber-weich); }
.kennzahl-icon.blau { background: var(--blau-weich); }
.kennzahl-titel { font-size: 13.5px; font-weight: 500; color: var(--text-gedimmt); }
.kennzahl-wert { font-family: var(--font-marke); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -.035em; }
.kennzahl-fuss { font-size: 12px; color: var(--text-leise); margin-top: 8px; }
.kennzahl-fuss strong { color: var(--text-gedimmt); font-weight: 600; }

/* === ZEILEN === */
.zeile {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius-klein);
  margin-bottom: 9px; box-shadow: var(--schatten);
  transition: box-shadow .15s ease, transform .15s ease;
}
.zeile:hover { box-shadow: var(--schatten-hoch); }
.zeile.rot { border-left: 3px solid var(--rot); }
.zeile.orange { border-left: 3px solid var(--amber); }
.zeile.gruen { border-left: 3px solid var(--gruen); }
.zeile.neutral { border-left: 3px solid var(--rand-stark); }
.zeile-haupt { flex: 1 1 260px; min-width: 0; }
.zeile-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -.01em; }
/* Notiz auf zwei Zeilen begrenzen — lange Anmerkungen dürfen die Zeile nicht auseinanderziehen */
.zeile-notiz {
  font-size: 12.5px; color: var(--text-leise); margin-top: 5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.zeile-warnungen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }

/* Ist der Detailbereich offen, muss die Zeile umbrechen dürfen — sonst stellt
 * er sich neben den Kunden statt darunter. */
.zeile.aufgeklappt { flex-wrap: wrap; }
.zeile.aufgeklappt .entwurf { flex-basis: 100%; }

/* Steuerelemente rechts: schrumpfen nie, brechen bei schmalem Fenster als Block um */
.steuerung { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media (max-width: 1000px) {
  .steuerung { width: 100%; justify-content: flex-start; padding-left: 52px; }
}

/* Rundes Initialen-Feld links in der Zeile */
.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: -.02em;
  background: #F2F2F7; color: var(--text-gedimmt);
}
/* Nur die KI-Kunden tragen die Markenfarbe — sonst bleibt die Liste ruhig */
.avatar.ki { background: var(--akzent-weich); color: var(--akzent-tief); }

/* === ETIKETTEN === */
.etikett {
  font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 8px; white-space: nowrap;
}
.etikett.typ-ki { color: var(--akzent-tief); background: var(--akzent-weich); }
.etikett.typ-dreht { color: var(--text-gedimmt); background: #F2F2F7; }
.etikett.firma { color: var(--text-gedimmt); background: #F2F2F7; }
.warn { font-size: 11.5px; font-weight: 600; border-radius: 7px; padding: 4px 9px; white-space: nowrap; }
.warn.rot { color: var(--rot); background: var(--rot-weich); }
.warn.orange { color: var(--amber); background: var(--amber-weich); }
.warn.aktion { color: var(--akzent-tief); background: var(--akzent-weich); }
.warn.neutral { color: var(--text-gedimmt); background: #F2F2F7; }

/* === ZAHLENFELDER === */
.zahlen { display: flex; gap: 8px; flex-shrink: 0; }
/* Feste Breite: Zahlen-Eingaben bringen sonst ihre eigene, viel zu große Standardbreite mit */
.zahl-feld { text-align: center; width: 64px; flex-shrink: 0; }
.zahl-feld input {
  width: 100%; background: #FAFAFC; border: 1px solid var(--rand); border-radius: 9px;
  padding: 8px 4px; font-size: 16px; font-weight: 700; color: var(--text);
  font-family: var(--font-marke); text-align: center; transition: border-color .15s ease;
}
.zahl-feld input:focus { outline: none; border-color: var(--akzent); background: #fff; box-shadow: 0 0 0 3px rgba(196,240,72,.35); }
.zahl-feld input.leer { color: var(--rot); border-color: #F5C9C9; background: var(--rot-weich); }
.zahl-feld label { display: block; font-size: 10.5px; color: var(--text-leise); margin-top: 5px; font-weight: 500; }

/* Native Pfeile weg — sie zählen bei gedrückter Maustaste von selbst hoch */
.zahl-feld input::-webkit-outer-spin-button,
.zahl-feld input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zahl-feld input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.zahl-schritte { display: flex; gap: 4px; margin-top: 5px; }
.zahl-schritt {
  flex: 1; height: 26px; border: 1px solid var(--rand); border-radius: 7px;
  background: #FAFAFC; color: var(--text-gedimmt);
  font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  font-family: inherit; padding: 0; transition: all .12s ease;
}
.zahl-schritt:hover { background: var(--akzent-weich); border-color: var(--akzent-rand); color: var(--akzent-tief); }
.zahl-schritt:active { background: var(--akzent); color: #14180A; }

/* === KNÖPFE === */
.btn {
  border: none; border-radius: 99px; padding: 10px 20px; font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { transform: translateY(-1px); }
/* Hauptknopf in Marken-Lime mit dunkler Schrift */
.btn-lila {
  background: var(--akzent); color: #14180A;
  box-shadow: 0 1px 2px rgba(20,20,45,.06);
}
.btn-lila:hover { background: #B9E838; }
.btn-hell { background: var(--karte); color: var(--text); border: 1px solid var(--rand-stark); }
.btn-hell:hover { border-color: var(--text-leise); }
.btn-klein { padding: 7px 14px; font-size: 12.5px; }
.btn-leise {
  background: none; border: 1px solid var(--rand); color: var(--text-leise);
  padding: 5px 11px; font-size: 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-weight: 600; transition: all .15s ease;
}
.btn-leise:hover { color: var(--rot); border-color: #F5C9C9; background: var(--rot-weich); }

/* === FILTER === */
.filter { display: flex; gap: 6px; flex-wrap: wrap; background: var(--karte); padding: 5px; border-radius: 99px; border: 1px solid var(--rand); }
.filter button {
  background: none; border: none; color: var(--text-gedimmt);
  border-radius: 99px; padding: 8px 15px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.filter button:hover { color: var(--text); }
.filter button.aktiv { background: var(--akzent-weich); color: var(--akzent-tief); }

/* === WERKZEUGLEISTE (Filter + Suche) === */
.werkzeugleiste {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.suchfeld { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.suchfeld input {
  width: 100%; background: var(--karte); border: 1px solid var(--rand);
  border-radius: 99px; padding: 10px 36px 10px 36px;
  font-size: 13.5px; color: var(--text); font-family: inherit;
  box-shadow: var(--schatten);
}
.suchfeld input:focus {
  outline: none; border-color: var(--akzent);
  box-shadow: 0 0 0 3px rgba(196,240,72,.35);
}
.suchfeld input::-webkit-search-cancel-button { display: none; }
.such-lupe {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .5; pointer-events: none;
}
.such-weg {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: #F0F0F5; color: var(--text-gedimmt);
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 11px; line-height: 1; font-family: inherit;
}
.such-weg:hover { background: var(--rot-weich); color: var(--rot); }

/* === TABELLENKOPF === */
.tabelle-hut {
  display: flex; align-items: center; gap: 14px; padding: 0 18px 10px;
  font-size: 11.5px; font-weight: 600; color: var(--text-leise);
}
.tabelle-hut .platz { flex: 1; min-width: 0; }
/* Gleiche Abstände wie in .steuerung bzw. .zahlen der Kundenzeile */
.hut-rechts { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hut-zahlen { display: flex; gap: 8px; }
@media (max-width: 1000px) { .hut-rechts { display: none; } }

/* === SCHNITT-LOG === */
.woche-block { margin-bottom: 22px; }
.woche-kopf { display: flex; align-items: center; gap: 10px; padding: 6px 4px 10px; }
.woche-kopf .kw { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.woche-kopf .spanne { font-size: 12.5px; color: var(--text-leise); }
.woche-kopf .summe {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--gruen); background: var(--gruen-weich); border-radius: 99px; padding: 4px 11px;
}
.log-zeile {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  border-radius: var(--radius-klein); font-size: 13.5px;
  border-bottom: 1px solid var(--rand);
}
.log-zeile:last-child { border-bottom: none; }
.log-zeile:hover { background: #FAFAFC; }
.log-datum { color: var(--text-leise); font-size: 12.5px; width: 56px; flex-shrink: 0; }
.log-kunde { font-weight: 600; width: 200px; flex-shrink: 0; }
.log-titel { color: var(--text-gedimmt); flex: 1; }
.log-zeile .btn-leise { opacity: 0; }
.log-zeile:hover .btn-leise { opacity: 1; }

/* === AUFGABEN ===
 * Als eigenständige Karten statt Listenzeilen — offene Punkte sollen ins Auge fallen.
 */
.aufgabe {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  background: var(--karte); border: 1px solid var(--rand); border-left: 3px solid var(--rand-stark);
  border-radius: var(--radius-klein); margin-bottom: 9px; box-shadow: var(--schatten);
}
.aufgabe.dringend { border-left-color: var(--rot); }
.aufgabe.mahnend { border-left-color: var(--amber); }
.aufgabe input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); cursor: pointer; flex-shrink: 0; }
/* Marke bei Punkten, die sich aus den Daten ergeben — statt Kontrollkästchen */
.aufgabe-marke { font-size: 16px; flex-shrink: 0; width: 18px; text-align: center; }
.aufgabe-mitte { flex: 1; min-width: 0; }
.aufgabe.erledigt { opacity: .55; box-shadow: none; }
.aufgabe.erledigt .aufgabe-text { text-decoration: line-through; color: var(--text-leise); }
.aufgabe-text { font-size: 14px; line-height: 1.45; font-weight: 500; }
.aufgabe-kunde {
  font-size: 12.5px; color: var(--text-gedimmt); font-weight: 600;
  margin-bottom: 4px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}

/* === FORMULAR === */
.formular { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.formular select, .formular input[type=text], .formular input[type=date] {
  background: #FAFAFC; border: 1px solid var(--rand); border-radius: 10px;
  padding: 10px 13px; font-size: 13.5px; color: var(--text); font-family: inherit;
}
.formular select:focus, .formular input:focus {
  outline: none; border-color: var(--akzent); background: #fff;
  box-shadow: 0 0 0 3px rgba(196,240,72,.35);
}
.formular input[type=text] { flex: 1; min-width: 180px; }

.mini-wahl {
  background: #FAFAFC; border: 1px solid var(--rand); border-radius: 9px;
  padding: 7px 10px; font-size: 12px; color: var(--text-gedimmt); font-family: inherit; font-weight: 500;
  max-width: 150px;
}
.mini-wahl:focus { outline: none; border-color: var(--akzent); }
.mini-wahl.warnung { border-color: #F0D2A8; background: var(--amber-weich); color: var(--amber); }
.mini-wahl.ruht { border-color: var(--rand-stark); background: #F0F0F5; color: var(--text-leise); }

/* Kunden endgültig löschen — bewusst unauffällig, wird erst beim Darüberfahren rot */
.knopf-weg {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  border: 1px solid var(--rand); background: none; color: var(--text-leise);
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.knopf-weg:hover { background: var(--rot-weich); border-color: #F5C9C9; color: var(--rot); }

/* Erscheint, sobald eine Zahl geändert wurde — erst der Klick übernimmt sie */
.knopf-ok {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  border: 1px solid var(--akzent); background: var(--akzent); color: #14180A;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.knopf-ok:hover { background: #B9E838; }
.zahl-feld input.offen-aenderung {
  border-color: var(--akzent); background: var(--akzent-weich); color: var(--text);
}

/* Schalter für "keine Skripte mehr" — Markierung statt Zahl */
.schalter {
  border: 1px solid var(--rand); background: #FAFAFC; color: var(--text-leise);
  border-radius: 9px; padding: 8px 12px; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.schalter:hover { border-color: var(--rand-stark); color: var(--text-gedimmt); }
.schalter.an { background: var(--amber-weich); border-color: #F0D2A8; color: var(--amber); }

/* Alters-Marke an offenen Aufgaben */
.alter {
  font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 4px 10px;
  white-space: nowrap; flex-shrink: 0;
}
.alter.rot { color: #fff; background: var(--rot); }
.alter.orange { color: var(--amber); background: var(--amber-weich); }
.alter.neutral { color: var(--text-gedimmt); background: #F0F0F5; }

/* === E-MAIL-ENTWURF === */
.entwurf {
  width: 100%; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--rand);
}
.entwurf-zeile { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.entwurf-zeile label {
  font-size: 12px; font-weight: 600; color: var(--text-leise);
  width: 52px; flex-shrink: 0;
}
.eingabe {
  background: #FAFAFC; border: 1px solid var(--rand); border-radius: 9px;
  padding: 9px 12px; font-size: 13.5px; color: var(--text);
  font-family: inherit; width: 100%;
}
.eingabe:focus {
  outline: none; border-color: var(--akzent); background: #fff;
  box-shadow: 0 0 0 3px rgba(196,240,72,.35);
}
.entwurf-text { line-height: 1.6; resize: vertical; margin-top: 4px; }
.entwurf-knoepfe { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.entwurf-knoepfe .btn { text-decoration: none; }
.entwurf-hinweis { font-size: 12.5px; color: var(--text-leise); }

/* === ANMELDUNG === */
#login {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--bg);
}
#login[hidden] { display: none; }
.login-karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten-hoch); padding: 34px; width: 100%; max-width: 380px;
}
.login-karte h1 { font-family: var(--font-marke); font-weight: 800; font-size: 22px; letter-spacing: -.03em; margin-top: 16px; }
.login-unter { font-size: 13.5px; color: var(--text-gedimmt); margin: 8px 0 24px; line-height: 1.5; }
.login-karte label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-gedimmt); margin: 14px 0 6px;
}
.login-fehler {
  margin-top: 16px; padding: 11px 13px; border-radius: var(--radius-klein);
  background: var(--rot-weich); color: var(--rot); font-size: 13px; line-height: 1.45;
}

/* === SPEICHER-ANZEIGE === */
.sync {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  padding: 9px 15px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--schatten-hoch); transition: opacity .25s ease;
  max-width: 420px;
}
.sync.leer { opacity: 0; pointer-events: none; }
.sync.laeuft { background: var(--karte); border: 1px solid var(--rand); color: var(--text-gedimmt); }
.sync.ruhig { background: var(--akzent-weich); border: 1px solid var(--akzent-rand); color: var(--akzent-tief); }
.sync.fehler { background: var(--rot); color: #fff; }

/* Rückmeldung im Schnitt-Log, was die App beim Kunden mitgebucht hat */
.log-hinweis { font-size: 12.5px; color: var(--text-leise); margin-top: 12px; line-height: 1.5; }
.log-gebucht {
  color: var(--akzent-tief); background: var(--akzent-weich);
  border-radius: 7px; padding: 5px 10px; font-weight: 600; display: inline-block;
}

/* === WOCHENVERBUCHUNG === */
.verbuchung {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 22px; border-left: 3px solid var(--akzent);
}
.verbuchung.fertig { border-left-color: var(--gruen); align-items: center; }
.verbuch-icon, .verbuch-haken { font-size: 20px; flex-shrink: 0; }
.verbuch-haken {
  width: 30px; height: 30px; border-radius: 50%; background: var(--akzent);
  color: #14180A; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.verbuchung strong { font-size: 14.5px; font-weight: 600; }
.verbuch-unter { font-size: 13px; color: var(--text-gedimmt); margin-top: 5px; line-height: 1.5; }
.verbuch-knoepfe { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.verbuch-liste {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rand);
  max-height: 260px; overflow-y: auto;
}
.verbuch-liste .mini-zeile.uebersprungen .name,
.verbuch-liste .mini-zeile.uebersprungen .wert { color: var(--text-leise); }

/* Diese Woche zu schneiden */
.anstehend-haken {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--rand-stark); display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: transparent;
}
.anstehend-haken.an { background: var(--akzent); border-color: var(--akzent); color: #14180A; }
.log-zeile.erledigt .log-kunde { color: var(--text-gedimmt); }
.log-zeile .wert { font-size: 12px; color: var(--text-leise); flex-shrink: 0; }

/* === ONBOARDING === */
.start-karte { margin-bottom: 14px; padding: 18px 20px; }
.start-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.start-naechst { font-size: 13px; color: var(--text-gedimmt); margin-top: 5px; }
.start-naechst strong { color: var(--text); font-weight: 600; }
.start-zahl { flex-shrink: 0; text-align: right; min-width: 92px; }
.start-anteil { font-family: var(--font-marke); font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.start-anteil span { font-size: 13px; color: var(--text-leise); }
.start-balken {
  height: 6px; border-radius: 99px; background: #EDEDF2; margin-top: 7px; overflow: hidden;
}
.start-balken span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; transition: width .3s ease; }

.start-schritte {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px; padding-top: 16px; border-top: 1px solid var(--rand);
}
.start-schritt { display: flex; gap: 11px; align-items: flex-start; }
.start-haken {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--rand-stark); background: none; color: var(--text-leise);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.start-haken:hover:not(:disabled) { border-color: var(--akzent); color: var(--akzent-tief); }
.start-haken:disabled { cursor: default; }
.start-schritt.fertig .start-haken { background: var(--akzent); border-color: var(--akzent); color: #14180A; }
.start-titel { font-size: 13.5px; font-weight: 600; }
.start-schritt.fertig .start-titel { color: var(--text-gedimmt); }
.start-hilfe { font-size: 12px; color: var(--text-leise); line-height: 1.45; margin-top: 3px; }
.start-auto { color: var(--text-leise); opacity: .85; white-space: nowrap; }
.start-fuss { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rand); }

/* === PLATTFORMEN === */
.etikett.plattform {
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 6px; border: 1px solid transparent;
}
.etikett.plattform.instagram { color: #B8256F; background: #FDEBF3; }
.etikett.plattform.tiktok    { color: #0B7285; background: #E3F5F8; }
.etikett.plattform.youtube   { color: #C0392B; background: #FDECEA; }
.etikett.plattform.facebook  { color: #1B4F9C; background: #EAF1FB; }
.etikett.plattform.linkedin  { color: #14607A; background: #E6F2F6; }

.plattform-wahl { display: flex; gap: 8px; flex-wrap: wrap; }
.plattform-knopf {
  border: 1px solid var(--rand); background: #FAFAFC; color: var(--text-gedimmt);
  border-radius: 99px; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.plattform-knopf:hover { border-color: var(--rand-stark); color: var(--text); }
.plattform-knopf.an { border-color: transparent; }
.plattform-knopf.an.instagram { color: #B8256F; background: #FDEBF3; }
.plattform-knopf.an.tiktok    { color: #0B7285; background: #E3F5F8; }
.plattform-knopf.an.youtube   { color: #C0392B; background: #FDECEA; }
.plattform-knopf.an.facebook  { color: #1B4F9C; background: #EAF1FB; }
.plattform-knopf.an.linkedin  { color: #14607A; background: #E6F2F6; }

/* === KUNDEN-DETAILS === */
.knopf-stift {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  border: 1px solid var(--rand); background: none; color: var(--text-leise);
  font-size: 13px; cursor: pointer; font-family: inherit; transition: all .15s ease;
}
.knopf-stift:hover { background: var(--akzent-weich); border-color: var(--akzent-rand); color: var(--akzent-tief); }
.knopf-stift.an { background: var(--akzent); border-color: var(--akzent); color: #14180A; }

.detail-raster {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px;
}
.detail-raster label, .entwurf > label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-gedimmt); margin-bottom: 6px;
}
.detail-datum { display: flex; gap: 7px; align-items: center; }
.detail-datum .eingabe { flex: 1; }
.detail-hinweis { font-size: 12px; color: var(--text-leise); margin-top: 6px; }

/* Zuständigkeit an offenen Punkten */
.mini-wahl.wer { background: var(--akzent-weich); border-color: var(--akzent-rand); color: var(--akzent-tief); font-weight: 600; }

/* === EINSTELLUNGEN === */
.regler-feld { display: flex; align-items: center; gap: 8px; }
.regler-feld input {
  width: 70px; background: #FAFAFC; border: 1px solid var(--rand); border-radius: 9px;
  padding: 8px 4px; font-size: 16px; font-weight: 700; color: var(--text);
  font-family: var(--font-marke); text-align: center;
}
.regler-feld input:focus {
  outline: none; border-color: var(--akzent); background: #fff;
  box-shadow: 0 0 0 3px rgba(196,240,72,.35);
}
.regler-feld input::-webkit-outer-spin-button,
.regler-feld input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.regler-feld input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.regler-feld input.offen-aenderung { border-color: var(--akzent); background: var(--akzent-weich); }
.regler-einheit { font-size: 12.5px; color: var(--text-leise); min-width: 42px; }

/* Auswahl des Anlasses direkt über dem Entwurf */
.vorlagen-wahl {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rand);
}
.vorlagen-titel { font-size: 12.5px; font-weight: 600; color: var(--text-leise); margin-right: 2px; }
.vorlage-knopf {
  border: 1px solid var(--rand); background: #FAFAFC; color: var(--text-gedimmt);
  border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: all .15s ease;
}
.vorlage-knopf:hover { border-color: var(--rand-stark); color: var(--text); }
.vorlage-knopf.an { background: var(--akzent-weich); border-color: var(--akzent-rand); color: var(--akzent-tief); }

/* === VORLAGEN-EDITOR === */
.platzhalter-legende {
  background: #FAFAFC; border: 1px solid var(--rand); border-radius: var(--radius-klein);
  padding: 12px 14px; margin-bottom: 20px;
  font-size: 12.5px; color: var(--text-gedimmt); line-height: 1.9;
}
.platzhalter-legende code {
  background: var(--akzent-weich); color: var(--akzent-tief);
  border-radius: 5px; padding: 2px 6px; font-size: 12px; font-weight: 600;
  margin-right: 6px;
}
.vorlage-block { padding-top: 18px; border-top: 1px solid var(--rand); margin-top: 18px; }
.vorlage-block:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.vorlage-kopf { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 14px; }
.vorlage-block .eingabe + .entwurf-text { margin-top: 8px; }

/* Karte zum Anlegen eines Kunden */
.neu-karte { margin-bottom: 22px; }
.neu-karte h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

.leer-hinweis { color: var(--text-leise); font-size: 13.5px; padding: 24px; text-align: center; }

/* === ZWEISPALTIG (Wochenansicht) === */
.spalten { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 22px; align-items: start; }
.seiten-karte { margin-bottom: 16px; }
.seiten-karte h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; letter-spacing: -.01em; }
.seiten-karte .unter { font-size: 12.5px; color: var(--text-leise); line-height: 1.5; margin-bottom: 14px; }
.mini-zeile { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rand); font-size: 13px; }
.mini-zeile:last-child { border-bottom: none; }
.mini-zeile .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-zeile .wert { font-size: 12px; font-weight: 600; color: var(--text-leise); flex-shrink: 0; }

@media (max-width: 1120px) { .spalten { grid-template-columns: 1fr; } }

/* Tablet und schmale Fenster: Seitenleiste nur mit Symbolen */
@media (max-width: 860px) and (min-width: 721px) {
  .sidebar { width: 66px; padding: 18px 10px; }
  .sidebar .marke-name, .nav-lang, .nav-kurz, .sidebar-fuss, .nav-gruppe { display: none; }
  .nav-punkt { justify-content: center; }
  .inhalt { padding: 22px 16px 60px; }
  .zeile { flex-wrap: wrap; }
}

/* === HANDY ===
 * Die Seitenleiste wandert nach unten und wird zur Leiste, wie man es von
 * Apps kennt. Damit steht die ganze Breite für den Inhalt zur Verfügung.
 */
@media (max-width: 720px) {
  .app { flex-direction: column; }

  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: auto; flex-direction: row;
    border-right: none; border-top: 1px solid var(--rand);
    padding: 5px 2px calc(5px + env(safe-area-inset-bottom, 0px));
    z-index: 50; box-shadow: 0 -2px 12px rgba(20,20,45,.06);
  }
  .sidebar-marke, .sidebar-fuss, .nav-gruppe { display: none; }
  .sidebar-nav { flex-direction: row; justify-content: space-around; width: 100%; gap: 0; }

  .nav-punkt {
    position: relative; flex-direction: column; gap: 3px;
    padding: 7px 2px; border-radius: 10px; font-size: 10px; font-weight: 600;
    text-align: center; line-height: 1.15;
  }
  .nav-punkt .icon { font-size: 18px; width: auto; }
  .nav-lang { display: none; }
  .nav-kurz { display: block; }
  .nav-zahl {
    position: absolute; top: 1px; left: 50%; margin-left: 5px;
    margin-right: 0; font-size: 9px; padding: 1px 5px; min-width: 15px;
  }

  .inhalt { padding: 18px 14px 88px; }
  .kopf { gap: 12px; margin-bottom: 18px; }
  .kopf h1 { font-size: 23px; }
  .kopf-unter { font-size: 13px; }
  .kopf .btn { width: 100%; justify-content: center; }

  /* Zwei Kennzahlen nebeneinander statt einer Kolonne */
  .kennzahlen { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .kennzahl { padding: 13px 14px; }
  .kennzahl-hut { gap: 8px; margin-bottom: 10px; }
  .kennzahl-icon { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
  .kennzahl-titel { font-size: 12px; line-height: 1.25; }
  .kennzahl-wert { font-size: 25px; }
  .kennzahl-fuss { font-size: 11px; margin-top: 6px; }

  /* Kundenzeilen: alles untereinander, Bedienelemente in voller Breite */
  .zeile { flex-wrap: wrap; padding: 13px 14px; gap: 11px; }
  .zeile-haupt { flex: 1 1 100%; }
  .steuerung { width: 100%; padding-left: 0; flex-wrap: wrap; gap: 8px; }
  .steuerung .mini-wahl,
  .steuerung .schalter { flex: 1 1 auto; min-width: 130px; width: auto !important; }
  .zahlen { flex: 0 0 auto; }
  .tabelle-hut, .hut-rechts { display: none; }

  .werkzeugleiste { gap: 10px; }
  .filter { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .filter button { white-space: nowrap; }
  .suchfeld { max-width: none; }

  .verbuchung { flex-wrap: wrap; }
  .verbuch-knoepfe { width: 100%; }
  .verbuch-knoepfe .btn { flex: 1; justify-content: center; }

  .start-schritte { grid-template-columns: 1fr; }
  .start-kopf { flex-wrap: wrap; }
  .start-zahl { text-align: left; min-width: 0; flex: 1; }
  .detail-raster { grid-template-columns: 1fr; }

  .log-zeile { flex-wrap: wrap; gap: 6px 10px; }
  .log-kunde { width: auto; }
  .log-zeile .btn-leise { opacity: 1; }

  .aufgabe { flex-wrap: wrap; }
  .aufgabe-mitte { flex: 1 1 60%; }

  .sync { left: 14px; right: 14px; bottom: 76px; text-align: center; }
}

/* Hinweis im Vorlagen-Editor, wenn gespeicherte Texte abweichen */
.vorlagen-hinweis {
  background: var(--amber-weich); border: 1px solid #F0D2A8; color: var(--amber);
  border-radius: var(--radius-klein); padding: 12px 14px; margin-bottom: 18px;
  font-size: 12.5px; line-height: 1.6;
}
