/* FinanzHub — Heat Theme + alle 8 Theme-Varianten
   Layout ist über alle Themes identisch — die internen --heat-* Variablen werden
   aus den globalen Theme-Tokens (--bg / --surface / --text / --accent etc.)
   abgeleitet, damit Trust/Reserve/Sage/Mono (hell) sowie Editorial/Midnight/Neon
   (dunkel) und Heat (cream) automatisch korrekt aussehen. */

/* Default-Fallback (dunkel) — wenn data-theme noch nicht gesetzt ist */
body[class*="theme-"] {
  --heat-bg-base:    var(--bg, #0a0a0d);
  --heat-bg-card:    var(--surface, rgba(20, 18, 22, 0.85));
  --heat-bg-card-hi: var(--surface-alt, rgba(28, 25, 28, 0.92));
  --heat-line:       var(--divider, rgba(255,255,255,0.07));
  --heat-line-hi:    var(--divider, rgba(255,255,255,0.13));
  --heat-ink:        var(--text, #fafaf7);
  --heat-ink-soft:   var(--text-muted, rgba(250,250,247,0.78));
  --heat-ink-mute:   var(--text-muted, rgba(250,250,247,0.5));
  --heat-warm:       var(--accent);
  --heat-warm-soft:  var(--accent-soft, rgba(249, 115, 22, 0.16));
  --heat-warm-glow:  var(--accent-soft, rgba(249, 115, 22, 0.4));
  --heat-pos:        #16A34A;
  --heat-neg:        #DC2626;
}

/* Body-Reset & Layout — Theme-Tokens steuern Hintergrund + Text */
html, body[class*="theme-"] {
  background: var(--bg, #0a0a0d);
  transition: background 220ms ease;
}
body[class*="theme-"] {
  color: var(--heat-ink);
}
/* .stage und #stage-overlay werden vom Anpassen-Panel als Hintergrundebene genutzt —
   nicht mehr global ausblenden. Nur das Editorial-Filmkorn bleibt versteckt. */
body[class*="theme-"] .grain { display: none; }
body[class*="theme-"] .stage {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
body[class*="theme-"] .stage > * { position: absolute; inset: 0; }
body[class*="theme-"] #app-root { position: relative; z-index: 1; }

/* Hide editorial elements when in heat mode */
body[class*="theme-"] .nav,
body[class*="theme-"] .editorial-nav,
body[class*="theme-"] .editorial-mark,
body[class*="theme-"] .sheet-lead,
body[class*="theme-"] .features-section { display: none; }

/* Layout-Container: Sidebar | Main — Hintergrund kommt von .stage (oder body
   wenn kein BG-Layer aktiv ist); #app-root selbst zeigt nur den Akzent-Glow. */
body[class*="theme-"] #app-root {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(60% 50% at 85% 0%, var(--accent-soft, rgba(124, 45, 18, 0.22)) 0%, transparent 60%);
}

/* Default: Mobile-only Elemente unsichtbar */
.mobile-header,
.mobile-bottom-nav,
.mobile-backdrop { display: none; }

/* ───── Tablet (≤1023px): Hamburger + Slide-In-Sidebar ─────
   Sidebar wird zur off-canvas Schublade, Hamburger öffnet sie. */
@media (max-width: 1023px) {
  body[class*="theme-"] #app-root {
    grid-template-columns: 1fr;
    position: relative;
  }
  body[class*="theme-"] .heat-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 200;
    transform: translateX(-100%) !important;
    transition: transform .25s ease;
    box-shadow: 0 10px 50px rgba(0,0,0,.6);
  }
  body[class*="theme-"].is-sidebar-open .heat-sidebar { transform: translateX(0) !important; }

  .mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--heat-bg-card);
    border-bottom: 1px solid var(--heat-line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-hamburger {
    /* 2026-06-01: Hamburger ausgeblendet — Bottom-Nav + "Mehr"-Drawer reichen.
       Drei Nav-Einstiege (Hamburger + Bottom-Nav + Mehr) waren redundant.
       Button bleibt im DOM falls Re-Enable nötig — nur unsichtbar. */
    display: none;
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--heat-line);
    border-radius: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
  }
  .mobile-hamburger span {
    width: 16px;
    height: 1.6px;
    background: var(--heat-ink);
    border-radius: 1px;
  }
  .mobile-header-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .mobile-header-logo {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--heat-warm) 0%, #dc2626 100%);
    color: #fff;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    flex-shrink: 0;
  }
  .mobile-header-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--heat-ink);
    letter-spacing: -.005em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-customize {
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--heat-line);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--heat-ink);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color .15s, color .15s, background .15s;
  }
  .mobile-customize:hover,
  .mobile-customize:active {
    border-color: var(--heat-warm);
    color: var(--heat-warm);
    background: var(--heat-warm-soft);
  }
  .mobile-customize svg { width: 18px; height: 18px; }

  .mobile-backdrop {
    display: none;            /* bulletproof: nie sichtbar außer bei offener Sidebar */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  body.is-sidebar-open .mobile-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body[class*="theme-"] .heat-main {
    padding: 14px 16px 20px;
    max-width: 100%;
  }
}

/* ───── Mobile (≤767px): zusätzlich Bottom-Nav ───── */
@media (max-width: 767px) {
  body[class*="theme-"] .heat-main {
    /* Bottom-Nav (64) + Puffer + Safe-Area. Install-Banner/Anpassen-Chip sind
       transient bzw. dismissbar → kein Dauer-Puffer von 180px nötig (sonst zu
       viel Leer-Scroll am Seitenende). */
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--heat-bg-card);
    border-top: 1px solid var(--heat-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 100;
    padding: 6px 4px;
  }
  .mobile-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: 0;
    color: var(--heat-ink-mute);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 10px;
    transition: color .15s, background .15s;
  }
  .mobile-bnav-item.is-active {
    color: var(--heat-warm);
    background: var(--heat-warm-soft);
  }
  .mobile-bnav-icon {
    width: 22px; height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-bnav-icon svg { width: 100%; height: 100%; }
  .mobile-bnav-label {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: -.005em;
  }

  /* Headlines mobil-tauglich verkleinern */
  body[class*="theme-"] .heat-greeting { font-size: clamp(17px, 4.5vw, 22px); }
  body[class*="theme-"] .prognose-title { font-size: clamp(22px, 6vw, 32px); }

  /* Auf <768px Section-Name kleiner aber sichtbar (User-Request: Logo + Section-Name + Customize) */
  .mobile-header-name {
    font-size: 13px;
    max-width: 130px;
  }

  /* Chat-Bubble über die Bottom-Nav heben.
     Floating Customize-Trigger wird auf Mobile versteckt (es gibt jetzt einen Header-Button). */
  #chat-root .chat-bubble {
    bottom: 80px !important;
  }
  .tweaks-trigger {
    display: none !important;
  }
}

/* ───── Mehr-Drawer (Bottom-Sheet) ───── */
.mobile-drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: auto;
}
.mobile-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: rgba(15, 13, 15, 0.98);
  border-top: 1px solid var(--heat-line);
  border-radius: 18px 18px 0 0;
  padding: 18px 20px 28px;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  pointer-events: auto;
  overflow-y: auto;
}
.mobile-drawer-wrap.is-visible .mobile-drawer { transform: translateY(0); }
.mobile-drawer-wrap.is-visible .mobile-drawer-backdrop { opacity: 1; }
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.mobile-drawer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--heat-ink);
}
.mobile-drawer-close {
  width: 32px; height: 32px;
  background: transparent;
  color: var(--heat-ink-mute);
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mobile-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-drawer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--heat-line);
  border-radius: 10px;
  color: var(--heat-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.mobile-drawer-item:hover,
.mobile-drawer-item:active {
  background: var(--heat-warm-soft);
  border-color: rgba(249, 115, 22, 0.25);
}
.mobile-drawer-item-arrow {
  color: var(--heat-warm);
  font-size: 16px;
}

/* ───── Sidebar ───── */
.heat-sidebar {
  background: var(--surface, rgba(15, 13, 15, 0.85));
  border-right: 1px solid var(--divider, var(--heat-line));
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  gap: 22px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 220ms ease, border-color 220ms ease;
}

.heat-side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.heat-side-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent, var(--heat-warm));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-contrast, #fff);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.heat-side-logo-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, var(--heat-ink));
  letter-spacing: -.01em;
}

.heat-side-search {
  background: var(--surface-alt, rgba(255,255,255,0.03));
  border: 1px solid var(--divider, var(--heat-line));
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-muted, var(--heat-ink-mute));
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.heat-side-search svg { width: 14px; height: 14px; flex-shrink: 0; }

.heat-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heat-side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-muted, var(--heat-ink-mute));
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.heat-side-nav-item:hover {
  color: var(--text, var(--heat-ink));
  background: var(--surface-alt, rgba(255,255,255,0.04));
}
.heat-side-nav-item.is-active {
  color: var(--text, var(--heat-ink));
  background: var(--accent-soft, var(--heat-warm-soft));
  border-color: transparent;
  font-weight: 600;
  padding-left: 16px;
}
.heat-side-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--accent, var(--heat-warm));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-soft, var(--heat-warm-soft));
}
.heat-side-nav-item.is-active svg {
  color: var(--accent, var(--heat-warm));
}
.heat-side-nav-item { position: relative; }
.heat-side-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.heat-side-divider {
  height: 1px;
  background: var(--heat-line);
  margin: 4px 0;
}

/* ── Rechner: aufklappbare Gruppe in der Sidebar (statt eigener Hub-Seite) ── */
.heat-side-group-btn {
  width: 100%;
  background: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.heat-side-chev {
  margin-left: auto;
  width: 15px !important;
  height: 15px !important;
  opacity: .55;
  transition: transform .22s ease;
}
.heat-side-group-btn.is-expanded .heat-side-chev { transform: rotate(180deg); opacity: .8; }
/* Gruppen-Header dezent halten — die Hervorhebung trägt das aktive Sub-Item. */
.heat-side-group-btn.is-active {
  background: transparent;
  padding-left: 12px;
  color: var(--text, var(--heat-ink));
}
.heat-side-group-btn.is-active::before { display: none; }

.heat-side-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0 0 0 21px;
  padding-left: 9px;
  border-left: 1px solid var(--heat-line);
  transition: max-height .28s cubic-bezier(.32,.72,0,1), opacity .2s ease, margin-top .2s ease;
}
.heat-side-subnav.is-open {
  max-height: 420px;
  opacity: 1;
  margin-top: 3px;
  margin-bottom: 2px;
}
.heat-side-subnav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-muted, var(--heat-ink-mute));
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.heat-side-subnav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .85; }
.heat-side-subnav-item:hover {
  color: var(--text, var(--heat-ink));
  background: var(--surface-alt, rgba(255,255,255,0.04));
}
.heat-side-subnav-item.is-active {
  color: var(--text, var(--heat-ink));
  background: var(--accent-soft, var(--heat-warm-soft));
  font-weight: 600;
}
.heat-side-subnav-item.is-active svg { color: var(--accent, var(--heat-warm)); opacity: 1; }

/* Custom-Selects in Heat-Theme — orange Akzent statt brass */
body[class*="theme-"] .fh-cselect-btn:hover,
body[class*="theme-"] .fh-cselect-btn:focus-visible,
body[class*="theme-"] .fh-cselect.is-open .fh-cselect-btn {
  border-color: var(--heat-warm);
  background: var(--heat-warm-soft);
  box-shadow: 0 0 0 3px var(--heat-warm-soft);
}
body[class*="theme-"] .fh-cselect-chev { color: var(--heat-warm); }
body[class*="theme-"] .fh-cselect-opt:hover {
  background: var(--heat-warm-soft);
  color: var(--heat-ink);
}
body[class*="theme-"] .fh-cselect-opt.is-selected {
  background: rgba(249, 115, 22, 0.18);
  color: var(--heat-ink);
}

.heat-side-goal-card {
  margin-top: auto;
  padding: 14px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14) 0%, rgba(220, 38, 38, 0.10) 100%);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.heat-side-goal-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--heat-warm);
  font-weight: 600;
}
.heat-side-goal-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--heat-ink);
}
.heat-side-goal-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.heat-side-goal-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.heat-side-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--heat-warm) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width .6s;
}
.heat-side-goal-meta {
  font-size: 11px;
  color: var(--heat-ink-mute);
  display: flex;
  justify-content: space-between;
}
.heat-side-goal-cta {
  margin-top: 4px;
  background: var(--heat-warm);
  color: #15140e;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ───── Main ───── */
.heat-main {
  padding: 24px 32px 72px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  /* 2026-06-19 (revidiert): User will die App wieder breit — volle Breite
     statt zentrierter 1180px-Spalte. Cap nur als Schutz auf Ultrawide. */
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
}

@media (max-width: 600px) {
  .heat-main { padding: 16px 16px 32px; gap: 14px; }
}

/* Header */
.heat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.heat-greeting {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--heat-ink);
  margin: 0;
}
.heat-greeting em {
  color: var(--heat-warm);
  font-style: normal;
}
.heat-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Platz für den floating Anpassen-Pill oben rechts */
  margin-right: 160px;
}
@media (max-width: 768px) {
  .heat-header-right { margin-right: 0; }
}
.heat-header-search {
  position: relative;
  width: 240px;
}
.heat-header-search input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--heat-line);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  color: var(--heat-ink);
  font-size: 12.5px;
  outline: none;
}
.heat-header-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--heat-ink-mute);
}
.heat-header-date {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--heat-line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--heat-ink-soft);
}
.heat-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--heat-warm) 0%, #dc2626 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* KPI Row: 60/40 split — Hero NetWorth links, 3 gestapelt rechts */
.heat-kpi-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
  align-items: stretch;
}
.heat-kpi-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.heat-kpi-stack .heat-kpi {
  padding: 14px 16px 12px;
}
@media (max-width: 980px) {
  .heat-kpi-row { grid-template-columns: 1fr; }
  .heat-kpi-stack { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .heat-kpi-stack { grid-template-columns: 1fr; }
}

/* Hero-Card: NetWorth */
.heat-kpi-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 30px;
  background: var(--surface, var(--heat-bg-card));
  border: 1px solid var(--divider, var(--heat-line));
  border-radius: 18px;
  text-decoration: none;
  color: var(--text, var(--heat-ink));
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  min-height: 180px;
}
.heat-kpi-hero:hover {
  border-color: var(--accent, var(--heat-warm));
  transform: translateY(-1px);
}
.heat-kpi-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%; height: 100%;
  background: radial-gradient(circle at 100% 0%, var(--accent-soft, var(--heat-warm-soft)) 0%, transparent 70%);
  pointer-events: none;
}
.heat-kpi-hero-value {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(44px, 5.5vw, 72px);
  letter-spacing: -2.5px;
  line-height: 1;
  color: var(--text, var(--heat-ink));
  margin: 18px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  position: relative;
  z-index: 1;
}
.heat-kpi-hero-cur {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.48em;
  letter-spacing: -1px;
  opacity: 0.7;
}
.heat-kpi-hero-delta {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.heat-kpi-hero-delta.pos { color: var(--heat-pos, #16A34A); }
.heat-kpi-hero-delta.neg { color: var(--heat-neg, #DC2626); }
.heat-kpi-hero-sub {
  color: var(--text-muted, var(--heat-ink-mute));
  font-weight: 400;
  font-size: 12px;
}

.heat-kpi {
  padding: 18px 18px 14px;
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.heat-kpi[data-dash-goto] { cursor: pointer; }
.heat-kpi[data-dash-goto]:hover {
  border-color: var(--heat-warm, rgba(232,105,10,.5));
  transform: translateY(-1px);
}

/* Begrüßungs-Warn-Hinweis (Sparquote negativ) */
.heat-greeting em.warn {
  color: #ef9f27;
  font-style: normal;
}

/* Cashflow „kein Einkommen" Banner */
.heat-cashflow-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 12px;
  border-radius: 10px;
  background: var(--heat-bg-2, rgba(255, 255, 255, .04));
  border: 1px solid var(--heat-line, rgba(255, 255, 255, .12));
  border-left: 3px solid var(--heat-ink-mute, rgba(255, 255, 255, .4));
  font-size: 13px;
  color: rgba(255,255,255,.78);
}
.heat-cashflow-warning strong { color: var(--heat-ink, #fff); font-weight: 600; }
.heat-cashflow-warning-link {
  margin-left: auto;
  color: var(--heat-ink-soft, rgba(255, 255, 255, .65));
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
}
.heat-cashflow-warning-link:hover { text-decoration: underline; }
.heat-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, var(--heat-warm-soft) 0%, transparent 70%);
  pointer-events: none;
}
.heat-kpi-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--heat-ink-mute);
  display: flex;
  align-items: center;
  gap: 6px;
}
.heat-kpi-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--heat-warm);
  border-radius: 50%;
}
.heat-kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--heat-ink);
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.heat-kpi-delta {
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.heat-kpi-delta.pos { color: var(--heat-pos); }
.heat-kpi-delta.neg { color: var(--heat-neg); }
.heat-kpi-sparkline {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 70px;
  height: 30px;
  opacity: .7;
  pointer-events: none;
}

/* 2 Charts Row */
.heat-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 980px) {
  .heat-charts { grid-template-columns: 1fr; }
}
.heat-panel {
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 14px;
  padding: 18px 20px 16px;
  min-width: 0;
}

/* Klickbare Panels (data-dash-goto) — Cursor + sanfter Hover-Hint */
.heat-kpi[data-dash-goto],
.heat-panel[data-dash-goto] {
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.heat-kpi[data-dash-goto]:hover,
.heat-panel[data-dash-goto]:hover {
  border-color: rgba(249, 115, 22, 0.32);
  background: var(--heat-bg-card-hi);
}
.heat-panel[data-dash-goto]:hover .heat-panel-title::after {
  content: ' →';
  color: var(--heat-warm);
  font-weight: 600;
  margin-left: 4px;
  opacity: .75;
}
.heat-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.heat-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heat-ink);
}
/* Unified pill tabs — track + transparent pill, active = accent-soft bg + accent text */
.heat-panel-tabs {
  display: inline-flex;
  background: var(--surface-alt, rgba(255,255,255,0.04));
  border: 1px solid var(--divider, var(--heat-line));
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.heat-panel-tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, var(--heat-ink-mute));
  font-family: 'Inter', inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.heat-panel-tabs button:hover { color: var(--text); }
.heat-panel-tabs button.is-active {
  background: var(--accent-soft, var(--heat-warm-soft));
  color: var(--accent, var(--heat-warm));
  border-color: var(--accent-soft);
  font-weight: 600;
}

/* Bar-Chart (Ausgaben) */
.heat-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 6px;
  height: 200px;
  padding: 8px 0 18px;
  position: relative;
}
.heat-bar {
  background: linear-gradient(180deg, var(--heat-warm) 0%, #b91c1c 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: opacity .2s;
}
.heat-bar:hover { opacity: .75; }
.heat-bar-lbl {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  color: var(--heat-ink-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Line-Chart (Cashflow) */
.heat-line-chart {
  width: 100%;
  height: 200px;
}

/* ============================================================
   Budget-Tabs (Budget / Transaktionen / Abos)
   Sichtbar auf allen 3 Seiten — gemeinsamer Hub.
   ============================================================ */
body[class*="theme-"] .bt-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: var(--surface-alt, rgba(255,255,255,0.04));
  border: 1px solid var(--divider, var(--heat-line));
  border-radius: 999px;
  align-self: flex-start;
}
body[class*="theme-"] .bt-tab {
  font-family: 'Inter', var(--font-ui, inherit);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted, var(--heat-ink-mute));
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
body[class*="theme-"] .bt-tab:hover {
  color: var(--text, var(--heat-ink-soft));
}
body[class*="theme-"] .bt-tab.is-active {
  background: var(--accent-soft, var(--heat-warm-soft));
  color: var(--accent, var(--heat-warm));
  border-color: var(--accent-soft);
  font-weight: 600;
}

@media (max-width: 720px) {
  body[class*="theme-"] .bt-tabs {
    width: 100%;
    justify-content: space-between;
  }
  body[class*="theme-"] .bt-tab {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 12.5px;
  }
}

/* ============================================================
   Budget-Charts (Donut / 6-Monats-Trend / Budget vs. Ausgaben)
   ============================================================ */
.heat-bc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 980px) {
  .heat-bc-grid { grid-template-columns: 1fr; }
}

.heat-bc-card { min-width: 0; }

.heat-bc-donut-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}
@media (max-width: 520px) {
  .heat-bc-donut-row { grid-template-columns: 1fr; justify-items: center; }
}

.heat-bc-donut-wrap { width: 180px; flex-shrink: 0; }
.heat-bc-donut { width: 100%; height: auto; display: block; }
.heat-bc-donut-val {
  fill: var(--heat-ink);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.heat-bc-donut-lbl {
  fill: var(--heat-ink-mute);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heat-bc-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.heat-bc-legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.heat-bc-legend-dot {
  width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0;
}
.heat-bc-legend-name {
  color: var(--heat-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-bc-legend-val {
  color: var(--heat-ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.heat-bc-legend-pct {
  color: var(--heat-ink-mute);
  font-weight: 400;
}

.heat-bc-line {
  width: 100%;
  height: 180px;
  display: block;
}
.heat-bc-axis {
  fill: var(--heat-ink-mute);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.heat-bc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 12px;
  text-align: center;
  min-height: 140px;
}
.heat-bc-empty-glyph { font-size: 26px; opacity: 0.7; }
.heat-bc-empty-text {
  font-size: 12.5px;
  color: var(--heat-ink-mute);
  max-width: 280px;
  line-height: 1.45;
}
.heat-bc-empty-text a { color: var(--heat-warm); text-decoration: none; }
.heat-bc-empty-text a:hover { text-decoration: underline; }

/* Budget vs. Ausgaben */
.heat-bc-bv-panel { margin-top: 14px; }
.heat-bc-bv-legend {
  display: flex;
  gap: 14px;
}
.heat-bc-bv-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--heat-ink-mute);
}
.heat-bc-bv-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.heat-bc-bv-swatch-budget { background: rgba(255,255,255,0.18); }
.heat-bc-bv-swatch-spent { background: var(--heat-warm); }

.heat-bc-bv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.heat-bc-bv-row { display: flex; flex-direction: column; gap: 6px; }
.heat-bc-bv-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.heat-bc-bv-dot {
  width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0;
}
.heat-bc-bv-name {
  color: var(--heat-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-bc-bv-vals {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--heat-ink-mute);
  display: inline-flex;
  gap: 4px;
}
.heat-bc-bv-spent { color: var(--heat-ink); font-weight: 600; }
.heat-bc-bv-spent.is-over { color: #ef4444; }
.heat-bc-bv-sep { color: var(--heat-ink-mute); }

.heat-bc-bv-track {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}
.heat-bc-bv-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}
.heat-bc-bv-bar-budget {
  background: rgba(255,255,255,0.14);
}
.heat-bc-bv-bar-spent {
  height: 100%;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

/* ───── Prognose-Screen ───── */
.prognose-sheet {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.prognose-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.prognose-eyebrow {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--heat-warm);
  font-weight: 600;
  margin-bottom: 6px;
}
.prognose-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--heat-ink);
  margin: 0;
}
.prognose-title em {
  font-style: normal;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--heat-warm);
}
.prognose-sub {
  font-size: 13px;
  color: var(--heat-ink-mute);
  margin: 8px 0 0;
  max-width: 540px;
  line-height: 1.55;
}
.prognose-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--heat-ink-soft);
}
.prognose-legend-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prognose-legend-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.prognose-loading,
.prognose-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--heat-ink-mute);
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 14px;
}
.prognose-empty-glyph { font-size: 38px; margin-bottom: 14px; }
.prognose-empty-title { font-size: 16px; font-weight: 600; color: var(--heat-ink); margin-bottom: 6px; }
.prognose-empty-sub { max-width: 420px; margin: 0 auto; line-height: 1.55; }

/* Header-rechte Spalte: Zeitraum-Toggle + Legende untereinander */
.prognose-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.prognose-horizon-toggle {
  display: flex;
  gap: 4px;
}
.prognose-horizon-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  border: 0.5px solid rgba(255,255,255,.15);
  background: transparent;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-ui, system-ui);
}
.prognose-horizon-btn:hover {
  border-color: rgba(255,255,255,.3);
  color: rgba(255,255,255,.8);
}
.prognose-horizon-btn.is-active {
  background: rgba(232,105,10,.14);
  border-color: rgba(232,105,10,.45);
  color: var(--heat-warm);
}

/* Chart-„Kein Einkommen" Warnbanner */
.prognose-chart-warn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 12px;
  border-radius: 10px;
  background: var(--heat-bg-2, rgba(255, 255, 255, .04));
  border: 1px solid var(--heat-line, rgba(255, 255, 255, .12));
  border-left: 3px solid var(--heat-ink-mute, rgba(255, 255, 255, .4));
  font-size: 13px;
  color: rgba(255,255,255,.78);
}
.prognose-chart-warn strong { color: var(--heat-ink, #fff); font-weight: 600; }
.prognose-chart-warn-link {
  margin-left: auto;
  color: var(--heat-ink-soft, rgba(255, 255, 255, .65));
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
}
.prognose-chart-warn-link:hover { text-decoration: underline; }

.prognose-chart-wrap {
  position: relative;
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 14px;
  padding: 20px;
  /* Auf breiten Screens nicht über volle Breite strecken — sonst werden die Linien
     flachgezogen und sehen "gestreckt" aus. 960px gibt das natürliche viewBox-Verhältnis
     von 720:280 (≈2.57:1) wieder. */
  max-width: 960px;
}
.forecast-chart {
  width: 100%;
  display: block;
  /* Festes Aspect-Ratio statt height:auto + preserveAspectRatio=none, damit Chart-Linien
     auf jeder Viewport-Breite die gleiche Steigung haben. */
  aspect-ratio: 720 / 280;
  max-height: 320px;
}
.forecast-axis-lbl {
  fill: var(--heat-ink-mute);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.forecast-hit { cursor: crosshair; }

.prognose-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 13, 15, 0.96);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--heat-ink);
  min-width: 200px;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.prognose-tooltip strong { display: block; margin-bottom: 6px; color: var(--heat-warm); font-size: 12px; }
.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  font-variant-numeric: tabular-nums;
}
.tooltip-row span:first-child { color: var(--heat-ink-mute); }
.tooltip-row-sep { border-top: 1px solid rgba(255,255,255,.08); margin-top: 4px; padding-top: 5px; }
.tooltip-row .pos { color: #34d399; }
.tooltip-row .neg { color: #f87171; }

.prognose-insights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prognose-insight {
  padding: 12px 16px;
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--heat-ink-soft);
  line-height: 1.5;
}
.prognose-insight.warn {
  background: rgba(248,113,113,.10);
  border-color: rgba(248,113,113,.30);
  color: #fca5a5;
}
.prognose-insight.tip {
  background: rgba(52,211,153,.08);
  border-color: rgba(52,211,153,.25);
}
.prognose-insight strong { color: var(--heat-ink); font-weight: 600; }
.prognose-insight.warn strong { color: #fca5a5; }

.prognose-simulator {
  background: var(--heat-bg-card);
  border: 1px solid var(--heat-line);
  border-radius: 14px;
  padding: 22px 24px;
}
.prognose-sim-head {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.prognose-sim-reset {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--heat-line);
  color: var(--heat-ink-soft);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.prognose-sim-reset:hover {
  background: var(--heat-warm-soft);
  color: var(--heat-warm);
}
.prognose-sim-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(251,191,36,.10);
  border: 1px solid rgba(251,191,36,.28);
  border-radius: 8px;
  font-size: 12px;
  color: var(--accent);
}

/* Toggle C deaktiviert + Warning-Banner für fehlendes Einkommen */
.prognose-sim-card.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255,255,255,.01);
}
.prognose-sim-card.is-disabled .prognose-sim-input {
  cursor: not-allowed;
  pointer-events: none;
}
.prognose-sim-warn {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(249,115,22,.10);
  border: 1px solid rgba(249,115,22,.32);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prognose-sim-warn-ico { font-size: 16px; line-height: 1; }
.prognose-sim-warn-text {
  flex: 1; min-width: 200px;
  font-size: 13px;
  color: rgba(250,250,247,.88);
  line-height: 1.45;
}
.prognose-sim-warn-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(249,115,22,.4);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.prognose-sim-warn-link:hover {
  background: var(--accent);
  color: #1a0d04;
}
/* Smooth Chart-Pfad-Animation (greift wenn Browser dasharray transitionen kann) */
.forecast-chart path { transition: d .35s ease; }
.prognose-sim-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--heat-ink);
}
.prognose-sim-sub {
  font-size: 12px;
  color: var(--heat-ink-mute);
  margin-top: 3px;
}
.prognose-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.prognose-sim-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--heat-line);
  border-radius: 10px;
}
.prognose-sim-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--heat-ink-mute);
  font-weight: 600;
}
.prognose-sim-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.prognose-sim-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--heat-line);
  color: var(--heat-ink);
  font-family: inherit;
  font-size: 14px;
  padding: 6px 0;
  width: 100%;
  outline: none;
}
.prognose-sim-input:focus { border-bottom-color: var(--heat-warm); }
.prognose-sim-unit {
  color: var(--heat-ink-mute);
  font-size: 12px;
  margin-left: 6px;
}
.prognose-sim-delta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--heat-ink-soft);
  font-variant-numeric: tabular-nums;
}
.prognose-sim-delta strong.pos { color: #34d399; }
.prognose-sim-delta strong.neg { color: #f87171; }

/* Empty-State für Charts (Ausgaben-Bars + Cashflow-Linie) */
.heat-chart-empty {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.heat-chart-empty-glyph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--heat-warm-soft);
  color: var(--heat-warm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.heat-chart-empty-text {
  font-size: 12.5px;
  color: var(--heat-ink-mute);
  max-width: 380px;
  line-height: 1.55;
}
.heat-chart-empty-text a {
  color: var(--heat-warm);
  text-decoration: none;
  font-weight: 500;
}
.heat-chart-empty-text a:hover { text-decoration: underline; }

/* 3-Spalten-Bottom */
.heat-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 14px;
}
@media (max-width: 1100px) {
  .heat-bottom-row { grid-template-columns: 1fr 1fr; }
  .heat-bottom-row > :nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .heat-bottom-row { grid-template-columns: 1fr; }
}

/* 2-Spalten-Bottom (Top Kat. + Letzte Tx) — Sparziele ist jetzt eigener Block */
.heat-bottom-row-two {
  grid-template-columns: 1fr 1.4fr;
}
@media (max-width: 900px) {
  .heat-bottom-row-two { grid-template-columns: 1fr; }
}

/* ───── Sparziele · eigener Block ───── */
.heat-panel-sub {
  font-size: 12px;
  color: var(--heat-ink-mute);
  margin-top: 4px;
  letter-spacing: -.003em;
}
.heat-goals-panel { padding: 20px 22px 22px; }

.heat-goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .heat-goals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .heat-goals-grid { grid-template-columns: 1fr; } }

.heat-goal-card {
  padding: 14px 14px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--heat-line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.heat-goal-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(249, 115, 22, 0.25);
}
.heat-goal-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.heat-goal-card-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--heat-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-goal-card-amount {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--heat-ink);
  font-variant-numeric: tabular-nums;
}
.heat-goal-card-amount span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--heat-ink-mute);
}
.heat-goal-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}
.heat-goal-card-eta {
  color: var(--heat-ink-mute);
}

/* Empty-State im Sparziele-Block */
.heat-goals-empty {
  padding: 32px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.heat-goals-empty-glyph {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--heat-warm-soft);
  color: var(--heat-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.heat-goals-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--heat-ink);
}
.heat-goals-empty-sub {
  font-size: 12.5px;
  color: var(--heat-ink-mute);
  max-width: 360px;
  line-height: 1.5;
}
.heat-goals-empty-cta {
  margin-top: 8px;
  background: var(--heat-warm);
  color: #15140e;
  border: 0;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.heat-goals-empty-cta:hover { opacity: .92; }

/* ───── Top-Insight Panel ───── */
.heat-topinsight-panel {
  background: var(--heat-bg-card);
  border-color: var(--heat-line);
  border-left: 3px solid var(--heat-ink-mute, rgba(255, 255, 255, .4));
  cursor: pointer;
}
.heat-topinsight-panel:hover {
  border-color: var(--heat-line-hi, rgba(255, 255, 255, .22));
}
.heat-topinsight-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.heat-topinsight-text { flex: 1; min-width: 280px; }
.heat-topinsight-eyebrow {
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--heat-ink-mute, rgba(255, 255, 255, .5));
  font-weight: 600;
  margin-bottom: 6px;
}
.heat-topinsight-body {
  font-size: 14px;
  color: var(--heat-ink);
  line-height: 1.5;
}
.heat-topinsight-body strong { color: var(--heat-ink, #fff); font-weight: 600; }
.heat-topinsight-spark {
  width: 200px;
  height: 50px;
  flex-shrink: 0;
}

/* ───── Dashboard-Footer ───── */
.heat-dash-footer {
  margin-top: 8px;
  padding: 22px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--heat-line);
  flex-wrap: wrap;
}
.heat-dash-footer-text {
  font-size: 12px;
  color: var(--heat-ink-mute);
  line-height: 1.55;
  max-width: 640px;
}
.heat-dash-footer-text strong {
  color: var(--heat-ink-soft);
  font-weight: 600;
}
.heat-dash-footer-tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--heat-warm);
  font-weight: 600;
  white-space: nowrap;
}

/* Sparziele-Card im Bottom */
.heat-goals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.heat-goal-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.heat-goal-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--heat-warm-soft);
  color: var(--heat-warm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.heat-goal-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.heat-goal-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--heat-ink);
}
.heat-goal-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.heat-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--heat-warm) 0%, var(--accent) 100%);
  border-radius: 2px;
}
.heat-goal-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--heat-warm);
  font-variant-numeric: tabular-nums;
}

/* Top-Kategorien */
.heat-cats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.heat-cat-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}
.heat-cat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.heat-cat-name { font-size: 13px; color: var(--heat-ink-soft); }
.heat-cat-amt {
  font-size: 13px;
  font-weight: 600;
  color: var(--heat-ink);
  font-variant-numeric: tabular-nums;
}

/* Letzte Transaktionen */
.heat-tx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* 2-Spalten-Grid wenn auf voller Breite (Dashboard-Hauptpanel) */
.heat-tx-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
@media (max-width: 768px) {
  .heat-tx-list-grid { grid-template-columns: 1fr; }
}
.heat-tx-panel { margin-bottom: 20px; }

/* 3-Spalten-Grid für Top-Kategorien-Volle-Breite */
.heat-cats-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 24px;
}
@media (max-width: 980px) {
  .heat-cats-list-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .heat-cats-list-grid { grid-template-columns: 1fr; }
}
.heat-tx-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 8px 4px;
  align-items: center;
  border-radius: 8px;
  transition: background .15s;
}
.heat-tx-item:hover {
  background: rgba(255,255,255,0.03);
}
.heat-tx-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--heat-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.heat-tx-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.heat-tx-name {
  font-size: 13px;
  color: var(--heat-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-tx-date {
  font-size: 11px;
  color: var(--heat-ink-mute);
}
.heat-tx-amt {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--heat-ink);
  text-align: right;
}
.heat-tx-amt.neg { color: var(--heat-neg); }
.heat-tx-amt.pos { color: var(--heat-pos); }

/* Empty-State innerhalb der Panels */
.heat-empty {
  padding: 18px 0;
  color: var(--heat-ink-mute);
  font-size: 12px;
  text-align: center;
  font-style: normal;
}

/* Extra-Bottom-Row für Notgroschen + Konten + Bald-fällig */
.heat-bottom-row-extra {
  margin-top: 0;
}

/* Notgroschen */
.heat-notgroschen {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.heat-notgroschen-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}
.heat-notgroschen-num span {
  font-size: 16px;
  color: var(--heat-ink-mute);
  margin-left: 4px;
  font-weight: 500;
}
.heat-notgroschen-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.heat-notgroschen-bar span {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.06);
}
.heat-notgroschen-bar span.is-on { background: var(--c, var(--heat-warm)); }
.heat-notgroschen-state {
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
}
.heat-notgroschen-foot {
  font-size: 11px;
  color: var(--heat-ink-mute);
  margin-top: 4px;
}

/* Konten */
.heat-konten-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.heat-konto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--heat-line);
  gap: 12px;
}
.heat-konto-item:last-child { border-bottom: 0; }
.heat-konto-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.heat-konto-name {
  font-size: 13px;
  color: var(--heat-ink);
  font-weight: 500;
}
.heat-konto-bank {
  font-size: 11px;
  color: var(--heat-ink-mute);
}
.heat-konto-bal {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--heat-ink);
}

.heat-upcoming-item.is-sub:hover {
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
}
.heat-upcoming-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* Bald fällig */
.heat-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.heat-upcoming-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  padding: 6px 0;
  align-items: center;
  border-bottom: 1px solid var(--heat-line);
}
.heat-upcoming-item:last-child { border-bottom: 0; }
.heat-upcoming-date {
  font-size: 11px;
  color: var(--heat-warm);
  font-weight: 600;
  letter-spacing: .02em;
}
.heat-upcoming-name {
  font-size: 13px;
  color: var(--heat-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-upcoming-amt {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ======================================================================
   === Dashboard 2026-05 Rebuild ========================================
   Top-Bar + 2-Spalten-Grid + NetWorth-Hero + 4-Up Accounts + TX-Card +
   Spending-Side + Goals-Side. Strikt Token-only — funktioniert in allen
   8 Themes (trust/reserve/editorial/heat/sage/midnight/neon/mono).
   ====================================================================== */

/* TopBar */
.dash-topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
  padding:18px 0 22px;
  margin-bottom:6px;
}
.dash-brand{ display:flex; align-items:center; gap:12px; }
.dash-brand-mark{
  width:40px; height:40px;
  display:grid; place-items:center;
  background:var(--accent);
  color:var(--bg, #fff);
  border-radius:calc(var(--radius, 14px) * 0.6);
  font-family:var(--font-head, 'Syne', 'Helvetica Neue', sans-serif);
  font-weight:800; font-size:18px; line-height:1;
  letter-spacing:-0.5px;
  box-shadow:0 6px 22px var(--accent-soft, rgba(0,0,0,0.18));
}
.dash-brand-text{ display:flex; flex-direction:column; gap:2px; }
.dash-brand-name{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:20px; letter-spacing:-0.3px;
  color:var(--text);
  line-height:1.1;
}
.dash-brand-name em{
  font-family: var(--font-disp, 'Inter', sans-serif);
  font-style:normal; font-weight:400; letter-spacing:0;
  margin-left:2px;
}
.dash-brand-sub{
  font-size:12px; color:var(--text-muted);
  font-weight:500;
}
.dash-actions{ display:flex; align-items:center; gap:10px; }
.dash-iconbtn{
  width:36px; height:36px; padding:0;
  display:grid; place-items:center;
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--divider);
  border-radius:999px;
  cursor:pointer;
  transition:all 160ms ease;
}
.dash-iconbtn:hover{ background:var(--surface-alt); border-color:var(--accent-soft); }
.dash-anpassen-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 16px;
  background:var(--accent);
  color:var(--bg, #fff);
  border:none;
  border-radius:999px;
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:600; font-size:13px; letter-spacing:0.3px;
  cursor:pointer;
  box-shadow:0 6px 24px var(--accent-soft, rgba(0,0,0,0.2));
  transition:box-shadow 160ms ease, transform 160ms ease;
}
.dash-anpassen-pill:hover{ box-shadow:0 8px 32px var(--accent-soft, rgba(0,0,0,0.3)); transform:translateY(-1px); }
.dash-anpassen-dot{
  width:8px; height:8px; border-radius:999px;
  background:var(--bg, #fff);
  opacity:0.9;
}
.dash-avatar{
  width:36px; height:36px;
  display:grid; place-items:center;
  background:var(--surface-alt);
  color:var(--text);
  border-radius:999px;
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:13px;
  border:1px solid var(--divider);
}

/* 2-Spalten-Grid */
.dash-grid{
  display:grid;
  grid-template-columns:1fr 400px;
  gap:20px;
  align-items:flex-start;
  margin-bottom:20px;
}
.dash-main{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.dash-side{ display:flex; flex-direction:column; gap:16px; }

/* === NetWorth Hero === */
.networth-card{
  background:var(--surface);
  border:1px solid var(--divider);
  border-radius:calc(var(--radius, 14px) * 1.2);
  padding:36px 36px 28px;
  display:flex; flex-direction:column; gap:24px;
  text-decoration:none; color:inherit;
  cursor:pointer;
  transition:border-color 200ms ease, transform 200ms ease;
}
.networth-card:hover{ border-color:var(--accent-soft); }
.networth-head{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:16px; flex-wrap:wrap;
}
.networth-left{ display:flex; flex-direction:column; gap:8px; min-width:0; }
.networth-eyebrow{
  font-size:12px;
  letter-spacing:1.8px;
  text-transform:uppercase;
  color:var(--text-muted);
  font-weight:600;
}
.networth-num{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:800;
  font-size:clamp(48px, 6vw, 72px);
  letter-spacing:-2.8px;
  line-height:1;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  margin-top:8px;
}
.networth-delta-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.networth-delta-pill{
  display:inline-flex; align-items:center; gap:5px;
  padding:7px 14px;
  background:var(--surface-alt);
  border-radius:999px;
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:600; font-size:14px;
  font-variant-numeric:tabular-nums;
}
.networth-delta-pill.pos{ color:var(--heat-pos, #16A34A); }
.networth-delta-pill.neg{ color:var(--heat-neg, #DC2626); }
.networth-delta-sub{ font-size:13px; color:var(--text-muted); }

.networth-range{
  display:inline-flex; align-items:center; gap:2px;
  padding:4px;
  background:var(--surface-alt);
  border-radius:999px;
}
.networth-range button{
  padding:8px 14px;
  background:transparent;
  border:none;
  border-radius:999px;
  font-family:var(--font-body, 'Inter', sans-serif);
  font-weight:600; font-size:13px;
  color:var(--text-muted);
  cursor:pointer;
  transition:all 160ms ease;
}
.networth-range button:hover{ color:var(--text); }
.networth-range button.is-active{
  background:var(--surface);
  color:var(--text);
  box-shadow:0 1px 3px rgba(0,0,0,0.08);
}

.networth-spark{ width:100%; }
.networth-spark-svg{ display:block; width:100%; height:150px; }

/* === Account-Grid === */
.account-grid{
  display:grid;
  /* auto-fit statt fixe 4 Spalten: bei 2 Karten (1 Konto + Add-Tile) füllen sie
     die Breite statt 50% leer zu lassen; bei 4 Konten weiterhin 4 nebeneinander. */
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:20px;
}
.account-card{
  display:flex; flex-direction:column; gap:8px;
  padding:22px;
  background:var(--surface);
  border:1px solid var(--divider);
  border-radius:var(--radius, 14px);
  text-decoration:none; color:inherit;
  cursor:pointer;
  transition:border-color 200ms ease, transform 200ms ease;
  min-width:0;
}
.account-card:hover{ border-color:var(--accent-soft); transform:translateY(-1px); }
.account-kind{
  font-size:11px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:700;
}
.account-name{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:17px;
  color:var(--text);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.account-sub{
  font-size:12px;
  color:var(--text-muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  min-height:14px;
}
.account-value{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:800; font-size:24px;
  letter-spacing:-0.7px;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  margin-top:6px;
}
.account-delta{
  font-size:12px; font-weight:600;
  font-variant-numeric:tabular-nums;
}
.account-delta.pos{ color:var(--heat-pos, #16A34A); }
.account-delta.neg{ color:var(--heat-neg, #DC2626); }
.account-delta.is-zero{ color:var(--text-muted); }

.account-card.is-empty{
  display:grid; place-items:center;
  gap:6px;
  border-style:dashed;
  background:transparent;
  color:var(--text-muted);
  min-height:120px;
}
.account-card.is-empty:hover{ background:var(--surface-alt); color:var(--text); }
.account-empty-mark{
  width:36px; height:36px;
  display:grid; place-items:center;
  border-radius:999px;
  background:var(--surface-alt);
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:20px; line-height:1;
}
.account-empty-lbl{
  font-size:12px;
  font-weight:500;
}

/* === Card-Head (geteilt für tx-card, spending-card, goals-card-v2) === */
.tx-card, .spending-card, .goals-card-v2{
  background:var(--surface);
  border:1px solid var(--divider);
  border-radius:calc(var(--radius, 14px) * 1.1);
  padding:28px;
  display:flex; flex-direction:column; gap:18px;
}
.card-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}
.card-title{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:18px;
  color:var(--text);
}
.card-sub{
  font-size:12px; color:var(--text-muted);
  margin-top:3px;
}
.card-total{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:16px;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
.card-link{
  font-size:13px; font-weight:600;
  color:var(--accent);
  text-decoration:none;
  transition:opacity 160ms ease;
}
.card-link:hover{ opacity:0.7; }
.card-empty{
  padding:18px 0;
  font-size:13px;
  color:var(--text-muted);
  text-align:left;
  line-height:1.5;
}
.card-empty a{ color:var(--accent); text-decoration:none; font-weight:600; }
.card-empty a:hover{ text-decoration:underline; }

/* === Transactions === */
.tx-list{ display:flex; flex-direction:column; }
.tx-row{
  display:grid;
  grid-template-columns:44px 1fr auto;
  gap:14px; align-items:center;
  padding:14px 0;
  border-bottom:1px solid var(--divider);
}
.tx-row:last-child{ border-bottom:none; }
.tx-icon{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:calc(var(--radius, 14px) * 0.5);
  font-size:16px;
}
.tx-icon svg{ width:16px; height:16px; }
.tx-meta{ min-width:0; }
.tx-name{
  font-size:15px; font-weight:500;
  color:var(--text);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.tx-sub{
  font-size:12px; color:var(--text-muted);
  margin-top:3px;
}
.tx-amt{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:700; font-size:16px;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.tx-amt.pos{ color:var(--heat-pos, #16A34A); }

/* === Spending-Card (Sidebar) === */
.spending-row{ display:flex; flex-direction:column; gap:8px; }
.spending-row + .spending-row{ margin-top:12px; }
.spending-row-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:8px;
}
.spending-row-name{
  display:inline-flex; align-items:center; gap:10px;
  font-size:14px; color:var(--text);
}
.spending-row-dot{
  width:10px; height:10px;
  border-radius:999px;
  flex-shrink:0;
}
.spending-row-val{
  font-family:var(--font-head, 'Syne', sans-serif);
  font-weight:600; font-size:13px;
  color:var(--text-muted);
  font-variant-numeric:tabular-nums;
}
.spending-bar{
  height:8px;
  background:var(--surface-alt);
  border-radius:4px;
  overflow:hidden;
}
.spending-bar-fill{
  display:block;
  height:100%;
  background:var(--accent);
  border-radius:4px;
  transition:width 250ms ease;
}

/* === Goals-Card-v2 (Sidebar) === */
.goal-row-v2{ display:flex; flex-direction:column; gap:6px; cursor:pointer; }
.goal-row-v2 + .goal-row-v2{ padding-top:12px; border-top:1px solid var(--divider); }
.goal-row-of{
  color:var(--text-muted);
  font-weight:500;
}

/* === Extras-KPI (3 Reihe Sparrate/Sparquote/Fixkosten) === */
.dash-extras-kpi{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin-bottom:24px;
}
.dash-extras-kpi .heat-kpi{
  background:var(--surface);
  border:1px solid var(--divider);
  border-radius:var(--radius, 14px);
}

/* === Responsive === */
@media (max-width: 1199px){
  .account-grid{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width: 1023px){
  .dash-grid{ grid-template-columns:1fr; }
  .dash-side{ order:2; }
  .networth-head{ flex-direction:column; align-items:stretch; gap:14px; }
  .networth-range{ align-self:flex-start; }
  .dash-extras-kpi{ grid-template-columns:1fr; }
}
@media (max-width: 767px){
  .dash-topbar{ flex-wrap:wrap; gap:12px; }
  .dash-actions{ width:100%; justify-content:flex-end; }
  .account-grid{ grid-template-columns:repeat(2, 1fr); gap:12px; }
  .networth-card{ padding:22px 20px 18px; }
  .networth-num{ font-size:clamp(34px, 8vw, 44px); letter-spacing:-1.4px; }
  .tx-card, .spending-card, .goals-card-v2{ padding:18px; }
}
.heat-upcoming-amt.pos { color: var(--heat-pos); }
.heat-upcoming-amt.neg { color: var(--heat-neg); }
.heat-upcoming-amt.dim { color: var(--heat-ink-mute); }

/* Insights */
.heat-insights-panel { padding-bottom: 14px; }
.heat-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.heat-insights-list li {
  font-size: 13px;
  color: var(--heat-ink-soft);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.heat-insights-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--heat-warm);
  border-radius: 50%;
}

/* ── Non-Dashboard-Routes in Heat-Mode ──
   Wenn andere Screens (Budget, Subscriptions, …) in den heat-main-host
   gerendert werden, ihre <section class="sheet"> braucht volle Breite. */
body[class*="theme-"] .heat-main-host > .sheet {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  /* .sheet ist display:grid (editorial.css) → die implizite Spalte wuchs auf
     max-content (= breiteste Inhalte) statt auf die Container-Breite → horizontaler
     Überlauf auf Mobile (Abos-Tab abgeschnitten, „halbe Seite weg"). minmax(0,1fr)
     erlaubt der Spalte zu schrumpfen; min-width:0 bricht die min-content-Sperre. */
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
body[class*="theme-"] .heat-main-host > .sheet > * { min-width: 0; }
body[class*="theme-"] .heat-main-host .sheet-body {
  padding: 24px 32px 48px;
  background: transparent;
  /* Sheet-Lead ist versteckt — bg-main soll volle Breite haben statt
     in der schmalen ersten Spalte zu landen */
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding-top: 0;
}
body[class*="theme-"] .heat-main-host .bg-main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  body[class*="theme-"] .heat-main-host .sheet-body { padding: 18px 16px 32px; }
}

/* Editorial-Nav + Menu-Grid innerhalb sheets versteckt halten */
body[class*="theme-"] .sheet > .nav,
body[class*="theme-"] .sheet > .menu,
body[class*="theme-"] .sheet > nav.menu,
body[class*="theme-"] nav.menu,
body[class*="theme-"] .heat-main-host > .nav,
body[class*="theme-"] .heat-main-host .nav,
body[class*="theme-"] .heat-main-host nav.menu,
body[class*="theme-"] header.nav { display: none !important; }

/* "Alles im Hub" / BEREICHE-Section + landing-tools überall verstecken */
body[class*="theme-"] .features-section,
body[class*="theme-"] section.features-section,
body[class*="theme-"] .landing-tools,
body[class*="theme-"] section.landing-tools { display: none !important; }

/* ============================================================
   Cashflow Bar-Chart (Dashboard, unter Letzte Transaktionen)
   ============================================================ */
.cashflow-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 18px 20px 14px;
  margin-top: 16px;
}
.cashflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.cashflow-title {
  font: 700 16px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  letter-spacing: -0.005em;
}
.cashflow-sub {
  font: 500 12.5px/1.3 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
  margin-top: 2px;
}
.cashflow-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cashflow-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11.5px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.65);
}
.cashflow-legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.cashflow-svg {
  display: block;
  width: 100%;
  height: auto;
}
.cashflow-netto.is-pos { fill: #1D9E75; }
.cashflow-netto.is-neg { fill: #F87171; }
.cashflow-empty {
  padding: 28px 16px;
  text-align: center;
  font: 500 13.5px/1.5 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
}

/* ============================================================
   Kommende Zahlungen Card (Sidebar, unter KI-Tipp)
   ============================================================ */
.kz-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 16px 18px;
}
.kz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.kz-title {
  font: 700 14.5px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  letter-spacing: -0.005em;
}
.kz-sub {
  font: 500 11.5px/1.3 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  margin-top: 2px;
}
.kz-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kz-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  transition: background .12s;
}
.kz-row:hover { background: rgba(255,255,255,.05); }
.kz-row.is-today {
  background: rgba(232,105,10,.08);
  border: 1px solid rgba(232,105,10,.24);
  padding: 7px 9px;
}
.kz-row.is-tomorrow {
  background: rgba(232,194,10,.06);
  border: 1px solid rgba(232,194,10,.20);
  padding: 7px 9px;
}
.kz-glyph {
  font-size: 15px;
  text-align: center;
}
.kz-name {
  font: 500 13px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kz-date {
  font: 500 11px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  white-space: nowrap;
}
.kz-date.is-today    { color: var(--accent); font-weight: 700; }
.kz-date.is-tomorrow { color: #E8C20A; font-weight: 700; }
.kz-date.is-soon     { color: rgba(250,250,247,.75); }
.kz-amt {
  font: 700 13px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  white-space: nowrap;
}
.kz-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.kz-foot-lbl {
  font: 500 11.5px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
}
.kz-foot-val {
  font: 700 14px/1.2 Manrope, Inter, sans-serif;
  color: var(--accent);
}
.kz-empty {
  padding: 12px;
  text-align: center;
  font: 500 12.5px/1.4 Manrope, Inter, sans-serif;
  color: #1D9E75;
}

/* ── Monats-Fortschritt-Karte (ersetzt 4× Konto-anlegen-Placeholder) ── */
.month-progress-card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 22px 26px;
  display: flex; flex-direction: column; gap: 18px;
}
.month-progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
}
.month-progress-title {
  font: 600 17px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.92);
  letter-spacing: -0.01em;
}
.month-progress-daysleft {
  font: 600 12px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.55);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.month-progress-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.month-progress-stat {
  display: flex; flex-direction: column; gap: 4px;
}
.month-progress-stat-lbl {
  font: 500 11px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.5);
  text-transform: uppercase; letter-spacing: .06em;
}
.month-progress-stat-val {
  font: 700 22px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.95);
  letter-spacing: -0.01em;
}
.month-progress-bars {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 4px;
}
.month-progress-bar-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
}
.month-progress-bar-track {
  height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.month-progress-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width 480ms cubic-bezier(.22,.61,.36,1);
}
.month-progress-bar-fill.is-neutral { background: rgba(255,255,255,.32); }
.month-progress-bar-fill.is-ok      { background: #1D9E75; }
.month-progress-bar-fill.is-warn    { background: var(--accent); }
.month-progress-bar-fill.is-danger  { background: #F87171; }
.month-progress-bar-lbl {
  font: 500 12px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.7);
  white-space: nowrap;
}
.month-progress-bar-lbl strong {
  color: rgba(250,250,247,.95); font-weight: 700;
}
.month-progress-cta {
  display: inline-flex; align-self: flex-start;
  font: 600 13px/1.2 Manrope, Inter, sans-serif;
  color: var(--accent, #FFFFFF);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
}
.month-progress-cta:hover {
  background: rgba(255,255,255,.04);
}
@media (max-width: 720px) {
  .month-progress-stats { grid-template-columns: 1fr; gap: 12px; }
}

/* ── KI-Tipp Karte (rechte Sidebar unter Sparziele) ── */
.ki-tipp-card {
  background: linear-gradient(180deg, rgba(255,165,80,.08), rgba(255,255,255,.012));
  border: 1px solid rgba(255,165,80,.18);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  overflow: hidden;
}
.ki-tipp-card::before {
  content: '';
  position: absolute; inset: -1px; border-radius: 16px;
  background: radial-gradient(circle at top right, rgba(255,140,40,.18), transparent 60%);
  pointer-events: none;
}
.ki-tipp-head {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.ki-tipp-title {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 13px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.92);
  letter-spacing: -0.005em;
}
.ki-tipp-icon { font-size: 16px; }
.ki-tipp-meta { display: inline-flex; gap: 6px; align-items: center; }
.ki-tipp-badge {
  font: 700 9px/1 Manrope, Inter, sans-serif;
  letter-spacing: .14em;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink, #fff);
  padding: 4px 7px; border-radius: 4px;
}
.ki-tipp-offline {
  font: 600 9px/1 Manrope, Inter, sans-serif;
  letter-spacing: .12em;
  color: rgba(250,250,247,.55);
  border: 1px solid rgba(255,255,255,.12);
  padding: 4px 7px; border-radius: 4px;
}
.ki-tipp-body {
  font: 500 13px/1.5 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.85);
  font-style: normal;
  position: relative; z-index: 1;
  min-height: 40px;
}
.ki-tipp-body.is-loading {
  color: rgba(250,250,247,.45);
  font-style: normal;
}
.ki-tipp-body.is-loading::before {
  content: '✦'; display: inline-block;
  margin-right: 6px;
  animation: ki-tipp-spin 1.4s linear infinite;
}
@keyframes ki-tipp-spin { to { transform: rotate(360deg); } }
.ki-tipp-reload {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1.2 Manrope, Inter, sans-serif;
  color: rgba(250,250,247,.7);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  position: relative; z-index: 1;
}
.ki-tipp-reload:hover {
  background: rgba(255,255,255,.08);
  color: rgba(250,250,247,.95);
  border-color: rgba(255,165,80,.4);
}
.ki-tipp-reload-icon {
  display: inline-block; font-size: 13px; font-weight: 700;
  transition: transform .35s;
}
.ki-tipp-reload:hover .ki-tipp-reload-icon { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════════
   Einheitliches Empty-State-System (js/empty-state.js → emptyState())
   Icon + genau EIN Satz + genau EINE primäre Aktion. Pro Screen max. EINS.
   ═══════════════════════════════════════════════════════════════ */
.fh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 40px 24px;
  min-height: 160px;
}
.fh-empty--compact {
  padding: 24px 16px;
  gap: 9px;
  min-height: 0;
}
.fh-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  color: var(--accent);
  background: var(--accent-soft, rgba(190,106,56,.12));
}
.fh-empty--compact .fh-empty-icon { width: 44px; height: 44px; border-radius: 12px; }
.fh-empty-text {
  margin: 0;
  max-width: 34ch;
  font: 500 14px/1.5 Manrope, Inter, sans-serif;
  color: var(--heat-ink-soft, #999);
}
.fh-empty--compact .fh-empty-text { font-size: 13px; }
.fh-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  font: 700 14px/1 Manrope, Inter, sans-serif;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, transform .12s ease;
}
.fh-empty-action:hover { background: var(--accent-deep); transform: translateY(-1px); }
.fh-empty-action:active { transform: translateY(0) scale(.97); }
.fh-empty-action svg { display: block; }

/* Geführter Onboarding-Block (Dashboard, wenn die ganze App leer ist) */
.fh-onboard-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 520px;
  margin: 4vh auto 0;
  padding: 0 20px 40px;
}
.fh-onboard-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent-soft, rgba(190,106,56,.12));
}
.fh-onboard-title {
  margin: 0;
  font: 600 1.7rem/1.1 'Bricolage Grotesque', Manrope, sans-serif;
  letter-spacing: -0.02em;
  color: var(--heat-ink, #fff);
}
.fh-onboard-sub {
  margin: 0;
  font: 500 15px/1.6 Manrope, Inter, sans-serif;
  color: var(--heat-ink-soft, #999);
}
.fh-onboard-cta {
  margin-top: 4px;
  font-size: 15px;
  padding: 13px 24px;
}
.fh-onboard-cta svg { display: block; }
.fh-onboard-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  counter-reset: onb;
}
.fh-onboard-steps li {
  counter-increment: onb;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--heat-line, rgba(255,255,255,.08));
  border-radius: 12px;
  background: var(--heat-bg-card, #181818);
  font: 600 14px/1 Manrope, Inter, sans-serif;
  color: var(--heat-ink, #fff);
  text-align: left;
}
.fh-onboard-steps li::before {
  content: counter(onb);
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-ink, #fff);
  font: 700 12px/1 Manrope, sans-serif;
}
.fh-onboard-step-ico {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); margin-left: auto;
}

/* ── Start-Tutorial-Launcher (unten im leeren Dashboard) ── */
.fh-tut-launch {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--heat-line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent-soft, rgba(232,101,14,.12)), transparent);
  margin-top: 8px;
}
.fh-tut-launch-mark {
  flex: none;
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: var(--accent-soft, rgba(232,101,14,.12));
  color: var(--accent);
}
.fh-tut-launch-body { min-width: 0; flex: 1; }
.fh-tut-launch-eyebrow {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 4px;
}
.fh-tut-launch-title {
  margin: 0 0 4px; font-size: 1.25rem; font-weight: 600; color: var(--heat-ink);
}
.fh-tut-launch-sub {
  margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--heat-ink-soft);
  max-width: 52ch;
}
.fh-tut-steps {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; counter-reset: tut;
}
.fh-tut-steps li {
  counter-increment: tut;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--heat-line);
  border-radius: 999px;
  background: var(--heat-bg-card);
  font-size: 12.5px; font-weight: 600; color: var(--heat-ink);
}
.fh-tut-steps li::before {
  content: counter(tut);
  flex: none; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-ink, #fff);
  font: 700 11px/1 Manrope, sans-serif;
}
.fh-tut-step-ico { display: inline-flex; color: var(--accent); }
.fh-tut-launch-cta { font-size: 14px; }
@media (max-width: 600px) {
  .fh-tut-launch { flex-direction: column; gap: 12px; padding: 18px 16px; }
}

/* Eigene-Kategorie-Inline-Form im Tutorial */
.fh-tut-newcat { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.fh-tut-newcat .fh-onb-input { flex: 1; }
.fh-tut-addcat { border-style: dashed; }
