@import "tailwindcss";

/* Inter – self-hosted, exakt wie auf jenny-wullich.de */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

/* =========================================================
   Designhoch10 · Neura – Look von jenny-wullich.de
   (Inter, Fast-Schwarz mit nocturna-Aurora, gedämpfte Farben)
   ========================================================= */

:root {
  /* Höhe der unteren Handy-Leiste (.bottom-nav). Basis 0 – erst wenn die
     Leiste sichtbar ist, wird sie in gn2-extra.css gesetzt. Alles, was
     eine eigene Höhe aus 100vh/dvh rechnet, muss sie abziehen, sonst endet
     der Inhalt hinter der Leiste. (Jenny, 05.09.2026: „da verschwindet
     etwas in der unteren Leiste") */
  --leiste-unten: 0px;
  /* Marken-Logofarben (zusammengeführt aus gn2-extra, jetzt an EINER Stelle,
     theme-aware): Magenta = Fokus/Aktion, Gold = --accent, Violett = --violet */
  --logo-magenta: #b62a52; /* Rot-Rosa, gedämpft – die knallige Stufe biss in den Augen (Jenny, 03.08.2026) */
  --logo-gold: var(--accent);
  --logo-purple: var(--violet);
  /* Links = das leuchtende Rot-Rosa der Zahlen (Jenny, 03.08.2026) –
     dieselbe Farbe wie --rose, AA-fest auf Fast-Schwarz. */
  --link: var(--accent); /* Links in Lumina (Jenny, 23.08.2026 – vorher Rot-Rosa) */
  --link-hover: color-mix(in srgb, var(--accent) 75%, white);
  /* Marken-Look von jenny-wullich.de: Fast-Schwarz + nocturna-Aurora */
  --bg: #050410;
  --surface: #0d0b1a;
  --surface-2: #16132447;
  --card: #14111f;
  --card-hover: #1c1830;
  --border: #262238;
  --border-soft: #1f1b30;
  --text: #f5f3fa;
  --muted: #9a97b0;
  --faint: #8a87a2; /* aufgehellt ggü. Prototyp: WCAG AA für Kleintext */
  --accent: #dcf763; /* Lumina – ganz helles Lime-Gelb mit Grünstich (Jenny, 03.08.2026) */
  --on-accent: #ffffff; /* Text auf farbigen Badges (immer hell) */
  --accent-text: #b897f0; /* Akzent-TEXT = Violett – Pink nur noch für CTA (--logo-magenta) und Zahlen/negativ (--rose). (Jenny, 02.08.2026) */
  --accent-soft: #dcf7631a;
  /* Aurora-Töne statt Grün/Rot: Grünblau (positiv) + Violett (negativ) */
  --violet: #b897f0;
  --violet-soft: #b897f01a;
  --green: #4ee6d0; /* Grünblau/Petrol, leuchtender (Einnahmen, positiv) */
  --rose: #df497b; /* Rot-Rosa, gedämpft (Ausgaben, negativ, Links; AA auch klein) */
  --blue: #8ab4e8; /* Dämmerblau, leuchtender */
  --yellow: var(--accent); /* Ampel „mittel" = Lumina (Jenny, 03.08.2026) */
  /* Ampel für Kunden-Gesundheit. Bewusst eigene Tokens: --rose ist im System
     Pink (Ausgaben/negativ) und liest sich nicht als Warnung. */
  --ampel-gruen: #3ecf8e;
  --ampel-gelb: var(--accent); /* = Lumina */
  --ampel-rot: #f4564a;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;

  /* Glas-Look (aus dashboard-extras.css hierher geholt, 04.09.2026):
     Tokens gehören laut Regelwerk ausschließlich hierher. */
  --glass-bg: color-mix(in srgb, var(--text) 7%, transparent);
  --glass-bg-hover: color-mix(in srgb, var(--text) 14%, transparent);
  --glass-border: color-mix(in srgb, var(--text) 18%, transparent);
  --aurora-accent: #a99cf0;
  --ice: #a6d9ef;

  /* Schriftgrößen-Skala (Jenny, 04.09.2026: „die optische Inkonsistenz stört")
     Vorher: 47 verschiedene Größen bei 496 Vorkommen – 8,5px neben 9,5px neben
     10,5px, dazu rem und px gemischt. Jetzt acht Stufen, alles andere wird
     darauf gerundet (Gleichstand nach oben: zu kleiner Text ist das größere
     Barrierefreiheits-Risiko). Der CD-Wächter meldet jede rohe px-Größe. */
  --fs-xs: 11px;      /* Badges, Zähler, Kleinstes */
  --fs-sm: 12px;      /* Meta-Zeilen, Nebeninfo */
  --fs-md: 13px;      /* Sekundärtext, Knopftext */
  --fs-base: 14px;    /* Fließtext, Karten-Titel */
  --fs-lg: 16px;      /* Formularfelder (kein iOS-Zoom), Panel-Titel */
  --fs-xl: 20px;      /* Ansichts-Überschrift */
  --fs-2xl: 24px;     /* große Zahlen */
  --fs-3xl: 32px;     /* Hero */

  /* Radien-Skala (04.09.2026). Vorher lagen zwischen 1px und 20px zwölf
     verschiedene Werte herum. --radius und --radius-sm gab es schon; neu sind
     nur Namen für das, was ohnehin benutzt wurde. */
  --radius-xs: 8px;      /* Chips, Badges, kleine Felder */
  --radius-feld: 12px;   /* Formularfelder (Regelwerk) */
  --radius-pill: 999px;  /* alles Pillenförmige */

  /* Knopf- und Icon-Maße (04.09.2026). Regelwerk: „Knöpfe in EINER Reihe haben
     EINE Größe: 42px Standard, 28px kompakt." Vorher standen 26/30/32/34/38/44/50
     nebeneinander – eine Pille war 44px hoch, der Icon-Knopf daneben 42px. */
  --btn: 42px;
  --btn-klein: 28px;
  --icon: 16px;        /* Icon im Standardknopf */
  --icon-klein: 12px;  /* Icon im kompakten Knopf, Chips, Meta-Zeilen */
}
[data-theme="light"] {
  --logo-magenta: #b62a52; /* gilt in beiden Modi – gedämpftes Rot-Rosa */
  --link: #5a6a11; /* Hellmodus: dunkles Lumina-Lime, AA-fest auf Hell (Jenny, 23.08.2026) */
  --link-hover: #454f10;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --card: #ffffff;
  --card-hover: #f4f1ea;
  --border: #e4dfd2;
  --border-soft: #ede9de;
  --text: #1b1826;
  --muted: #6c6880;
  --faint: #6f6b7d; /* abgedunkelt: WCAG AA für Kleintext */
  --accent: #8da71a; /* Lime-Gelb, auf Weiß abgedunkelt */
  --on-accent: #ffffff;
  --accent-text: #6b4fc0; /* Akzent-TEXT = Violett (heller Modus, AA-sicher) */
  --accent-soft: #8da71a18;
  --violet: #6b4fc0;
  --violet-soft: #6b4fc015;
  --green: #14807a; /* Grünblau/Petrol – lesbar auf Weiß */
  --rose: #b62a52; /* gedämpftes Rot-Rosa – lesbar auf Weiß */
  --blue: #3f7fcb;
  --yellow: var(--accent); /* Ampel „mittel" = Lumina, hell abgedunkelt */
  --ampel-gruen: #14875c;
  --ampel-gelb: var(--accent); /* = Lumina */
  --ampel-rot: #c4362c;
  --shadow: 0 10px 30px -14px rgba(60, 50, 30, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  /* Kein „nach unten ziehen = neu laden" mehr (Pull-to-Refresh): sonst landet
     man beim Runterziehen einer Ansicht wieder auf dem Dashboard. */
  overscroll-behavior-y: contain;
  /* Native UI (Eingabefelder, Dialoge wie window.prompt, Scrollbars,
     Datumsauswahl, Autofill) im dunklen Marken-Look rendern */
  color-scheme: dark;
}
body {
  overscroll-behavior-y: contain;
}
:root[data-theme="light"],
html[data-theme="light"] {
  color-scheme: light;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-lg);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* nocturna-Aurora: sanfte dunkelviolette Nordlicht-Schleier */
  background-image: radial-gradient(
      55% 45% at 80% 6%,
      rgba(96, 56, 160, 0.22),
      transparent 70%
    ),
    radial-gradient(48% 40% at 10% 20%, rgba(74, 40, 130, 0.18), transparent 70%),
    radial-gradient(55% 46% at 90% 80%, rgba(54, 28, 100, 0.2), transparent 72%),
    radial-gradient(50% 44% at 6% 94%, rgba(36, 20, 68, 0.24), transparent 72%);
  background-attachment: fixed;
}
[data-theme="light"] body {
  background-image: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Sichtbarer Fokus überall (WCAG, 3:1 in beiden Themes).
   Magenta, nicht Gold: die Hausregel kennt genau EIN Fokus-Signal, und ein
   zweiter Ring in Goldton daneben sah nach Fehler aus. (Jenny, 01.08.2026) */
:focus-visible {
  outline: 2px solid var(--logo-magenta);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Topbar ---------- */
header.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 65%, black));
  color: #100c02;
  font-weight: 800;
  font-size: var(--fs-lg);
  box-shadow: 0 4px 14px -4px var(--accent);
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-transform: none;
}
nav.tabs {
  display: flex;
  gap: 4px;
  margin-left: 14px;
}
nav.tabs a {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: 0.18s;
  letter-spacing: 0.01em;
  text-decoration: none;
}
nav.tabs a:hover {
  color: var(--text);
  background: var(--surface-2);
}
nav.tabs a[aria-current="page"] {
  color: var(--text);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}
.spacer {
  flex: 1;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: var(--btn);  /* EINE Größe für Icon-Knöpfe im Fluss – wie mic-btn (Jenny, 03.08.2026) */
  height: var(--btn);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: var(--fs-lg);
}
/* „hidden" muss auch hier gewinnen: display:grid überstimmt sonst das
   Attribut, und per JS versteckte Knöpfe standen trotzdem in der Leiste
   (so hielten sich Lupe und Haken in der Mail-Übersicht). (Jenny, 15.08.2026) */
.icon-btn[hidden] { display: none !important; }
.icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  background: linear-gradient(140deg, var(--violet), #6d5bd0);
  color: #fff;
  border: 1.5px solid var(--bg);
}

main {
  padding: 24px 26px 60px;
}
.view {
  animation: fade 0.25s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.view-head h1 {
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.view-head p {
  color: var(--muted);
  font-size: var(--fs-base);
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn);
  gap: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 9px 16px;
  /* Schrift in der gelben Pille immer weiß (Jenny, Werkstatt 17.08.2026) –
     --on-accent ist exakt für Text auf farbigen Flächen gedacht. */
  color: var(--on-accent);
  transition: 0.18s;
}
.pill-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* aria-disabled statt disabled: Button bleibt fokussierbar (kein Fokus-Verlust) */
.pill-btn[aria-disabled="true"],
.q-action[aria-disabled="true"] {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.ghost-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.ghost-btn:hover {
  border-color: var(--accent);
  box-shadow: none;
  background: var(--accent-soft);
}

/* ---------- Board ---------- */
.board-wrap {
  display: flex;
  gap: 16px;
}

/* Umschalter Kanban ↔ Liste */
.board-main {
  flex: 1;
}
.board-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.view-switch {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.view-switch button {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.view-switch button:hover {
  color: var(--text);
}
.view-switch button[aria-pressed="true"] {
  color: var(--text);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Listen-Ansicht */
.task-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
  min-width: 660px;
}
.task-table th {
  text-align: left;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
}
.task-table td {
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.task-table tbody tr:last-child td {
  border-bottom: none;
}
.task-table tbody tr:hover {
  background: var(--surface-2);
}
.task-table .t-title {
  font-weight: 550;
}
.status-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  font: inherit;
  font-size: var(--fs-md);
  cursor: pointer;
}
.status-select:hover {
  border-color: var(--accent);
}
.columns {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  flex: 1;
}
.column {
  min-width: 270px;
  max-width: 290px;
  flex: 1 0 270px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 190px - var(--leiste-unten));
}
.col-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 15px 11px;
  position: sticky;
  top: 0;
}
.col-head h2 {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.col-count {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--faint);
  background: var(--surface-2);
  padding: 2px 9px;
  border-radius: var(--radius);
}
.col-body {
  padding: 4px 11px 11px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.col-body.drag-over {
  background: var(--accent-soft);
  border-radius: var(--radius-xs);
  outline: 1.5px dashed var(--accent);
}

.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 13px 13px 11px;
  cursor: grab;
  transition: 0.15s;
  position: relative;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--border);
  transform: translateY(-1px);
}
.card:focus-visible {
  outline: 2px solid var(--logo-magenta);
  outline-offset: 2px;
}
.card.dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}
.tag {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  /* Lange Kundennamen kappen statt über die Karte laufen zu lassen */
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
  box-sizing: border-box;
}
.card h3 {
  font-size: var(--fs-base);
  font-weight: 550;
  line-height: 1.35;
  margin-bottom: 10px;
}
.card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.src {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--faint);
  border: 1px solid var(--border-soft);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}
.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.due.soon {
  color: var(--rose);
}
.mini-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #100c02; /* dunkle Initialen auf Pastell-Verlauf (AA statt Weiß) */
  margin-left: auto;
}
.card .move-row {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  opacity: 0;
  transition: 0.15s;
}
.card:hover .move-row,
.card:focus-within .move-row,
.card:focus-visible .move-row {
  opacity: 1;
}
.video-badge,
.claude-badge {
  color: var(--violet);
}

/* Kunden- UND Website-Projekt-Tag: Farbe kommt als --tag-color aus den
   Daten; im hellen Modus wird der Text abgedunkelt, damit er AA-Kontrast
   erreicht. */
.tag-client,
.tag-projekt {
  color: var(--tag-color, var(--muted));
  background: color-mix(in srgb, var(--tag-color, var(--muted)) 10%, transparent);
}
[data-theme="light"] .tag-client,
[data-theme="light"] .tag-projekt {
  color: color-mix(in srgb, var(--tag-color, var(--muted)) 42%, #1b1826);
  background: color-mix(in srgb, var(--tag-color, var(--muted)) 16%, transparent);
}

/* ---------- Claude panel ---------- */
aside.claude {
  width: 310px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 190px - var(--leiste-unten));
  align-self: flex-start;
  position: sticky;
  top: 100px;
}
.claude-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.claude-orb {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: linear-gradient(140deg, var(--violet), var(--accent));
  display: grid;
  place-items: center;
  font-size: var(--fs-md);
}
.claude-head strong {
  font-size: var(--fs-base);
  font-weight: 600;
}
.claude-head span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.capture {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Feld-Look (Glas, Radius, Fokus) kommt aus design-system.css – dort steht
   auch, warum: dasselbe Feld wie beim Auftrag einstellen in der Werkstatt.
   (Regel 3 CLAUDE.md, Jenny 14.08.2026) */
.capture-row {
  display: flex;
}
.capture-row .pill-btn {
  flex: 1;
}
.mic-btn {
  width: var(--btn);
  height: var(--btn); /* ohne feste Höhe wurde aus dem Kreis eine Pille */
  align-self: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-lg);
  display: grid;
  place-items: center;
}
.mic-btn:hover {
  border-color: var(--violet);
  color: var(--text);
}
.mic-btn[aria-pressed="true"] {
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--rose) 35%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}
.claude-out .typing {
  color: var(--accent-text);
}

/* ---------- Dashboard ---------- */
.kpi {
  border-radius: var(--radius);
  padding: 18px;
}
.kpi .label {
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}
.kpi .k-ic {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
}
.kpi .value {
  font-size: var(--fs-2xl);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.kpi .sub {
  font-size: var(--fs-sm);
  margin-top: 6px;
  color: var(--muted);
}
.up {
  color: var(--green);
}
.down {
  color: var(--rose);
}
.dash-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .dash-cols {
    grid-template-columns: 1fr;
  }
}
.panel {
  border-radius: var(--radius);
  /* 20px = Panel-Innenabstand laut CLAUDE.md (vorher krumme 18px; 18.08.2026) */
  padding: 20px;
}
.panel h2 {
  font-weight: 600;
  margin-bottom: 4px;
}
.panel .p-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: 16px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 150px;
  padding-top: 10px;
}
.bar.in {
  background: linear-gradient(var(--accent), #c8a04d);
}
.bar.out {
  background: var(--border);
  opacity: 0.9;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 12px;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-xs);
  margin-right: 5px;
  vertical-align: middle;
}
.client-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.client-row:last-child {
  border: none;
}
.client-row .c-av {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  flex-shrink: 0;
  color: var(--tag-color, var(--muted));
  background: color-mix(in srgb, var(--tag-color, var(--muted)) 13%, transparent);
}
[data-theme="light"] .client-row .c-av {
  color: color-mix(in srgb, var(--tag-color, var(--muted)) 42%, #1b1826);
}
.client-row .c-name {
  font-size: var(--fs-base);
  font-weight: 550;
}
.client-row .c-meta {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.client-row .c-val {
  margin-left: auto;
  text-align: right;
}
.client-row .c-val b {
  font-size: var(--fs-base);
}
.health {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.abo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: var(--fs-md);
}
.abo .a-ic {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: var(--fs-base);
}
.abo .a-amt {
  margin-left: auto;
  font-weight: 600;
  color: var(--rose);
}
.foot-note {
  margin-top: 26px;
  text-align: center;
  color: var(--faint);
  font-size: var(--fs-sm);
}
.foot-note a {
  color: var(--accent-text);
  text-decoration: underline; /* Link nicht nur über Farbe erkennbar */
}


/* ---------- Task-Detail (Asana-Stil) ---------- */
.task-detail-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(3px);
  z-index: 60;
}
.task-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(500px, 100vw);
  border-left: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  padding: 22px;
  overflow-y: auto;
  z-index: 61;
  display: flex;
  flex-direction: column;
  animation: td-slide-in 0.22s ease;
}
@keyframes td-slide-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.td-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.td-head .icon-btn {
  margin-left: auto;
  flex-shrink: 0;
}
/* Der grüne Anlegen-/Erledigt-Haken steht in EINER Reihe mit Löschen und
   Schließen und bekommt darum dieselbe Größe wie die Icon-Knöpfe: 42px statt
   der 28px aus der Listenzeile (Jenny, 02.09.2026 – „rechts in selber Größe"). */
.td-head .tun-erledigt {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.td-head .tun-erledigt svg {
  width: var(--icon);
  height: var(--icon);
}
.task-detail .td-done-active {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.td-loading {
  color: var(--muted);
  font-size: var(--fs-base);
}
.td-status {
  min-height: 19px;
  font-size: var(--fs-sm);
  color: var(--green);
}
.td-status[data-kind="error"] {
  color: var(--rose);
}
.td-title {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-feld);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-xl);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding: 3px 0 5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.td-title:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.td-title:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  outline: none;
}
.td-meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
}
.td-meta > label {
  color: var(--muted);
}
.td-meta select,
.td-meta input {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--border);
  font: inherit;
}
.td-meta select {
  cursor: pointer;
}
/* Deaktivierte Felder klar erkennbar – die Drawer liegt außerhalb von
   .view/.panel, deshalb greift die dortige Regel hier nicht von selbst. */
.td-meta select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Natives Datums-Icon passend zum Theme */
.task-detail input[type="date"] {
  color-scheme: dark;
}
[data-theme="light"] .task-detail input[type="date"] {
  color-scheme: light;
}
.td-provider-form {
  grid-column: 2;
  display: flex;
  gap: 7px;
}
.td-provider-form input {
  flex: 1;
  min-width: 0;
}
/* Die Zeile „Für Claude freigeben" samt Hinweis ist am 07.09.2026 entfallen
   (Jenny: „brauch ich nicht, wenn du mir die Klammer dorthin setzt"). Der
   Einmal-Link sitzt seither als reines Icon in der Kopfzeile neben dem
   Mülleimer und braucht dort keine eigene Regel – er ist ein icon-btn wie
   seine Nachbarn. */
/* Selten Gebrauchtes unter „mehr": Projekt, Auftrag, Website-Projekt,
   Claude-Status. Spannt über beide Spalten des Feldrasters. */
.td-mehr {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.td-mehr > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: var(--fs-md);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Statt des Browser-Dreiecks ein Chevron (Jenny, 07.09.2026) – es dreht
     sich beim Aufklappen, damit man den Zustand sieht. */
  list-style: none;
}
.td-mehr > summary::-webkit-details-marker { display: none; }
.td-mehr > summary svg {
  width: var(--icon-klein);
  height: var(--icon-klein);
  transition: transform .15s;
}
.td-mehr[open] > summary svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .td-mehr > summary svg { transition: none; }
}
.td-mehr > summary:focus-visible {
  outline: 2px solid var(--logo-magenta);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.td-mehr-gitter {
  margin-top: 8px;
}
.td-btn-sm {
  padding: 6px 12px;
  font-size: var(--fs-md);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
.td-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.td-section > h2 {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.td-progress {
  color: var(--faint);
  font-weight: 500;
}
.td-desc {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  padding: 10px;
  resize: vertical;
  transition: 0.15s;
}
.td-desc:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.td-desc::placeholder {
  color: var(--faint);
}
.td-comment-input {
  min-height: 64px;
}
.td-subtasks {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.td-subtask {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border-soft);
}
.td-subtask:last-child {
  border-bottom: none;
}
.td-subtask input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.td-subtask label {
  flex: 1;
  font-size: var(--fs-base);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.td-subtask label.done {
  text-decoration: line-through;
  color: var(--muted);
}
.td-subtask-del {
  background: none;
  border: none;
  color: var(--faint);
  font-size: var(--fs-md);
  padding: 4px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: 0.15s;
}
.td-subtask-del:hover {
  color: var(--rose);
  background: color-mix(in srgb, var(--rose) 12%, transparent);
}
.td-subtask-add {
  display: flex;
  gap: 7px;
  margin-top: 2px;
}
.td-subtask-add input {
  flex: 1;
  min-width: 0;
}
.td-subtask-add input::placeholder,
.td-provider-form input::placeholder {
  color: var(--faint);
}
.td-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-text);
  text-decoration: underline;
  font-size: var(--fs-base);
}
.td-instructions {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: var(--fs-md);
}
.td-instructions summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.td-instructions pre {
  margin-top: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: var(--muted);
  line-height: 1.55;
}
.td-created {
  color: var(--faint);
  font-size: var(--fs-sm);
}
.td-comment {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
}
.td-comment-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.td-comment-head b {
  font-size: var(--fs-md);
}
.td-comment-head span {
  color: var(--faint);
  font-size: var(--fs-sm);
}
.td-comment p {
  font-size: var(--fs-md);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.td-comment-add {
  flex-direction: column;
}
.td-comment-add .pill-btn {
  align-self: flex-end;
}
