/* Selbst gehostete Schriften statt Google Fonts (2026-10-24, DSGVO/"nicht
   abgemahnt werden"-Audit): Google Fonts über fonts.googleapis.com/
   fonts.gstatic.com laden widersprach der eigenen Aussage in der
   Datenschutzerklärung ("kein Tracking, keine externen Verbindungen") — jeder
   Seitenaufruf hätte die IP-Adresse an Google geschickt (bekanntes
   Abmahn-Thema). Dateien stammen aus den offiziellen npm-Fontsource-Paketen
   (@fontsource/plus-jakarta-sans, @fontsource/playfair-display, beide
   OFL-1.1-lizenziert, Embedding/Redistribution ausdrücklich erlaubt), nur die
   tatsächlich genutzten Schnitte (Plus Jakarta Sans 600/700/800 normal,
   Playfair Display 700 kursiv), Latin-Subset reicht für deutsche/englische
   Texte. Liegen unter assets/fonts/. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/playfair-display-latin-700-italic.woff2") format("woff2");
}

:root {
  --bg: #f6f4f0;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text: #14181a;
  /* 2026-10-24, A11y-Audit: war #6b7280 (nur 4.4:1 auf --bg, knapp unter dem
     WCAG-AA-Minimum 4.5:1 für normalen Text) — minimal nachgedunkelt auf
     5.3:1, visuell kaum ein Unterschied. */
  --muted: #5f666f;
  --border: #e7e1d7;
  --accent: #8a5a36;
  --accent-dark: #6b4423;
  --accent-soft-bg: #f1e4d3;
  --accent-soft-text: #8a5a36;
  --amber: #92400e;
  --amber-bg: #fef3e0;
  --red: #9a3412;
  --red-bg: #fdece4;
  --green: #15803d;
  --green-bg: #dcfce7;
  /* Ampel-Farben für Wichtigkeit/Priorität (Aufgaben, Kalender, Deals,
     Marken, Zahlungs-Radar, …) — 14.11.2026, Dominik fand die bisherigen
     reinen --red/--amber/var(--green) zu "knallig". Eigene, dedizierte
     Token (statt --red/--green direkt zu ändern, die z.B. für Status-
     Badges unverändert knallig bleiben sollen) in denselben gedeckten
     Boutique-Tönen wie Social Media Analytics/Finanzen (--kz-einnahmen/
     --kz-offen/--kz-ausgaben in dieser Datei): Bordeaux-Rot, Champagnergold,
     dunkles Olivengrün. Bewusst in Hell UND Dunkel gleich (kein
     Aufhellen im Dunkelmodus) — genau das machte --green dort "knallgrün". */
  --prio-hoch: #6d1b2f;
  --prio-mittel: #c9a35c;
  --prio-niedrig: #4b5320;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --accent-gradient: linear-gradient(135deg, #a9794c 0%, #6b4423 100%);
  --glow: 0 0 0 0 transparent;
  --font-display: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* iOS-artige Schublade (Ionic-Kurve) für die mobile Sidebar */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --scrim: rgba(0, 0, 0, 0.45);
  --radius-feature: 16px;
  --radius-card: 10px;
  --radius-control: 8px;
}

:root[data-app-theme="dark"] {
  /* Hintergrundfamilie nach "Ristretto" (dunkles Kaffeebraun, Referenz
     Porsche Ristretto Brown Metallic #6C4D3E), als dunkle Stufen desselben
     Farbtons statt eines neutralen Grau-Brauns. */
  --bg: #17100d;
  --sidebar-bg: #1b120e;
  --card-bg: #1e1510;
  --text: #ece6dd;
  --muted: #a89c8c;
  --border: #342519;
  --accent: #d8b589;
  --accent-dark: #c49a6c;
  --accent-soft-bg: rgba(216, 181, 137, 0.15);
  --accent-soft-text: #d8b589;
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.15);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.15);
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.15);
  /* Bewusst identisch zu Hell — siehe Kommentar im hellen :root oben. */
  --prio-hoch: #6d1b2f;
  --prio-mittel: #c9a35c;
  --prio-niedrig: #4b5320;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --accent-gradient: linear-gradient(135deg, #e3c9a0 0%, #b8946a 100%);
  --glow: 0 0 0 1px rgba(216, 181, 137, 0.25), 0 6px 24px -4px rgba(216, 181, 137, 0.35);
  /* Native Datumsfelder, Selects, Checkboxen und Scrollbalken überall dunkel
     zeichnen (vorher nur einzeln pro Modal/Bereich gesetzt) */
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Sichtbarer Tastatur-Fokus (Apple-Craft-Prinzip: Tastaturnutzung muss immer
   erkennbar sein) — nur bei :focus-visible, damit Maus-/Touch-Klicks keinen
   Ring zeigen, aber Tab-Navigation immer einen klaren Umriss bekommt. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

/* Weicher Theme-Wechsel: Farben/Flächen überblenden statt hart umzuspringen */
body, .sidebar, .topbar, .tile, .panel-card, .stat-card-mini, .data-table,
.nav-item, .connect-banner, .expose-row, .flyer, .flyer-price-badge,
.icon-btn, .form-row input, .form-row select, .empty-state, .avatar,
.sidebar-brand .mark, .tile-icon {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Verhindert, dass geschützte Seiten kurz aufblitzen, bevor uaSchuetzeSeite()
   (supabase-auth.js) die Session geprüft und ggf. zu login.html umgeleitet
   hat — Attribut wird im <head> jeder geschützten Seite synchron gesetzt,
   noch bevor der Rest der Seite rendert. */
:root[data-auth-pending] body { visibility: hidden; }

:root[data-app-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(216, 181, 137, 0.07), transparent 60%),
    var(--bg);
}

h1, h2, h3,
.stat-value, .sidebar-brand span, .user-name {
  font-family: var(--font-display);
  font-weight: 700;
}

.page-title, .stat-value { letter-spacing: -0.02em; line-height: 1.15; }
h3 { letter-spacing: -0.01em; }

/* Sofortiges Press-Feedback statt nur Hover (fühlt sich direkter/hochwertiger an) */
.btn-primary, .btn-outline, .ms-login-btn, .icon-btn, .nav-toggle-btn, .nav-item, .calendar-day {
  transition: transform 100ms var(--ease-out), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.btn-primary:active, .btn-outline:active, .ms-login-btn:active,
.icon-btn:active, .nav-toggle-btn:active, .nav-item:active, .tile-link:active,
.panel-card-link:active, .calendar-day:active {
  transform: scale(0.97);
}

.icon { stroke-width: 2; }

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 0 16px;
  margin-bottom: -10px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  height: 42px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.brand-word {
  font-family: "Playfair Display", var(--font-display), serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--text);
}

.brand-word .brand-accent { color: var(--accent); }

/* Wiederverwendbares Hervorheben eines einzelnen Worts in der Akzentfarbe
   innerhalb eines normalen Satzes (2026-10-27, erster Einsatz: "Kooperationen"
   im Einleitungssatz von rechnungen.html, damit sofort klar ist, woher die
   Rechnungen kommen). Bewusst ein eigener, generischer Name statt
   .brand-accent, da dessen bestehende CSS-Regel auf .brand-word beschränkt ist. */
.text-accent { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }

.icon { display: inline-block; vertical-align: middle; }
.nav-item .icon { width: 17px; height: 17px; }
.icon-btn .icon { width: 17px; height: 17px; }
.tile-icon .icon { width: 20px; height: 20px; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }

.nav-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.nav-item:hover { background: var(--bg); }

.nav-item.active {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  font-weight: 600;
}

.nav-item .nav-icon { font-size: 1rem; width: 18px; text-align: center; }

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  background: var(--amber-bg);
  color: var(--amber);
  padding: 2px 7px;
  border-radius: 999px;
}

.nav-item .nav-count-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  padding: 2px 7px;
  border-radius: 999px;
}

.icon-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Main area */

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  /* Bleibt beim Scrollen oben sichtbar (11.11.2026, Dominiks Wunsch) —
     position: sticky statt fixed, damit sie weiterhin normal im Fluss der
     Seite steht und nichts verschoben werden muss. */
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title { display: flex; align-items: center; gap: 9px; font-size: 1.1rem; font-weight: 700; }
.topbar-title .icon { width: 19px; height: 19px; flex-shrink: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.icon-btn:hover { background: var(--bg); }
.icon-btn:disabled { opacity: 0.6; cursor: default; }

@keyframes icon-btn-spin { to { transform: rotate(360deg); } }
.icon-btn.is-spinning .icon { animation: icon-btn-spin 0.7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .icon-btn.is-spinning .icon { animation: none; }
}

.brand-link { color: inherit; text-decoration: none; }

.ms-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent-gradient);
  box-shadow: var(--glow);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.ms-login-btn:hover { filter: brightness(0.93); }

.ms-login-btn.connected {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  cursor: default;
}

.ms-logo { font-size: 1.05rem; }

.dashboard {
  padding: 28px 32px 48px;
}

.intro {
  color: var(--muted);
  margin-bottom: 24px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 150ms var(--ease-in-out);
}

.tile-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-gradient);
  box-shadow: var(--glow);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.tile h2 {
  margin: 0;
  font-size: 1.05rem;
}

.tile-desc {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 8px 0;
  flex-grow: 1;
}

.status {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-disconnected { background: var(--red-bg); color: var(--red); }
.status-connected { background: var(--green-bg); color: var(--green); }
.status-soon { background: var(--amber-bg); color: var(--amber); }

/* "Weitere 5 E-Mails anzeigen" unter der Liste (Dominiks Wunsch, 2026-11-04):
   erst die 25 neuesten E-Mails, danach auf Zuruf in 5er-Schritten mehr.
   [hidden] explizit erzwingen — sonst überschreibt display:block hier das
   native [hidden] (gleiche Spezifität, bekannte Falle, siehe andere
   [hidden]-Regeln in dieser Datei). */
/* "Weitere E-Mails anzeigen": bewusst kein eigenständiger Knopf mehr mit
   Rahmen/Hintergrund (11.11.2026, Dominiks Fund: "schaut das Gesendet so
   abgelegen aus") — läuft jetzt in voller Breite direkt an die letzte
   Zeile angehängt, wie eine ausklappbare Fortsetzung der Liste statt einer
   separaten kleinen Box. Pfeil per ::after (gleiche Zwei-Rahmenkanten-
   Technik wie .zr-chevron/.nr-chevron), kein eigenes Icon-Bild nötig. */
.email-list-mehr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  /* Absichtlich oben knapper als unten (11.11.2026, Dominiks Fund: war
     genau andersrum, Text hing näher an "Gesendet" als an der letzten
     E-Mail) — oben kollabiert mit der 8px margin-bottom der letzten
     .email-row, unten kommt nichts weiter dazu, also hier bewusst mehr. */
  padding: 2px 0 18px;
  border: none;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}
.email-list-mehr::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  /* currentColor statt eigener Farbe, damit der Pfeil beim Hover
     automatisch mit der Textfarbe mitzieht, ohne eigene Übergangsregel. */
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: rotate(45deg);
}
/* Nur Schrift+Pfeil hellen beim Hover auf, nicht die ganze Klickfläche
   (11.11.2026, Dominiks Fund: "sieht man den ganzen Bereich aufhellen,
   das sieht nicht gut aus") — kein Hintergrund mehr, nur Textfarbe (der
   Pfeil folgt automatisch über currentColor, siehe oben). */
@media (hover: hover) and (pointer: fine) {
  .email-list-mehr:hover { color: var(--text); }
}
.email-list-mehr[disabled] { opacity: 0.6; cursor: not-allowed; }
.email-list-mehr[hidden] { display: none; }

/* Zeigt in der E-Mails-Topbar, dass ein echtes Postfach verbunden ist
   (Dominiks Wunsch, 2026-11-04: "wirkt professioneller") — verschwindet
   nicht einfach wie das Verbinden-Banner, sondern bleibt als dauerhafter,
   dezenter Hinweis sichtbar, solange die Verbindung besteht. */
.email-connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  white-space: nowrap;
}

.section-title { margin: 40px 0 4px 0; font-size: 1.15rem; }
.section-title-sm { font-size: 1rem; margin: 32px 0 12px 0; }

/* margin-bottom bewusst gleich der .dashboard-Innenabstands oben (28px,
   siehe "padding: 28px 32px 48px" oben) — Dominiks Wunsch (11.11.2026):
   der Abstand von ganz oben bis zum ersten Text soll genauso groß sein wie
   der Abstand von dort bis zum nächsten Inhalt darunter. */
.page-title { margin: 0 0 28px 0; font-size: 1.5rem; }

.connect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--accent-soft-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.connect-banner[hidden] { display: none; }
.panel-card[hidden] { display: none; }
.empty-state[hidden] { display: none; }
.icon-btn-badge[hidden] { display: none; }

.connect-banner-text strong { display: block; margin-bottom: 2px; font-size: 0.92rem; }
.connect-banner-text p { margin: 0; color: var(--muted); font-size: 0.83rem; }

/* Variante mit einer zweiten, aufklappbaren Option darunter (seit
   04.11.2026: Gmail-Knopf oben, E-Mail-Weiterleitung als Alternative) —
   braucht eine Spalte statt der Standard-Zeile aus Text + Knöpfen. */
.connect-banner-column { flex-direction: column; align-items: stretch; }
.connect-banner-column .connect-banner-actions { justify-content: flex-start; }

.btn-icon-row { display: inline-flex; align-items: center; gap: 8px; }

.connect-banner-alt { margin-top: 4px; }
.connect-banner-alt summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 4px 0;
}
.connect-banner-alt summary::-webkit-details-marker { display: none; }
.connect-banner-alt summary::before { content: "▸ "; color: var(--muted); }
.connect-banner-alt[open] summary::before { content: "▾ "; }
.connect-banner-alt .intro { margin: 8px 0 14px; }
.connect-banner .btn-primary { flex-shrink: 0; }
.connect-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.connect-banner-actions .btn-primary, .connect-banner-actions .btn-outline { flex-shrink: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table thead {
  background: var(--sidebar-bg);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--sidebar-bg);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table-clickable tbody tr { cursor: pointer; }

.data-table-highlight {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

/* Herkunft unter dem Aufgaben-Titel (2026-10-23, Dominiks Wunsch): "Erkannt
   aus E-Mail" (klickbar, führt zur E-Mail) oder "Manuell eingetragen" (reiner
   Text). Gleiches Prinzip wie .calendar-entry-source im Kalender, hier als
   eigene Klasse, da die Aufgaben-Tabelle eine andere Zellstruktur hat. */
.task-title-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.task-title { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.task-source { font-size: 0.74rem; font-weight: 500; color: var(--muted); }
a.task-title-link:hover .task-title { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a.task-title-link:hover .task-source { color: var(--accent-soft-text); }

.muted-cell { color: var(--muted); font-size: 0.82rem; }

/* Sanftes Einblenden statt hartem Auf-/Verschwinden bei Bestätigungen wie
   "Gespeichert ✓" — kurze, dezente Fade+Shift-Animation (Feedback für eine
   abgeschlossene, seltene Aktion, siehe Craft-Richtlinien). */
.fade-note {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.fade-note.visible { opacity: 1; transform: translateY(0); }

.btn-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-remove:hover { color: var(--red); }

.btn-edit {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  margin-right: 10px;
}

.btn-edit:hover { color: var(--accent); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 32px 20px;
  text-align: center;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
}

.empty-state-icon {
  width: 34px;
  height: 34px;
  color: var(--muted);
  opacity: 0.6;
}

.empty-state-title {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.empty-state-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.5;
}

.empty-state-desc a {
  color: var(--accent);
  font-weight: 600;
}

.add-form { margin-top: 8px; }

/* Einstellungen (12.11.2026, Dominiks Wunsch): jeder Abschnitt bekommt eine
   sichtbare Grenze (Karte mit Rahmen), statt nur eine Überschrift + Abstand
   zu haben — man soll auf den ersten Blick sehen, wo ein Punkt endet und der
   nächste beginnt. Zusätzlich nach Themen sortiert und gruppiert (Profil,
   Kalender, Rechtliches & Abo, Konto, Verbinden, Daten) über
   .settings-group-label: eigener, größerer Abstand vor einer neuen Gruppe,
   dicht beieinander innerhalb einer Gruppe (mehrere Karten unter einem
   Label, z.B. die drei "Verbinden"-Karten).
   Bewusst eine eigene Klasse statt .add-form selbst zu verändern — .add-form
   wird auch auf aufgaben.html/team.html für andere Formulare verwendet, die
   davon nicht betroffen sein sollen. */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
}
.settings-card + .settings-card { margin-top: 16px; }

.settings-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 40px 0 12px;
}
.settings-group-label:first-of-type { margin-top: 0; }

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.form-row input, .form-row select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}

.form-row input[type="text"] { flex: 1; min-width: 200px; }

.btn-primary {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent-gradient);
  box-shadow: var(--glow);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-primary:hover { filter: brightness(0.93); }

.btn-outline {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-outline:hover { background: var(--bg); }
.btn-outline[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-outline[disabled]:hover { background: var(--card-bg); }

.btn-danger {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #dc2626;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-danger:hover { filter: brightness(0.92); }

/* Eigenes Bestätigungs-Dialog statt window.confirm() — in einer eingebetteten
   Artifact-Vorschau (iframe ohne allow-modals) wird der native Browser-Dialog
   unterdrückt, wodurch der Klick auf Entfernen wirkungslos wirkte. */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.confirm-overlay[hidden] { display: none; }
.confirm-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.confirm-card p { margin: 0 0 20px; color: var(--text); }
.confirm-card-actions { display: flex; justify-content: flex-end; gap: 10px; }
.edit-card { max-width: 480px; }

/* "Neue Kooperation"-Vorschlagsdialog (Dominiks Wunsch, 2026-11-04): Marken
   aus Your Brands mit Pitch-Status "Antwort erhalten", die noch keine
   Kooperation haben, zur Übernahme anbieten statt leerem Formular. */
#koopVorschlagOverlay .confirm-card { max-width: 440px; }
.deal-vorschlag-hinweis { margin: 0 0 14px; color: var(--muted); font-size: 0.88rem; }
.deal-vorschlag-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; max-height: 280px; overflow-y: auto; }
.deal-vorschlag-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.deal-vorschlag-name { font-weight: 600; color: var(--text); }
.edit-card .section-title-sm { margin: 0 0 16px; }
.edit-card .form-row { margin-bottom: 12px; }

.nav-item-sub {
  padding-left: 30px;
  font-size: 0.85rem;
}

.nav-item-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item-row .nav-item { flex: 1; min-width: 0; }

.nav-toggle-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle-btn:hover { background: var(--bg); color: var(--text); }

.nav-chevron { width: 14px; height: 14px; transition: transform 0.15s var(--ease-in-out); }

.nav-toggle-btn[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }

.nav-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s var(--ease-in-out);
}

.nav-submenu.expanded { grid-template-rows: 1fr; }

.nav-submenu-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

/* Exposé-Flow */

.expose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 10px;
}

.expose-row-info strong { display: block; font-size: 0.92rem; }
.expose-row-info span { color: var(--muted); font-size: 0.82rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 18px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
}

.back-link:hover { color: var(--accent); }

/* Upload-Schritt */

.upload-header { margin-bottom: 20px; }
.upload-header h2 { margin: 0 0 4px 0; font-size: 1.3rem; }
.upload-header p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 32px 20px;
  text-align: center;
  margin-bottom: 20px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft-bg); }
.dropzone p { margin: 0 0 6px 0; }
.dropzone-hint { color: var(--muted); font-size: 0.82rem; }

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.photo-thumb { position: relative; border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 1; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-thumb-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.photo-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}

/* Flyer (Bild-Exposé) — eigene, austauschbare Farbvariablen statt fester App-Farben,
   damit später pro Kunde ein eigenes Design (z.B. Rot/Gold) einsetzbar ist. */

.flyer {
  --flyer-accent: var(--accent);
  --flyer-gradient: var(--accent-gradient);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-feature);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 640px;
}

.flyer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.flyer-topbar span:last-child { color: var(--muted); font-weight: 500; font-size: 0.78rem; }

.flyer-hero { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.flyer-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.flyer-hero-overlay {
  position: absolute;
  inset: 0 48% 0 0;
  background: var(--flyer-gradient);
  clip-path: polygon(0 0, 88% 0, 62% 100%, 0 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 14% 24px 22px;
}

.flyer-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; opacity: 0.9; margin-bottom: 6px; }
.flyer-headline { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; }

.flyer-price-badge {
  position: absolute;
  left: 20px;
  bottom: 16px;
  background: var(--card-bg);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.flyer-price-badge span { display: block; font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.flyer-price-badge strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--flyer-accent); }

.flyer-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 6px;
  padding: 16px 20px 0;
}

.flyer-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }

.flyer-body { padding: 20px; }
.flyer-body h3 { margin: 0 0 8px 0; font-size: 0.95rem; }
.flyer-body p { margin: 0; color: var(--text); line-height: 1.6; font-size: 0.9rem; }

.flyer-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.flyer-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}

.flyer-actions .btn-outline[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Profil-Topbar (Entwurf B) */

.topbar-profile { gap: 24px; }

.topbar-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 8px 0;
  max-height: 420px;
  overflow-y: auto;
  z-index: 50;
}
.search-results[hidden] { display: none; }

.search-group-label {
  padding: 6px 14px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.search-result-row:hover { background: var(--bg); }
.search-result-title { font-weight: 600; font-size: 0.88rem; }
.search-result-meta { color: var(--muted); font-size: 0.8rem; margin-left: auto; white-space: nowrap; }
.search-results-empty { padding: 10px 14px; color: var(--muted); font-size: 0.85rem; }

.row-highlight {
  animation: rowHighlightFade 2s ease-out;
}
@keyframes rowHighlightFade {
  0% { background: var(--accent-soft-bg); }
  100% { background: transparent; }
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-control);
  transition: background-color 0.15s ease, transform 100ms var(--ease-out);
}

.user-chip:hover {
  background: var(--sidebar-bg);
}

.user-chip:active {
  transform: scale(0.98);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent-gradient);
  box-shadow: var(--glow);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

.user-name { font-size: 0.86rem; font-weight: 600; }

/* Stat-Zeile + Panel-Karten (Entwurf B) */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

/* Bei sehr schmaler Kachelbreite reicht der Platz neben einer sechsstelligen
   Zahl nicht mehr für die Sparkline (Zahlen brechen ohne Leerzeichen nicht
   um, würden also unter die Linie laufen statt umzubrechen) — Sparkline dann
   lieber ausblenden als überlappen lassen. */
@media (max-width: 480px) {
  .stat-sparkline { display: none; }
}

.stat-card-mini {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 100ms var(--ease-out), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.stat-sparkline {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 64px;
  height: 22px;
}
.stat-sparkline polyline {
  fill: none;
  stroke-width: 3; /* 2026-11-05, auf Dominiks Wunsch dicker (war 2) */
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease, filter 0.2s ease;
}
/* Farben je Kennzahl (2026-11-05, siehe Kommentar bei KZ_FARBE in
   kennzahlen-diagramm.js) — bewusst hier statt per Inline-Style, damit die
   Einnahmen-Sparkline unten auf :hover umschalten kann (Inline-Style hätte
   Vorrang vor jedem CSS-Hover-Selektor). */
.spark-einnahmen polyline { stroke: var(--geld-einnahmen); filter: drop-shadow(0 0 4px var(--geld-einnahmen)); }
.spark-ausgaben polyline { stroke: var(--geld-ausgaben-spark); filter: drop-shadow(0 0 4px var(--geld-ausgaben-spark)); }

.stat-card-mini:active { transform: scale(0.97); }

/* Einnahmen-Kachel (2026-11-05, auf Dominiks Wunsch: "erst gold, wenn man
   mit der Maus drauf ist", 2026-11-06 korrigiert: nur ein goldener Rand
   wie bei den anderen Kacheln, nicht die ganze Fläche) — im Ruhezustand
   UND beim Hover sieht die Kachel aus wie die anderen drei (normale
   Karte, normale Textfarbe, nur Rand wird gold), nur der größere
   Eckenradius bleibt als dezenter Unterschied bestehen. */
.stat-card-mini.highlight {
  border-radius: var(--radius-feature);
}

.stat-card-mini .stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card-mini .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.grid-row-3 {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.grid-row-4 {
  display: grid;
  /* E-Mails etwas breiter, Kalender etwas schmaler (11.11.2026, Dominiks
     Wunsch) — Aufgaben/Team bleiben bei 1fr. Gleiche Höhe für alle vier
     bleibt wie gewohnt per Grid-Stretch erhalten, nur die Breite ändert
     sich. */
  grid-template-columns: 1.4fr 1fr 1fr 0.6fr;
  gap: 18px;
  margin-bottom: 18px;
}

.chart-row {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width: 860px) {
  .grid-row-3, .grid-row-4, .chart-row { grid-template-columns: 1fr; }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .grid-row-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Linienchart: gerader Linienverlauf durch die 4 Kennzahlen, je ein Punkt
   pro Kennzahl. Klick auf eine Kennzahl-Kachel oder einen Punkt zeigt einen
   breiten Verlaufs-Balken hinter dem passenden Punkt — angelehnt an Dominiks
   zweitem Referenzbild (Synaptix-AI-Dashboard). */
.panel-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-card-header-row h3 { margin: 0; }

#chartExpandIcon { transition: transform 0.2s var(--ease-out); }
.chart-row.expanded #chartExpandIcon { transform: rotate(180deg); }

.chart-row.expanded {
  grid-template-columns: 1fr;
}
.chart-row.expanded .panel-card-progress { display: none; }
.chart-row.expanded .bar-chart { height: 380px; }
.chart-row.expanded .line-chart-body { height: 330px; }
.chart-row.expanded .line-chart-svg { height: 330px; }

.chart-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.chart-headline-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.chart-headline-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.chart-headline-badge.up { background: var(--accent-soft-bg); color: var(--accent-soft-text); }
.chart-headline-badge.down { background: var(--red-bg); color: var(--red); }

.bar-chart {
  position: relative;
  height: 240px;
  padding: 8px 4px 0;
}

.line-chart-body {
  display: flex;
  gap: 10px;
  height: 190px;
}

.line-chart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0 20px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.line-chart-plot {
  position: relative;
  flex: 1;
}

.line-chart-svg {
  width: 100%;
  height: 190px;
  overflow: visible;
  display: block;
}
.chart-row.expanded .line-chart-plot .line-chart-svg { height: 330px; }

.line-chart-gridline {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.line-chart-highlight-bar {
  fill: url(#dashboardChartGradient);
  transition: x 0.25s var(--ease-out);
}
.line-chart-highlight-bar[hidden] { display: none; }

.line-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Punkte als eigene HTML-Buttons statt SVG-<circle> — das SVG skaliert mit
   preserveAspectRatio="none" X und Y unabhängig voneinander, wodurch echte
   Kreise oval ("wie ein Ei") verzerrt wurden. Als normale HTML-Elemente
   bleiben sie unabhängig vom Seitenverhältnis wirklich rund, und sind dazu
   größere, leichter klickbare Ziele für jeden einzelnen Monatspunkt. */
.chart-dot-marker {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2.5px solid var(--accent);
  transform: translate(-50%, -50%);
  cursor: pointer;
  padding: 0;
  transition: width 0.15s var(--ease-out), height 0.15s var(--ease-out);
}

.chart-dot-marker.active {
  width: 15px;
  height: 15px;
  background: var(--accent);
}

.chart-dot-marker:hover { filter: brightness(0.92); }

.line-chart-point-tooltip {
  position: absolute;
  transform: translate(-50%, -130%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}
.line-chart-point-tooltip[hidden] { display: none; }

.line-chart-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 6px;
}

.line-chart-label-item {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.line-chart-label-item.active {
  color: var(--accent);
  font-weight: 700;
}

/* Fortschritt-Donut: echtes conic-gradient statt statischem Platzhalter,
   mit Prozentzahl in der Mitte. */
.progress-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 14px;
}

.progress-donut-ring {
  width: 148px;
  height: 148px;
  border-radius: 999px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-donut-ring::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 999px;
  background: var(--card-bg);
}

.progress-donut-value {
  position: relative;
  z-index: 1; /* sonst malt ::after (das Donut-Loch) über den Flex-Item-Text drüber */
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

/* Lade-Zustand des Rings auf der Übersicht (10.11.2026, Dominiks Wunsch:
   "das Rad mit den Farben ... soll sich drehen, solange geladen wird, ohne
   Zahlen") — der echte Ring (gleiche 4 Farben wie sonst, nur zu gleichen
   Teilen statt nach echten Werten) dreht sich langsam, ohne Mittenwert,
   solange smInit() in social-media.js noch lädt. */
.progress-donut-ring-lade { animation: smRingLade 3s linear infinite; }
@keyframes smRingLade { to { transform: rotate(360deg); } }

.progress-donut-caption {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  /* Grid-/Flex-Items haben sonst min-width:auto, d.h. ein langer Betreff
     oder Absendername (siehe .dashboard-mini-meta, flex-shrink:0) konnte
     die ganze Spalte breiter ziehen als ihr fairer Anteil — dann rutschte
     z.B. die Kalender-Kachel aus dem Sichtbereich (Dominiks Fund,
     11.11.2026). min-width:0 lässt die vorhandene Ellipsis-Kürzung in den
     Kacheln greifen, statt die Spaltenbreite zu sprengen. */
  min-width: 0;
}

.panel-card h3 {
  margin: 0 0 14px 0;
  font-size: 0.95rem;
}


.panel-card-chart { min-height: 280px; }
.panel-card-progress { min-height: 280px; align-items: stretch; }

/* Vorschau-Kacheln auf der Übersicht (Aufgaben/E-Mails), die zur jeweiligen
   Seite weiterleiten — gleiches Press-/Hover-Verhalten wie .tile-link,
   damit sie sich nicht von den anderen Panels unterscheiden. */
.panel-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 150ms var(--ease-in-out);
}

.panel-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.dashboard-today-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-app-theme="dark"] .dashboard-today-number {
  filter: drop-shadow(0 0 5px rgba(216, 181, 137, 0.25));
}

.dashboard-today-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-mini-list {
  display: flex;
  flex-direction: column;
}

.dashboard-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.dashboard-mini-row:last-child {
  border-bottom: none;
}

/* Eine manuell eingetragene Aufgabe im Kalender-Tages-Detail ist komplett
   anklickbar und öffnet das Bearbeiten-Pop-up (kalender.js, 14.11.2026). */
.calendar-entry-clickable {
  cursor: pointer;
  margin: 0 -8px;
  padding: 9px 8px;
  border-radius: var(--radius-control);
}
@media (hover: hover) and (pointer: fine) {
  .calendar-entry-clickable:hover { background: var(--accent-soft-bg); }
}
.calendar-entry-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dashboard-mini-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-mini-title-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dashboard-mini-title-group .dashboard-mini-title {
  flex: none;
}

.dashboard-mini-meta {
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}

.empty-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  margin: auto 0 0 0;
  text-align: center;
  padding: 10px 0 0 0;
}

.chart-placeholder {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 100px;
  padding: 0 4px;
}

.chart-placeholder .bar {
  flex: 1;
  background: var(--border);
  border-radius: 6px 6px 0 0;
}

.donut-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: conic-gradient(var(--border) 0deg 360deg);
  margin: 4px auto 12px auto;
  position: relative;
}

.donut-placeholder::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 999px;
  background: var(--card-bg);
}

.panel-tracker { align-items: center; justify-content: center; text-align: center; }

/* E-Mails: Ampel-Priorisierung */

.priority-legend-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.priority-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.priority-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.priority-chip strong { color: var(--text); font-family: var(--font-display); margin-left: 2px; }

.priority-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 -1px 1.5px rgba(0, 0, 0, 0.18);
}

.priority-legend .priority-dot { width: 18px; height: 18px; }

/* Eigene Ampelfarben statt --red/--amber/--green: Die Status-Töne sind für
   Text auf getöntem Hintergrund abgestimmt und liegen als reine Punkte zu nah
   beieinander. 14.11.2026, Dominiks Korrektur: die vorherigen reinen
   Ampel-Farben (#dc2626/#f59e0b/var(--green)) wirkten "knallig" — jetzt die
   gedeckten --prio-*-Töne (Bordeaux/Champagnergold/Oliv), siehe Definition
   oben in :root. */
.priority-dot.red { background: var(--prio-hoch); }
.priority-dot.amber { background: var(--prio-mittel); }
.priority-dot.green { background: var(--prio-niedrig); }
.priority-dot.gray { background: var(--muted); }
/* Feiertag/Urlaub im Kalender (11.11.2026, Dominiks Wunsch) — eigene
   Farben statt der Ampel-Bedeutung, da keine Priorität gemeint ist. */
.priority-dot.blue { background: #2563eb; }
.priority-dot.purple { background: #9333ea; }

.team-avatar-wrap { position: relative; flex-shrink: 0; }
.team-status-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid var(--card-bg);
}
.team-status-badge.online { background: var(--accent); }
.team-status-badge.away { background: var(--muted); }
.team-status-badge.offline { background: #dc2626; }

/* Energieeffizienzklassen-Badges: feste Farbskala nach dem bekannten
   EU-Energielabel (A+ dunkelgrün bis H dunkelrot) — bewusst unabhängig
   vom Hell/Dunkel-Theme, da diese Farben eine feste, wiedererkennbare
   Bedeutung haben (wie z.B. ein Ampel-Symbol). */
.energie-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.energie-badge-a-plus { background: #00a651; color: #fff; }
.energie-badge-a { background: #4cb748; color: #fff; }
.energie-badge-b { background: #8dc63f; color: #1a1a1a; }
.energie-badge-c { background: #d8e023; color: #1a1a1a; }
.energie-badge-d { background: #ffd500; color: #1a1a1a; }
.energie-badge-e { background: #fcaf17; color: #1a1a1a; }
.energie-badge-f { background: #f1731d; color: #fff; }
.energie-badge-g { background: #ed1c24; color: #fff; }
.energie-badge-h { background: #b71234; color: #fff; }

.email-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 8px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.2s ease, transform 100ms var(--ease-out);
}

.email-row:hover { border-color: var(--accent); }
.email-row:active { transform: scale(0.99); }

.email-row-main { flex: 1; min-width: 0; }

.email-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.email-sender { font-weight: 600; font-size: 0.9rem; }
.email-date { color: var(--muted); font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }

.email-subject {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Threads/Konversationen zusammengefasst (2026-11-06, Dominiks Wunsch) —
   die Hauptzeile zeigt statt des Entfernen-Knopfs einen Knopf mit
   Nachrichtenanzahl, der die älteren Nachrichten des Threads darunter
   einklappbar zeigt. */
.email-row-skeleton { cursor: default; }
.email-row-skeleton:hover { border-color: var(--border); }
.email-row-skeleton:active { transform: none; }

.email-thread-gruppe { margin-bottom: 8px; }
.email-thread-gruppe .email-row { margin-bottom: 0; }
.email-thread-toggle-btn {
  border: 1px solid var(--border);
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.email-thread-toggle-btn:hover { border-color: var(--accent); }
.email-thread-weitere {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 8px 28px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.email-thread-weitere[hidden] { display: none; }
.email-thread-weitere .email-row { margin-bottom: 0; }
.email-row-thread-mitglied { background: var(--bg); }

/* "Gesendet"-Abschnitt (email-gesendet.js, 2026-11-05) — Zeilen wie
   .email-row, klappen aber ihren Text direkt in der Zeile auf statt in die
   Detail-Ansicht zu wechseln (kein Antworten/KI-Analyse für selbst
   geschriebene E-Mails nötig). */
.email-row-gesendet .email-subject { white-space: normal; }
.email-gesendet-body {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text);
}

.email-remove-btn {
  flex-shrink: 0;
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
}

.email-detail-original {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
}

.email-detail-original .email-detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.email-detail-original h2 { margin: 0 0 12px 0; font-size: 1.15rem; }
.email-detail-original p { line-height: 1.6; margin: 0; white-space: pre-line; color: var(--text); }

/* Manuelle Kooperations-Zuordnung (email.js, 2026-11-05) */
.email-kooperation-zuordnung {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  margin: 12px 0;
}
.email-kooperation-zuordnung-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.email-kooperation-zuordnung-label select { font-weight: 400; color: var(--text); flex: 1; max-width: 320px; }
.email-kooperation-zuordnung-hinweis { margin: 6px 0 0; font-size: 0.76rem; color: var(--muted); }

/* Kalender */

/* Ganzer Monat ohne Scrollen sichtbar (11.11.2026, Dominiks Fund: der
   Tage-Raster war per aspect-ratio:1 quadratisch und damit bei 6 Wochen
   oft höher als der Bildschirm) — die Seite füllt stattdessen genau die
   Höhe unterhalb der Topbar, die Tage-Zeilen teilen sich die verbleibende
   Höhe gleichmäßig auf (grid-auto-rows: 1fr unten), egal ob 5 oder 6
   Wochen. Nur auf dieser Seite (.kal-body), nicht global. */
/* .app hat normalerweise nur min-height:100vh (kann wachsen, wenn Inhalt
   länger ist) — für "genau eine Bildschirmhöhe, kein Scrollen" braucht es
   hier eine echte, feste Höhe, sonst hat .main-area/.kalender-seite
   unten nichts Definites, an dem sich flex:1 orientieren kann. */
.kal-body .app { height: 100vh; }
.kal-body .main-area { overflow: hidden; }
.kal-body .sidebar { overflow-y: auto; }

.kalender-seite {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Sicherheitsnetz: eigentlich füllt .calendar-grid die Höhe exakt, aber
     bei sehr kleinen Fenstern lieber ein schmaler Scrollbalken als
     abgeschnittener Inhalt. */
  overflow: auto;
}

.calendar-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 20px;
  align-items: start;
}

.kalender-seite .calendar-layout { flex: 1; min-height: 0; align-items: stretch; }

@media (max-width: 860px) {
  .calendar-layout { grid-template-columns: 1fr; }
  /* Gestapeltes Layout auf schmalen Screens: natürliche Höhe/Scrollen
     behalten, statt beide Karten in die Resthöhe zu zwängen — wie vor
     dieser Änderung, quadratische Tage-Kacheln eingeschlossen. */
  .kalender-seite, .kalender-seite .calendar-layout { flex: none; height: auto; overflow: visible; }
  .kal-body .main-area { overflow: visible; }
  .kalender-seite .calendar-grid { flex: none; min-height: auto; grid-auto-rows: unset; }
  .calendar-day { aspect-ratio: 1; }
}

.calendar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}

.kalender-seite .calendar-card { display: flex; flex-direction: column; min-height: 0; }
.kalender-seite .calendar-detail-card { min-height: 0; overflow-y: auto; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.calendar-month-label {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
}

.calendar-today-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.kalender-seite .calendar-grid {
  /* Zeilen teilen sich die Resthöhe der Karte gleichmäßig auf (5 oder 6
     Wochen je nach Monat), statt wie .calendar-day unten quadratisch zu
     sein und dadurch bei breiten Fenstern zu hoch für den Bildschirm zu
     werden. */
  flex: 1;
  min-height: 0;
  grid-auto-rows: 1fr;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 8px 4px 6px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 100ms var(--ease-out);
}

.calendar-day:hover {
  background: var(--sidebar-bg);
}

.calendar-day.other-month {
  color: var(--muted);
  opacity: 0.5;
}

.calendar-day.today .calendar-day-number {
  background: var(--accent);
  color: white;
}

.calendar-day.selected {
  border-color: var(--accent);
  background: var(--accent-soft-bg);
}

.calendar-day-number {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.calendar-day-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

/* 14.11.2026: dieselben gedeckten --prio-*-Töne wie .priority-dot oben
   (einheitliche Ampelfarben zwischen Aufgaben- und Kalender-Ansicht). */
.calendar-dot.red { background: var(--prio-hoch); }
.calendar-dot.amber { background: var(--prio-mittel); }
.calendar-dot.green { background: var(--prio-niedrig); }
.calendar-dot.blue { background: #2563eb; }
.calendar-dot.purple { background: #9333ea; }

.calendar-dot-more {
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1;
}

.calendar-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  position: sticky;
  top: 20px;
}

.calendar-detail-card h3 {
  margin: 0 0 14px 0;
  font-size: 0.95rem;
}

.calendar-entry-source {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 1px;
}

/* Anklickbar, wenn es eine echte Quellseite gibt (2026-10-23, Dominiks
   Wunsch) — sonst bleibt es ein reiner <span> ohne Verhalten. */
a.calendar-entry-source { text-decoration: none; }
a.calendar-entry-source:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Legende (Priorität + Feiertag/Urlaub) + "+ Urlaub eintragen" unten in der
   Detail-Karte (11.11.2026, Dominiks Wunsch). */
.calendar-legend {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.calendar-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.calendar-legend-chip .priority-dot { width: 9px; height: 9px; flex-shrink: 0; }

.calendar-urlaub-remove-btn { margin-left: auto; flex-shrink: 0; }

.calendar-form-error { color: var(--red); font-size: 0.82rem; margin: 0; }
.calendar-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.task-hint-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
  max-width: 640px;
}

.task-hint-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.task-hint-text {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Eine E-Mail kann mehrere Hinweise gleichzeitig auslösen (z.B. Marke UND
   Termin) — Abstand zwischen den gestapelten Blöcken innerhalb der Karte. */
.task-hint-item + .task-hint-item {
  margin-top: 14px;
}

.ai-draft-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-feature);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 640px;
}

.ai-draft-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-soft-text);
  background: var(--accent-soft-bg);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.ai-draft-body {
  line-height: 1.6;
  white-space: pre-line;
  margin: 0 0 16px 0;
  color: var(--text);
}

.ai-draft-textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--card-bg);
  color: var(--text);
  resize: vertical;
  margin-bottom: 14px;
}

.ai-draft-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ai-draft-loading { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.88rem; color: var(--muted); }
.ai-draft-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: aiDraftSpin 0.8s linear infinite;
}
@keyframes aiDraftSpin { to { transform: rotate(360deg); } }

/* ===== Wiederverwendbare Skeleton-Ladeanimation (10.11.2026, Dominiks
   Wunsch "viel coolere Ladeanimationen" statt reinem Lade-Text) — ein
   heller Schimmer läuft über eine ruhige, neutral gefärbte Fläche, gleiche
   Technik wie bei LinkedIn/Facebook/Stripe-artigen Ladeplatzhaltern. Form
   kommt über zusätzliche Klassen (.skeleton-line/.skeleton-circle), diese
   Basis-Klasse liefert nur Farbe + Animation. Reduced-Motion-Nutzer
   bekommen automatisch die ruhige Variante (siehe globale Regel unten). ===== */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--border);
  border-radius: var(--radius-control);
  display: inline-block;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
:root[data-app-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent); }
@keyframes skeletonShimmer { 100% { transform: translateX(100%); } }

.skeleton-line { display: block; height: 12px; border-radius: 6px; }
.skeleton-circle { border-radius: 50%; flex-shrink: 0; }

/* Reduced Motion: Übergänge praktisch sofort statt animiert (Farbwechsel bleiben, da hilfreich) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===== Kooperationen (kooperationen.html) ===== */


.deal-page-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Zusammenfassung oben */
.deal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.deal-summary-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 18px;
}
.deal-summary-card.is-alert { background: var(--red-bg); border-color: transparent; }
.deal-summary-card.is-alert .deal-summary-value { color: var(--red); }
.deal-summary-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.deal-summary-value { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.deal-summary-hint { font-size: 0.78rem; color: var(--muted); }

/* Kanban-Board: Spaltenbreite in % des Boards, damit auch bei schmaler
   Fensterbreite eine Spalte fast ganz sichtbar ist und die nächste anschaut
   (Wisch-Hinweis). Horizontales Scrollen bleibt im Board, nicht auf der Seite. */
.deal-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(280px, 85%);
  align-items: start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.deal-board[hidden] { display: none; }

@media (max-width: 860px) {
  .deal-board { scroll-snap-type: x mandatory; }
}

/* Spalte als leicht abgesenkte "Wanne" (aus --border abgeleitet, damit hell
   und dunkel automatisch passen) — so heben sich die weißen Karten ab,
   statt Weiß auf Weiß zu liegen. */
.deal-column {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--border) 45%, transparent);
  border-radius: var(--radius-card);
  padding: 10px;
  min-height: 160px;
  scroll-snap-align: start;
}
.deal-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 10px;
}
.deal-column-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-column-count {
  flex-shrink: 0;
  min-width: 20px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  padding: 1px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.deal-column-count.is-zero { background: transparent; color: var(--muted); padding: 0 2px; }
.deal-column-sum {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.deal-column-list { display: flex; flex-direction: column; gap: 8px; }
/* Leere Spalte: gestrichelter Platzhalter in Kartenhöhe statt nur Text */
.deal-column-empty {
  margin: 0;
  padding: 22px 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: var(--radius-card);
}

/* Deal-Karte — Hierarchie: Marke > Betrag > Datum > Ampel-Grund > Details */
.deal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .deal-card:hover { border-color: var(--accent); }
}
/* Press-Feedback nur, wenn die Karte selbst gedrückt wird, nicht Select/Button darin */
.deal-card:active:not(:has(.deal-card-actions:active)) { transform: scale(0.985); }
/* Globaler Fokus-Ring setzt border-radius: 4px — hier den Kartenradius behalten */
.deal-card:focus-visible { border-radius: var(--radius-card); outline-offset: 2px; }

/* Abgeschlossene Deals treten zurück: keine Kartenfläche, nur Umriss */
.deal-column[data-status="bezahlt"] .deal-card { background: transparent; }

.deal-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.deal-card-top .priority-dot { width: 10px; height: 10px; }
.deal-card-brand { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; flex: 1 1 auto; min-width: 0; max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-amount { margin-left: auto; flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-card-amount.is-gratis { font-family: inherit; font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.deal-card-meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Ampel-Grund als getönte Pille (Text-Tokens auf Tint, wie im Rest des Dashboards) */
.deal-card-reason {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.deal-card-reason-red { color: var(--red); background: var(--red-bg); }
.deal-card-reason-amber { color: var(--amber); background: var(--amber-bg); }

.deal-card-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.deal-chip {
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.deal-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Eigene Select-Optik statt nativem Safari-Verlaufsknopf; Pfeil aus zwei
   Verläufen in --muted, damit er dem Theme folgt (keine SVG-Farbe nötig). */
.deal-status-select,
.deal-field select,
.form-row select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--card-bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 9px) 52%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.deal-status-select {
  flex: 1 1 110px;
  min-width: 0;
  padding: 6px 24px 6px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease;
}
.deal-next-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms var(--ease-out), filter 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .deal-status-select:hover { border-color: var(--accent); }
  .deal-next-btn:hover { filter: brightness(0.95); }
  :root[data-app-theme="dark"] .deal-next-btn:hover { filter: brightness(1.15); }
}
.deal-next-btn:active { transform: scale(0.97); }
.deal-status-select:focus-visible,
.deal-next-btn:focus-visible { border-radius: var(--radius-control); }

/* Hervorhebung nach Sprung aus der Suche — Rahmen-Puls statt Hintergrund,
   weil die Karte selbst einen deckenden Hintergrund hat. */
.deal-card-highlight { animation: dealCardHighlight 2s ease-out; }
@keyframes dealCardHighlight {
  0% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Reduzierte Bewegung: kein Puls (würde global auf 0 ms gekürzt und damit
   unsichtbar), sondern ein ruhiger, stehender Rahmen */
@media (prefers-reduced-motion: reduce) {
  .deal-card-highlight { animation: none; box-shadow: 0 0 0 2px var(--accent); }
}

/* Formular-Modal: viele Felder → scrollbar und mit Beschriftungen */
.deal-edit-card { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.deal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  .deal-form-grid { grid-template-columns: minmax(0, 1fr); }
}
.deal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.deal-field-wide { grid-column: 1 / -1; }
.deal-field input, .deal-field select, .deal-field textarea {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  background-color: var(--card-bg);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease;
}
.deal-field select { padding-right: 28px; }
.form-row select { padding-right: 30px; cursor: pointer; }
.form-row select:focus { border-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .form-row select:hover { border-color: var(--accent); }
}
.deal-field input:focus, .deal-field select:focus, .deal-field textarea:focus { border-color: var(--accent); }
.deal-field textarea { resize: vertical; }
.deal-field-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 0.88rem; font-weight: 400; align-self: end; padding-bottom: 9px; }
.deal-field-check input { width: auto; accent-color: var(--accent); }
/* Betrag Brutto/Netto-Umschalter (2026-10-22) — gleiches Knopf-Muster wie
   der Plattform-Umschalter bei Social Media Analytics. */
.deal-betrag-modus-feld { justify-content: flex-end; padding-bottom: 1px; }
.deal-betrag-modus { display: flex; gap: 6px; }
.deal-betrag-modus-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s var(--ease-out);
}
.deal-betrag-modus-btn.is-active { background: var(--accent); color: #fff; border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .deal-betrag-modus-btn:not(.is-active):hover { border-color: var(--accent); color: var(--text); }
}
.deal-betrag-modus-btn:active { transform: scale(0.96); }
.deal-form-section { font-size: 0.85rem; margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.deal-field-hinweis { margin: 2px 0 0; font-size: 0.78rem; color: var(--muted); }
#eAnzahlungFelder[hidden] { display: none; }
.deal-edit-actions { margin-top: 22px; flex-wrap: wrap; }
.deal-delete-btn { margin-right: auto; color: var(--red); }
.deal-delete-btn[hidden] { display: none; }

/* ===== Kennzahlen + Diagramm "Einnahmen & Ausgaben" + Steuerrücklage ===== */
/* Kennzahl-Farben (Petrol / Champagnergold / Bordeaux-Rot / Dunkles
   Olivengrün). Im Dunkelmodus hellere Stufen derselben Farbtöne, sonst sind
   Petrol und Oliv auf dem dunklen Kartenhintergrund kaum zu sehen. */
:root {
  --kz-einnahmen: #6d1b2f;
  --kz-offen: #c9a35c;
  --kz-aktiv: #0d5c63;
  --kz-ausgaben: #4b5320;
}
:root[data-app-theme="dark"] {
  --kz-einnahmen: #6d1b2f;
  --kz-offen: #c9a35c;
  --kz-aktiv: #0d5c63;
  --kz-ausgaben: #4b5320;
}

/* Eigene Farben nur für das Einnahmen/Ausgaben-Diagramm + die Finanzen-Seite
   (2026-11-04, zweiter Anlauf auf Dominiks Wunsch): dieselben gedeckten
   Boutique-Töne wie --kz-einnahmen/--kz-ausgaben oben (Bordeaux-Rot/Dunkles
   Olivengrün), aber mit der Zuordnung, die zur üblichen Ampel-Logik passt
   (Einnahmen grünlich, Ausgaben rötlich) — nicht die reinen, kräftigen
   Ampel-Farben --green/--red, die vorher kurz eingesetzt waren, sondern die
   gedeckteren Originaltöne, nur richtig zugeordnet. --kz-einnahmen/
   --kz-ausgaben selbst bleiben bewusst unverändert, werden an anderen
   Stellen (z.B. Instagram-Badge in content-daten.js) als reine Deko-Farbe
   ohne Geld-Bedeutung weiterverwendet. */
:root {
  --geld-einnahmen: #4b5320;
  --geld-ausgaben: #6d1b2f;
  /* Nur für die dünne Sparkline in der Ausgaben-Kachel (kennzahlen-diagramm.js,
     2026-11-05, Dominik: "bei Ausgaben sehr schwer zu sehen") — der dunkle
     Bordeaux-Ton --geld-ausgaben ist auf der Kachel selbst (Punkt/Legende/
     großes Diagramm, bleiben unverändert) gut lesbar, als 2px-Linie aber zu
     unauffällig, im Dunkelmodus dazu fast unsichtbar auf der fast schwarzen
     Kartenfarbe (--card-bg) — deshalb hier ein helleres Rosé extra. */
  --geld-ausgaben-spark: #c2425c;
}
:root[data-app-theme="dark"] {
  --geld-einnahmen: #4b5320;
  --geld-ausgaben: #6d1b2f;
  --geld-ausgaben-spark: #e06080;
}

/* Kacheln sind jetzt teils echte Links (<a>) statt Buttons */
a.stat-card-mini { display: block; color: inherit; text-decoration: none; }
/* <button> erbt die Textfarbe nicht (Browser-Standard = schwarz), im
   Dunkelmodus war der Wert der Ausgaben-Kachel sonst kaum lesbar. */
button.stat-card-mini { color: var(--text); }
.stat-card-mini:hover { border-color: var(--accent); }
.stat-card-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.stat-hint { margin-top: 6px; font-size: 0.78rem; color: var(--muted); }
/* Platz für die absolut positionierte Sparkline rechts unten freihalten
   (Hinweistext hat Leerzeichen und bricht deshalb sauber um). */
.stat-hint.has-sparkline { padding-right: 72px; }
@media (max-width: 480px) { .stat-hint.has-sparkline { padding-right: 0; } }

.chart-header-actions { display: flex; align-items: center; gap: 8px; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; font-weight: 600; }

/* Y-Achse: Beschriftung absolut auf Höhe der jeweiligen Gitterlinie, weil
   die Achse jetzt auch negative Werte (Verlust-Monate) haben kann. */
.line-chart-yaxis.kz-yaxis {
  position: relative;
  display: block;
  width: 58px;
  flex-shrink: 0;
  padding: 0;
}
.kz-yaxis span { position: absolute; right: 0; transform: translateY(-50%); }
.line-chart-gridline.is-zero { stroke: var(--muted); stroke-opacity: 0.5; }

/* Einnahmen/Ausgaben bewusst mit den generischen Ampel-Farben (--green/--red)
   statt --kz-einnahmen/--kz-ausgaben (2026-11-04, zurück auf Dominiks
   Wunsch — die Bordeaux-/Oliv-Töne hatten Einnahmen/Ausgaben verwechselbar
   gemacht; --kz-einnahmen/--kz-ausgaben selbst bleiben unverändert, werden
   an anderen Stellen weiterhin als reine Deko-Farbe ohne Geld-Bedeutung
   gebraucht, z.B. Instagram-Badge in content-daten.js). */
.kz-bar-einnahmen { fill: var(--geld-einnahmen); }
.kz-bar-ausgaben { fill: var(--geld-ausgaben); }

.kz-month-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}
.line-chart-plot .chart-dot-marker { z-index: 2; }

.kz-tooltip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 500;
  text-align: left;
}
.kz-tooltip[hidden] { display: none; }
.kz-tooltip.is-left { transform: translate(-12px, -115%); }
.kz-tooltip.is-right { transform: translate(calc(-100% + 12px), -115%); }

/* Monatslabels exakt unter den Spalten (Raster statt space-around), um die
   Breite der Y-Achse eingerückt. */
.line-chart-labels.kz-labels { display: grid; padding-left: 68px; text-align: center; }

.kz-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.kz-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.kz-legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.kz-legend-line { width: 14px; height: 2.5px; border-radius: 2px; background: var(--accent); }
.kz-demo-note { margin: 6px 0 0; font-size: 0.72rem; color: var(--muted); font-style: italic; }

.kz-donut-amount { font-size: 1.2rem; }

/* Social-Media-Analytics-Kasten (ersetzt die frühere Steuerrücklage) */
.sm-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; border-radius: var(--radius-card); transition: opacity 0.15s ease; }
.sm-card-link:hover { opacity: 0.82; }
.sm-card-link:focus-visible { outline-offset: 2px; }
.sm-legend { justify-content: center; margin-top: 2px; }
.sm-legend-item {
  border: none;
  background: transparent;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .sm-legend-item:hover { background: var(--accent-soft-bg); }
}
.sm-legend-item.is-active { background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 700; }

.sm-metric-list { display: flex; flex-direction: column; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }

.sm-nicht-verbunden {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 8px;
}
.sm-nicht-verbunden a { color: var(--accent-soft-text); font-weight: 600; }
/* Eigenes display:flex überschreibt sonst die [hidden]-Eigenschaft (gleiche
   bekannte Falle wie andere [hidden]-Regeln in dieser Datei) — DAS war der
   eigentliche Grund, warum "Noch keine Plattform verbunden" selbst bei
   erfolgreich geladenen echten Daten sichtbar blieb (Dominiks Fund,
   11.11.2026): smZeigeInhalt(true) hatte hidden längst korrekt gesetzt,
   nur zeigte es keine Wirkung ohne diese Regel. */
.sm-nicht-verbunden[hidden] { display: none; }

.sm-metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 4px;
  border: none;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s var(--ease-out);
}
.sm-metric-row:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .sm-metric-row:hover { background: var(--accent-soft-bg); }
}
.sm-metric-row.is-active { background: var(--accent-soft-bg); }
.sm-metric-row.is-active .dashboard-mini-title { color: var(--accent-soft-text); font-weight: 700; }
.sm-metric-row.is-active .dashboard-mini-meta { color: var(--accent-soft-text); }

/* Ausgaben-Modal */
.ausgaben-card { max-width: 520px; max-height: 90vh; overflow-y: auto; }
.ausgabe-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Anhang-Zeile im "Neue E-Mail"-Formular (2026-11-05) — Knopf links, Chip
   mit Dateiname + ×-Entfernen rechts daneben, sobald eine Datei gewählt ist. */
.compose-anhang-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.compose-anhang-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  font-size: 0.82rem;
  color: var(--text);
  max-width: 100%;
}
.compose-anhang-chip[hidden] { display: none; }
#composeAnhangName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.compose-anhang-entfernen {
  border: none;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  width: 20px;
  height: 20px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.compose-anhang-entfernen:hover { background: var(--red-bg); color: var(--red); }
.compose-anhang-fehler { margin: 0; font-size: 0.82rem; color: var(--red); }

/* Anhänge einer eingehenden E-Mail (2026-11-06) — Chip-Liste wie beim
   Compose-Formular, hier ohne Entfernen-Knopf, dafür mit Herunterladen. */
.email-anhaenge-box { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.email-anhaenge-titel { margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-soft); }
.email-anhaenge-box[hidden] { display: none; }
.email-anhang-chip { justify-content: space-between; width: 100%; max-width: 420px; padding: 8px 8px 8px 14px; }
.email-anhang-chip .compose-anhang-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ausgabe-form-error { margin: 0; font-size: 0.82rem; color: var(--red); }
.ausgabe-form-error[hidden] { display: none; }
.ausgabe-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.ausgabe-list[hidden] { display: none; }
/* Zeile selbst anklickbar zum Bearbeiten (2026-11-05, auf Dominiks Wunsch —
   vorher ließen sich Einnahmen/Ausgaben nur löschen und neu anlegen, nie
   korrigieren). Der ×-Lösch-Knopf bleibt per position:relative/z-index
   eigenständig klickbar, gleiches Muster wie die Rechnungen-Zeilen in
   rechnungen.js. */
.ausgabe-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  margin: 0 -4px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .ausgabe-row:hover { background: var(--accent-soft-bg); }
}
.ausgabe-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ausgabe-row.is-editing { background: var(--accent-soft-bg); border-color: var(--accent); }
.ausgabe-row-date { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.ausgabe-row-main { display: flex; flex-direction: column; min-width: 0; }
.ausgabe-row-kategorie { font-weight: 600; }
.ausgabe-row-notiz { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ausgabe-row-betrag { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* × am Rand statt Textknopf "Löschen" (2026-11-05) — gleiches Muster wie
   .re-liste-loeschen-btn in rechnungen.js: zweistufig (×, dann "Wirklich?"),
   position:relative/z-index, damit der Klick nicht an die jetzt klickbare
   Zeile durchgereicht wird. */
.ausgabe-delete-btn {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  border-radius: var(--radius-control);
  width: 26px;
  height: 26px;
  line-height: 1;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.1s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .ausgabe-delete-btn:hover { color: var(--red); border-color: var(--red); }
}
.ausgabe-delete-btn:active { transform: scale(0.92); }
.ausgabe-delete-btn.is-confirm { background: #dc2626; border-color: #dc2626; color: white; width: auto; padding: 0 8px; font-size: 0.74rem; }
.ausgaben-card-actions { margin-top: 18px; }
.ausgabe-bearbeitung-hinweis {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.ausgabe-bearbeitung-hinweis[hidden] { display: none; }

/* Gleicher "du bearbeitest gerade"-Hinweis wie bei Ausgaben, für Aufgaben
   (aufgaben.js, 14.11.2026) — eigene Klasse statt die Ausgaben-Klasse
   wiederzuverwenden, damit ein Entfernen des einen Bausteins nicht
   versehentlich die Optik des anderen mitreißt. */
.aufgabe-bearbeitung-hinweis {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.aufgabe-bearbeitung-hinweis[hidden] { display: none; }

/* Beleg-Anhang (beleg-anhang.js), 2026-11-05 — gleiches Grundmuster wie
   .re-logo-vorschau beim Rechnungs-Logo (rechnung.html), nur als Zeile statt
   nebeneinander, damit es sich in die schmale Modal-Breite einfügt. */
.ausgabe-beleg-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ausgabe-beleg-vorschau {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-align: center;
  padding: 4px;
}
.ausgabe-beleg-vorschau img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ausgabe-beleg-vorschau a { color: var(--accent); text-decoration: none; font-size: 0.74rem; }
.ausgabe-beleg-upload-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

/* Beleg-Symbol in der Zeilen-Liste (Ausgaben/Sonstige Einnahmen) — zusammen
   mit dem Lösch-Knopf in einem gemeinsamen Flex-Container als EIN
   Grid-Element (.ausgabe-row bleibt bei 4 festen Spalten, egal ob ein Beleg
   vorhanden ist oder nicht — sonst bräuchte jede Zeile ohne Beleg eine
   leere 5. Spalte, oder würde bei CSS Grids Standard-Zeilenumbruch-Verhalten
   in eine zweite Zeile rutschen). */
.ausgabe-row-aktionen { display: flex; align-items: center; gap: 6px; }
.ausgabe-beleg-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}
@media (hover: hover) and (pointer: fine) {
  .ausgabe-beleg-link:hover { background: var(--accent-soft-bg); }
}

/* Legende + Demo-Hinweis stehen jetzt unter dem Diagramm — feste Höhe würde
   sie in die nächste Zeile überlaufen lassen; die Höhe kommt aus
   .line-chart-body (190px bzw. vergrößert 330px). */
.chart-row .bar-chart, .chart-row.expanded .bar-chart { height: auto; }
/* Nur auf der Übersicht etwas kompakter (11.11.2026, Dominiks Wunsch, damit
   die Seite insgesamt weniger Scrollen braucht) — über die ID eingegrenzt,
   damit der gleichnamige, größere Chart auf der Social-Media-Analytics-
   Seite (social-media-analytics.js nutzt dieselben .line-chart-*-Klassen)
   unberührt bleibt. Im aufgeklappten Zustand (.chart-row.expanded oben)
   weiterhin die normale, größere Höhe. */
#dashboardBarChart .line-chart-body,
#dashboardBarChart .line-chart-svg { height: 150px; }
.chart-row.expanded #dashboardBarChart .line-chart-body,
.chart-row.expanded #dashboardBarChart .line-chart-svg { height: 330px; }
.panel-card-chart .panel-card-header-row { gap: 10px; flex-wrap: wrap; }

/* ===== Your Brands (brands.html) — alle Klassen mit "brand-"-Präfix.
   Achtung: .brand-icon/.brand-word/.brand-accent/.brand-link gehören zur
   Sidebar-Marke bzw. Begrüßung und sind hier bewusst nicht verwendet. ===== */


/* Filter nach Pitch-Status: Chips, auf dem Handy seitlich wischbar */
.brand-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
}
.brand-filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, transform 120ms var(--ease-out);
}
.brand-filter-chip:active { transform: scale(0.97); }
.brand-filter-chip.is-active { background: var(--accent-soft-bg); color: var(--accent-soft-text); border-color: transparent; font-weight: 600; }
.brand-filter-count { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.brand-filter-chip.is-active .brand-filter-count { color: inherit; }
/* Leere Filter treten zurück, bleiben aber klickbar */
.brand-filter-chip.is-empty:not(.is-active) { color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .brand-filter-chip:hover { border-color: var(--accent); }
}

/* Karten-Raster */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}
.brand-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .brand-card:hover { border-color: var(--accent); }
}
.brand-card:active { transform: scale(0.985); }
.brand-card:focus-visible { border-radius: var(--radius-card); outline-offset: 2px; }
.brand-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-card-top .priority-dot { width: 10px; height: 10px; flex-shrink: 0; }
.brand-card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-card-meta { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.brand-card-foot .deal-chip { margin-left: auto; }
/* Fuß sitzt per margin-top:auto unten (Karten einer Reihe sind gleich hoch,
   die Trennlinien liegen dadurch auf einer Höhe) — Mindestabstand davor: */
.brand-card > :nth-last-child(2) { margin-bottom: 6px; }

/* Pitch-Status-Pille: neutral → Akzent → Grün (Kooperation) */
.brand-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.brand-pill-gepitcht { background: var(--accent-soft-bg); color: var(--accent-soft-text); border-color: transparent; }
.brand-pill-antwort { background: var(--accent-soft-bg); color: var(--text); border-color: var(--accent); }
.brand-pill-kooperation { background: var(--green-bg); color: var(--green); border-color: transparent; }

.brand-reason {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
}
.brand-reason-red { color: var(--red); background: var(--red-bg); }
.brand-reason-amber { color: var(--amber); background: var(--amber-bg); }

/* Hervorhebung nach Sprung aus der Suche (wie .deal-card-highlight) */
.brand-card-highlight { animation: brandCardHighlight 2s ease-out; }
@keyframes brandCardHighlight {
  0% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-card-highlight { animation: none; box-shadow: 0 0 0 2px var(--accent); }
}

/* "+ Neue Marke"-Kachel: letztes Element im selben Grid wie die echten
   Marken-Karten (11.11.2026, Dominiks Wunsch) — landet dadurch automatisch
   in der nächsten freien Zelle, z.B. unten rechts, wenn die letzte echte
   Karte unten links liegt. Höhe passt sich per Grid-Stretch der jeweiligen
   Reihe an, genau wie bei einer echten Karte. */
.brand-new-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 90px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.brand-new-tile-plus { font-size: 1.2rem; line-height: 1; }
@media (hover: hover) and (pointer: fine) {
  .brand-new-tile:hover { border-color: var(--accent); background: var(--accent-soft-bg); }
}
.brand-new-tile:active { transform: scale(0.985); }

.brand-website { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  a.brand-website:hover { text-decoration: underline; }
}
span.brand-website { color: var(--muted); }

/* Detailansicht */
.brand-detail-head { margin-bottom: 16px; }
.brand-detail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand-detail-name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.brand-detail-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.brand-website-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; text-decoration: none; }
.brand-website-btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* "Bei Google suchen"-Knopf (2026-10-27, Dominiks Wunsch): etwas größer als
   die übrigen Knöpfe, bewusst fest weiß mit schwarzer Schrift in BEIDEN
   Themes (wie das bekannte "Mit Google anmelden"-Knopf-Muster) statt der
   sonstigen Akzentfarbe — daneben das echte, farbige Google-"G"-Logo. */
.brand-google-btn {
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  box-shadow: none;
}
.brand-google-btn:hover { background: #f8f9fa; filter: none; }
.brand-google-logo { width: 20px; height: 20px; }
.brand-detail-notes {
  margin: 14px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-line;
  max-width: 720px;
  overflow-wrap: anywhere;
}
.brand-detail-hint { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }

.brand-pitch-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.brand-pitch-box.is-due { background: var(--amber-bg); border-color: transparent; }
.brand-pitch-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 280px; }
.brand-pitch-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.brand-pitch-status { display: flex; align-items: center; gap: 8px; }
.brand-pitch-text { margin: 0; font-size: 0.88rem; color: var(--text); }
.brand-pitch-box.is-due .brand-pitch-text { color: var(--amber); font-weight: 600; }
.brand-pitch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-pitch-link { display: inline-flex; align-items: center; text-decoration: none; }
/* Erweiterungspunkt für Bausteine (BRAND_DETAIL_EXTRAS) */
.brand-detail-extras { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.brand-detail-extras[hidden] { display: none; }

.brand-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  min-width: 0;
}
/* KI-Bereich als hervorgehobene Karte, wie der KI-Entwurf bei den E-Mails —
   steht jetzt direkt unter dem Website-/Google-Knopf statt weiter unten
   neben "Deine Erfahrung mit der Marke" (Dominiks Wunsch, 2026-10-27). Eigener
   margin-bottom (statt am gemeinsamen .brand-panel), damit das nicht auch den
   "Pitch schreiben"-Baustein (pitch-vorlagen.js, nutzt .brand-panel ebenfalls,
   aber innerhalb von .brand-detail-extras mit eigenem flex-gap) betrifft. */
.brand-ki-panel, .brand-experience-panel { margin-bottom: 20px; }
.brand-ki-panel { border-radius: var(--radius-feature); box-shadow: var(--shadow); }
.brand-panel-title { font-size: 1rem; margin: 0 0 12px; }
.brand-panel-empty { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.brand-panel-empty a { color: var(--accent); }
.brand-subtitle { font-size: 0.85rem; margin: 18px 0 8px; }

.brand-overdue {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  background: var(--red-bg);
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
}
.brand-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.brand-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: var(--bg);
  min-width: 0;
}
.brand-stat.is-alert { background: var(--red-bg); }
.brand-stat.is-alert .brand-stat-value { color: var(--red); }
.brand-stat-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.brand-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.brand-stat-hint { font-size: 0.75rem; color: var(--muted); }
/* "–" (noch keine Daten) ist kein Alarmwert, auch nicht in einer roten Kachel */
.brand-stat .brand-stat-value.is-empty { color: var(--muted); }

.brand-deal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.brand-deal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .brand-deal-row:hover { border-color: var(--accent); }
}
.brand-deal-row .priority-dot { flex-shrink: 0; width: 10px; height: 10px; }
.brand-deal-row:focus-visible { border-radius: var(--radius-control); }
.brand-deal-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.brand-deal-title { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-deal-meta { font-size: 0.75rem; color: var(--muted); }
.brand-deal-amount { flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; }

/* KI-Markenprofil (Vorschau) */
.brand-ki-panel .ai-draft-label { margin-bottom: 12px; text-transform: none; letter-spacing: 0; max-width: 100%; }
.brand-ki-intro { margin: 0 0 14px; font-size: 0.88rem; color: var(--muted); }
.brand-ki-loading { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.88rem; color: var(--muted); }
.brand-ki-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: brandKiSpin 0.8s linear infinite;
}
@keyframes brandKiSpin { to { transform: rotate(360deg); } }
.brand-ki-example {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 600;
}
.brand-ki-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.brand-ki-row dt { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.brand-ki-row dd { margin: 2px 0 0; font-size: 0.88rem; line-height: 1.5; }
.brand-ki-tips { margin: 0; padding-left: 20px; font-size: 0.88rem; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.brand-ki-note { margin: 14px 0 0; font-size: 0.75rem; color: var(--muted); font-style: italic; }
.brand-ki-collapse-btn { margin-top: 14px; }

/* Formular-Modal */
.brand-edit-card .deal-field input:disabled { opacity: 0.5; cursor: not-allowed; }
/* WebKit gibt Datumsfeldern innen extra Polster → 4px höher als die Selects
   daneben. Polster der Teilfelder entfernen, damit die Zeile bündig ist.
   Gilt für beide Formular-Modals (Brand-Modal trägt ebenfalls .deal-edit-card). */
.deal-edit-card input[type="date"]::-webkit-datetime-edit,
.deal-edit-card input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.deal-edit-card input[type="date"]::-webkit-datetime-edit-day-field,
.deal-edit-card input[type="date"]::-webkit-datetime-edit-month-field,
.deal-edit-card input[type="date"]::-webkit-datetime-edit-year-field { padding-top: 0; padding-bottom: 0; }
.confirm-card p.brand-form-hint { margin: 14px 0 0; font-size: 0.8rem; color: var(--muted); }
.confirm-card p.brand-form-error { margin: 14px 0 0; font-size: 0.85rem; color: var(--red); font-weight: 600; }
.brand-form-hint[hidden], .brand-form-error[hidden] { display: none; }

/* ===== Mobile Navigation (mobile-nav.js) =====
   Breakpoint 900px: Darunter blieben neben der 240px-Sidebar nur noch
   ≤ 660px für den Inhalt (Tablet hochkant 768–834px wäre schon gequetscht);
   das Diagramm stapelt ab 860px ohnehin einspaltig. Desktop bleibt unverändert,
   der Burger ist dort per display:none ausgeblendet. */
.nav-burger { display: none; }
.nav-overlay { display: none; }

@media (max-width: 900px) {
  .nav-burger { display: flex; flex-shrink: 0; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    width: min(280px, 84vw);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    visibility: hidden;
    /* Schließen etwas schneller als Öffnen; visibility erst nach der Bewegung */
    transition: transform 200ms var(--ease-drawer), visibility 0s linear 200ms,
      background-color 0.2s ease, border-color 0.2s ease;
  }
  .app.nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition: transform 240ms var(--ease-drawer), visibility 0s linear 0s,
      background-color 0.2s ease, border-color 0.2s ease;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 89;
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease-out);
  }
  .app.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
    transition-duration: 240ms;
  }

  /* Body-Scroll sperren, solange das Menü offen ist */
  html.nav-scroll-lock, html.nav-scroll-lock body { overflow: hidden; }

  /* Topbar: Burger links, Titel/Suche daneben, Aktionen rechts */
  .topbar { justify-content: flex-start; padding: 12px 16px; gap: 12px; }
  .topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { margin-left: auto; flex-shrink: 0; }
  .topbar-search { min-width: 0; max-width: none; }
  .topbar-search input { min-width: 0; }

  .dashboard { padding: 20px 16px 40px; }
}

/* Schmal: Profil-Chip nur noch als Avatar */
@media (max-width: 600px) {
  .topbar-actions { gap: 8px; }
  .user-chip { padding-left: 0; border-left: none; gap: 0; }
  .user-chip > div:not(.avatar) { display: none; }
  /* Nur das Gmail-Icon zeigen, Text weg — sonst drängt der "Mit Gmail
     verbunden"-Text auf schmalen Bildschirmen den Seitentitel ab. */
  .email-connected-badge { padding: 5px; }
  .email-connected-badge-text { display: none; }
  /* Tabellen (Aufgaben, Team) und Kalender ohne Seiten-Querscrollen */
  .data-table th, .data-table td { padding: 10px 8px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 12px; }
  .calendar-grid { gap: 3px; }
  /* Suchergebnisse über die volle Topbar-Breite statt nur so breit wie das
     schmale Suchfeld */
  .topbar-profile { position: relative; }
  .topbar-profile .topbar-search { position: static; }
  .topbar-profile .search-results { left: 16px; right: 16px; top: calc(100% - 4px); }
}

/* Reduzierte Bewegung: Menü erscheint ohne Schiebe-Bewegung (Overlay blendet
   über die globale Regel praktisch sofort ein) */
@media (prefers-reduced-motion: reduce) {
  .sidebar, .app.nav-open .sidebar { transition: none; }
}

/* ===== Hinweis-Leiste auf kooperationen.html: Zahlungs-Radar + Nutzungsrechte-
   Wecker als eine Gruppe zwischen Zusammenfassung und Board. Breit nebeneinander,
   sonst untereinander; ist nur einer sichtbar, nimmt er die volle Breite (auto-fit
   klappt leere Spuren zusammen). Sind beide leer/entfernt, verschwindet die Leiste
   samt Abstand. ===== */
.hinweis-leiste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr));
  gap: 14px;
  align-items: start;
  margin: -10px 0 24px;
}
.hinweis-leiste:not(:has(> :not([hidden]))) { display: none; }

/* ===== Baustein: Zahlungs-Radar & Mahn-Entwürfe (zahlungsradar.js) — alle
   Klassen mit "zr-"-Präfix, Block einzeln entfernbar.
   Kompakte, einklappbare Leiste (<details>): Kopf = Titel + Kennzahl, Zeilen
   passen sich über eine Container-Query der eigenen Breite an. ===== */
.zr-radar {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  scroll-margin-top: 16px;
  container-type: inline-size;
}
.zr-radar[hidden] { display: none; }
.zr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius-card);
}
.zr-head::-webkit-details-marker { display: none; }
.zr-head:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }
.zr-head-text { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.zr-title { margin: 0; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.zr-sub { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Chevron aus zwei Rahmenkanten in --muted (folgt dem Theme): offen ▾, zu ▸ */
.zr-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease;
}
.zr-details:not([open]) .zr-chevron { transform: rotate(-45deg); margin: 0 4px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .zr-head:hover .zr-chevron { border-color: var(--text); }
}
.zr-list { list-style: none; margin: 0; padding: 0 16px 2px; }
/* Zeile breit: Punkt | Marke + Infos | Tage-Pille | Betrag | Button */
.zr-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto auto;
  grid-template-areas: "dot main days amount btn";
  align-items: center;
  gap: 4px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.zr-dot { grid-area: dot; width: 10px; height: 10px; align-self: start; margin-top: 6px; }
.zr-row-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zr-row-brand { font-family: var(--font-display); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zr-row-meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.zr-days { grid-area: days; justify-self: start; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.zr-days-red { color: var(--red); background: var(--red-bg); }
.zr-days-amber { color: var(--amber); background: var(--amber-bg); }
.zr-days-neutral { color: var(--muted); background: var(--bg); }
.zr-amount { grid-area: amount; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; min-width: 56px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zr-btn { grid-area: btn; white-space: nowrap; transition: border-color 0.15s ease, transform 0.12s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .zr-btn:hover { border-color: var(--accent); }
}
.zr-btn:active, .zr-stufe:active { transform: scale(0.97); }
.zr-btn:focus-visible, .zr-stufe:focus-visible { border-radius: var(--radius-control); }
/* Schmale Leiste (Handy oder halbe Breite): Marke + Betrag oben, Pille + Button darunter */
@container (max-width: 600px) {
  .zr-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    grid-template-areas: "dot main amount" ". days btn";
    gap: 6px 10px;
  }
  .zr-amount { align-self: start; margin-top: 1px; min-width: 0; }
  .zr-btn { justify-self: end; }
}

.zr-card-chip {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-bg);
}

.zr-modal { max-width: 600px; max-height: 90vh; overflow-y: auto; }
.zr-modal .section-title-sm { margin: 0 0 16px; }
.confirm-card p.zr-modal-meta { margin: -8px 0 14px; font-size: 0.85rem; color: var(--muted); }
.zr-stufen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
@media (max-width: 520px) { .zr-stufen { grid-template-columns: 1fr; } }
.zr-stufe {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
.zr-stufe.is-active { border-color: var(--accent); background: var(--accent-soft-bg); }
.zr-stufe-name { font-size: 0.82rem; font-weight: 700; }
.zr-stufe-hint { font-size: 0.72rem; color: var(--muted); }
.zr-text { min-height: 240px; }
.confirm-card p.zr-hinweis { margin: 0 0 12px; font-size: 0.78rem; color: var(--muted); }
.confirm-card p.zr-meldung { margin: 0 0 12px; font-size: 0.85rem; font-weight: 600; color: var(--green); }
.confirm-card p.zr-meldung.is-error { color: var(--red); }
.zr-meldung[hidden] { display: none; }
.zr-modal-actions { flex-wrap: wrap; }

/* Hinweis auf der Übersicht unter den Kennzahlen (nur bei Überfälligem) */
.zr-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: -6px 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  background: var(--red-bg);
  color: var(--red);
  text-decoration: none;
  font-size: 0.9rem;
  transition: filter 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
.zr-banner[hidden] { display: none; }
.zr-banner .priority-dot { width: 10px; height: 10px; }
.zr-banner-text { flex: 1 1 auto; min-width: 0; }
.zr-banner-link { font-weight: 600; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .zr-banner:hover { filter: brightness(0.97); }
}
.zr-banner:active { transform: scale(0.99); }
.zr-banner:focus-visible { border-radius: var(--radius-card); }

/* Baustein: Aufgaben-Erinnerung (aufgaben-heute.js, 14.11.2026) — gleicher
   Aufbau wie .zr-banner, nur amber statt rot: eine heute fällige Aufgabe
   ist eine Erinnerung, keine überfällige Zahlung, daher bewusst eine
   ruhigere Farbe. */
.aufgaben-heute-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: -6px 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  background: var(--amber-bg);
  color: var(--amber);
  text-decoration: none;
  font-size: 0.9rem;
  transition: filter 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
.aufgaben-heute-banner[hidden] { display: none; }
.aufgaben-heute-banner .priority-dot { width: 10px; height: 10px; }
.aufgaben-heute-banner-text { flex: 1 1 auto; min-width: 0; }
.aufgaben-heute-banner-link { font-weight: 600; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .aufgaben-heute-banner:hover { filter: brightness(0.97); }
}
.aufgaben-heute-banner:active { transform: scale(0.99); }
.aufgaben-heute-banner:focus-visible { border-radius: var(--radius-card); }

/* Onboarding-Checkliste für neue Nutzer (2026-11-06, onboarding.js) —
   Karte zwischen Einleitung und Kennzahlen auf der Übersicht, solange noch
   nicht alle Schritte erledigt sind. */
.onboarding-card {
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
}
.onboarding-card[hidden] { display: none; }

.onboarding-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.onboarding-card-title { margin: 0 0 4px; font-size: 1rem; }
.onboarding-card-desc { margin: 0; color: var(--muted); font-size: 0.88rem; }

.onboarding-dismiss-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  padding: 2px 4px;
}
.onboarding-dismiss-btn:hover { color: var(--red); }

.onboarding-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.onboarding-step-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s ease;
}
.onboarding-step-link:hover { border-color: var(--accent); }
.onboarding-step-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.onboarding-step.is-done .onboarding-step-link { border-color: var(--green); color: var(--muted); font-weight: 400; }
.onboarding-step.is-done .onboarding-step-icon { background: var(--green); border-color: var(--green); color: #fff; }

/* ===== Baustein: Nutzungsrechte-Wecker (nutzungsrechte.js) — alle Klassen
   mit "nr-"-Präfix, Block einzeln entfernbar. ===== */
.nr-wecker {
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  container-type: inline-size;
}
.nr-wecker[hidden] { display: none; }
.nr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius-card);
}
.nr-head::-webkit-details-marker { display: none; }
.nr-head:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }
.nr-head-text { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
.nr-title { margin: 0; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.nr-sub { font-size: 0.8rem; color: var(--muted); }
.nr-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease;
}
.nr-details:not([open]) .nr-chevron { transform: rotate(-45deg); margin: 0 4px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .nr-head:hover .nr-chevron { border-color: var(--text); }
}
.nr-list { list-style: none; margin: 0; padding: 0 16px 2px; }
/* Zeile breit: Punkt | Marke + Infos | Pille | Aktionen (gleiches Raster wie das Radar) */
.nr-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  grid-template-areas: "dot main days actions";
  align-items: center;
  gap: 4px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.nr-dot { grid-area: dot; width: 10px; height: 10px; align-self: start; margin-top: 6px; }
.nr-row-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nr-row-brand { font-family: var(--font-display); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-row-meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nr-row-hint { font-size: 0.78rem; color: var(--red); }
.nr-days { grid-area: days; justify-self: start; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.nr-days-red { color: var(--red); background: var(--red-bg); }
.nr-days-amber { color: var(--amber); background: var(--amber-bg); }
.nr-row-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.nr-row-actions .btn-sm { white-space: nowrap; transition: border-color 0.15s ease, transform 0.12s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .nr-row-actions .btn-sm:hover { border-color: var(--accent); }
}
.nr-row-actions .btn-sm:active { transform: scale(0.97); }
.nr-row-actions .btn-sm:focus-visible { border-radius: var(--radius-control); }
/* Halbe Breite: Pille neben die Marke, Aktionen in die zweite Reihe */
@container (max-width: 680px) {
  .nr-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    grid-template-areas: "dot main days" ". actions actions";
    gap: 8px 10px;
  }
  .nr-days { align-self: start; justify-self: end; }
}
/* Handy: alles untereinander, Aktionen teilen sich die Breite */
@container (max-width: 420px) {
  .nr-row { grid-template-columns: 10px minmax(0, 1fr); grid-template-areas: "dot main" ". days" ". actions"; }
  .nr-days { justify-self: start; }
  .nr-row-actions .btn-sm { flex: 1 1 auto; }
}
.nr-meldung { margin: 0 16px 8px; font-size: 0.85rem; font-weight: 600; color: var(--green); }
.nr-meldung.is-error { color: var(--red); }
.nr-meldung[hidden] { display: none; }

/* Hinweis-Pille auf der Deal-Karte */
.nr-pill {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
}
.nr-pill-red { color: var(--red); background: var(--red-bg); }
.nr-pill-amber { color: var(--amber); background: var(--amber-bg); }

.nr-modal { max-width: 600px; max-height: 90vh; overflow-y: auto; }
.nr-modal .section-title-sm { margin: 0 0 16px; }
.confirm-card p.nr-modal-meta { margin: -8px 0 14px; font-size: 0.85rem; color: var(--muted); }
.nr-text { min-height: 220px; }
.confirm-card p.nr-hinweis { margin: 0 0 12px; font-size: 0.78rem; color: var(--muted); }
.confirm-card p.nr-meldung { margin: 0 0 12px; }
.nr-modal-actions { flex-wrap: wrap; }

/* ===== Baustein: Briefing-Zusammenfassung & Korrekturrunden-Hinweis
   (briefing.js) — alle Klassen mit "bf-"-Präfix, Block einzeln entfernbar.
   Seit 2026-10-30 wieder ein eigenes Fenster (#bfOverlay, gleiches Muster
   wie Zahlungs-Radar/Nutzungsrechte-Wecker), geöffnet über den Knopf
   "Briefing" auf der Deal-Karte — Dominiks Wunsch: ein Klick reicht, die
   Zusammenfassung ist der Hauptinhalt, Korrekturrunden nur ein kleiner,
   goldener Hinweis daneben. ===== */
.bf-modal { max-width: 640px; max-height: 90vh; overflow-y: auto; }
.bf-modal .section-title-sm { margin: 0 0 4px; }
p.bf-modal-meta { margin: 0 0 14px; font-size: 0.85rem; color: var(--muted); }
.bf-modal-actions { flex-wrap: wrap; }
/* Bewusst neutral/grau statt golden wie .ai-draft-label — markiert eingehenden
   Text (von der Marke erhalten), nicht etwas, das du selbst verschicken sollst. */
.bf-received-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bf-korrektur-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft-bg);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
}
.bf-korrektur-badge[hidden] { display: none; }
.bf-briefing-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.bf-zeichen { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Vorschau gefundener E-Mails im Briefing-Modal (2026-10-29, Dominiks
   Wunsch: den Text erst zeigen, bevor man ihn übernimmt, statt einer
   Dropdown-Liste mit nur dem Betreff). */
.bf-email-matches { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bf-email-matches[hidden] { display: none; }
.bf-email-match {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  padding: 12px 14px;
}
.bf-email-match-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bf-email-match-head strong { font-size: 0.9rem; }
.bf-email-match-meta { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.bf-email-match-preview {
  margin: 6px 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: pre-line;
  max-height: 4.6em;
  overflow: hidden;
}
.bf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bf-actions .btn-primary[disabled] { opacity: 0.6; cursor: progress; }
.bf-result { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-card); }
.bf-result[hidden] { display: none; }
.bf-result .ai-draft-label { margin-bottom: 8px; }
p.bf-result-note { margin: 0 0 12px; font-size: 0.8rem; color: var(--muted); }
.bf-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
@media (max-width: 520px) { .bf-result-grid { grid-template-columns: 1fr; } }
.bf-result-title { margin: 0 0 4px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.bf-result-donts .bf-result-title { color: var(--red); }
.bf-result-fragen .bf-result-title { color: var(--amber); }
.bf-result-list { margin: 0; padding-left: 18px; font-size: 0.85rem; line-height: 1.45; overflow-wrap: anywhere; }
.bf-result-list li + li { margin-top: 3px; }
p.bf-result-empty { margin: 0; font-size: 0.82rem; color: var(--muted); font-style: italic; }
.bf-loading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.bf-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: bfSpin 0.8s linear infinite;
}
@keyframes bfSpin { to { transform: rotate(360deg); } }
p.bf-meldung { margin: 12px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--green); }
p.bf-meldung.is-error { color: var(--red); }
.bf-meldung[hidden] { display: none; }

/* ===== Baustein: Rechnung aus dem Deal (rechnung.js, rechnung.html) — alle
   Klassen mit "re-"-Präfix, Block einzeln entfernbar. Das Rechnungsblatt ist
   in beiden Themes "Papier" (weiß, dunkle Schrift), weil es so gedruckt wird. ===== */
.re-card-btn {
  align-self: flex-start;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--accent-soft-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .re-card-btn:hover { border-color: var(--accent); }
}
.re-card-btn:active { transform: scale(0.97); }

.re-titel { margin: 0; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.01em; }
.re-deal-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.re-kopf { margin-bottom: 14px; }
.re-warnung {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-card);
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.85rem;
}
.re-status-hinweis { margin: -6px 0 16px; font-size: 0.85rem; color: var(--muted); }
.re-status-hinweis[hidden], .re-check[hidden], .re-meldung[hidden], #reInhalt[hidden], #reEmpfUstIdWrap[hidden] { display: none; }
.re-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .re-layout { grid-template-columns: minmax(0, 1fr); } }
/* #reFormular ist bewusst ein <div>, kein <form> — die Rechnungs-Branding-
   Aufklappleiste (eigenes <form id="reBrandingForm">) sitzt zwischen den
   beiden Abschnitten, und ein <form> darf kein zweites <form> enthalten.
   rechnung.js liest alle Felder ohnehin per getElementById(), nicht über
   natives Formular-Submit, deshalb ändert das am Verhalten nichts. */
.re-formular { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Rechte Spalte: Vorschau + Status/Aktionen direkt darunter (2026-10-23,
   Dominik: im Vollbild nicht bis ans Ende der oft längeren linken Spalte
   scrollen müssen). .re-check/.re-meldung/.re-aktionen stecken dafür in
   einem eigenen re-no-print-Wrapper statt wie zuvor #reFormular selbst
   diese Klasse zu tragen — .re-blatt daneben muss ja weiterhin drucken. */
.re-preview-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.re-preview-col .re-no-print { display: flex; flex-direction: column; gap: 14px; }

/* --- Baustein: Rechnungs-Branding — Aufklappleiste (2026-10-23, von den
   Einstellungen hierher verschoben). Gleiches Chevron-Muster wie
   .nr-details/.sma-heatmap-details, eigenes "rb-"-Präfix. --- */
.rb-details { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.rb-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.rb-summary::-webkit-details-marker { display: none; }
.rb-summary-text { display: flex; flex-direction: column; gap: 2px; }
.rb-summary-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.rb-summary-sub { font-size: 0.78rem; color: var(--muted); }
.rb-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease;
}
.rb-details:not([open]) .rb-chevron { transform: rotate(-45deg); margin: 0 4px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .rb-summary:hover .rb-chevron { border-color: var(--text); }
}
.rb-details[open] .rb-summary { border-bottom: 1px solid var(--border); }
.rb-body { padding: 16px 18px; }
.re-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 18px; }
.re-panel-titel { margin: 0 0 4px; font-family: var(--font-display); font-size: 1rem; }
.re-panel-hinweis { margin: 0 0 12px; font-size: 0.78rem; color: var(--muted); }
.re-panel .deal-form-grid + .re-panel-hinweis { margin: 12px 0 0; }
.re-check { padding: 12px 14px; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--card-bg); font-size: 0.84rem; }
.re-check-titel { margin: 0 0 4px; font-weight: 700; color: var(--amber); }
.re-check-liste { margin: 0; padding-left: 18px; }
.re-check-warnung { margin: 6px 0 0; color: var(--amber); }
.re-meldung { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--green); }
.re-meldung.is-error { color: var(--red); }
.re-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.re-aktionen .btn-outline[disabled] { color: var(--green); opacity: 1; }
@media (max-width: 520px) { .re-aktionen > button { flex: 1 1 100%; } }

.re-blatt {
  min-width: 0;
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 44px;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color-scheme: light;
}
@media (max-width: 520px) { .re-blatt { padding: 22px 18px; font-size: 0.8rem; } }
.re-blatt-absenderzeile { font-size: 0.7rem; color: #555; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-bottom: 14px; }
.re-blatt-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.re-blatt-empfaenger { flex: 1 1 220px; min-width: 0; }
.re-blatt-meta { margin: 0; display: grid; gap: 2px; flex: 0 1 auto; }
.re-blatt-meta div { display: flex; gap: 12px; justify-content: space-between; }
.re-blatt-meta dt { color: #555; white-space: nowrap; overflow-wrap: normal; }
.re-blatt-meta dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.re-vorschau-hinweis { display: block; text-align: right; font-weight: 400; color: #8a5a36; font-size: 0.72rem; }
.re-blatt-titel { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.3rem; color: #1a1a1a; }
.re-blatt-tabelle, .re-blatt-summen { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.re-blatt-tabelle th { white-space: nowrap; text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: #555; border-bottom: 1px solid #1a1a1a; padding: 6px 6px 6px 0; }
.re-blatt-tabelle td { vertical-align: top; padding: 8px 6px 8px 0; border-bottom: 1px solid #ddd; }
.re-blatt-tabelle th:last-child, .re-blatt-tabelle td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.re-blatt-tabelle td:nth-child(3) { white-space: nowrap; }
@media (max-width: 520px) { .re-blatt-tabelle th:nth-child(3), .re-blatt-tabelle td:nth-child(3) { display: none; } }
.re-blatt-summen { width: auto; min-width: min(300px, 100%); margin: 12px 0 0 auto; }
.re-blatt-summen td { padding: 3px 0; }
.re-blatt-summen td:last-child { text-align: right; padding-left: 24px; white-space: nowrap; }
.re-summe-gesamt td { border-top: 1px solid #1a1a1a; padding-top: 6px; font-weight: 700; }
.re-blatt-hinweis { margin: 14px 0 0; font-weight: 600; }
.re-blatt-zahlung { margin: 14px 0 0; }
.re-blatt-gruss { margin: 10px 0 0; }
.re-blatt-fuss { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; padding-top: 10px; border-top: 1px solid #ccc; font-size: 0.7rem; color: #444; }
@media (max-width: 520px) { .re-blatt-fuss { grid-template-columns: minmax(0, 1fr); } }
.re-fehlt { color: #b45309; background: #fef3e0; border-radius: 3px; padding: 0 3px; }

@media print {
  @page { size: A4; margin: 18mm 16mm; }
  html:has(.re-body) { background: #ffffff; }
  .re-body { background: #ffffff; }
  .re-body .sidebar, .re-body .topbar, .re-body .nav-overlay, .re-body .re-no-print { display: none !important; }
  .re-body .app, .re-body .main-area, .re-body .dashboard { display: block; margin: 0; padding: 0; min-height: 0; }
  .re-body .re-layout { display: block; }
  .re-blatt { border: 0; border-radius: 0; padding: 0; font-size: 10pt; }
  .re-blatt-kopf { flex-wrap: nowrap; }
  .re-blatt-tabelle th:nth-child(3), .re-blatt-tabelle td:nth-child(3) { display: table-cell; }
  .re-blatt-fuss { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .re-fehlt { background: none; color: #b45309; }
}

/* ===== Baustein: Preisrechner / Angebots-Baukasten (preisrechner.js,
   preisrechner.html) — alle Klassen mit "pr-"-Präfix, Block einzeln entfernbar. ===== */
.pr-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 1000px) { .pr-layout { grid-template-columns: minmax(0, 1fr); } }
.pr-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 18px; min-width: 0; }
.pr-panel-titel { margin: 0 0 12px; font-family: var(--font-display); font-size: 1rem; }
.pr-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pr-checks .deal-field-check { padding-bottom: 0; }
.pr-positionen { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.pr-position { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 0.88rem; }
.pr-position:first-child { border-top: 0; }
.pr-position-label { min-width: 0; overflow-wrap: anywhere; }
.pr-position-detail { display: block; font-size: 0.75rem; color: var(--muted); }
.pr-position-betrag { white-space: nowrap; font-weight: 600; }
.pr-summe-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 6px 0 16px; padding-top: 10px; border-top: 2px solid var(--text); }
.pr-summe { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pr-text { min-height: 260px; margin-bottom: 10px; }
.pr-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 520px) { .pr-aktionen > button { flex: 1 1 100%; } }
.pr-deal-link { font-weight: 600; font-size: 0.88rem; color: var(--accent-soft-text); text-decoration: none; }
.pr-deal-link:hover { text-decoration: underline; }
.pr-deal-link[hidden], .pr-meldung[hidden] { display: none; }
.pr-meldung { margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; color: var(--green); }
.pr-meldung.is-error { color: var(--red); }
.pr-preise-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pr-preise-kopf .pr-panel-titel { margin-bottom: 4px; }
.pr-richtwert { font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: var(--amber); background: var(--amber-bg); }
.pr-preise-hinweis { margin: 4px 0 12px; font-size: 0.8rem; color: var(--muted); }
.pr-grundpreis { max-width: 240px; margin-bottom: 12px; }
.pr-tabelle-wrap { overflow-x: auto; }
.pr-tabelle { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.pr-tabelle th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.pr-tabelle td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pr-tabelle td:first-child { color: var(--muted); font-size: 0.8rem; }
.pr-prozent { width: 76px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--card-bg); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.pr-prozent:focus { border-color: var(--accent); }
/* :focus (oben) entfernte bisher das Outline komplett statt es nur zu
   ersetzen — sperrte Tastaturnutzer aus (2026-10-24, A11y-Audit behoben):
   globales :focus-visible (siehe oben im Dokument) greift jetzt wieder. */
.pr-tab-default { color: var(--muted); white-space: nowrap; }
.pr-quelle { font-size: 0.68rem; font-weight: 700; padding: 0 6px; border-radius: 999px; color: var(--green); background: var(--green-bg); }
@media (max-width: 600px) { .pr-tab-basis, .pr-tab-default { display: none; } }

/* ===== Baustein: Vertrag (vertrag.js, vertrag.html) — alle Klassen mit
   "vt-"-Präfix, Block einzeln entfernbar. Layout/Panels nutzen bewusst die
   pr-/deal-field-Klassen aus dem Preisrechner-Baustein statt eigener Kopien. ===== */
.vt-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 1000px) { .vt-layout { grid-template-columns: minmax(0, 1fr); } }
.vt-deal-auswahl { margin-bottom: 4px; }
.vt-text { min-height: 420px; font-size: 0.82rem; line-height: 1.5; margin-bottom: 8px; }
.vt-disclaimer { margin: 0 0 12px; font-size: 0.76rem; color: var(--muted); }
/* Das druckfertige Blatt ist am Bildschirm unsichtbar — die Vorschau ist der
   Textarea-Entwurf links; das Blatt existiert nur für den Druck/PDF-Export. */
.vt-blatt { display: none; }
#vtAnzahlungFelder[hidden] { display: none; }

@media print {
  @page { size: A4; margin: 18mm 16mm; }
  html:has(.vt-body) { background: #ffffff; }
  .vt-body { background: #ffffff; }
  .vt-body .sidebar, .vt-body .topbar, .vt-body .nav-overlay, .vt-body .re-no-print { display: none !important; }
  .vt-body .app, .vt-body .main-area, .vt-body .dashboard { display: block; margin: 0; padding: 0; min-height: 0; }
  .vt-blatt { display: block; border: 0; border-radius: 0; padding: 0; font-size: 10pt; color: #1a1a1a; }
  .vt-blatt-titel { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.3rem; color: #1a1a1a; }
  .vt-blatt-sub { margin: 0 0 20px; font-size: 0.78rem; color: #555; }
  .vt-blatt-abschnitt-titel { margin: 18px 0 4px; font-size: 0.95rem; color: #1a1a1a; }
  .vt-blatt-abschnitt-text { margin: 0; white-space: pre-line; }
}

/* ===== Baustein: Einnahmen & Ausgaben (finanzen.js, finanzen.html) — alle
   Klassen mit "fz-"-Präfix, Block einzeln entfernbar. Kennzahlen-Kacheln
   nutzen bewusst .stat-row/.stat-card-mini der Übersicht statt eigener
   Kopien, sind hier aber reine Anzeige (nicht klickbar). ===== */
.fz-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.fz-toolbar-filter { display: flex; flex-wrap: wrap; gap: 12px; }
.fz-toolbar-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fz-jahr-feld { max-width: 160px; margin-bottom: 0; }
#fzKennzahlen .stat-card-mini { cursor: default; }
#fzKennzahlen .stat-card-mini:active { transform: none; }
.fz-zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-bottom: 20px; align-items: start; }
@media (max-width: 760px) { .fz-zweispaltig { grid-template-columns: minmax(0, 1fr); } }
.fz-donut-karte { display: flex; flex-direction: column; }
/* Nur der Ring wird größer, nicht die ganze Karte — und der Betrag bekommt
   etwas kleinere Schrift + Innenabstand, damit Minus/€-Zeichen bei
   cent-genauen Beträgen nicht an den Ring stoßen (2026-10-25). */
.fz-donut-ring { width: 196px; height: 196px; }
.fz-donut-ring::after { inset: 26px; }
.fz-donut-value { font-size: 1.2rem; padding: 0 10px; text-align: center; white-space: nowrap; }
.fz-kategorien-karte { margin-bottom: 0; }
.fz-kategorien-liste { list-style: none; margin: 0; padding: 0; }
.fz-kategorie-zeile { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.fz-kategorie-zeile:first-child { border-top: 0; }
.fz-betrag-positiv { color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fz-betrag-negativ { color: var(--red); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Typ-Chip (Einnahme/Ausgabe) in der Einnahmen-&-Ausgaben-Tabelle — ganzer
   Chip eingefärbt statt nur der Text, auf Dominiks Wunsch (2026-10-27). */
.fz-typ-chip { font-size: 0.7rem; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; white-space: nowrap; }
.fz-typ-chip.is-einnahme { background: var(--green-bg); color: var(--green); }
.fz-typ-chip.is-ausgabe { background: var(--red-bg); color: var(--red); }
@media (max-width: 640px) { .fz-tabelle th:nth-child(4), .fz-tabelle td:nth-child(4) { display: none; } }

/* Bearbeiten/Entfernen direkt in der Haupttabelle (2026-11-05) — nur für
   Sonstige-Einnahmen-/Ausgaben-Zeilen, siehe Kommentar bei fzEintraege() in
   finanzen.js. Gleiches kompaktes ×-Muster wie .re-liste-loeschen-btn in
   rechnungen.js, Bearbeiten-Stift daneben in derselben Größe. */
.fz-aktion-zelle { white-space: nowrap; text-align: right; }
.fz-aktion-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  border-radius: var(--radius-control);
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.1s var(--ease-out);
}
.fz-aktion-btn + .fz-aktion-btn { margin-left: 6px; }
.fz-bearbeiten-btn { display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) {
  .fz-bearbeiten-btn:hover { color: var(--accent); border-color: var(--accent); }
  .fz-loeschen-btn:hover { color: var(--red); border-color: var(--red); }
}
.fz-aktion-btn:active { transform: scale(0.92); }
.fz-loeschen-btn.is-confirm { background: var(--red); border-color: var(--red); color: #fff; width: auto; padding: 0 8px; font-size: 0.74rem; }

/* ===== Baustein: Sonstige Einnahmen (sonstige-einnahmen-erfassen.js) — nutzt
   .confirm-overlay (bereits global [hidden]-behandelt) sowie .ausgabe-row
   usw. aus dem Ausgaben-Modal weiter, keine eigenen Klassen nötig. ===== */

/* ===== Baustein: Pitch-Vorlagen in Your Brands (pitch-vorlagen.js) — alle
   Klassen mit "pv-"-Präfix, Block einzeln entfernbar. ===== */
.pv-vorlagen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 600px) { .pv-vorlagen { grid-template-columns: minmax(0, 1fr); } }
.pv-vorlage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
.pv-vorlage.is-active { border-color: var(--accent); background: var(--accent-soft-bg); }
@media (hover: hover) and (pointer: fine) {
  .pv-vorlage:hover { border-color: var(--accent); }
}
.pv-vorlage:active, .pv-aktionen .btn-sm:active { transform: scale(0.97); }
.pv-vorschlag { font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.pv-portfolio { max-width: 420px; margin-bottom: 14px; }
.pv-text { min-height: 280px; margin-bottom: 8px; }
.pv-fehlt { margin: 0 0 8px; font-size: 0.8rem; color: var(--amber); }
.pv-fehlt[hidden], .pv-meldung[hidden] { display: none; }
.pv-meldung { margin: 0 0 8px; font-size: 0.85rem; font-weight: 600; color: var(--green); }
.pv-meldung.is-error { color: var(--red); }
.pv-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-aktionen .btn-outline[disabled] { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 520px) { .pv-aktionen > button { flex: 1 1 100%; } }

/* ===== Baustein: Social Media Analytics – Detailseite (social-media-
   analytics.js/.html) — alle Klassen mit "sma-"-Präfix. Ersetzt den
   früheren "Folgt bald"-Platzhalter. Reine Demo-Daten (social-media-
   analytics-daten.js), keine echte TikTok-/Instagram-Anbindung.
   2026-10-21 komplett neu gestaltet (vorherige Fassung wirkte zu flach/
   billig): sichtbare Achse + Zahlen + Farbe im Diagramm statt einfarbiger
   Balken, hervorgehobene Hero-Zeile für die wichtigsten Kennzahlen,
   Plattform-Vergleich als Dot+Zeile statt nackter <dl>. ===== */
.sma-page .intro { margin-bottom: 18px; }

/* --- Eigener Lade-Bildschirm (13.11.2026, siehe social-media-analytics.js
   smaLadeScreenZeigen()) — ersetzt den ersten Versuch (größerer, drehender
   Ring im wiederverwendeten "nicht verbunden"-Kasten), der wie eine
   Notlösung wirkte. Eigener, ruhiger Moment: echte Plattform-Logos mit
   Live-Status, darunter ein Skeleton-Vorgeschmack auf das Layout, das
   gleich erscheint. --- */
.sma-lade-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  min-height: 56vh;
  padding: 64px 24px 48px;
  text-align: center;
}
/* Eigenes display:flex überschreibt sonst das native [hidden] (Autor-CSS
   schlägt UA-Stylesheet, bekannte Falle in diesem Projekt — siehe
   .sma-nicht-verbunden[hidden] weiter oben für den gleichen Fund). */
.sma-lade-screen[hidden] { display: none; }

/* Gestaffeltes Einblenden beim Erscheinen (13.11.2026) — macht aus dem
   Lade-Bildschirm einen bewusst komponierten Moment statt eines abrupten
   Auftauchens. Spielt automatisch einmal ab, sobald der Block von
   [hidden] auf sichtbar wechselt. Seit 14.11.2026 (Dominiks Wunsch: aller
   Text raus, "einfach nur so eine cleane Ladeseite") ohne .sma-lade-kopf --
   es bleiben nur die Plattform-Kacheln + der Skeleton-Vorgeschmack, beide
   deutlich größer als vorher. */
.sma-lade-plattformen, .sma-lade-vorschau {
  animation: smaLadeReveal 640ms var(--ease-out) backwards;
}
.sma-lade-vorschau { animation-delay: 90ms; }
@keyframes smaLadeReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sma-lade-plattformen, .sma-lade-vorschau { animation: none; }
  .sma-lade-chip-status { animation: none; }
}

.sma-lade-plattformen {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.sma-lade-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 11px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--muted);
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.sma-lade-chip .sma-logo-md { width: 28px; height: 28px; border-radius: 6px; }

.sma-lade-chip-name { white-space: nowrap; }

.sma-lade-chip-status {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  flex-shrink: 0;
  animation: smaLadeChipSpin 0.8s linear infinite;
}
@keyframes smaLadeChipSpin { to { transform: rotate(360deg); } }

.sma-lade-chip.is-done {
  border-color: var(--green);
  color: var(--text);
  background: var(--green-bg);
}
.sma-lade-chip.is-done .sma-lade-chip-status {
  position: relative;
  border: none;
  background: var(--green);
  animation: none;
}
.sma-lade-chip.is-done .sma-lade-chip-status::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 8px;
  border-right: 2px solid var(--sidebar-bg);
  border-bottom: 2px solid var(--sidebar-bg);
  transform: rotate(40deg);
}

.sma-lade-chip.is-failed {
  border-color: var(--border);
  color: var(--muted);
}
.sma-lade-chip.is-failed .sma-lade-chip-status {
  border: none;
  animation: none;
  background: none;
  position: relative;
}
.sma-lade-chip.is-failed .sma-lade-chip-status::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 11px;
  height: 2px;
  border-radius: 1px;
  background: var(--muted);
}

.sma-lade-vorschau {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sma-lade-vorschau-karten {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sma-lade-vorschau-karte { height: 84px; border-radius: var(--radius-card); }
.sma-lade-vorschau-chart { height: 220px; border-radius: var(--radius-card); }

@media (max-width: 640px) {
  .sma-lade-screen { padding: 44px 16px 36px; gap: 36px; min-height: 48vh; }
  .sma-lade-chip { font-size: 1rem; padding: 13px 22px 13px 13px; }
  .sma-lade-vorschau-karten { grid-template-columns: 1fr; }
  .sma-lade-vorschau-karte { height: 56px; }
  .sma-lade-vorschau-chart { height: 170px; }
}

/* Einige Analyse-Abschnitte setzen selbst "display: grid/flex" (z.B.
   .grid-row-2, .stat-row) — das überschreibt sonst das native [hidden]
   (gleiche Spezifität, aber später in der Kaskade), weshalb versteckte
   Abschnitte trotzdem als leere Box sichtbar blieben. Höhere Spezifität
   erzwingt "display: none" zuverlässig (gleiches Muster wie die
   bestehende .panel-card[hidden]-Regel). */
.sma-analyse-abschnitt[hidden] { display: none; }

.grid-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 860px) {
  .grid-row-2 { grid-template-columns: 1fr; }
}

/* 2026-10-23: Umschalter von drei Buttons zu Kennzahl-Kacheln im Stil der
   Übersichtsseite umgebaut (Dominik: ein Kasten pro App, wie eine Kennzahl
   dort — Name + Logo oben, Wert darunter). Nutzt dieselben Klassen wie dort
   (.stat-row/.stat-card-mini/.stat-label/.stat-value/.stat-hint/
   .stat-sparkline) für exakt dieselbe Optik, nur mit eigenem Logo statt
   Farbpunkt und einer Plattformfarbe statt der globalen Akzentfarbe im
   aktiven Zustand. Der angezeigte Wert folgt der bei Monatstrend gewählten
   Metrik (`smaAusgewaehlteMetrik`) — ein Klick auf die Kachel wählt
   weiterhin die Plattform aus (wie vorher der Umschalter). */
.sma-platform-row { margin-bottom: 18px; }
.sma-platform-card { text-align: center; }
.sma-platform-card .stat-label { font-weight: 700; }
.sma-platform-card-logo { display: inline-flex; margin: 2px 0 10px; }
.sma-logo.sma-platform-card-logo-svg { width: 28px; height: 28px; }
.sma-platform-card .stat-hint.has-sparkline { padding-right: 0; }
.sma-platform-card.is-active {
  background: var(--sma-toggle-color, var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--sma-toggle-color, var(--accent)) 55%, transparent);
}
.sma-platform-card .stat-hint .up { color: var(--green); font-weight: 700; }
.sma-platform-card .stat-hint .down { color: var(--red); font-weight: 700; }
.sma-platform-card.is-active .stat-label,
.sma-platform-card.is-active .stat-hint { color: rgba(255, 255, 255, 0.88); }
.sma-platform-card.is-active .stat-hint .up,
.sma-platform-card.is-active .stat-hint .down { color: #fff; }

/* --- Hero-Zeile: Engagement-Rate + Follower-Wachstum, Gold-Hervorhebung
   jetzt nur noch auf der gerade aufgeklappten Kachel (2026-10-21: vorher
   stand Engagement-Rate permanent in Gold, unabhängig vom Klick — Dominik
   wollte es erst beim Anklicken). --- */
.sma-hero-row { align-items: stretch; }
.sma-hero-card { gap: 2px; }
.sma-hero-card.is-expanded {
  background: var(--accent-gradient);
  border-color: transparent;
  border-radius: var(--radius-feature);
  box-shadow: var(--glow), var(--shadow);
  color: white;
}
.sma-hero-label { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.sma-hero-card.is-expanded .sma-hero-label { color: rgba(255, 255, 255, 0.85); }
.sma-hero-value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; }
.sma-hero-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 700; margin-top: 6px; }
.sma-hero-trend.up { color: var(--green); }
.sma-hero-trend.down { color: var(--red); }
.sma-hero-card.is-expanded .sma-hero-trend.up,
.sma-hero-card.is-expanded .sma-hero-trend.down { color: #fff; }
.sma-hero-benchmark { margin: 10px 0 0; font-size: 0.82rem; }
.sma-hero-card.is-expanded .sma-hero-benchmark { color: rgba(255, 255, 255, 0.92); }
.sma-hero-sub { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }
.sma-hero-disclaimer { margin: 10px 0 0; font-size: 0.72rem; font-style: italic; }
.sma-hero-card.is-expanded .sma-hero-disclaimer { color: rgba(255, 255, 255, 0.75); }
.sma-sparkline { width: 100%; height: 32px; margin-top: 12px; }
.sma-sparkline polyline { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* --- Monatstrend: echte Achse, sichtbare Zahlen, Farbe für den aktuellen Monat --- */
.sma-metric-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 20px; }
.sma-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 4px 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-out);
}
.sma-metric-chip.is-active { background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 700; border-color: transparent; }
.sma-metric-chip:active { transform: scale(0.95); }

/* --- Monatstrend-Karte: das Herzstück der Seite, deshalb sichtbar größer/
   gewichtiger als die übrigen Karten (größerer Titel, mehr Innenabstand,
   etwas kräftigerer Rahmen) — der Chart selbst nutzt bereits die große
   smaLinienChart()-Variante, hier nur der Kartenrahmen drumherum. ------- */
.sma-trend-hero { padding: 24px 24px 20px; margin-bottom: 18px; border-width: 1.5px; }
.sma-trend-hero .panel-card-header-row { margin-bottom: 4px; }
.sma-trend-hero h3 { font-size: 1.15rem; }
/* Kräftiger/auffälliger als der Standard-Linienchart, da dies die Haupt-
   kennzahl der Seite ist (2026-10-21, auf Dominiks Wunsch): dickere Linie,
   voll ausgefüllte Punkte statt der sonst üblichen Ring-Marker, und kein
   Leuchtbalken hinter dem aktuellen Monat mehr (fand er unnötig). Nur für
   diese eine Karte — die übrigen smaLinienChart()-Verwendungen (Hero-
   Verlauf, Plattform-Vergleich) bleiben beim Standard-Look (Ring in der
   jeweiligen Plattformfarbe). 2026-10-23 behoben: die Punkte waren hier
   hart auf Rot gesetzt statt auf die Farbe der gerade angezeigten Plattform
   — jetzt über die vom Diagramm pro Punkt gesetzte Variable `--sma-dot-farbe`
   (siehe smaLinienChart() in social-media-analytics.js), damit TikTok/
   Instagram/YouTube jeweils ihre eigene Farbe zeigen. Linie zusätzlich
   minimal dicker (Dominik: "etwas dicker, aber nicht viel"). */
.sma-trend-hero .line-chart-line { stroke-width: 4; }
.sma-trend-hero .sma-line-dot { background: var(--sma-dot-farbe); border-color: var(--sma-dot-farbe); }
.sma-trend-hero .line-chart-highlight-bar { display: none; }
/* "+X % ggü. Vormonat" soll als echtes Grün statt der beigen Akzentfarbe
   lesbar sein — nur hier, der gleiche .chart-headline-badge auf der
   Übersichtsseite bleibt unverändert beige. */
.sma-trend-hero .chart-headline-badge.up { background: var(--green-bg); color: var(--green); }

/* --- Beste Posting-Zeit (Heatmap) --- */
.sma-section-intro { margin: 2px 0 16px; font-size: 0.85rem; color: var(--muted); max-width: 62ch; }
.sma-heatmap {
  display: grid;
  grid-template-columns: 44px repeat(4, 1fr);
  gap: 4px;
}
.sma-heatmap-col-label { font-size: 0.68rem; color: var(--muted); text-align: center; align-self: center; text-transform: uppercase; letter-spacing: 0.02em; }
.sma-heatmap-row-label { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; }
.sma-heatmap-cell {
  /* Flacher statt fast quadratisch (2026-10-21, Dominik: "zu lang, zu viel
     Scrollen") — bei 7 Zeilen macht jede zusätzliche Pixelhöhe pro Zelle
     die ganze Tabelle spürbar länger. */
  aspect-ratio: 2.5;
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  transition: transform 0.12s var(--ease-out);
}
.sma-heatmap-cell.is-best { box-shadow: 0 0 0 2px var(--text) inset; font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .sma-heatmap-cell:hover { transform: scale(1.06); }
}
.sma-heatmap-caption { margin: 12px 0 0; font-size: 0.82rem; color: var(--muted); }

.sma-section-sub { margin: 14px 0 8px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }

.sma-age-list { display: flex; flex-direction: column; gap: 6px; }
.sma-age-row { display: grid; grid-template-columns: 48px 1fr 44px; align-items: center; gap: 8px; }
.sma-age-bucket { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sma-age-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.sma-age-fill { height: 100%; border-radius: 999px; transition: width 0.3s var(--ease-out); display: flex; overflow: hidden; }
.sma-age-fill-segment { display: block; height: 100%; }
.sma-age-fill-segment-trenner { border-right: 1px solid var(--card-bg); }
.sma-age-value { font-size: 0.78rem; text-align: right; font-variant-numeric: tabular-nums; }

.sma-gender-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg); }
.sma-gender-segment { display: block; height: 100%; }
.sma-gender-segment-trenner { border-right: 2px solid var(--card-bg); }
.sma-gender-legend { margin-top: 10px; }
.sma-demographics-disclaimer { margin: 14px 0 0; font-size: 0.72rem; color: var(--muted); font-style: italic; }

/* --- "Neueste Beiträge" auf Social Media Analytics: Karten-Grid mit
   Startbild-Feld statt schlichter Zeilenliste (14.11.2026, Dominiks
   Wunsch, nach Vorbild des Redesign-Artifacts) --- eigene, dedizierte
   sma-content-*-Klassen statt der geteilten .ct-preview-list/
   .dashboard-mini-row, die content.html und "Content zu diesem Deal"
   (kooperationen.html) weiterhin unverändert nutzen. */
.sma-content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.sma-content-karte { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.sma-content-thumb {
  aspect-ratio: 4 / 3;
  background: var(--accent-soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sma-content-thumb .sma-logo-md { width: 30px; height: 30px; }
/* Noch kein echtes Startbild verfügbar (weder Content-Datenmodell noch die
   Social-Media-APIs liefern bisher eins, siehe Kommentar in
   smaRenderContentVorschau()) — deshalb klar als Platzhalter beschriftet,
   nicht als echtes Bild ausgegeben. */
.sma-content-thumb-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: 999px;
}
.sma-content-body { padding: 10px 12px 12px; }
.sma-content-caption {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sma-content-stats { display: flex; gap: 12px; color: var(--muted); font-size: 0.74rem; }
.sma-content-stats span { display: inline-flex; align-items: center; gap: 3px; }
.sma-content-stats .sma-icon { width: 12px; height: 12px; }

/* --- Plattform-Vergleich: Dot + Zeile statt nackter <dl> ---
   auto-fit statt fester Spaltenzahl (2026-10-22: dritte Plattform YouTube
   ergänzt) — passt sich automatisch an 2 oder 3 Karten an, ohne eigene
   Breakpoints pro Plattform-Anzahl zu brauchen. */
.sma-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sma-compare-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.12s var(--ease-out), box-shadow 0.15s ease;
}
.sma-compare-card:active { transform: scale(0.98); }
.sma-compare-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Klick wählt weiterhin die Plattform aus (wie der Umschalter oben), aber
   ohne eigene Gold-Hervorhebung mehr — Dominik wollte die Karten-Farben so
   lassen, wie sie ohnehin schon sind (2026-10-21). */
.sma-compare-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sma-compare-title { margin: 0; font-family: var(--font-display); font-size: 1rem; }
.sma-compare-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.sma-compare-row:first-of-type { border-top: 0; }
.sma-compare-row span { display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--muted); }
.sma-compare-row strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.sma-compare-row strong.up { color: var(--green); }
.sma-compare-row strong.down { color: var(--red); }

/* --- Eigene Icons (2026-10-22) — siehe SMA_METRIK_ICON in
   social-media-analytics.js: schlichte Linien-Symbole für die Kennzahlen
   (Aufrufe/Follower/Likes/Kommentare/Shares), bewusst unverändert. --- */
.sma-icon { width: 17px; height: 17px; flex-shrink: 0; vertical-align: middle; }
.sma-icon-sm { width: 13px; height: 13px; opacity: 0.75; }
.sma-icon-md { width: 22px; height: 22px; }
.sma-platform-icon-wrap { display: inline-flex; flex-shrink: 0; }

/* --- Echte Plattform-Logos (2026-10-23) — siehe SMA_PLATTFORM_LOGO_PATH/
   smaPlattformLogoSvg() in social-media-analytics.js: TikTok/Instagram/
   YouTube-Logos statt der früheren generischen Icons, auf Dominiks Wunsch.
   Eigene Klasse statt .sma-icon, da fill-basiert (Markenfarben) statt
   stroke-basiert (currentColor). */
.sma-logo { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; border-radius: 4px; overflow: hidden; }
.sma-logo-md { width: 24px; height: 24px; border-radius: 5px; }
.sma-logo-tiktok { box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 60%, transparent); }

/* --- Fläche unter der Monatstrend-/Verlaufs-Kurve (2026-10-22, Redesign):
   sanfter Verlaufs-Fill statt einer rein linearen Linie — recherchebegründet
   der Stil, der Analytics-Charts "teilbar"/hochwertig wirken lässt (siehe
   Doku/Funktionen.md). Nutzt denselben Gradient wie der Leuchtbalken. */
.line-chart-area { stroke: none; pointer-events: none; }

/* --- Hero-Kacheln anklickbar: zeigen darunter ihren Verlaufs-Chart, nur
   eine gleichzeitig offen (2026-10-21, auf Dominiks Wunsch). --- */
.sma-hero-card[role="button"] { cursor: pointer; transition: transform 0.12s var(--ease-out), box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease; }
.sma-hero-card[role="button"]:active { transform: scale(0.98); }
.sma-hero-card[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sma-hero-chart-card .panel-card-header-row h3 { font-size: 0.95rem; }

/* --- Linien-Chart-Punkte (smaLinienChart) — Größer als zuerst (2026-10-21,
   Dominik: "Diagramm nicht schön genug"), angelehnt an .chart-dot-marker
   von der Übersichtsseite. Seit 2026-11-06 auch anklickbar (siehe
   smaWireLinienChartKlicks()) — zeigt die Werte des Monats als Tooltip,
   gleiches Verhalten wie der Übersicht-Chart. --- */
.sma-line-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2.5px solid var(--accent);
  transform: translate(-50%, -50%);
  transition: width 0.15s var(--ease-out), height 0.15s var(--ease-out);
  z-index: 2;
}
.sma-line-dot.is-current { width: 13px; height: 13px; }
.sma-line-dot:hover { filter: brightness(0.92); }
.sma-line-dot.is-selected { width: 14px; height: 14px; background: var(--accent); }

/* Y-Achse absolut positioniert wie .kz-yaxis (nicht per Flex-Reihenfolge)
   — Bugfix 2026-10-21: vorher stand per Flex-Spalte der kleinste Wert
   oben und der größte unten, also genau umgedreht. */
.line-chart-yaxis.sma-yaxis { position: relative; display: block; width: 50px; flex-shrink: 0; padding: 0; }
.sma-yaxis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.line-chart-labels.sma-labels { display: grid; padding-left: 58px; text-align: center; }
.sma-linechart { margin-top: 4px; }

/* "Größere" Variante für die aufklappbaren Verlaufs-/Vergleichs-Charts
   (2026-10-21, Dominik wollte sie größer als die Mini-Sparklines). */
.line-chart-body.sma-linechart-gross,
.line-chart-body.sma-linechart-gross .line-chart-svg { height: 260px; }

/* --- Beste Posting-Zeit: eingeklappt nur bester Zeitpunkt + ein Balken,
   volle 7×4-Tabelle über <details> aufklappbar (vorher immer offen, war
   Dominik "viel zu groß"). Chevron-Muster wie bei den Kooperationen-
   Bausteinen (.zr-chevron/.nr-chevron). --- */
/* Karte selbst viel kompakter als eine normale .panel-card (2026-10-21:
   Dominik fand den eingeklappten Zustand "ein Viertel so groß" sollte er
   sein) — Titel steckt jetzt mit in der Zusammenfassungszeile statt in
   einer eigenen Kopfzeile darüber, dadurch nur noch eine Textzeile Höhe im
   eingeklappten Zustand statt zwei plus großzügigem Kartenabstand. */
.sma-heatmap-card { padding: 10px 16px; min-height: 0; margin-bottom: 18px; }
.sma-heatmap-details { margin-top: 0; }
.sma-heatmap-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 2px 0;
}
.sma-heatmap-summary::-webkit-details-marker { display: none; }
.sma-heatmap-summary-title { flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--accent-soft-text); }
.sma-heatmap-summary-row { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.sma-heatmap-summary-text { font-size: 0.85rem; white-space: nowrap; }
/* Goldbeige wie die aktive Kennzahl im Monatstrend (.sma-metric-chip.is-
   active) — derselbe Akzent-Farbton, statt der Plattformfarbe. Der frühere
   Balken daneben (Breite nach relativer Stärke) ist komplett entfernt, war
   Dominik "ein schwarzer Strich" (2026-10-21). */
.sma-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease;
}
.sma-heatmap-details:not([open]) .sma-chevron { transform: rotate(-45deg); margin: 0 4px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .sma-heatmap-summary:hover .sma-chevron { border-color: var(--text); }
}
.sma-heatmap-details .sma-heatmap { margin-top: 14px; }

/* --- Plattform-Vergleich: Button für den vollständigen Verlaufs-Vergleich --- */
/* Dauerhaft gold/auffällig statt dezentem Outline-Button — war Dominik
   "sehr unauffällig" (2026-10-21), jetzt .btn-primary statt .btn-outline. */
.sma-vergleich-expand-btn { margin-top: 16px; }
#smaVergleichChart.sma-linechart { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ===== Rechnungsübersicht (rechnungen.js, rechnungen.html) und Rechnungs-Branding
   (rechnung-branding.js, rechnung.js) — Klassen "re-liste-"/"re-logo-"/"re-blatt-logo",
   Block einzeln entfernbar. ===== */
.re-liste-summen { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.re-liste-summen[hidden], .re-liste-tabelle[hidden] { display: none; }
.re-liste-summe { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 18px; min-width: 140px; }
.re-liste-summe span { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.re-liste-summe strong { font-family: var(--font-display); font-size: 1.15rem; }
.re-liste-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--sidebar-bg); color: var(--muted); }
.re-liste-badge.is-bezahlt { background: var(--green-bg); color: var(--green); }
.re-liste-badge.is-ueberfaellig { background: var(--red-bg); color: var(--red); }
.re-liste-auto { font-size: 0.68rem; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
/* Ganze Zeile klickbar + Gold-Hover wie bei den Hero-/Vergleichs-Karten
   heute Nacht (2026-10-22, auf Dominiks Wunsch) — kein eigener "Öffnen/PDF"-
   Button mehr (bewusst weggelassen), Zeile selbst per tabindex fokussierbar.
   Gold-Hover nur auf Geräten mit echtem Hover (Maus), sonst würde Touch den
   Zustand "festhalten". Farben exakt, keine `transition: all`; Press-
   Feedback über eine etwas dunklere Zwischenstufe statt Skalierung, weil
   eine skalierte Tabellenzeile das Layout verspringen lassen würde. */
.re-liste-row { cursor: pointer; transition: color 0.15s ease; }
.re-liste-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Höher gewichtet als die generische .data-table tbody tr:hover-Regel weiter
   oben (sonst gewinnt die mit ihrem hellen --sidebar-bg-Hintergrund gegen
   unseren Gold-Verlauf, während die weiße Schriftfarbe hier trotzdem
   durchkommt — Text auf hellem Grund, quasi unsichtbar. Bugfix 2026-10-22.) */
@media (hover: hover) and (pointer: fine) {
  .re-liste-tabelle tbody tr.re-liste-row:hover { background: var(--accent-gradient); color: #fff; }
  .re-liste-tabelle tbody tr.re-liste-row:hover .re-liste-badge:not(.is-bezahlt):not(.is-ueberfaellig) { background: rgba(255, 255, 255, 0.25); color: #fff; }
  .re-liste-tabelle tbody tr.re-liste-row:hover .muted-cell,
  .re-liste-tabelle tbody tr.re-liste-row:hover .re-liste-auto { color: rgba(255, 255, 255, 0.85); border-color: rgba(255, 255, 255, 0.4); }
}
.re-liste-tabelle tbody tr.re-liste-row:active { background: var(--accent-dark); color: #fff; }
/* Rechnung entfernen (2026-10-22) — zweistufig wie bei den Ausgaben, kein
   extra Dialog. Eigenes fokussierbares Element in der klickbaren Zeile,
   deshalb position:relative + z-index, damit es wirklich eigenständig
   klickbar bleibt und nicht nur die Zeilen-Navigation greift. */
.re-liste-loeschen-btn {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  border-radius: var(--radius-control);
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.1s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .re-liste-loeschen-btn:hover { color: var(--red); border-color: var(--red); }
}
.re-liste-loeschen-btn:active { transform: scale(0.92); }
.re-liste-loeschen-btn.is-confirm { background: var(--red); border-color: var(--red); color: #fff; width: auto; padding: 0 8px; font-size: 0.74rem; }
.re-liste-tabelle tbody tr.re-liste-row:hover .re-liste-loeschen-btn:not(.is-confirm) { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.re-liste-hinweis { margin-top: 16px; font-size: 0.78rem; color: var(--muted); }
/* Hinweis-Karte für Deals auf "Rechnung gestellt" ohne gültigen Betrag — die
   Automatik lehnt 0-€-Rechnungen bewusst ab, das war vorher aber lautlos
   (siehe rlOffenePosten() in rechnungen.js). */
.re-fehlt-karte { border-color: var(--amber); margin-bottom: 18px; }
.re-fehlt-titel { margin: 0 0 6px; font-family: var(--font-display); font-size: 1rem; color: var(--amber); }
.re-fehlt-text { margin: 0 0 12px; font-size: 0.85rem; color: var(--muted); }
.re-fehlt-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.re-fehlt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.re-fehlt-zeile:first-child { border-top: 0; }
/* Manuell eine Rechnung erstellen, ohne auf den Status warten zu müssen
   (2026-10-22, auf Dominiks Wunsch). */
.re-manuell-karte { margin-bottom: 18px; }
.re-manuell-titel { margin: 0 0 6px; font-family: var(--font-display); font-size: 1rem; }
.re-manuell-text { margin: 0 0 12px; font-size: 0.85rem; color: var(--muted); }
.re-manuell-form { display: flex; flex-wrap: wrap; gap: 10px; }
.re-manuell-form select { flex: 1 1 280px; min-width: 0; }
.re-manuell-fehler { margin: 10px 0 0; font-size: 0.82rem; color: var(--red); }
.re-manuell-vorschau { flex: 1 1 100%; margin: 0; font-size: 0.85rem; color: var(--muted); }
.re-manuell-vorschau strong { color: var(--text); }
.re-manuell-neu-text { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
/* Gleiche Eingabefeld-Optik wie .form-row input (2026-10-23 ergänzt) — vorher
   komplett unstyled, dadurch im Dunkelmodus schwarz statt der Dashboard-Farben. */
.re-manuell-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}
.re-manuell-form input[type="text"] { flex: 1 1 220px; min-width: 0; }
.re-manuell-form input[type="number"] { flex: 0 1 140px; min-width: 0; }
@media (max-width: 900px) { .re-liste-tabelle { display: block; overflow-x: auto; } }
.re-logo-vorschau { width: 120px; height: 64px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius-card); font-size: 0.75rem; color: var(--muted); overflow: hidden; }
.re-logo-vorschau img { max-width: 100%; max-height: 100%; object-fit: contain; }
.re-blatt-marke { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.re-blatt-logo { max-width: 160px; max-height: 64px; object-fit: contain; }
.re-blatt-firma { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

/* ===== Baustein: Content (content.html/content.js, content-daten.js) —
   alle Klassen mit "ct-"-Präfix. Entfernen: diese Dateien, die <script>-
   Zeilen + markierten Blöcke in social-media-analytics.html/.js und
   kooperationen.html/.js, und diesen CSS-Block löschen. ===== */

.ct-filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ct-filter-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s var(--ease-out);
}
.ct-filter-btn.is-active { background: var(--accent); color: #fff; border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .ct-filter-btn:not(.is-active):hover { border-color: var(--accent); color: var(--text); }
}
.ct-filter-btn:active { transform: scale(0.96); }

.ct-deal-filter-hint { margin: 0 0 14px; font-size: 0.85rem; color: var(--muted); }
.ct-clear-filter-btn {
  border: none;
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  width: 20px;
  height: 20px;
  line-height: 1;
  cursor: pointer;
  margin-left: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .ct-clear-filter-btn:hover { color: var(--red); }
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.ct-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 150ms var(--ease-in-out);
}
@media (hover: hover) and (pointer: fine) {
  .ct-card:hover { border-color: var(--accent); }
}
.ct-card:active { transform: scale(0.99); }
.ct-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ct-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }

/* Plattform-Farbe kommt pro Beitrag über die Inline-Variable --ct-farb
   (siehe content.js/social-media-analytics.js) — dieselbe Technik wie
   --sma-toggle-color bei der Social-Media-Analytics-Seite. */
.ct-plattform-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ct-farb, var(--accent));
  color: #fff;
  flex-shrink: 0;
}
.ct-plattform-badge-sm { font-size: 0.68rem; padding: 1px 8px; flex-shrink: 0; }

.ct-card-date { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-card-top .deal-chip { margin-left: auto; }
.ct-chip-deal { background: var(--green-bg); color: var(--green); border-color: transparent; }

.ct-caption {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ct-caption-empty { color: var(--muted); font-style: italic; }

.ct-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 6px; border-top: 1px solid var(--border); }
.ct-metric { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ct-metric-value { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.ct-metric-label { font-size: 0.68rem; color: var(--muted); }

/* Zuordnungs-Vorschlag: Caption nennt eine bekannte Marke, aber der Beitrag
   ist noch nicht verknüpft — nie automatisch festlegen, nur vorschlagen. */
.ct-vorschlag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--amber-bg);
  padding: 6px 10px;
  border-radius: var(--radius-control);
}
.ct-vorschlag-text { font-size: 0.78rem; font-weight: 600; color: var(--amber); }
.ct-vorschlag .btn-sm { flex-shrink: 0; white-space: nowrap; }

/* "+ Neuer Beitrag"-Kachel: letztes Element im selben Grid wie die echten
   Content-Karten (11.11.2026, Dominiks Wunsch, gleiche Behandlung wie bei
   Your Brands) — landet dadurch automatisch in der nächsten freien Zelle. */
.ct-new-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 90px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.ct-new-tile-plus { font-size: 1.2rem; line-height: 1; }
@media (hover: hover) and (pointer: fine) {
  .ct-new-tile:hover { border-color: var(--accent); background: var(--accent-soft-bg); }
}
.ct-new-tile:active { transform: scale(0.985); }

/* Vorschau "Neueste Beiträge" (social-media-analytics.html) und "Content zu
   diesem Deal" (kooperationen.html) nutzen dieselben .dashboard-mini-row-
   Zeilen wie die Übersicht, nur mit dem Plattform-Badge statt eines
   Ampel-Punkts davor. */
.ct-preview-list .dashboard-mini-row:first-child { padding-top: 0; }
.ct-deal-content-list { display: flex; flex-direction: column; margin-bottom: 10px; }
.ct-deal-content-empty { margin: 0 0 10px; font-size: 0.82rem; color: var(--muted); font-style: italic; }

/* =====================================================================
   "Verkaufsbereitschaft"-Bausteine (2026-10-23, während Dominik schlief,
   per 4-Agenten-Pipeline — Recherche/Design/Bau/Sicherheit): Landingpage,
   Login/Registrieren (reine Demo-UI), Abo/Preise, Impressum/Datenschutz/AGB.
   Alle Klassen mit "pub-"/"auth-"/"abo-"/"legal-"-Präfix, je nach Seite.
   Kein echtes Backend — siehe CLAUDE.md: Platzhalter-Daten, bis ein echtes
   Login-System existiert. ===================================================== */

/* --- Gemeinsame Hülle für öffentliche Seiten (Landing/Abo/Impressum/
   Datenschutz/AGB) — kein Sidebar/Topbar-Appshell, da vor dem "Login"
   gedacht. --- */
.pub-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
}
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pub-brand .brand-icon { height: 34px; }
/* Zurück-Button + Logo links in der Kopfzeile (2026-10-24, nur auf
   Impressum/Datenschutz/AGB — Dominiks Wunsch). Eigener Wrapper statt
   direkt im Header, damit .pub-header weiterhin sauber "links/rechts" per
   justify-content: space-between aufteilt. */
.pub-header-left { display: flex; align-items: center; gap: 14px; }
.pub-brand .brand-word { font-size: 1.25rem; }
.pub-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-nav a:not(.btn-primary):not(.btn-outline) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.88rem; padding: 6px 4px; }
@media (hover: hover) and (pointer: fine) {
  .pub-nav a:not(.btn-primary):not(.btn-outline):hover { color: var(--text); }
}
.pub-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px); }
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 20px clamp(16px, 4vw, 48px) 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.pub-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.pub-footer-links a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .pub-footer-links a:hover { color: var(--text); text-decoration: underline; }
}
@media (max-width: 640px) {
  .pub-header { flex-wrap: wrap; }
}

/* --- Landingpage --- */
.pub-hero { text-align: center; padding: clamp(24px, 6vw, 64px) 0 clamp(32px, 6vw, 72px); }
.pub-hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-soft-text);
  background: var(--accent-soft-bg);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.pub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.pub-hero p { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); max-width: 54ch; margin: 0 auto 28px; line-height: 1.5; }
.pub-hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pub-hero-actions .btn-primary, .pub-hero-actions .btn-outline { padding: 13px 26px; font-size: 0.95rem; }

.pub-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: clamp(32px, 6vw, 64px); }
.pub-feature-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.pub-feature-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-control);
  background: var(--accent-soft-bg); color: var(--accent-soft-text);
  margin-bottom: 12px;
}
.pub-feature-card h3 { margin: 0 0 6px; font-size: 1rem; font-family: var(--font-display); }
.pub-feature-card p { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }

.pub-social-proof { text-align: center; color: var(--muted); font-size: 0.82rem; margin-bottom: clamp(32px, 6vw, 64px); font-style: italic; }

.pub-cta-band {
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-feature);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  margin-bottom: clamp(24px, 5vw, 48px);
}
.pub-cta-band h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 10px; }
.pub-cta-band p { margin: 0 0 20px; opacity: 0.92; }
.pub-cta-band .btn-primary { background: #fff; color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .pub-cta-band .btn-primary:hover { filter: brightness(0.96); }
}

/* --- Login/Registrieren: bewusst minimal, nur eine Aufgabe --- */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; background: var(--bg); }
.auth-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.auth-brand .brand-icon { height: 38px; }
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-feature);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.auth-demo-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--amber-bg);
  color: var(--amber);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-bottom: 18px;
}
.auth-demo-badge svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.auth-card h1 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 4px; }
.auth-card .auth-sub { margin: 0 0 20px; font-size: 0.85rem; color: var(--muted); }
.auth-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.auth-field label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.auth-field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
.auth-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* "Passwort anzeigen"-Knopf (password-toggle.js, 2026-10-27) — Input bekommt
   rechts Platz für den Augen-Knopf, der absolut positioniert darüber liegt. */
.auth-password-wrap { position: relative; }
.auth-password-wrap input { width: 100%; padding-right: 38px; box-sizing: border-box; }
.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-control);
}
.auth-password-toggle:hover { color: var(--text); }
.auth-password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-password-toggle svg { width: 18px; height: 18px; }
.auth-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 18px; font-size: 0.8rem; }
.auth-row-between label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.auth-link-btn { background: none; border: none; color: var(--accent); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0; }
.auth-submit { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 0.75rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .auth-social-btn:hover { border-color: var(--accent); }
}
.auth-foot { text-align: center; margin-top: 18px; font-size: 0.85rem; color: var(--muted); }
.auth-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); text-align: center; }
.auth-note[hidden] { display: none; }
.auth-note.is-error { color: var(--red); font-weight: 600; }
.auth-legal-links { margin-top: 20px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.auth-legal-links a { color: var(--muted); }

/* --- Abo/Preise --- */
.abo-intro { text-align: center; max-width: 60ch; margin: 0 auto clamp(24px, 5vw, 40px); }
.abo-intro h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 10px; }
.abo-intro p { color: var(--muted); margin: 0; }
.abo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; margin-bottom: 28px; }
.abo-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-feature);
  padding: 24px 22px;
  position: relative;
}
.abo-card.is-highlight { border-color: var(--accent); box-shadow: var(--glow), var(--shadow); }
.abo-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.abo-plan-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 4px 0 2px; }
.abo-plan-desc { font-size: 0.82rem; color: var(--muted); margin: 0 0 16px; min-height: 2.6em; }
.abo-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 18px; }
.abo-price-value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: -0.01em; }
.abo-price-period { color: var(--muted); font-size: 0.85rem; }
.abo-feature-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.abo-feature-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.85rem; line-height: 1.4; }
.abo-feature-list svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px; color: var(--green); }
.abo-feature-list li.is-muted { color: var(--muted); }
.abo-feature-list li.is-muted svg { color: var(--muted); }
.abo-cta { width: 100%; justify-content: center; }
.abo-status-pill {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.abo-note { text-align: center; font-size: 0.8rem; color: var(--muted); max-width: 56ch; margin: 0 auto; }
.abo-demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--amber-bg);
  color: var(--amber);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 24px;
}
.abo-demo-banner svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }

/* --- Impressum / Datenschutz / AGB --- */
.legal-page { max-width: 72ch; }
.legal-page h1 { font-family: var(--font-display); font-size: 1.9rem; margin: 0 0 6px; }
.legal-page .legal-updated { color: var(--muted); font-size: 0.82rem; margin: 0 0 24px; }
.legal-page h2 { font-size: 1.05rem; margin: 28px 0 10px; font-family: var(--font-display); }
.legal-page p { line-height: 1.6; margin: 0 0 12px; }
.legal-page address { font-style: normal; line-height: 1.6; }
.legal-page ul { line-height: 1.6; padding-left: 20px; }
.legal-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--amber-bg);
  color: var(--amber);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 28px;
}
.legal-notice svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.legal-missing { color: var(--red); font-style: italic; }

/* ===== Hilfe-Seite (hilfe.html, 2026-10-23) — eigenes "hf-"-Präfix.
   Chevron-Mechanik 1:1 von .rb-details/.rb-chevron übernommen (Rechnungs-
   Branding), hier für eine Liste von FAQ-<details> statt einem einzelnen
   Baustein. ===== */
.hf-page { max-width: 760px; }
.hf-section { margin-bottom: 32px; }
.hf-steps { margin: 0; padding-left: 20px; line-height: 1.7; }
.hf-steps li { margin-bottom: 4px; }
.hf-hinweis { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }
.hf-hinweis code { background: var(--accent-soft-bg); color: var(--accent-soft-text); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.hf-kategorie { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 20px 0 8px; }
.hf-kategorie:first-of-type { margin-top: 4px; }

.hf-faq-list { display: flex; flex-direction: column; gap: 8px; }
.hf-faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.hf-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}
.hf-faq-q::-webkit-details-marker { display: none; }
.hf-faq-q:focus-visible { outline-offset: -2px; }
.hf-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease;
}
.hf-faq-item:not([open]) .hf-chevron { transform: rotate(-45deg); margin: 0 4px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .hf-faq-q:hover .hf-chevron { border-color: var(--text); }
}
.hf-faq-item[open] .hf-faq-q { border-bottom: 1px solid var(--border); }
.hf-faq-a { padding: 12px 16px 16px; font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.hf-faq-a a { color: var(--accent-soft-text); }
.hf-faq-a strong { color: var(--text); }

.hf-rechtliches-links { display: flex; gap: 16px; }
.hf-rechtliches-links a { color: var(--accent-soft-text); font-weight: 600; text-decoration: none; }
.hf-rechtliches-links a:hover { text-decoration: underline; }

/* ===== Baustein: Social-Media-Verbindungen (social-connect.js, Einstellungen)
   — alle Klassen mit "sc-"-Präfix, Block einzeln entfernbar. ===== */
.sc-liste { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sc-zeile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}
.sc-status { font-weight: 600; font-size: 0.9rem; }
.sc-status-verbunden { color: var(--green); }
.sc-info { font-size: 0.78rem; color: var(--muted); margin-right: auto; }
.sc-bald { margin-left: auto; font-size: 0.78rem; color: var(--muted); font-style: italic; }
.confirm-card p.sc-meldung,
p.sc-meldung { margin: 12px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--green); }
p.sc-meldung.is-error { color: var(--red); }
.sc-meldung[hidden] { display: none; }

/* ===== Baustein: E-Mail-Weiterleitung (email-weiterleitung.js, Einstellungen)
   — alle Klassen mit "ew-"-Präfix, Block einzeln entfernbar. ===== */
.ew-adresse-eingabe {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 0 12px;
  margin-bottom: 10px;
}
.ew-adresse-eingabe input {
  flex: 1;
  min-width: 100px;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.ew-adresse-eingabe .ew-domain-suffix { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
#ewSlugHinweis.is-error { color: var(--red); font-weight: 600; }
.ew-adresse-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg);
}
.ew-adresse-box code { font-size: 0.88rem; word-break: break-all; margin-right: auto; }
.ew-anleitungen { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ew-anleitung {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 2px 14px;
}
.ew-anleitung summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
  font-weight: 600;
  font-size: 0.88rem;
}
.ew-anleitung summary::-webkit-details-marker { display: none; }
.ew-anleitung summary::before { content: "▸ "; color: var(--muted); }
.ew-anleitung[open] summary::before { content: "▾ "; }
.ew-anleitung ol { margin: 0 0 12px; padding-left: 20px; font-size: 0.85rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
