/* Jarvis – ruhiges, flaches Design. Keine Schatten, keine Verläufe. */

/* MB-/Waldgrün-Werte (auf die bestehenden Token-Namen gemappt) */
:root {
  --bg: #F7F9F8;
  --karte: #FFFFFF;
  --text: #14241D;
  --text-2: #6E7B74;
  --rand: #E1E8E4;
  --rand-stark: #CBD6D0;
  --eingabe: #F4F7F5;
  --gruen: #1B5036;
  --gruen-flaeche: #D7E6DE;
  --blau: #3D6B82;
  --blau-flaeche: #DCE7EC;
  --lila: #6B5B95;
  --rot: #A1483C;
  --rot-flaeche: #F0E0DC;
  --orange: #B08D57;
  --orange-flaeche: #EFE7DA;
  --grau-balken: #D8DEDA;
}

[data-thema="dunkel"] {
  --bg: #0E1814;
  --karte: #16241D;
  --text: #ECF3EF;
  --text-2: #84938B;
  --rand: #233530;
  --rand-stark: #2F453D;
  --eingabe: #1A2C24;
  --gruen: #5BB088;
  --gruen-flaeche: #163124;
  --blau: #7BA8C0;
  --blau-flaeche: #15252C;
  --lila: #A99BD6;
  --rot: #D88B7E;
  --rot-flaeche: #2E1A16;
  --orange: #C9A876;
  --orange-flaeche: #2A2419;
  --grau-balken: #2F453D;
}

@media (prefers-color-scheme: dark) {
  [data-thema="auto"] {
    --bg: #0E1814;
    --karte: #16241D;
    --text: #ECF3EF;
    --text-2: #84938B;
    --rand: #233530;
    --rand-stark: #2F453D;
    --eingabe: #1A2C24;
    --gruen: #5BB088;
    --gruen-flaeche: #163124;
    --blau: #7BA8C0;
    --blau-flaeche: #15252C;
    --lila: #A99BD6;
    --rot: #D88B7E;
    --rot-flaeche: #2E1A16;
    --orange: #C9A876;
    --orange-flaeche: #2A2419;
    --grau-balken: #2F453D;
  }
}

* { box-sizing: border-box; }

/* Body-Grundtypografie (Schriftgröße/-gewicht/Zeilenhöhe/Hintergrund) kommt jetzt
   aus mb/base.css + app.css (Design-Werte). Die alte 15px/300/1.55-Regel wurde
   entfernt, weil sie gegen die jv-Shell („Schrift/Abstände") gearbeitet hat. */
html, body { margin: 0; }

h1, h2, h3, h4 { margin: 0 0 .6rem; font-family: var(--font-display, Georgia, serif); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.05rem; }
h4.gruppe { font-family: var(--font-mono, ui-monospace, monospace); font-size: .72rem; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); margin: .9rem 0 .35rem; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

/* --- Grundgerüst --- */

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

.seitenleiste {
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 1.4rem .9rem;
  border-right: 1px solid var(--rand);
  background: var(--karte);
  position: sticky;
  top: 0;
  height: 100vh;
}

.marke {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0 .65rem .9rem;
}

.navigation { display: flex; flex-direction: column; gap: .15rem; flex: 1; }

.nav-eintrag {
  display: block;
  padding: .5rem .65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color .15s, background .15s;
}
.nav-eintrag:hover { color: var(--text); background: var(--bg); }
.nav-eintrag.aktiv { color: var(--text); background: var(--bg); border-color: var(--rand); font-weight: 600; }
.leiste-fuss { display: flex; flex-direction: column; gap: .15rem; margin-top: .4rem; }
.nav-eintrag.mit-symbol { display: flex; align-items: center; gap: .55rem; }
.nav-symbol { flex-shrink: 0; }

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

.kopfzeile {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1.6rem;
  border-bottom: 1px solid var(--rand);
}
.kopf-titel { font-weight: 600; flex: 1; }

.burger, .thema-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--karte);
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.burger:hover, .thema-knopf:hover { color: var(--text); border-color: var(--rand-stark); }
.burger { display: none; }

/* Sonne/Mond-Sichtbarkeit wird jetzt vom #themaKnopf-Handler in app.js gesteuert
   (über das hidden-Attribut). Die alten CSS-display-Regeln wurden entfernt, weil
   sie damit kollidiert haben. */

/* Inkognito-Auge: offen = aus, durchgestrichen = aktiv */
.inkognito-knopf .symbol-auge-zu { display: none; }
.inkognito-knopf.aktiv .symbol-auge { display: none; }
.inkognito-knopf.aktiv .symbol-auge-zu { display: inline; }
.inkognito-knopf.aktiv { color: var(--lila); border-color: var(--lila); }

.inhalt {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.8rem 1.6rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.schleier {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 8;
}

/* --- Karten --- */

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}

.gruss h1 { margin-bottom: .1rem; }
.gruss .datum { margin: 0; color: var(--text-2); }

/* Dashboard-Kopf nach Vorlage (Begrüßung + An-Jarvis-Leiste) */
.dash-kopf { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-datum { margin-bottom: 8px; }
.dash-gruss { font-family: var(--font-display, Georgia, serif); font-weight: 300;
  font-size: clamp(1.9rem, 3vw, 2.5rem); letter-spacing: -0.02em; margin: 0; line-height: 1.05; }
.dash-name { font-style: italic; color: var(--gruen); }
.dash-ask { width: min(420px, 100%); }
@media (max-width: 760px) { .dash-ask { width: 100%; } }

.quelle-fehler {
  color: var(--orange);
  background: var(--orange-flaeche);
  border-radius: 8px;
  padding: .45rem .7rem;
  font-size: .85rem;
  margin: .3rem 0;
}
.leer-text { color: var(--text-2); margin: .3rem 0; }
.meta { color: var(--text-2); font-size: .82rem; margin: .1rem 0 0; }

/* --- Jarvis-Box --- */

.jarvis-box form { display: flex; gap: .6rem; }
.jarvis-box input {
  flex: 1;
  padding: .6rem .8rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
}
.jarvis-box input:focus { outline: none; border-color: var(--rand-stark); }

.knopf-primaer {
  padding: .6rem 1.1rem;
  border: 1px solid var(--text);
  border-radius: 8px;
  background: var(--text);
  color: var(--karte);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.knopf-primaer:hover { opacity: .85; }
.knopf-primaer:disabled { opacity: .5; cursor: wait; }

.jarvis-antwort {
  margin-top: .75rem;
  padding: .55rem .8rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rand);
  font-size: .9rem;
}
.jarvis-antwort.fehler { color: var(--rot); background: var(--rot-flaeche); border-color: transparent; }

.schnell-knoepfe { display: inline-flex; gap: .4rem; margin-left: .5rem; }
.schnell-knopf {
  padding: .15rem .6rem;
  font-size: .8rem;
  border: 1px solid var(--rand-stark);
  border-radius: 999px;
  background: var(--karte);
  color: var(--text);
  cursor: pointer;
}
.schnell-knopf:hover { border-color: var(--text-2); }

/* --- Wichtig-Zone --- */

.wichtig-liste { display: flex; flex-direction: column; }

.wichtig-eintrag {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .2rem;
  border-bottom: 1px solid var(--rand);
}
.wichtig-eintrag:last-child { border-bottom: none; }

.wichtig-eintrag.ueberfaellig {
  background: var(--rot-flaeche);
  border-radius: 8px;
  padding: .5rem .6rem;
  border-bottom: none;
  margin-bottom: .25rem;
}
.wichtig-eintrag.ueberfaellig .aufgabe-titel { font-weight: 600; }
.ueberfaellig-hinweis { color: var(--rot); font-size: .82rem; font-weight: 600; margin-left: auto; white-space: nowrap; }
.wichtig-eintrag.heute-faellig .aufgabe-titel { font-weight: 600; }
.wichtig-eintrag .meta { margin-left: auto; white-space: nowrap; }

.punkt { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.punkt.rot { background: var(--rot); }
.punkt.orange { background: var(--orange); }
.punkt.gruen { background: var(--gruen); }
.punkt.blau { background: var(--blau); }

/* --- Kacheln --- */

.kachel-reihe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.kachel { text-align: center; padding: 1rem; }
.kachel-zahl { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.kachel-text { color: var(--text-2); font-size: .85rem; }
.kachel-rot { border-color: var(--rot); }
.kachel-rot .kachel-zahl { color: var(--rot); }

/* --- Fortschritts-Zeile --- */

.drei-reihe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }

.finanz-balken {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 110px;
  margin-top: .8rem;
}
.finanz-monat { display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.balken-paar { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.balken { width: 14px; border-radius: 4px 4px 0 0; min-height: 2px; }
.balken.einnahmen { background: var(--lila); }
.balken.ausgaben { background: var(--grau-balken); }
.balken-label { font-size: .75rem; color: var(--text-2); }

.legende { display: flex; gap: 1rem; margin-top: .7rem; font-size: .78rem; color: var(--text-2); }
.legende-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.legende-punkt.lila { background: var(--lila); }
.legende-punkt.grau { background: var(--grau-balken); }

.leer-zustand { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; color: var(--text-2); }
.leer-zustand h3, .leer-zustand h2 { color: var(--text); margin: 0; }
.leer-zustand p { margin: 0; }
.leer-zustand.gross { padding: 4rem 1.5rem; }
.leer-kreis {
  width: 34px;
  height: 34px;
  border: 1.5px dashed var(--rand-stark);
  border-radius: 50%;
  margin-bottom: .5rem;
}

/* --- 2x2-Raster --- */

.raster-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }

.gruen-text { color: var(--gruen); }
.blau-text { color: var(--blau); }

.termin-liste li { padding: .3rem 0; border-bottom: 1px solid var(--rand); display: flex; gap: .6rem; }
.termin-liste li:last-child { border-bottom: none; }
.termin-zeit { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 4.4em; flex-shrink: 0; }

.aufgaben-liste li { padding: .35rem 0; border-bottom: 1px solid var(--rand); display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.aufgaben-liste li:last-child { border-bottom: none; }

.aufgabe { display: flex; align-items: baseline; gap: .55rem; cursor: pointer; min-width: 0; }
.aufgabe-haken { accent-color: var(--gruen); cursor: pointer; flex-shrink: 0; transform: translateY(1px); }
.aufgabe-titel { overflow-wrap: anywhere; }
.aufgabe.erledigt .aufgabe-titel { text-decoration: line-through; color: var(--text-2); }

.reflektion-liste li { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--rand); }
.reflektion-liste li:last-child { border-bottom: none; }

.pille {
  font-size: .76rem;
  font-weight: 600;
  padding: .12rem .6rem;
  border-radius: 999px;
  border: 1px solid;
}
.pille.gruen { color: var(--gruen); background: var(--gruen-flaeche); border-color: transparent; }
.pille.orange { color: var(--orange); background: var(--orange-flaeche); border-color: transparent; }
.pille.neutral { color: var(--text-2); border-color: var(--rand-stark); }

.kunden-liste li { padding: .5rem 0; border-bottom: 1px solid var(--rand); }
.kunden-liste li:last-child { border-bottom: none; }
.kunden-zeile { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }

/* --- Login --- */

.login-seite {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
.login-karte {
  width: 100%;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 2rem 1.8rem;
  text-align: center;
}
.login-karte .marke { padding: 0; font-size: 1.4rem; }
.login-text { margin: -0.6rem 0 .4rem; color: var(--text-2); }
.login-karte input {
  padding: .6rem .8rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
  text-align: center;
}
.login-karte input:focus { outline: none; border-color: var(--rand-stark); }
.login-fehler { color: var(--rot); font-size: .85rem; margin: 0; }

/* --- Skeletons --- */

.skelett {
  background: var(--rand);
  border-radius: 6px;
  animation: pulsieren 1.4s ease-in-out infinite;
  margin: .45rem 0;
}
.skelett.zeile { height: 16px; width: 75%; }
.skelett.zeile.breit { width: 95%; }
.skelett.zeile.schmal { width: 45%; }
.skelett.zahl { height: 38px; width: 60%; margin: .5rem auto; }
.skelett.block { height: 110px; width: 100%; }

@keyframes pulsieren {
  0%, 100% { opacity: 1; }
  50% { opacity: .58; }
}

/* Lazy nachgeladene Inhalte (Fragmente + ganze Seiten) blenden sanft ein */
[data-fragment].geladen > *,
[data-seite].geladen > * { animation: einblenden .15s ease-out; }
.inhalt.einblenden { animation: einblenden .15s ease-out; }

/* Seiteninhalt beim ersten Aufbau weich einblenden */
main.jv-scroll { animation: einblenden .18s ease-out; }

@keyframes einblenden {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* --- Ladebalken oben (2px, Akzentfarbe) --- */

.ladebalken {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: width .35s cubic-bezier(.2,.7,.3,1), opacity .2s ease;
}
.ladebalken.aktiv { width: 90%; opacity: 1; }
.ladebalken.fertig { width: 100%; opacity: 0; transition: width .15s ease, opacity .3s ease .1s; }

/* --- Klick-Feedback (scale 0.98) --- */

button:active, .nav-eintrag:active, .aufgabe:active,
.jv-navitem:active, .jv-iconbtn:active { transform: scale(.98); }

/* ===== Aufgaben-Kalender: Termin-/Aufgaben-Blöcke (Layout-Politur) ===== */
.auf-block {
  position: absolute; left: 3px; right: 3px;
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 4px 9px 4px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border); border-left: 3px solid var(--dc);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  z-index: 2;
}
.auf-block--meeting { background: var(--surface); }
.auf-block--task {
  background-image: repeating-linear-gradient(135deg, var(--dct), var(--dct) 6px, transparent 6px, transparent 12px);
  border: 1px dashed var(--dc); border-left: 3px solid var(--dc);
  box-shadow: none;
  padding-right: 22px;            /* Platz für × */
  cursor: grab;
}
.auf-block--task.auf-evtask { transition: top .18s cubic-bezier(.2, .7, .3, 1); }
.auf-block:hover { box-shadow: var(--shadow-sm); }
.auf-block-inhalt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.auf-block-titel {
  font-size: 12px; font-weight: 500; color: var(--text-primary);
  line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.auf-block-zeit {
  font-size: 10px; color: var(--text-muted); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 3px;
}
/* Kurze/schmale Blöcke: Titel zuerst (volle Breite, immer sichtbar), Zeit darunter */
.auf-block--kompakt { padding-top: 2px; padding-bottom: 2px; gap: 0; }
.auf-block--kompakt .auf-block-inhalt { gap: 0; }
.auf-block--kompakt .auf-block-titel { font-size: 11px; line-height: 1.2; -webkit-line-clamp: 1; }

/* Board-Karten: Titel max. 2 Zeilen, lange Wörter/URLs brechen (kein Überlauf). */
.auf-karte-titel {
  flex: 1; min-width: 0;
  font-size: var(--text-sm); line-height: 1.4; color: var(--text-primary);
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Chips dürfen die Karte/das Detail-Modal nicht sprengen (z. B. langer Kundenname/URL). */
.auf-karte .jv-chip, #aufDetailModal .jv-chip { max-width: 100%; overflow-wrap: anywhere; }
.auf-block--kompakt .auf-block-zeit { font-size: 9px; line-height: 1.15; }
.auf-block .auf-unplan {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; z-index: 3;
}
.auf-block .auf-unplan:hover { color: var(--text-primary); }
/* Drag-Vorschau ("Geist") */
.auf-geist {
  position: absolute; left: 3px; right: 3px;
  border-radius: var(--radius-sm); border: 1.5px dashed var(--accent);
  background: var(--accent-surface); opacity: .85; pointer-events: none;
  z-index: 5; display: none; align-items: center; padding: 0 9px;
}
.auf-geist span { font-size: 10.5px; color: var(--accent); font-weight: 600; }
/* Aktuelle Uhrzeit als feine Linie */
.auf-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--jv-overdue); z-index: 4; pointer-events: none; }
.auf-now::before { content: ""; position: absolute; left: -2px; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--jv-overdue); }

/* --- Toasts --- */

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 60;
}
.toast {
  background: var(--text);
  color: var(--karte);
  padding: .6rem .9rem;
  border-radius: 8px;
  font-size: .88rem;
  max-width: 340px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.toast.sichtbar { opacity: 1; transform: none; }
.toast.fehler { background: var(--rot); color: #fff; }

/* --- Seitenpanel --- */

.panel {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: var(--karte);
  border-left: 1px solid var(--rand);
  z-index: 40;
  transform: translateX(100%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
}
.panel.offen { transform: none; }
.panel-kopf { display: flex; justify-content: flex-end; padding: .6rem .8rem 0; }
.panel-schliessen {
  border: 1px solid var(--rand);
  background: var(--karte);
  color: var(--text-2);
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}
.panel-inhalt { padding: .4rem 1.3rem 2rem; overflow-y: auto; }
.panel-schleier {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  z-index: 39;
}
.panel-schleier.offen { display: block; }

.panel-daten { margin: .6rem 0; }
.panel-daten dt { color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-top: .7rem; }
.panel-daten dd { margin: .15rem 0 0; }
.panel-link { color: var(--blau); text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

.hubspot-gruppen { max-height: 420px; overflow-y: auto; }
.hubspot-gruppen .gruppe:first-child { margin-top: 0; }
.hubspot-deals { list-style: none; margin: .4rem 0 0; padding: 0; }
.hubspot-deals li { padding: .5rem 0; border-top: 1px solid var(--rand); display: flex; flex-direction: column; gap: .2rem; }
.hubspot-deals li:first-child { border-top: none; }
.deal-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.deal-name { font-weight: 600; }
.deal-betrag { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-next { color: var(--text-2); font-size: .85rem; }

.mail-liste { list-style: none; margin: .3rem 0 .8rem; padding: 0; }
.mail-liste li { padding: .55rem 0; border-top: 1px solid var(--rand); display: flex; flex-direction: column; gap: .2rem; }
.mail-liste li:first-child { border-top: none; }
.mail-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.mail-betreff { font-weight: 600; color: var(--text); text-decoration: none; }
.mail-betreff:hover { text-decoration: underline; }
.mail-auszug { color: var(--text-2); font-size: .85rem; }
.md-text {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: .7rem .9rem;
  font-size: .85rem;
  max-height: 300px;
  overflow-y: auto;
}
.fussnote { color: var(--text-2); font-size: .78rem; border-top: 1px solid var(--rand); padding-top: .7rem; margin-top: 1.2rem; }

.panel-knoepfe { display: inline-flex; gap: .35rem; margin-top: .25rem; }
.panel-knopf {
  font-size: .74rem;
  padding: .12rem .55rem;
  border: 1px solid var(--rand-stark);
  border-radius: 999px;
  background: var(--karte);
  color: var(--text-2);
  cursor: pointer;
}
.panel-knopf:hover { color: var(--text); border-color: var(--text-2); }

/* --- Wichtig-Zone V3 --- */

.ueberfaellig-block {
  background: var(--rot-flaeche);
  border-radius: 8px;
  padding: .35rem .6rem;
  margin-bottom: .6rem;
}
.ueberfaellig-zeile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  padding: .3rem 0;
}
.ueberfaellig-zeile .aufgabe-titel { font-weight: 600; }

.zeitstrahl { display: flex; flex-direction: column; }
.zeit-eintrag {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  padding: .45rem .5rem;
  border-radius: 8px;
  position: relative;
}
.zeit-eintrag::before {
  content: "";
  position: absolute;
  left: calc(5.2em + .65rem + 3px);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rand);
}
.zeit-eintrag:first-child::before { top: 50%; }
.zeit-eintrag:last-child::before { bottom: 50%; }
.zeit-eintrag.aktiv { background: var(--bg); border: 1px solid var(--rand); }
.zeit-spanne {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  min-width: 5.2em;
  font-size: .85rem;
  flex-shrink: 0;
}
.zeit-punkt {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
}
.zeit-punkt.gruen { background: var(--gruen); }
.zeit-punkt.blau { background: var(--blau); }
.zeit-inhalt { min-width: 0; flex: 1; }
.zeit-kopf { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.bereichs-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.pille.prio-hoch { color: var(--rot); background: var(--rot-flaeche); border-color: transparent; }
.pille.prio-mittel { color: var(--orange); background: var(--orange-flaeche); border-color: transparent; }

.termin-liste li { align-items: baseline; flex-wrap: wrap; }
.termin-titel { flex: 1; min-width: 0; }

/* --- Finanzen-Tab --- */

.kachel-reihe.vier { grid-template-columns: repeat(4, 1fr); }
.rot-text { color: var(--rot); }

.fortschritt-balken {
  height: 8px;
  background: var(--rand);
  border-radius: 999px;
  overflow: hidden;
  margin: .45rem auto;
  max-width: 150px;
}
.fortschritt-balken.klein { margin: 0; max-width: 90px; }
.fortschritt-fuellung {
  height: 100%;
  background: var(--lila);
  border-radius: 999px;
}

.schulden-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-top: .4rem;
}
.schulden-tabelle th {
  text-align: left;
  color: var(--text-2);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--rand-stark);
}
.schulden-tabelle td {
  padding: .5rem;
  border-bottom: 1px solid var(--rand);
  vertical-align: middle;
}
.schulden-tabelle tr:last-child td { border-bottom: none; }
.bezahlt-zeile { opacity: .45; }
.balken-zelle { width: 100px; }

.pille.status-offen { color: var(--orange); background: var(--orange-flaeche); border-color: transparent; }
.pille.status-laufend { color: var(--blau); background: var(--blau-flaeche); border-color: transparent; }
.pille.status-bezahlt { color: var(--gruen); background: var(--gruen-flaeche); border-color: transparent; }

.eintrags-liste li {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--rand);
}
.eintrags-liste li:last-child { border-bottom: none; }
.eintrags-liste .aufgabe-titel { flex: 1; min-width: 0; }
.betrag { font-variant-numeric: tabular-nums; white-space: nowrap; }

.fragment-stapel { display: flex; flex-direction: column; gap: 1.1rem; }

/* --- Login-Spinner + Schütteln --- */

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: drehen .7s linear infinite;
  vertical-align: -2px;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.knopf-primaer.laedt { opacity: .6; cursor: wait; }

.schuetteln { animation: schuetteln .4s ease; }
@keyframes schuetteln {
  0%, 100% { transform: none; }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* --- Reduzierte Bewegung --- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Mobil --- */

@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .seitenleiste {
    position: fixed;
    z-index: 9;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .seitenleiste.offen { transform: translateX(0); }
  .schleier.offen { display: block; }
  .kachel-reihe, .drei-reihe, .raster-2x2 { grid-template-columns: 1fr; }
  .kachel-reihe.vier { grid-template-columns: repeat(2, 1fr); }
  .schulden-tabelle th:nth-child(2), .schulden-tabelle td:nth-child(2),
  .schulden-tabelle th:nth-child(6), .schulden-tabelle td:nth-child(6) { display: none; }
  .panel { width: 100vw; }
  .inhalt { padding: 1.2rem 1rem 3rem; }
  .kopfzeile { padding: .75rem 1rem; }
}

/* --- V2: Konten --- */

.konten-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: .5rem; }
.konto-karte {
  display: block;
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: .75rem .9rem;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.konto-karte:hover { border-color: var(--rand-stark); background: var(--bg); }
.konto-name { font-weight: 600; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.konto-stand { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin: .15rem 0; }
.konto-karte.geschaeft { border-style: dashed; }

.leer-text.klein { font-size: .8rem; margin-top: .7rem; }

/* --- V2: Kurven (SVG) --- */

.kurve { width: 100%; height: 110px; color: var(--lila); margin-top: .6rem; display: block; }
.kurve.klein { height: 60px; }
.kurve-legende { display: flex; justify-content: space-between; margin-top: .3rem; }

/* --- V2: Wo geht mein Geld hin? --- */

.wohin-liste li { display: flex; align-items: center; gap: .7rem; padding: .35rem 0; border-bottom: 1px solid var(--rand); }
.wohin-liste li:last-child { border-bottom: none; }
.wohin-name { min-width: 7.5em; }
.wohin-balken { flex: 1; max-width: none; }
.fortschritt-balken.klein.wohin-balken { max-width: none; }

/* --- V2: Schuldenabbau zweispurig --- */

.fortschritt-balken.gross { height: 12px; max-width: none; margin: .6rem 0 .3rem; position: relative; overflow: visible; }
.fortschritt-balken.gross .fortschritt-fuellung { border-radius: 999px; }
.fortschritt-balken .fortschritt-fuellung.gruen { background: var(--gruen); }
.fortschritt-balken.mit-ziel .ziel-markierung {
  position: absolute;
  left: 90%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--text-2);
  border-radius: 1px;
}
.naechster-hinweis {
  background: var(--blau-flaeche);
  color: var(--blau);
  border-radius: 8px;
  padding: .45rem .7rem;
  font-size: .88rem;
  margin: .5rem 0;
}
.wasserfall li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--rand); }
.wasserfall li:last-child { border-bottom: none; }
.wasserfall .aufgabe-titel { flex: 1; min-width: 0; }
.wasserfall .fortschritt-balken.klein { width: 90px; flex-shrink: 0; }
.prio-nummer {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rand-stark);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
}

.einstellung-zeile { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; font-size: .88rem; color: var(--text-2); }
.einstellung-eingabe {
  padding: .3rem .5rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
  width: 110px;
}
select.einstellung-eingabe { width: auto; }

.monat-zahlen { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: .4rem 0 .8rem; }
.monat-spalte.gesamt { border-left: 1px solid var(--rand); padding-left: 1.5rem; }
.monat-betrag { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }

.klick-karte { display: block; text-decoration: none; transition: border-color .15s; }
.klick-karte:hover { border-color: var(--rand-stark); }
.pfeil { color: var(--text-2); font-size: 1.2rem; }
.kopf-zurueck { color: var(--text-2); text-decoration: none; margin-right: .35rem; font-weight: 400; }
.kopf-zurueck:hover { color: var(--text); }

/* --- V2: Ziele & Gewohnheiten --- */

.ziel-liste li { display: flex; align-items: center; gap: .7rem; padding: .4rem 0; border-bottom: 1px solid var(--rand); }
.ziel-liste li:last-child { border-bottom: none; }
.ziel-liste .aufgabe-titel { flex: 1; min-width: 0; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.ziel-balken { width: 130px; flex-shrink: 0; }

.gewohnheiten-tabelle-halter { overflow-x: auto; }
.gewohnheiten-tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: .4rem; }
.gewohnheiten-tabelle th {
  text-align: center;
  color: var(--text-2);
  font-size: .74rem;
  font-weight: 600;
  padding: .35rem .4rem;
  border-bottom: 1px solid var(--rand-stark);
}
.gewohnheiten-tabelle td { text-align: center; padding: .45rem .4rem; border-bottom: 1px solid var(--rand); }
.gewohnheiten-tabelle tr:last-child td { border-bottom: none; }
.gewohnheiten-tabelle td.gewohnheit-name { text-align: left; }
.gewohnheiten-tabelle .heute-spalte { background: var(--blau-flaeche); }
.gewohnheit-haken { accent-color: var(--gruen); width: 16px; height: 16px; cursor: pointer; }
.gewohnheit-haken:disabled { opacity: .35; cursor: default; }

.datei-liste li { padding: .15rem 0; }
.datei-knopf {
  background: none;
  border: none;
  padding: .25rem 0;
  font: inherit;
  color: var(--blau);
  cursor: pointer;
}
.datei-knopf:hover { text-decoration: underline; }

.md-gerendert { font-size: .9rem; line-height: 1.6; overflow-wrap: anywhere; }
.md-gerendert h1, .md-gerendert h2 { font-size: 1.05rem; margin-top: 1rem; }
.md-gerendert h3, .md-gerendert h4 { font-size: .95rem; margin-top: .8rem; }
.md-gerendert ul { list-style: disc; padding-left: 1.2rem; margin: .4rem 0; }
.md-gerendert ol { padding-left: 1.2rem; margin: .4rem 0; }
.md-gerendert blockquote { border-left: 3px solid var(--rand-stark); margin: .6rem 0; padding: .1rem .8rem; color: var(--text-2); }
.md-gerendert code { background: var(--bg); border-radius: 4px; padding: .05rem .3rem; font-size: .85em; }
.md-gerendert table { border-collapse: collapse; margin: .6rem 0; }
.md-gerendert th, .md-gerendert td { border: 1px solid var(--rand); padding: .25rem .55rem; font-size: .85rem; }

/* --- V2: Notion-Seite (Unternehmensaufbau) --- */

details.notion-seite summary { cursor: pointer; color: var(--text); font-weight: 600; padding: .3rem 0; }
.notion-inhalt { font-size: .9rem; line-height: 1.6; margin-top: .6rem; max-height: 480px; overflow-y: auto; padding-right: .5rem; overflow-wrap: anywhere; }
.notion-inhalt h2, .notion-inhalt h3, .notion-inhalt h4 { margin-top: 1rem; }
.notion-inhalt ul { list-style: disc; padding-left: 1.2rem; margin: .4rem 0; }
.notion-inhalt ol { padding-left: 1.2rem; margin: .4rem 0; }
.notion-inhalt blockquote { border-left: 3px solid var(--rand-stark); margin: .6rem 0; padding: .1rem .8rem; color: var(--text-2); }
.notion-inhalt a { color: var(--blau); }
.notion-callout { background: var(--bg); border: 1px solid var(--rand); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
.notion-unterseite { margin: .2rem 0; }
.notion-unterseite a { color: var(--blau); text-decoration: none; }
.notion-unterseite a:hover { text-decoration: underline; }
.notion-inhalt pre { background: var(--bg); border: 1px solid var(--rand); border-radius: 8px; padding: .6rem .8rem; overflow-x: auto; font-size: .82rem; }

/* --- V2: Absprungs-Tracker (bewusst dezent) --- */

details.absprung-tracker > summary {
  cursor: pointer;
  list-style: none;
  text-align: center;
  font-size: .8rem;
  padding: .3rem;
}
details.absprung-tracker > summary::-webkit-details-marker { display: none; }
details.absprung-tracker > summary:hover { color: var(--text); }
.absprung-karte { margin-top: .6rem; }
.absprung-liste li { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--rand); }
.absprung-liste li:last-child { border-bottom: none; }
.absprung-text { flex: 1; min-width: 0; }
.absprung-text .fortschritt-balken.klein { max-width: none; margin: .35rem 0; }
.ampel { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: .4rem; }
.ampel.gruen { background: var(--gruen); }
.ampel.gelb { background: var(--orange); }
.ampel.rot { background: var(--rot); }

/* --- V2: Saleshax --- */

.mail-liste li { border-bottom: 1px solid var(--rand); }
.mail-liste li:last-child { border-bottom: none; }
.mail-zeile { display: block; padding: .45rem 0; text-decoration: none; }
.mail-zeile:hover .mail-betreff { color: var(--blau); }
.mail-betreff { display: block; font-weight: 500; overflow-wrap: anywhere; }

/* --- V2: Hintergrund-Log --- */

.log-liste li { display: flex; align-items: baseline; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--rand); font-size: .88rem; }
.log-liste li:last-child { border-bottom: none; }
.log-text { overflow-wrap: anywhere; }
.log-liste .log-fehler .log-text { color: var(--rot); }
.schnell-knopf.aktiv-filter { border-color: var(--text); color: var(--text); font-weight: 600; }
a.schnell-knopf { text-decoration: none; }

/* --- V2: Quick-Panel --- */

.quick-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 45;
  padding: 4.5rem 1rem 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}
.quick-overlay.offen { display: flex; }
.quick-fenster {
  width: min(440px, 100%);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.quick-kopf { display: flex; justify-content: space-between; align-items: center; }
.quick-kopf h3 { margin: 0; }
.jarvis-box-form { display: flex; gap: .6rem; }
.jarvis-box-form input {
  flex: 1;
  padding: .6rem .8rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
  min-width: 0;
}
.jarvis-box-form input:focus { outline: none; border-color: var(--rand-stark); }
.quick-termin { background: var(--bg); border: 1px solid var(--rand); border-radius: 8px; padding: .6rem .8rem; }
.quick-verlauf li { font-size: .8rem; color: var(--text-2); padding: .25rem 0; border-bottom: 1px solid var(--rand); overflow-wrap: anywhere; }
.quick-verlauf li:last-child { border-bottom: none; }

/* --- V2: Whoop & Körper --- */

.whoop-kurven { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
/* hidden-Attribut schlägt die display:flex-Regel (sonst 7- und 30-Tage gleichzeitig sichtbar). */
.whoop-kurven[hidden] { display: none; }
.kurve-block .meta { display: block; margin-bottom: .1rem; }
.knopf-link { text-decoration: none; display: inline-block; }

/* --- V2: Verträge-Formular --- */

.vertrag-formular { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.vertrag-formular input, .vertrag-formular select {
  padding: .55rem .7rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
}
.vertrag-formular input[name="name"] { flex: 2; min-width: 160px; }
.vertrag-formular input[name="betrag"] { width: 110px; }
.vertrag-formular input:focus, .vertrag-formular select:focus { outline: none; border-color: var(--rand-stark); }

/* --- V2: Mobil --- */

@media (max-width: 900px) {
  .konten-raster { grid-template-columns: 1fr 1fr; }
  .quick-overlay { padding: 0; }
  .quick-fenster { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .monat-spalte.gesamt { border-left: none; padding-left: 0; }
  .ziel-balken { width: 80px; }
}
@media (max-width: 560px) {
  .konten-raster { grid-template-columns: 1fr; }
}

/* --- V2.0.1: Whoop-Fehlermeldung --- */

.whoop-fehler {
  color: var(--rot);
  background: var(--rot-flaeche);
  border-radius: 8px;
  padding: .5rem .8rem;
  font-size: .88rem;
  max-width: 480px;
}

/* --- V3: Einstellungsseite --- */

.einstellungen-bereich { max-width: 620px; }
.einstellungen-bereich h2 { margin-bottom: .15rem; }
.einstellungen-bereich .leer-text { margin-bottom: .6rem; }
.meta-inline { color: var(--text-2); font-weight: 400; font-size: .9rem; }

.einstellungen-reiter {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 1.1rem;
}
.einstellungen-reiter a {
  padding: .5rem .85rem;
  margin-bottom: -1px;
  color: var(--text-2);
  text-decoration: none;
  font-size: .92rem;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.einstellungen-reiter a:hover { color: var(--text); }
.einstellungen-reiter a.aktiv {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 600;
}

.thema-wahl {
  display: inline-flex;
  border: 1px solid var(--rand);
  border-radius: 8px;
  overflow: hidden;
  margin-top: .3rem;
}
.thema-wahl button {
  padding: .45rem 1rem;
  border: none;
  border-right: 1px solid var(--rand);
  background: var(--karte);
  color: var(--text-2);
  font: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.thema-wahl button:last-child { border-right: none; }
.thema-wahl button:hover { color: var(--text); }
.thema-wahl button.aktiv { background: var(--bg); color: var(--text); font-weight: 600; }

.inkognito-status {
  font-size: .88rem;
  color: var(--text-2);
  margin: .2rem 0 .4rem;
}
.inkognito-status.an { color: var(--lila); }

.schalter-gruppe { margin-top: .3rem; }
.schalter-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rand);
}
.schalter-zeile:last-child { border-bottom: none; }

.schalter { position: relative; display: inline-block; width: 40px; height: 23px; flex-shrink: 0; }
.schalter input { opacity: 0; width: 0; height: 0; }
.schalter .gleis {
  position: absolute;
  inset: 0;
  background: var(--rand-stark);
  border-radius: 999px;
  transition: background .15s;
}
.schalter .gleis::before {
  content: "";
  position: absolute;
  width: 17px; height: 17px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
}
.schalter input:checked + .gleis { background: var(--gruen); }
.schalter input:checked + .gleis::before { transform: translateX(17px); }
.schalter input:focus-visible + .gleis { outline: 2px solid var(--blau); outline-offset: 2px; }

/* --- V3: Modal (Inkognito deaktivieren) --- */

.modal-schleier {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 70;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-schleier.offen { display: flex; animation: einblenden .15s ease-out; }
.modal-fenster {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.modal-fenster input {
  padding: .6rem .8rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--eingabe);
  color: var(--text);
  font: inherit;
}
.modal-fenster input:focus { outline: none; border-color: var(--rand-stark); }
.modal-knoepfe { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .4rem; }

.knopf-sekundaer {
  padding: .6rem 1.1rem;
  border: 1px solid var(--rand-stark);
  border-radius: 8px;
  background: var(--karte);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.knopf-sekundaer:hover { border-color: var(--text-2); }

/* --- Inkognito-Verlassen-Dialog (Politur, im jv-Designsystem) --- */
.inkognito-modal {
  text-align: center;
  gap: .55rem;
  padding: 1.7rem 1.5rem 1.45rem;
  max-width: 340px;
}
.modal-schleier.offen .inkognito-modal { animation: modalRein .2s cubic-bezier(.2, .7, .3, 1); }
.inkognito-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto .4rem;
  background: var(--accent-surface, var(--gruen-flaeche));
  color: var(--accent, var(--gruen));
}
.inkognito-modal h3 { margin: 0; font-size: 1.12rem; font-weight: 600; }
.inkognito-modal .leer-text { margin: 0 0 .35rem; font-size: .9rem; }
.inkognito-modal input { width: 100%; text-align: center; }
.inkognito-modal .login-fehler { text-align: center; }
.inkognito-modal .modal-knoepfe { margin-top: .55rem; }
.inkognito-modal .modal-knoepfe button { flex: 1; justify-content: center; text-align: center; }
@keyframes modalRein {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* --- V3: Tilgungsplan-Tabelle (Track-Tabelle) --- */

.track-link { text-decoration: none; color: inherit; }
.track-link:hover { color: var(--blau); }
.pfeil-klein { font-size: .76rem; font-weight: 600; color: var(--blau); white-space: nowrap; }

.tilgung-halter { overflow-x: auto; margin-top: .8rem; border: 1px solid var(--rand); border-radius: 10px; }
.tilgung-tabelle {
  border-collapse: collapse;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 100%;
}
.tilgung-tabelle th, .tilgung-tabelle td {
  padding: .4rem .65rem;
  text-align: right;
  border-bottom: 1px solid var(--rand);
  border-right: 1px solid var(--rand);
}
.tilgung-tabelle thead th {
  color: var(--text-2);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: var(--karte);
  position: sticky;
  top: 0;
  z-index: 1;
}
.tilgung-tabelle .fortschritt-zeile th {
  text-transform: none;
  color: var(--lila);
  top: 27px;
}
.tilgung-tabelle th.ecke,
.tilgung-tabelle td.schuldner-name,
.tilgung-tabelle tfoot td.ecke {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  background: var(--karte);
  border-right: 1px solid var(--rand-stark);
  min-width: 9rem;
}
.tilgung-tabelle thead th.ecke { z-index: 3; }
.tilgung-tabelle td.schuldner-name { font-weight: 500; }
.tilgung-tabelle td.schuldner-name .prio-nummer { margin-right: .45rem; vertical-align: -3px; }
.tilgung-tabelle .zelle { color: var(--text); }
.tilgung-tabelle .zelle.geplant { color: var(--text-2); }
.tilgung-tabelle .zelle.bezahlt,
.tilgung-tabelle .vorher-spalte {
  background: var(--gruen-flaeche);
  color: var(--gruen);
  font-weight: 600;
}
.tilgung-tabelle tbody tr:hover td:not(.bezahlt):not(.vorher-spalte) { background: var(--bg); }
.tilgung-tabelle tfoot td {
  color: var(--text-2);
  font-weight: 600;
  border-top: 1px solid var(--rand-stark);
}

/* --- V3: Zielebuch (Fortschritt & Reflektion) --- */

.zielebuch-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: .4rem; }
.zielebuch-spalte h3 { margin-bottom: .2rem; }
.zielebuch-liste { display: flex; flex-direction: column; gap: .7rem; }
.zielebuch-eintrag {
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: .6rem .75rem;
}
.zielebuch-eintrag .kunden-zeile { gap: .5rem; align-items: baseline; }
.zielebuch-eintrag .aufgabe-titel { font-weight: 600; }
.zielebuch-eintrag .fortschritt-balken { max-width: none; margin: .5rem 0 .35rem; }
.zielebuch-eintrag .meta { margin: 0; }

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

/* --- V3: Quick-Panel als eigenes Fenster (/panel) --- */

.quick-kopf-knoepfe { display: inline-flex; align-items: center; gap: .5rem; }

body.panel-fenster { padding: 0; }
.panel-fenster-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  background: var(--karte);
  z-index: 2;
}
.panel-fenster-kopf .marke { font-size: 1.05rem; font-weight: 700; padding: 0; }
.panel-fenster-kopf .meta { margin: 0; }
.panel-fenster-inhalt { padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.panel-fenster .quick-inhalt { display: flex; flex-direction: column; gap: .2rem; }
