/* FinanzHub — Net Worth Tracking + Recurring-Detection Styles
   Eigene Datei damit heat.css nicht weiter wächst. */

/* ═════════════════════════════════════════════════════════════
   Net Worth Tracking — Sheet, Hero, Chart, Breakdown, Donut, Insights
   ═════════════════════════════════════════════════════════════ */

.nw-sheet { display: flex; flex-direction: column; gap: 22px; }
.nw-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; flex-wrap: wrap;
}
.nw-eyebrow {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--heat-warm); font-weight: 600; margin-bottom: 6px;
}
.nw-title {
  font-size: 32px; font-weight: 700; letter-spacing: -.02em;
  color: var(--heat-ink); margin: 0;
}
.nw-title em { font-style: normal; color: var(--heat-warm); }
.nw-sub {
  color: var(--heat-ink-mute); font-size: 13.5px;
  margin: 8px 0 0 0; max-width: 520px;
}
.nw-add-btn {
  background: var(--heat-warm); color: #1a0d04; border: 0;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.nw-add-btn:hover { opacity: .9; transform: translateY(-1px); }

.nw-loading {
  padding: 60px 20px; text-align: center;
  color: var(--heat-ink-mute); font-size: 14px;
}

.nw-setup {
  background: var(--heat-bg-card);
  border: 1px solid rgba(249,115,22,.30);
  border-left: 4px solid var(--heat-warm);
  border-radius: 14px; padding: 26px 28px;
}
.nw-setup-eyebrow {
  font-size: 11px; letter-spacing: .12em; color: var(--heat-warm);
  text-transform: uppercase; font-weight: 600; margin-bottom: 8px;
}
.nw-setup-title {
  font-size: 18px; font-weight: 600; color: var(--heat-ink);
  margin: 0 0 8px;
}
.nw-setup-title code {
  background: rgba(255,255,255,.06); padding: 2px 7px;
  border-radius: 5px; font-family: 'JetBrains Mono', monospace; font-size: 14px;
}
.nw-setup-sub { color: var(--heat-ink-soft); font-size: 13.5px; margin: 0 0 14px; }
.nw-setup-steps {
  margin: 0 0 18px; padding-left: 22px;
  color: var(--heat-ink-soft); font-size: 13px; line-height: 1.7;
}
.nw-setup-sql {
  background: #0a0a0d; border: 1px solid var(--heat-line);
  border-radius: 8px; padding: 14px 18px; overflow-x: auto;
  font-size: 12px; line-height: 1.5; color: rgba(250,250,247,.85);
  font-family: 'JetBrains Mono', monospace;
}
.nw-setup-copy {
  margin-top: 14px; background: transparent;
  border: 1px solid var(--heat-line); color: var(--heat-ink);
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.nw-setup-copy:hover { border-color: var(--heat-warm); color: var(--heat-warm); }

.nw-empty {
  background: var(--heat-bg-card); border: 1px solid var(--heat-line);
  border-radius: 14px; padding: 60px 20px; text-align: center;
  color: var(--heat-ink-mute);
}
.nw-empty-glyph { font-size: 42px; margin-bottom: 14px; }
.nw-empty-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text, var(--heat-ink));
  margin-bottom: 10px;
}
.nw-empty-quote {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text-muted, var(--heat-ink-soft));
  max-width: 440px;
  margin: 0 auto 18px;
  letter-spacing: 0.1px;
}
.nw-empty-quote em { font-style: normal; }
.nw-empty-sub { max-width: 440px; margin: 0 auto 22px; line-height: 1.55; font-size: 13.5px; }
.nw-empty-cta { display: inline-flex; }

.nw-hero {
  background: linear-gradient(180deg, rgba(249,115,22,.10) 0%, var(--heat-bg-card) 80%);
  border: 1px solid rgba(249,115,22,.22);
  border-radius: 16px; padding: 26px 30px;
  display: flex; flex-direction: column; gap: 8px;
}
.nw-hero-eyebrow {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--heat-warm); font-weight: 600;
}
.nw-hero-value {
  font-size: 44px; font-weight: 700; letter-spacing: -.02em;
  color: var(--heat-ink); line-height: 1.05; margin: 4px 0;
}
.nw-trend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; align-self: flex-start;
}
.nw-trend.pos { color: #34d399; }
.nw-trend.neg { color: #f87171; }
.nw-trend.muted { color: var(--heat-ink-mute); font-weight: 500; }
.nw-trend-period { color: var(--heat-ink-mute); font-weight: 500; }
.nw-hero-meta { font-size: 12px; color: var(--heat-ink-mute); margin-top: 4px; }

.nw-chart-block {
  background: var(--heat-bg-card); border: 1px solid var(--heat-line);
  border-radius: 14px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  max-width: 960px;
}
.nw-chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
}
.nw-chart-title { font-size: 15px; font-weight: 600; color: var(--heat-ink); }
.nw-chart-sub { font-size: 12px; color: var(--heat-ink-mute); margin-top: 3px; }

.nw-range-seg {
  display: inline-flex; background: rgba(255,255,255,.03);
  border: 1px solid var(--heat-line); border-radius: 999px;
  padding: 3px; gap: 2px;
}
.nw-range-seg button {
  background: transparent; border: 0; color: var(--heat-ink-mute);
  padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s;
}
.nw-range-seg button.is-active {
  background: var(--heat-warm-soft); color: var(--heat-warm);
}

.nw-chart-wrap {
  position: relative; background: rgba(0,0,0,.16);
  border-radius: 10px; padding: 14px;
}
.nw-chart {
  width: 100%; display: block;
  aspect-ratio: 720 / 280; max-height: 320px;
}
.nw-chart-hint {
  text-align: center; padding: 28px 20px;
  color: var(--heat-ink-mute); font-size: 13px;
}
.nw-chart-single {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 8px 20px 14px;
}
.nw-chart-single-svg { width: 100%; max-height: 160px; }
.nw-chart-single-cta {
  text-align: center;
  color: var(--heat-ink-mute, rgba(255,255,255,.6));
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.nw-add-btn-inline {
  margin-top: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}
.nw-add-btn-inline:hover { background: rgba(255, 255, 255, .12); }

/* Snapshot-Verlauf — aufklappbare Tabelle */
.nw-history { margin-top: 22px; }
.nw-history-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--heat-ink-mute, rgba(255,255,255,.55));
  padding: 12px 0;
  user-select: none;
  list-style: none;
}
.nw-history-details summary::-webkit-details-marker { display: none; }
.nw-history-details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform .2s;
}
.nw-history-details[open] summary::before { transform: rotate(90deg); }
.nw-history-details summary:hover { color: rgba(255,255,255,.85); }
.nw-history-table-wrap { overflow-x: auto; margin-top: 10px; }
.nw-history-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.nw-history-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  padding: 8px 10px;
  border-bottom: 0.5px solid rgba(255,255,255,.1);
  font-weight: 600;
}
.nw-history-table th.num { text-align: right; }
.nw-history-table td {
  padding: 8px 10px;
  border-bottom: 0.5px solid rgba(255,255,255,.05);
  color: rgba(255,255,255,.78);
}
.nw-history-table td.num {
  text-align: right;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: "tnum" 1;
}
.nw-history-table td.netto { color: var(--accent); font-weight: 600; }
.nw-history-table td.actions { text-align: right; white-space: nowrap; }
.nw-history-edit, .nw-history-del {
  background: transparent;
  border: 0.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
  transition: background .15s, color .15s, border-color .15s;
}
.nw-history-edit:hover { border-color: var(--accent); color: var(--accent); }
.nw-history-del:hover  { border-color: #f87171; color: #f87171; background: rgba(248,113,113,.06); }

/* „Aus Immo-Rechner übernehmen" Button im Snapshot-Modal */
.nw-immo-suggest {
  background: rgba(249, 115, 22, .10);
  border: 0.5px solid rgba(249, 115, 22, .35);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin: -8px 0 14px;
  font-family: var(--font-ui, system-ui);
  transition: background .15s;
  width: 100%;
  text-align: left;
}
.nw-immo-suggest:hover { background: rgba(249, 115, 22, .18); }
.nw-immo-suggest.is-applied {
  background: rgba(29, 158, 117, .10);
  border-color: rgba(29, 158, 117, .35);
  color: #34d399;
}
.nw-axis-lbl {
  fill: var(--heat-ink-mute); font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.nw-hit { cursor: crosshair; }
.nw-tooltip {
  position: absolute; background: rgba(15, 13, 15, 0.96);
  border: 1px solid var(--heat-line); border-radius: 8px;
  padding: 10px 12px; font-size: 12px; color: var(--heat-ink);
  pointer-events: none; z-index: 10; min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.nw-tooltip strong { display: block; margin-bottom: 4px; }
.nw-tt-row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.nw-tt-row .pos { color: #34d399; }
.nw-tt-sep { height: 1px; background: var(--heat-line); margin: 4px 0; }

.nw-chart-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 11.5px; color: var(--heat-ink-mute); padding-top: 4px;
}
.nw-legend-row { display: inline-flex; align-items: center; gap: 6px; }
.nw-legend-net { color: var(--heat-ink); }
.nw-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.nw-breakdown-block {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 18px; align-items: start;
}
@media (max-width: 900px) {
  .nw-breakdown-block { grid-template-columns: 1fr; }
}
.nw-breakdown-cards {
  /* auto-fill statt auto-fit: leere Tracks bleiben erhalten → die letzte Karte
     (Schulden) streckt sich NICHT über die ganze Restzeile, alle gleich breit. */
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.nw-bd-card {
  background: var(--heat-bg-card); border: 1px solid var(--heat-line);
  border-radius: 12px; padding: 14px 16px;
}
.nw-bd-card.is-debt { border-left: 3px solid #f87171; }
.nw-bd-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 600; margin-bottom: 6px;
}
.nw-bd-value {
  font-size: 22px; font-weight: 700; color: var(--heat-ink); letter-spacing: -.01em;
}
.nw-bd-pct { font-size: 11.5px; color: var(--heat-ink-mute); margin-top: 3px; }

.nw-donut-wrap {
  background: var(--heat-bg-card); border: 1px solid var(--heat-line);
  border-radius: 14px; padding: 18px 20px;
}
.nw-donut-title { font-size: 13px; font-weight: 600; color: var(--heat-ink); margin-bottom: 12px; }
.nw-donut-svg-wrap { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.nw-donut-svg { width: 100%; height: 100%; display: block; }
.nw-donut-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); text-align: center;
}
.nw-donut-total { font-size: 17px; font-weight: 700; color: var(--heat-ink); }
.nw-donut-total-lbl {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--heat-ink-mute); margin-top: 2px;
}
.nw-donut-empty { text-align: center; padding: 30px 0; color: var(--heat-ink-mute); font-size: 12.5px; }
.nw-donut-legend { margin-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.nw-donut-leg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.nw-donut-leg-dot { width: 9px; height: 9px; border-radius: 50%; }
.nw-donut-leg-lbl { flex: 1; color: var(--heat-ink-soft); }
.nw-donut-leg-pct { color: var(--heat-ink-mute); font-weight: 600; }

.nw-insights {
  background: var(--heat-bg-card); border: 1px solid var(--heat-line);
  border-radius: 14px; padding: 18px 22px;
}
.nw-insights-title { font-size: 13px; font-weight: 600; color: var(--heat-ink); margin-bottom: 10px; }
.nw-insights-list { display: flex; flex-direction: column; gap: 8px; }
.nw-insight {
  padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  background: rgba(255,255,255,.025); border-left: 3px solid var(--heat-warm);
  color: var(--heat-ink-soft);
}
.nw-insight strong { color: var(--heat-ink); }
.nw-insight.pos { border-left-color: #34d399; }
.nw-insight.neg { border-left-color: #f87171; }
.nw-insight.warn { border-left-color: var(--accent); background: rgba(251,191,36,.05); }
.nw-insight.horizon { border-left-color: #3b82f6; }

.heat-kpi-delta.cta {
  color: var(--heat-warm); background: var(--heat-warm-soft);
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600;
}

/* ═════════════════════════════════════════════════════════════
   Recurring-Detection — Banner, Card, Modal, Toast
   ═════════════════════════════════════════════════════════════ */

.recurring-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.12) 0%, rgba(124, 58, 237, 0.08) 100%);
  border: 1px solid rgba(91, 141, 239, 0.28);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 12px;
}
.recurring-banner-ico { font-size: 24px; flex-shrink: 0; }
.recurring-banner-body { flex: 1; min-width: 0; }
.recurring-banner-title { font-size: 14px; font-weight: 600; color: var(--heat-ink, #fafaf7); }
.recurring-banner-sub { font-size: 12.5px; color: var(--heat-ink-mute, rgba(250,250,247,.6)); margin-top: 2px; }
.recurring-banner-btn {
  background: #5b8def; color: white; border: 0;
  padding: 8px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.recurring-banner-btn:hover { background: #4570d4; }

.recurring-card {
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.10) 0%, rgba(124, 58, 237, 0.06) 100%);
  border: 1px solid rgba(91, 141, 239, 0.24);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 18px;
}
.recurring-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 12px; flex-wrap: wrap;
}
.recurring-card-eyebrow {
  font-size: 10.5px; letter-spacing: .12em; color: #8ab4ff;
  text-transform: uppercase; font-weight: 600;
}
.recurring-card-title { font-size: 14.5px; font-weight: 600; color: var(--heat-ink, #fafaf7); margin-top: 3px; }
.recurring-card-list { display: flex; flex-direction: column; gap: 6px; }
.recurring-card-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; font-size: 13px;
  color: var(--heat-ink-soft, rgba(250,250,247,.85));
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.recurring-card-item:last-child { border-bottom: 0; }
.recurring-card-amt { color: var(--heat-warm); font-weight: 600; }
.recurring-card-iv { color: var(--heat-ink-mute); font-size: 12.5px; }
.recurring-card-conf {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: rgba(91, 141, 239, .18); color: #8ab4ff;
  padding: 2px 8px; border-radius: 999px;
}
.recurring-card-more {
  font-size: 12px; color: var(--heat-ink-mute);
  padding-top: 8px; font-style: normal;
}

.recurring-modal-intro {
  font-size: 13.5px; color: var(--heat-ink-soft, rgba(250,250,247,.85));
  line-height: 1.55; margin-bottom: 16px; padding: 12px 14px;
  background: rgba(91, 141, 239, .08);
  border-left: 3px solid #5b8def; border-radius: 6px;
}
.recurring-list { display: flex; flex-direction: column; gap: 12px; }
.recurring-item {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 14px 16px; position: relative;
}
.recurring-item-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 6px;
}
.recurring-item-name { font-size: 15px; font-weight: 600; color: var(--heat-ink, #fafaf7); }
.recurring-conf { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.recurring-conf-high { background: rgba(52, 211, 153, .15); color: #34d399; }
.recurring-conf-mid  { background: rgba(251, 191, 36, .15); color: var(--accent); }
.recurring-conf-low  { background: rgba(248, 113, 113, .15); color: #f87171; }
.recurring-item-meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--heat-ink-soft, rgba(250,250,247,.85)); margin-bottom: 4px;
}
.recurring-item-meta-dim { color: var(--heat-ink-mute); font-size: 12px; }
.recurring-item-meta-line {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--heat-ink-mute); margin-bottom: 6px;
}
.recurring-item-orig {
  font-size: 11.5px; color: var(--heat-ink-mute); font-style: normal;
  margin-bottom: 12px; font-family: 'JetBrains Mono', monospace;
}
.recurring-item-actions { display: flex; gap: 8px; }
.recurring-item-ignored {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: var(--heat-ink);
  font-size: 14px; font-weight: 600; border-radius: 10px;
}
.recurring-accept-hint {
  margin-top: 10px; padding: 10px 14px;
  background: rgba(52, 211, 153, .08);
  border-left: 3px solid #34d399; border-radius: 6px;
  font-size: 12.5px; color: var(--heat-ink-soft);
}

.recurring-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  display: flex; align-items: center; gap: 14px;
  background: rgba(15, 13, 15, 0.97);
  border: 1px solid #5b8def; border-radius: 12px;
  padding: 14px 18px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  max-width: 460px;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.recurring-toast.is-visible { transform: translateX(0); }
.recurring-toast-ico { font-size: 26px; flex-shrink: 0; }
.recurring-toast-body { flex: 1; min-width: 0; }
.recurring-toast-title { font-size: 13.5px; color: var(--heat-ink, #fafaf7); }
.recurring-toast-sub { font-size: 11.5px; color: var(--heat-ink-mute, rgba(250,250,247,.6)); margin-top: 3px; }
.recurring-toast-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.recurring-toast-yes, .recurring-toast-no {
  border: 1px solid var(--heat-line, rgba(255,255,255,.1));
  background: transparent; color: var(--heat-ink, #fafaf7);
  padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.recurring-toast-yes { background: #5b8def; border-color: #5b8def; color: white; }
.recurring-toast-yes:hover { background: #4570d4; }
.recurring-toast-no:hover { border-color: var(--heat-warm); color: var(--heat-warm); }

@media (max-width: 600px) {
  .recurring-toast {
    bottom: 80px; right: 12px; left: 12px; max-width: none;
  }
}
