/* ═══════════════════════════════════════════════════════════════════════════
   POLISH-LAYER für /app — nur visuelle Aufräumung
   Wirkt NACH _design.css / _app.css / _dashboard.css
   Keine Struktur-Änderung, keine Logik-Anpassung
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Globale Grundtokens (subtle refinements) ───────────────────────────── */
:root {
  --p-bg:           #F7F8FA;
  --p-surface:      #FFFFFF;
  --p-surface-2:    #F4F5F7;
  --p-border:       #E5E7EB;
  --p-border-soft:  #EEF0F3;
  --p-text:         #111827;
  --p-text-soft:    #374151;
  --p-muted:        #6B7280;
  --p-muted-2:      #9CA3AF;
  --p-accent:       #163047;
  --p-accent-2:     #1F4566;
  --p-accent-soft:  #EAF0F4;
  --p-success:      #047857;
  --p-success-soft: #ECFDF5;
  --p-warn:         #B45309;
  --p-warn-soft:    #FEF3C7;
  --p-danger:       #B91C1C;
  --p-danger-soft:  #FEE2E2;
  --p-shadow-sm:    0 1px 2px rgba(17,24,39,0.04);
  --p-shadow:       0 1px 3px rgba(17,24,39,0.06), 0 1px 2px rgba(17,24,39,0.04);
  --p-shadow-lg:    0 10px 25px -5px rgba(17,24,39,0.10), 0 4px 6px -2px rgba(17,24,39,0.05);
  --p-radius:       10px;
  --p-radius-lg:    14px;
}

/* Body-Background dezenter */
body.app-body { background: var(--p-bg); }

/* ── App-Header (Top-Bar) ───────────────────────────────────────────────── */
body.app-body .app-header {
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.app-body .app-nav { padding: 14px 0; }
body.app-body .brand-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--p-text);
}
body.app-body .brand-text .brand-dot { color: var(--p-accent); }
body.app-body .app-user { gap: 12px; }
body.app-body .app-user-email {
  font-size: 13px;
  color: var(--p-muted);
}
body.app-body .app-user-link {
  font-size: 13px;
  color: var(--p-text-soft);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color .12s;
}
body.app-body .app-user-link:hover { background: var(--p-surface-2); color: var(--p-text); }
body.app-body .tier-pill {
  background: var(--p-accent-soft);
  color: var(--p-accent);
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
body.app-body .app-user-logout {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--p-border);
  background: var(--p-surface);
  color: var(--p-text-soft);
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
body.app-body .app-user-logout:hover { background: var(--p-surface-2); border-color: var(--p-muted-2); color: var(--p-text); }

/* ── Main-Container ─────────────────────────────────────────────────────── */
body.app-body .app-main { padding: 32px 0 80px; }
body.app-body .container { width: min(1180px, 92%); }

/* ── Welcome-Section ────────────────────────────────────────────────────── */
body.app-body .welcome { margin: 0 0 28px; }
body.app-body .welcome-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin: 0 0 6px;
}
body.app-body .welcome-h {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--p-text);
  margin: 0 0 6px;
}
body.app-body .welcome-sub {
  font-size: 14px;
  color: var(--p-muted);
  line-height: 1.55;
  margin: 0 0 10px;
  max-width: 60ch;
}
body.app-body .welcome-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--p-accent-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color .12s;
}
body.app-body .welcome-help-link:hover { background: var(--p-accent-soft); color: var(--p-accent); }

/* ── Upload-Hero (große Action-Card) ────────────────────────────────────── */
body.app-body .upload-zone { margin: 0 0 28px; }
body.app-body .upload-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 22px 26px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  color: var(--p-text);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
body.app-body .upload-hero:hover {
  border-color: var(--p-accent);
  box-shadow: var(--p-shadow);
  transform: translateY(-1px);
}
body.app-body .upload-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.app-body .upload-hero-text { flex: 1; min-width: 0; }
body.app-body .upload-hero strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 3px;
}
body.app-body .upload-hero small {
  display: block;
  font-size: 13px;
  color: var(--p-muted);
  font-weight: 400;
}

/* ── Summary-Grid (Stats-Cards) ─────────────────────────────────────────── */
body.app-body .summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}
body.app-body .summary-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s;
}
body.app-body .summary-card:hover { border-color: var(--p-border-soft); }
body.app-body .summary-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin: 0;
}
body.app-body .summary-num {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--p-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 0;
}
body.app-body .summary-sub {
  font-size: 12.5px;
  color: var(--p-muted);
  margin: 0;
}

/* ── Plan-Strip / Tasks-Inbox ───────────────────────────────────────────── */
body.app-body .plan-strip,
body.app-body .tasks-inbox { margin: 0 0 24px; }
body.app-body .plan-strip-card,
body.app-body .task-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-sm);
  padding: 18px 22px;
}

/* ── Claims-Section ─────────────────────────────────────────────────────── */
body.app-body .claims-section { margin: 0 0 32px; }
body.app-body .claims-section-h,
body.app-body .claims-section h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--p-text);
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.app-body #claimsCount {
  background: var(--p-accent-soft);
  color: var(--p-accent);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Filter-Tabs (.cf-tabs) — bleibt in Logik exakt gleich, nur Style */
body.app-body .cf-tabs {
  display: flex;
  gap: 4px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 4px;
  margin-bottom: 16px;
  width: fit-content;
}
body.app-body .cf-tab {
  background: transparent;
  border: 0;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--p-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .12s, color .12s;
  font-family: inherit;
}
body.app-body .cf-tab:hover { color: var(--p-text); }
body.app-body .cf-tab.is-active {
  background: var(--p-accent);
  color: #fff;
  font-weight: 600;
}

/* Claim-Cards */
body.app-body .claim-card {
  background: var(--p-surface) !important;
  border: 1px solid var(--p-border) !important;
  border-radius: var(--p-radius-lg) !important;
  box-shadow: var(--p-shadow-sm) !important;
  padding: 18px 22px !important;
  margin-bottom: 10px !important;
  transition: border-color .12s, box-shadow .12s;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
}
body.app-body .claim-card:hover {
  border-color: var(--p-muted-2) !important;
  box-shadow: var(--p-shadow) !important;
}
body.app-body .claim-creditor {
  font-size: 15px;
  font-weight: 600;
  color: var(--p-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.app-body .claim-meta {
  font-size: 12.5px;
  color: var(--p-muted);
  margin-top: 2px;
}
body.app-body .claim-purpose {
  font-size: 13px;
  color: var(--p-text-soft);
  margin-top: 4px;
  line-height: 1.5;
}
body.app-body .claim-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--p-text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
body.app-body .claim-due {
  font-size: 11.5px;
  color: var(--p-muted);
  margin-top: 2px;
  text-align: right;
}

/* Claim-Pills einheitlich */
body.app-body .claim-type-pill,
body.app-body .claim-status-pill {
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  letter-spacing: 0.02em;
  background: var(--p-surface-2) !important;
  color: var(--p-muted) !important;
  border: 1px solid var(--p-border-soft) !important;
  white-space: nowrap;
}
body.app-body .claim-type-pill.is-escalation,
body.app-body .claim-type-pill.is-enforcement,
body.app-body .claim-status-pill.is-status-rejected {
  background: var(--p-danger-soft) !important;
  color: var(--p-danger) !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}
body.app-body .claim-type-pill.is-partial {
  background: var(--p-warn-soft) !important;
  color: var(--p-warn) !important;
  border-color: transparent !important;
}

/* Claim-Action-Buttons */
body.app-body .claim-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
body.app-body .claim-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: var(--p-surface);
  color: var(--p-text-soft);
  border: 1px solid var(--p-border);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
  font-family: inherit;
}
body.app-body .claim-action:hover { background: var(--p-surface-2); border-color: var(--p-muted-2); color: var(--p-text); }
body.app-body .claim-action.is-primary {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
  font-weight: 600;
}
body.app-body .claim-action.is-primary:hover { background: var(--p-accent-2); border-color: var(--p-accent-2); }
body.app-body .claim-action.is-danger {
  color: var(--p-danger);
  border-color: var(--p-danger-soft);
}
body.app-body .claim-action.is-danger:hover { background: var(--p-danger-soft); }
body.app-body .claim-action-badge {
  background: var(--p-accent-soft) !important;
  color: var(--p-accent) !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  margin-left: 2px;
}

/* ── Help-Card ──────────────────────────────────────────────────────────── */
body.app-body .help-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-sm);
  padding: 24px 26px;
  margin: 32px 0 0;
}
body.app-body .help-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--p-text);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
body.app-body .help-card details {
  border-top: 1px solid var(--p-border-soft);
  padding: 12px 0;
}
body.app-body .help-card details:first-of-type { border-top: 0; padding-top: 0; }
body.app-body .help-card summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text);
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
}
body.app-body .help-card summary::-webkit-details-marker { display: none; }
body.app-body .help-card details[open] summary { color: var(--p-accent); }
body.app-body .help-card details p {
  font-size: 13.5px;
  color: var(--p-text-soft);
  line-height: 1.6;
  margin: 8px 0 0;
}
body.app-body .help-step-num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
}

/* ── Modale ─────────────────────────────────────────────────────────────── */
body.app-body .modal-card {
  border-radius: var(--p-radius-lg) !important;
  box-shadow: var(--p-shadow-lg) !important;
  border: 1px solid var(--p-border-soft) !important;
}
body.app-body .modal-h {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--p-text) !important;
  letter-spacing: -0.01em;
}
body.app-body .modal-sub {
  font-size: 13.5px !important;
  color: var(--p-muted) !important;
  line-height: 1.55;
}
body.app-body .modal-close {
  color: var(--p-muted) !important;
  font-size: 18px !important;
}
body.app-body .modal-close:hover { color: var(--p-text) !important; }

/* Detail-Modal Headlines */
body.app-body .detail-h4 {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--p-muted) !important;
  margin: 24px 0 12px !important;
}
body.app-body .detail-head h3 {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--p-text) !important;
  margin-bottom: 4px !important;
}
body.app-body .detail-sub { font-size: 13px !important; color: var(--p-muted) !important; }

/* Buttons (universell innerhalb von app) */
body.app-body .btn,
body.app-body .btn-primary,
body.app-body .btn-secondary,
body.app-body .btn-accent {
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 9px 16px !important;
  transition: background-color .12s, border-color .12s, transform .12s;
}
body.app-body .btn-primary:hover,
body.app-body .btn-accent:hover { transform: translateY(-1px); }
body.app-body .btn-mini {
  padding: 6px 11px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

/* Inputs harmonisieren */
body.app-body input[type="text"],
body.app-body input[type="email"],
body.app-body input[type="number"],
body.app-body input[type="search"],
body.app-body input[type="date"],
body.app-body input[type="tel"],
body.app-body input[type="password"],
body.app-body textarea,
body.app-body select {
  border-radius: 8px !important;
  border-color: var(--p-border) !important;
  padding: 9px 12px !important;
  font-size: 13.5px !important;
  background: var(--p-surface) !important;
  color: var(--p-text) !important;
  transition: border-color .12s, box-shadow .12s;
}
body.app-body input:focus,
body.app-body textarea:focus,
body.app-body select:focus {
  border-color: var(--p-accent) !important;
  box-shadow: 0 0 0 3px var(--p-accent-soft) !important;
  outline: 0 !important;
}
body.app-body label {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--p-text-soft) !important;
  margin-bottom: 4px;
}

/* Letters-Liste */
body.app-body .letter-row {
  background: var(--p-surface) !important;
  border: 1px solid var(--p-border) !important;
  border-radius: var(--p-radius) !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
}
body.app-body .letter-row-kind {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--p-text) !important;
}
body.app-body .letter-row-meta {
  font-size: 12px !important;
  color: var(--p-muted) !important;
}

/* Chat-FAB */
body.app-body #chatFab {
  box-shadow: var(--p-shadow-lg) !important;
  border-radius: 14px !important;
}

/* Empty-States */
body.app-body .claims-empty,
body.app-body .claims-empty-state {
  background: var(--p-surface);
  border: 1px dashed var(--p-border);
  border-radius: var(--p-radius-lg);
  padding: 40px 24px;
  text-align: center;
  color: var(--p-muted);
}
body.app-body .claims-empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--p-text);
  margin: 12px 0 6px;
}
body.app-body .claims-empty-state p {
  font-size: 13.5px;
  color: var(--p-muted);
  line-height: 1.55;
  max-width: 44ch;
  margin: 0 auto 18px;
}
body.app-body .cest-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA-Section am Ende */
body.app-body .cta-section { margin: 40px 0 0; }
body.app-body .cta-box {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-sm);
  padding: 28px 32px;
}

/* Mobile-Tuning */
@media (max-width: 720px) {
  body.app-body .app-main { padding: 20px 0 60px; }
  body.app-body .welcome-h { font-size: 22px; }
  body.app-body .upload-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  body.app-body .upload-hero-icon { width: 44px; height: 44px; border-radius: 11px; }
  body.app-body .claim-card { grid-template-columns: 1fr; padding: 14px 16px !important; }
  body.app-body .claim-actions { width: 100%; justify-content: flex-end; }
  body.app-body .cf-tabs { width: 100%; overflow-x: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÜBERSICHTLICHKEITS-PASS: gezielte Hierarchie-Fixes
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page-Container: bessere Atmung ────────────────────────────────────── */
body.app-body .app-main { padding: 24px 0 80px; }

/* ── 1. CLAIM-CARDS: klare 3-Zonen-Hierarchie ────────────────────────────
   Zone A: Name + Pills (untereinander)
   Zone B: Betrag + Datum (rechts)
   Zone C: Actions (rechts daneben)
*/
body.app-body .claim-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 24px !important;
  align-items: center !important;
  padding: 16px 22px !important;
}

/* Creditor-Name oben, Pills DARUNTER (statt inline) */
body.app-body .claim-creditor {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--p-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
  margin-bottom: 6px;
}
/* Pills bekommen mehr Atemraum */
body.app-body .claim-creditor .claim-type-pill,
body.app-body .claim-creditor .claim-status-pill {
  font-size: 10.5px !important;
  padding: 2px 8px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  background: var(--p-surface-2) !important;
  color: var(--p-muted) !important;
  border: 0 !important;
  white-space: nowrap;
}
body.app-body .claim-creditor .claim-type-pill.is-sent {
  background: var(--p-success-soft) !important;
  color: var(--p-success) !important;
  font-weight: 600 !important;
}
body.app-body .claim-creditor .claim-type-pill.is-ready {
  background: #DBEAFE !important;
  color: #1D4ED8 !important;
  font-weight: 600 !important;
}
body.app-body .claim-creditor .claim-type-pill.is-needs-email,
body.app-body .claim-creditor .claim-type-pill.is-escalation {
  background: var(--p-warn-soft) !important;
  color: var(--p-warn) !important;
  font-weight: 600 !important;
}
body.app-body .claim-creditor .claim-type-pill.is-enforcement {
  background: var(--p-danger-soft) !important;
  color: var(--p-danger) !important;
  font-weight: 700 !important;
}

/* Meta dezenter, kleiner */
body.app-body .claim-meta {
  font-size: 12px;
  color: var(--p-muted);
  margin-top: 4px;
}
body.app-body .claim-purpose {
  font-size: 13px;
  color: var(--p-text-soft);
  margin-top: 4px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Betrag-Spalte (eigene Spalte, Rechtsbündig) */
body.app-body .claim-card > div:nth-child(2) {
  text-align: right;
  white-space: nowrap;
}
body.app-body .claim-amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: block;
}
body.app-body .claim-due {
  font-size: 11.5px;
  color: var(--p-muted);
  margin-top: 4px;
  text-align: right;
  display: block;
}
body.app-body .claim-due.is-due-soon { color: var(--p-warn); font-weight: 600; }
body.app-body .claim-due.is-due-over { color: var(--p-danger); font-weight: 600; }

/* Actions kompakter */
body.app-body .claim-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
body.app-body .claim-action {
  padding: 7px 11px !important;
  font-size: 12.5px !important;
  border-radius: 7px !important;
  font-weight: 500 !important;
  gap: 5px !important;
}
body.app-body .claim-action svg { opacity: 0.7; }
body.app-body .claim-action.is-primary svg,
body.app-body .claim-action.is-accent svg { opacity: 1; }
/* Auf engem Raum: Text bei nicht-primary verstecken (Icon only) */
@media (max-width: 1100px) {
  body.app-body .claim-action:not(.is-primary):not(.is-accent) span:not(.claim-action-badge) {
    display: none;
  }
  body.app-body .claim-action:not(.is-primary):not(.is-accent) {
    padding: 7px 9px !important;
  }
}

/* ── 2. CLAIMS-SECTION: kompakter Header mit allem in einer Zeile ───────── */
body.app-body .claims-section { margin: 24px 0 32px; }
body.app-body .claims-section > h2:first-child,
body.app-body .claims-section-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}

/* Liste: subtle background damit Cards sich abheben */
body.app-body #claimsList,
body.app-body .claims-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── 3. SUMMARY-GRID: noch kompakter, klarer ────────────────────────────── */
body.app-body .summary-grid {
  gap: 10px;
  margin: 0 0 24px;
}
body.app-body .summary-card { padding: 14px 18px; gap: 4px; }
body.app-body .summary-num { font-size: 22px; }

/* ── 4. WELCOME + UPLOAD eng zusammenrücken ─────────────────────────────── */
body.app-body .welcome { margin: 0 0 16px; }
body.app-body .upload-zone { margin: 0 0 24px; }

/* ── 5. PLAN-STRIP + TASKS-INBOX als Hinweis-Streifen ───────────────────── */
body.app-body .plan-strip,
body.app-body .tasks-inbox {
  margin: 0 0 16px;
}
body.app-body .plan-strip:not([hidden]),
body.app-body .tasks-inbox:not([hidden]) {
  background: linear-gradient(135deg, #EFF4F8, transparent 80%);
  border: 1px solid var(--p-border);
  border-left: 3px solid var(--p-accent);
  border-radius: var(--p-radius);
  padding: 14px 18px;
}

/* ── 6. HELP-CARD: dezent ans Ende, nicht überladen ─────────────────────── */
body.app-body .help-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 24px 0 0;
  margin: 40px 0 0;
  border-top: 1px solid var(--p-border);
}
body.app-body .help-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
body.app-body .help-card details {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 6px;
}
body.app-body .help-card details[open] { background: var(--p-surface); border-color: var(--p-accent-soft); }
body.app-body .help-card summary { padding: 0; }

/* ── 7. SECTION-DIVIDER (subtile Trennung großer Bereiche) ──────────────── */
body.app-body .claims-section { position: relative; }
body.app-body .claims-section::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--p-border);
  margin: 0 0 24px;
}

/* ── 8. EMPTY-STATE schöner ─────────────────────────────────────────────── */
body.app-body .claims-empty-state {
  padding: 56px 24px;
}
body.app-body .cest-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: var(--p-accent-soft);
  border-radius: 16px;
}
body.app-body .claims-empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text);
  margin: 0 0 8px;
}
body.app-body .cest-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}
body.app-body .cest-hint {
  font-size: 12.5px;
  color: var(--p-muted);
  background: var(--p-surface-2);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 14px auto 0;
  max-width: 460px;
  display: inline-block;
}

/* ── 9. TOP-HEADER: aufgeräumter Abstand ────────────────────────────────── */
body.app-body .app-nav { padding: 12px 0; gap: 14px; }
body.app-body .brand { gap: 8px; }
body.app-body .brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
}

/* ── 10. PAID-CARDS dezenter (verblasst, weniger Aufmerksamkeit) ────────── */
body.app-body .claim-card.is-claim-paid {
  opacity: 0.62;
  background: var(--p-surface) !important;
}
body.app-body .claim-card.is-claim-paid:hover { opacity: 1; }
body.app-body .claim-card.is-claim-escalation {
  border-left: 3px solid var(--p-danger) !important;
}

/* ── 11. Mobile-Tuning für Claim-Cards ──────────────────────────────────── */
@media (max-width: 720px) {
  body.app-body .claim-card {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }
  body.app-body .claim-card > div:nth-child(2) {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  body.app-body .claim-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  body.app-body .claim-action span:not(.claim-action-badge) { display: inline; }
}

/* ── App-Tabs (Top-Level-Bereiche: Übersicht / Brief hinzufügen / Forderungen) ── */
body.app-body .app-tabs {
  display: flex;
  gap: 4px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 4px;
  margin: 0 0 24px;
  width: fit-content;
  box-shadow: var(--p-shadow-sm);
}
body.app-body .app-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--p-muted);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .12s, color .12s;
}
body.app-body .app-tab:hover { color: var(--p-text); }
body.app-body .app-tab.is-active {
  background: var(--p-accent);
  color: #fff;
  font-weight: 600;
}
body.app-body .app-tab svg { opacity: 0.85; }
body.app-body .app-tab.is-active svg { opacity: 1; }
body.app-body .app-tab-badge {
  background: var(--p-surface-2);
  color: var(--p-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
body.app-body .app-tab.is-active .app-tab-badge {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* Hidden-State für Tab-Groups */
body.app-body [data-tab-group].tab-hidden { display: none !important; }

/* Section-margins zurücksetzen wenn versteckt → kein collapse-gap */
body.app-body .claims-section[data-tab-group]::before { display: none; }

/* Auf der Übersicht: Help-Card etwas dezenter als großer Block */
body.app-body [data-tab-group="overview"].help-card { margin-top: 32px; }

/* Mobile: Tabs scrollbar */
@media (max-width: 720px) {
  body.app-body .app-tabs { width: 100%; overflow-x: auto; }
  body.app-body .app-tab { white-space: nowrap; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESTRUKTUR 2026-05-20 — Single-View-Layout
   – Tabs entfernt, Hero-Actions, Alert-Bar, Tools-Bar, kompakte Stats, Burger
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── App-Header: Burger + collapsible User-Menu auf Mobile ──────────────── */
body.app-body .app-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--p-border);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--p-text-soft);
  cursor: pointer;
}
body.app-body .app-burger:hover { background: var(--p-surface-2); }

@media (max-width: 760px) {
  body.app-body .app-nav { position: relative; gap: 8px; }
  body.app-body .app-burger { display: inline-flex; align-items: center; }
  body.app-body .app-user {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    flex-direction: column;
    align-items: stretch;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow-lg);
    padding: 8px;
    min-width: 220px;
    z-index: 200;
  }
  body.app-body .app-user.is-open { display: flex; }
  body.app-body .app-user.is-open .app-user-email,
  body.app-body .app-user.is-open .app-user-link,
  body.app-body .app-user.is-open .app-user-logout {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
  }
  body.app-body .app-user.is-open .app-user-link:hover,
  body.app-body .app-user.is-open .app-user-logout:hover {
    background: var(--p-surface-2);
  }
}

/* ── Alert-Bar (oben, wenn Eskalation/Frist) ────────────────────────────── */
body.app-body .alert-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--p-danger-soft);
  border: 1px solid #FCA5A5;
  border-radius: var(--p-radius);
  padding: 12px 16px;
  margin: 16px 0 0;
  color: var(--p-danger);
  font-size: 14px;
  font-weight: 500;
}
body.app-body .alert-bar-icon { display: inline-flex; flex-shrink: 0; }
body.app-body .alert-bar-text { flex: 1; line-height: 1.4; }
body.app-body .alert-bar-text strong { font-weight: 700; }
body.app-body .alert-bar-link {
  color: var(--p-danger);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
body.app-body .alert-bar-link:hover { text-decoration: underline; }

/* ── Hero-Actions: Upload (groß) + Sammel-Plan (sekundär) ──────────────── */
body.app-body .hero-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin: 20px 0 6px;
}
body.app-body .hero-actions .upload-hero {
  margin: 0;
  width: 100%;
}
body.app-body .plan-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 18px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  color: var(--p-text);
}
body.app-body .plan-hero:hover {
  border-color: var(--p-accent);
  background: var(--p-accent-soft);
}
body.app-body .plan-hero:active { transform: translateY(1px); }
body.app-body .plan-hero-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  border-radius: 10px;
  flex-shrink: 0;
}
body.app-body .plan-hero-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.app-body .plan-hero-text strong { font-size: 15px; font-weight: 700; color: var(--p-text); }
body.app-body .plan-hero-text small { font-size: 12.5px; color: var(--p-muted); line-height: 1.4; }

@media (max-width: 760px) {
  body.app-body .hero-actions { grid-template-columns: 1fr; }
}

/* ── Stats kompakter: 3 statt 4 Karten, kleineres Padding ──────────────── */
body.app-body .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
body.app-body .summary-grid .stat-card {
  padding: 12px 14px;
  box-shadow: var(--p-shadow-sm);
}
body.app-body .summary-grid .stat-value strong { font-size: 18px; }
body.app-body .summary-grid .stat-value small { font-size: 11px; }
body.app-body .summary-grid .stat-label { font-size: 11px; }
@media (max-width: 720px) {
  body.app-body .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  body.app-body .summary-grid .stat-card { padding: 10px 8px; }
  body.app-body .summary-grid .stat-icon { display: none; }
  body.app-body .summary-grid .stat-value strong { font-size: 14px; }
  body.app-body .summary-grid .stat-value small { display: block; }
}

/* ── Tasks-Inbox: immer prominent, oberhalb Stats ──────────────────────── */
body.app-body .tasks-inbox {
  margin-top: 18px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-left: 3px solid var(--p-accent);
  border-radius: var(--p-radius);
  padding: 14px 16px;
}

/* ── Tools-Bar: sekundäre Werkzeuge im Footer-Bereich ──────────────────── */
body.app-body .tools-bar {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--p-border-soft);
}
body.app-body .tools-bar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin: 0 0 10px;
}
body.app-body .tools-bar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
body.app-body .tool-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--p-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
body.app-body .tool-tile:hover { border-color: var(--p-accent); background: var(--p-surface-2); }
body.app-body .tool-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--p-surface-2);
  color: var(--p-text-soft);
  border-radius: 8px;
  flex-shrink: 0;
}
body.app-body .tool-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body.app-body .tool-text strong { font-size: 13px; font-weight: 600; color: var(--p-text); }
body.app-body .tool-text small { font-size: 11.5px; color: var(--p-muted); line-height: 1.35; }
@media (max-width: 760px) {
  body.app-body .tools-bar-grid { grid-template-columns: 1fr; }
}

/* ── Empty-State: prominente Schritt-Anleitung ──────────────────────────── */
body.app-body .claims-empty-state {
  padding: 28px 22px;
  text-align: left;
}
body.app-body .claims-empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--p-text);
}
body.app-body .cest-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}
body.app-body .cest-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
body.app-body .cest-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--p-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
body.app-body .cest-steps strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 2px;
}
body.app-body .cest-steps p { margin: 0; font-size: 13px; color: var(--p-text-soft); line-height: 1.45; }
body.app-body .cest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}
body.app-body .cest-hint {
  font-size: 12.5px;
  color: var(--p-muted);
  margin: 6px 0 0;
}

/* ── Welcome kompakter ──────────────────────────────────────────────────── */
body.app-body .welcome { margin: 24px 0 0; }
body.app-body .welcome-h { font-size: 24px; margin: 4px 0 4px; }
body.app-body .welcome-sub { font-size: 14px; color: var(--p-muted); margin: 0; }

/* ── Removed-Help-Link aus dem Welcome (jetzt im Tools-Bar) ────────────── */
body.app-body .welcome-help-link { display: none; }

/* ── Chat-FAB etwas zurückhaltender ────────────────────────────────────── */
body.app-body .chat-fab {
  box-shadow: var(--p-shadow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION-BELL im Header (Tasks-Inbox als Dropdown)
   ═══════════════════════════════════════════════════════════════════════════ */
/* WICHTIG: [hidden] muss display:none erzwingen, sonst übersteuert
   das display:flex/inline-flex aus den Rules unten das Hidden-Verhalten. */
body.app-body .notif-bell[hidden],
body.app-body .notif-panel[hidden],
body.app-body .notif-badge[hidden],
body.app-body .notif-empty[hidden] { display: none !important; }

body.app-body .notif-wrap {
  position: relative;
  margin-left: auto; /* schiebt Bell rechts neben Brand */
}
@media (max-width: 760px) {
  body.app-body .notif-wrap { margin-left: auto; }
}
body.app-body .notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--p-border);
  border-radius: 999px;
  color: var(--p-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
body.app-body .notif-bell:hover {
  background: var(--p-surface-2);
  border-color: var(--p-accent);
  color: var(--p-accent);
}
body.app-body .notif-bell.has-unread {
  /* Akzent-Farben + leichte Animation, sobald es ungelesene gibt */
  color: var(--p-danger);
  border-color: #FCA5A5;
  background: var(--p-danger-soft);
  animation: notif-pulse 1.6s ease-out 1;
}
@keyframes notif-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(185,28,28,0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(185,28,28,0); }
  100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); }
}
body.app-body .notif-bell[aria-expanded="true"] {
  background: var(--p-accent-soft);
  border-color: var(--p-accent);
  color: var(--p-accent);
  animation: none;
}
body.app-body .notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--p-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  border: 2px solid var(--p-surface);
  font-variant-numeric: tabular-nums;
}

body.app-body .notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 540px);
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-lg);
  z-index: 250;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.app-body .notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--p-border-soft);
  background: var(--p-surface-2);
}
body.app-body .notif-head strong { font-size: 14px; color: var(--p-text); font-weight: 700; }
body.app-body .notif-mark-all {
  background: transparent;
  border: none;
  color: var(--p-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
body.app-body .notif-mark-all:hover { background: rgba(22,48,71,0.08); }

body.app-body .notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
body.app-body .notif-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--p-muted);
  margin: 0;
}
body.app-body .notif-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--p-border-soft);
  position: relative;
}
body.app-body .notif-item:last-child { border-bottom: none; }
body.app-body .notif-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--p-accent);
}
body.app-body .notif-item.is-read::before { background: transparent; }
body.app-body .notif-item.is-read .notif-item-title { color: var(--p-muted); font-weight: 500; }
body.app-body .notif-item.is-read .notif-item-text { color: var(--p-muted-2); }

body.app-body .notif-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--p-surface-2);
  color: var(--p-text-soft);
  border-radius: 6px;
  flex-shrink: 0;
}
body.app-body .notif-cat-urgent .notif-item-icon,
body.app-body .notif-cat-pay-deadline .notif-item-icon {
  background: var(--p-danger-soft);
  color: var(--p-danger);
}
body.app-body .notif-cat-deadline .notif-item-icon,
body.app-body .notif-cat-verjaehrung .notif-item-icon {
  background: var(--p-warn-soft);
  color: var(--p-warn);
}

body.app-body .notif-item-body {
  min-width: 0;
}
body.app-body .notif-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--p-text);
  line-height: 1.3;
  margin-bottom: 2px;
}
body.app-body .notif-item-text {
  font-size: 12.5px;
  color: var(--p-text-soft);
  line-height: 1.4;
  margin-bottom: 0;
}

/* ─── Item-Action-Reihe (Als gelesen + Erledigen) ─── */
body.app-body .notif-item {
  /* Grid umbauen: Icon | Body über Buttons drüber */
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
}
body.app-body .notif-item-icon { grid-row: 1 / span 2; }
body.app-body .notif-item-body { grid-column: 2; }
body.app-body .notif-item-actions {
  grid-column: 2;
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
body.app-body .notif-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--p-border);
  background: var(--p-surface);
  color: var(--p-text-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
body.app-body .notif-btn-read:hover {
  background: var(--p-success-soft);
  color: var(--p-success);
  border-color: var(--p-success);
}
body.app-body .notif-btn-done {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
}
body.app-body .notif-btn-done:hover {
  background: var(--p-accent-2);
  border-color: var(--p-accent-2);
}
body.app-body .notif-item.is-read .notif-btn-read {
  opacity: 0.5;
  pointer-events: none;
}

/* Mobile: Panel als Drawer von oben */
@media (max-width: 760px) {
  body.app-body .notif-panel {
    position: fixed;
    top: 64px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 80px);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLAIM-DETAIL-MODAL — Redesign + Skeleton (2026-05-21)
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body #modalClaimDetail .modal-card-lg { max-width: 720px; }
body.app-body .cd-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Header ── */
body.app-body .cd-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 4px;
}
body.app-body .cd-head-main { flex: 1; min-width: 0; }
body.app-body .cd-creditor {
  font-size: 22px;
  font-weight: 700;
  color: var(--p-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: break-word;
}
body.app-body .cd-sub {
  font-size: 13px;
  color: var(--p-muted);
  margin: 0 0 6px;
}
body.app-body .cd-purpose {
  font-size: 14px;
  color: var(--p-text-soft);
  margin: 6px 0 0;
  padding: 8px 12px;
  background: var(--p-surface-2);
  border-radius: 8px;
  border-left: 3px solid var(--p-accent);
}

/* ── Quick-Stats (3 Boxen oben) ── */
body.app-body .cd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0;
}
body.app-body .cd-stat {
  background: var(--p-surface-2);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
body.app-body .cd-stat-l {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--p-muted);
}
body.app-body .cd-stat-v {
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text);
  font-variant-numeric: tabular-nums;
}
body.app-body .cd-stat-sub {
  font-size: 11.5px;
  color: var(--p-muted);
  margin-top: 1px;
}
body.app-body .cd-stat.is-overdue {
  background: var(--p-danger-soft);
  border-color: #FCA5A5;
}
body.app-body .cd-stat.is-overdue .cd-stat-v,
body.app-body .cd-stat.is-overdue .cd-stat-sub { color: var(--p-danger); }
body.app-body .cd-stat.is-soon {
  background: var(--p-warn-soft);
  border-color: #FDE68A;
}
body.app-body .cd-stat.is-soon .cd-stat-v,
body.app-body .cd-stat.is-soon .cd-stat-sub { color: var(--p-warn); }
body.app-body .cd-status-pill {
  font-size: 13px !important;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  align-self: flex-start;
  font-weight: 600;
}

@media (max-width: 600px) {
  body.app-body .cd-stats { grid-template-columns: 1fr; }
}

/* ── Primäre Action-Reihe ── */
body.app-body .cd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--p-border-soft);
}
body.app-body .cd-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--p-border);
}
body.app-body .cd-actions .btn-primary {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
}
body.app-body .cd-actions .btn-primary:hover { background: var(--p-accent-2); }
body.app-body .cd-actions .btn-secondary {
  background: var(--p-surface);
  color: var(--p-text-soft);
}
body.app-body .cd-actions .btn-secondary:hover {
  background: var(--p-surface-2);
  border-color: var(--p-accent);
  color: var(--p-accent);
}
body.app-body .cd-actions-spacer { flex: 1; }
body.app-body .cd-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--p-border);
  background: var(--p-surface);
  color: var(--p-muted);
  cursor: pointer;
}
body.app-body .cd-btn-danger:hover {
  background: var(--p-danger-soft);
  color: var(--p-danger);
  border-color: #FCA5A5;
}

/* ── Sections ── */
body.app-body .cd-section { display: flex; flex-direction: column; gap: 10px; }
body.app-body .cd-section-h {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin: 0;
}

/* ── Status-Form ── */
body.app-body .cd-status-form {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: var(--p-surface-2);
  border-radius: var(--p-radius);
}
body.app-body .cd-status-form select,
body.app-body .cd-status-form input {
  padding: 8px 10px;
  border: 1px solid var(--p-border);
  border-radius: 7px;
  font-size: 13px;
  background: var(--p-surface);
  color: var(--p-text);
}
body.app-body .cd-status-form #statusSaveMsg { grid-column: 1 / -1; font-size: 12px; }
@media (max-width: 600px) {
  body.app-body .cd-status-form { grid-template-columns: 1fr; }
}

/* ── Collapsibles ── */
body.app-body .cd-collapse {
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius);
  overflow: hidden;
}
body.app-body .cd-collapse-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text-soft);
  cursor: pointer;
  background: var(--p-surface-2);
  list-style: none;
  user-select: none;
}
body.app-body .cd-collapse-h::-webkit-details-marker { display: none; }
body.app-body .cd-collapse-h small { font-size: 12px; color: var(--p-muted); font-weight: 500; margin-left: 4px; }
body.app-body .cd-collapse-h:hover { background: var(--p-accent-soft); color: var(--p-accent); }
body.app-body .cd-collapse[open] .cd-collapse-icon { transform: rotate(180deg); }
body.app-body .cd-collapse-icon { transition: transform 0.18s ease; }

/* ── Facts (Eckdaten) ── */
body.app-body .cd-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  padding: 14px 16px;
  font-size: 13.5px;
}
body.app-body .cd-facts dt {
  color: var(--p-muted);
  font-weight: 500;
  white-space: nowrap;
}
body.app-body .cd-facts dd {
  color: var(--p-text);
  margin: 0;
  font-weight: 500;
}

/* ── Timeline ── */
body.app-body .cd-timeline {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
body.app-body .cd-timeline li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
}
body.app-body .cd-timeline li::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -12px;
  width: 1px;
  background: var(--p-border-soft);
}
body.app-body .cd-timeline li:last-child::before { display: none; }
body.app-body .cd-timeline .t-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--p-surface-2);
  color: var(--p-text-soft);
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
}
body.app-body .cd-timeline .t-time {
  font-size: 12px;
  color: var(--p-muted);
  margin-bottom: 2px;
}
body.app-body .cd-timeline .t-text {
  font-size: 13.5px;
  color: var(--p-text);
  line-height: 1.4;
}

/* ── Skeleton-Shimmer ── */
@keyframes cd-shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
body.app-body .cd-skel-shimmer {
  background: linear-gradient(90deg, var(--p-surface-2) 0%, var(--p-border-soft) 50%, var(--p-surface-2) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: cd-shimmer 1.2s infinite linear;
  border-radius: 8px;
}
body.app-body .cd-skel-block { height: 60px; }
body.app-body .cd-skel-block + .cd-skel-block { margin-top: 10px; }
body.app-body .cd-skel { display: flex; flex-direction: column; gap: 14px; }

/* ── Versand-Block: visuelle Aufwertung ── */
body.app-body .versand-block {
  background: var(--p-surface-2);
  border-radius: var(--p-radius);
  padding: 14px 16px;
  border: 1px solid var(--p-border-soft);
}
body.app-body .versand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
body.app-body .versand-header h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-text-soft);
  margin: 0;
}

/* ── Enforcement-Alert prominenter ── */
body.app-body .detail-alert.is-enforcement {
  background: var(--p-danger-soft);
  border: 1px solid #FCA5A5;
  border-radius: var(--p-radius);
  padding: 12px 16px;
  color: var(--p-danger);
  font-size: 14px;
}
body.app-body .detail-alert.is-enforcement strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Plain-Box (KI-Klartext-Summary + Empfehlung) ── */
body.app-body .detail-plain {
  background: linear-gradient(135deg, var(--p-accent-soft) 0%, var(--p-surface-2) 100%);
  border-radius: var(--p-radius);
  padding: 14px 16px;
  border: 1px solid var(--p-border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.app-body .detail-plain .dp-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
body.app-body .detail-plain .dp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--p-surface);
  color: var(--p-accent);
  border-radius: 999px;
}
body.app-body .detail-plain .dp-icon-go {
  background: var(--p-accent);
  color: #fff;
}
body.app-body .detail-plain strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
body.app-body .detail-plain p {
  margin: 0;
  font-size: 14px;
  color: var(--p-text);
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PICKER: 3. Option "Manuell anlegen" — leicht abgesetzt vom Upload-Block
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .picker-option-manual {
  border-style: dashed;
  background: transparent;
}
body.app-body .picker-option-manual:hover {
  background: var(--p-surface-2);
  border-style: solid;
  border-color: var(--p-accent);
}
body.app-body .picker-option-manual .picker-icon {
  background: var(--p-surface-2);
  color: var(--p-text-soft);
}
body.app-body .picker-option-manual:hover .picker-icon {
  background: var(--p-accent-soft);
  color: var(--p-accent);
}

/* [hidden] muss display:none erzwingen — display-Rules sonst stärker */
body.app-body .claims-section[hidden],
body.app-body .summary-grid[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   HELP-MODAL — öffnet aus Tools-Bar (kein redundanter Accordion mehr)
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .help-modal {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
}
body.app-body .help-modal-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--p-border-soft);
  background: linear-gradient(135deg, var(--p-accent-soft) 0%, var(--p-surface) 100%);
}
body.app-body .help-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--p-surface);
  color: var(--p-accent);
  flex-shrink: 0;
  box-shadow: var(--p-shadow-sm);
}
body.app-body .help-modal-h {
  font-size: 19px;
  font-weight: 700;
  color: var(--p-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
body.app-body .help-modal-sub {
  font-size: 13.5px;
  color: var(--p-muted);
  margin: 0;
  line-height: 1.45;
}

body.app-body .help-modal-body {
  padding: 18px 26px;
  overflow-y: auto;
  flex: 1;
}
body.app-body .help-modal-section-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin: 0 0 10px;
}
body.app-body .help-modal-section-h:not(:first-child) { margin-top: 20px; }

/* 4-Schritte-Liste */
body.app-body .help-modal-body .help-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
body.app-body .help-modal-body .help-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: var(--p-surface-2);
  border-radius: var(--p-radius);
  border: 1px solid var(--p-border-soft);
}
body.app-body .help-modal-body .help-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--p-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
body.app-body .help-modal-body .help-steps strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 3px;
}
body.app-body .help-modal-body .help-steps p {
  margin: 0;
  font-size: 13px;
  color: var(--p-text-soft);
  line-height: 1.5;
}
body.app-body .help-modal-body .help-steps em {
  background: var(--p-accent-soft);
  color: var(--p-accent);
  padding: 1px 5px;
  border-radius: 4px;
  font-style: normal;
  font-weight: 500;
}

/* FAQ-Accordion */
body.app-body .help-modal-body .help-faq {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.app-body .help-modal-body .help-faq details {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 9px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.app-body .help-modal-body .help-faq details[open] {
  border-color: var(--p-accent);
  box-shadow: var(--p-shadow-sm);
}
body.app-body .help-modal-body .help-faq summary {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--p-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
body.app-body .help-modal-body .help-faq summary::-webkit-details-marker { display: none; }
body.app-body .help-modal-body .help-faq summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 400;
  color: var(--p-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.15s;
}
body.app-body .help-modal-body .help-faq details[open] summary::after {
  content: '×';
  color: var(--p-accent);
  transform: rotate(45deg);
}
body.app-body .help-modal-body .help-faq summary:hover { background: var(--p-surface-2); border-radius: 9px; }
body.app-body .help-modal-body .help-faq details[open] summary { border-bottom: 1px solid var(--p-border-soft); }
body.app-body .help-modal-body .help-faq details p {
  margin: 0;
  padding: 12px 16px 14px;
  font-size: 13px;
  color: var(--p-text-soft);
  line-height: 1.55;
}
body.app-body .help-modal-body .help-faq details a {
  color: var(--p-accent);
  font-weight: 600;
  text-decoration: underline;
}

body.app-body .help-modal-foot {
  padding: 14px 26px;
  border-top: 1px solid var(--p-border-soft);
  background: var(--p-surface);
  display: flex;
  justify-content: flex-end;
}
body.app-body .help-modal-foot .btn-primary {
  background: var(--p-accent);
  color: #fff;
  border: 1px solid var(--p-accent);
  padding: 9px 22px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}
body.app-body .help-modal-foot .btn-primary:hover { background: var(--p-accent-2); }

@media (max-width: 600px) {
  body.app-body .help-modal-head { padding: 18px 18px 14px; }
  body.app-body .help-modal-body { padding: 14px 18px; }
  body.app-body .help-modal-foot { padding: 12px 18px; }
}

/* Alte Help-Card-Klassen aus dem Dashboard-Flow rausnehmen (Section wurde gelöscht) */
body.app-body section.help-card { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   TUTORIAL: versteckte Sections (Empty-State) während Tour kurz einblenden
   ═══════════════════════════════════════════════════════════════════════════ */
body.tutorial-active .claims-section[hidden],
body.tutorial-active .summary-grid[hidden],
body.tutorial-active .notif-bell[hidden] {
  display: grid !important;
}
/* notif-bell ist eigentlich inline-flex */
body.tutorial-active .notif-bell[hidden] { display: inline-flex !important; }
/* summary-grid hat eigene grid-template, claims-section ist Block */
body.tutorial-active .claims-section[hidden] { display: block !important; }

/* Während Tutorial: Empty-Hinweis im claimsList, damit Fläche nicht 0 ist */
body.tutorial-active #claimsList:empty::before,
body.tutorial-active #claimsList .claims-empty:empty::before {
  content: '— Hier erscheinen deine Forderungen, sobald du den ersten Brief hochlädst.';
  display: block;
  padding: 24px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--p-muted);
  font-style: italic;
}
/* Falls claimsList eine "Wird geladen…"-Zeile hat: überschreiben */
body.tutorial-active #claimsList .claims-empty {
  font-style: italic;
  color: var(--p-muted);
}

/* Während Tutorial: kleine Demo-Pille in der Bell, damit sie ein Badge zeigt */
body.tutorial-active .notif-bell::after {
  content: 'Demo';
  position: absolute;
  top: -6px;
  right: -10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--p-accent);
  color: #fff;
  padding: 1px 5px;
  border-radius: 999px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   [hidden]-Override für inline-flex Loading-Spinner (sonst zeigt der immer)
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .loading[hidden],
body.app-body .plan-loading[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   REPLY-CARD im Claim-Detail — prominente Anzeige der Klassifikation
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .reply-card {
  border-radius: var(--p-radius);
  padding: 16px 18px;
  border: 2px solid var(--p-accent);
  background: linear-gradient(135deg, var(--p-accent-soft) 0%, var(--p-surface) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.app-body .reply-card.is-critical { border-color: var(--p-danger); background: linear-gradient(135deg, var(--p-danger-soft) 0%, var(--p-surface) 100%); }
body.app-body .reply-card.is-high     { border-color: #FB923C; background: linear-gradient(135deg, #FFEDD5 0%, var(--p-surface) 100%); }
body.app-body .reply-card.is-low      { border-color: var(--p-success); background: linear-gradient(135deg, var(--p-success-soft) 0%, var(--p-surface) 100%); }

body.app-body .reply-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
body.app-body .reply-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-muted);
}
body.app-body .reply-card-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--p-accent);
  color: #fff;
  white-space: nowrap;
}
body.app-body .reply-card.is-critical .reply-card-pill { background: var(--p-danger); }
body.app-body .reply-card.is-high     .reply-card-pill { background: #B45309; }
body.app-body .reply-card.is-low      .reply-card-pill { background: var(--p-success); }

body.app-body .reply-card-summary {
  font-size: 15px;
  font-weight: 500;
  color: var(--p-text);
  margin: 0;
  line-height: 1.5;
}
body.app-body .reply-card-counter {
  font-size: 13.5px;
  color: var(--p-text-soft);
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 7px;
  border-left: 3px solid var(--p-accent);
}
body.app-body .reply-card-options {
  background: rgba(255,255,255,0.7);
  border-radius: 7px;
  padding: 10px 12px;
}
body.app-body .reply-card-options-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin-bottom: 6px;
}
body.app-body .reply-card-options ul { margin: 0; padding-left: 18px; }
body.app-body .reply-card-options li {
  font-size: 13px;
  color: var(--p-text);
  line-height: 1.5;
  margin: 3px 0;
}
body.app-body .reply-card-disclaimer {
  font-size: 11.5px;
  color: var(--p-muted);
  margin: 0;
  padding-top: 4px;
}
body.app-body .reply-card-disclaimer a {
  color: var(--p-accent);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS-PILLS — kräftigere Farben je nach Klassifikation
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .claim-status-pill {
  font-weight: 700 !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  border: 1px solid transparent !important;
}
body.app-body .claim-status-pill.is-status-open      { background: #F3F4F6 !important; color: #6B7280 !important; border-color: #E5E7EB !important; }
body.app-body .claim-status-pill.is-status-draft     { background: #EFF6FF !important; color: #1E40AF !important; border-color: #BFDBFE !important; }
body.app-body .claim-status-pill.is-status-sent      { background: #DBEAFE !important; color: #1E40AF !important; border-color: #93C5FD !important; }
body.app-body .claim-status-pill.is-status-waiting   { background: #FEF3C7 !important; color: #92400E !important; border-color: #FCD34D !important; }
body.app-body .claim-status-pill.is-status-accepted,
body.app-body .claim-status-pill.is-paid             { background: #D1FAE5 !important; color: #065F46 !important; border-color: #6EE7B7 !important; }
body.app-body .claim-status-pill.is-status-rejected  { background: #FEE2E2 !important; color: #991B1B !important; border-color: #FCA5A5 !important; }
body.app-body .claim-status-pill.is-status-nego      { background: #FED7AA !important; color: #9A3412 !important; border-color: #FDBA74 !important; }
body.app-body .claim-status-pill.is-escalation       { background: #FEE2E2 !important; color: #7F1D1D !important; border-color: #F87171 !important; font-weight: 800 !important; }
body.app-body .claim-status-pill.is-status-closed    { background: #E5E7EB !important; color: #374151 !important; border-color: #D1D5DB !important; }

/* Auch Quick-Stat im Detail farbig */
body.app-body .cd-status-pill.is-status-accepted,
body.app-body .cd-status-pill.is-paid             { background: #D1FAE5 !important; color: #065F46 !important; }
body.app-body .cd-status-pill.is-status-rejected  { background: #FEE2E2 !important; color: #991B1B !important; }
body.app-body .cd-status-pill.is-status-nego      { background: #FED7AA !important; color: #9A3412 !important; }
body.app-body .cd-status-pill.is-escalation       { background: #FEE2E2 !important; color: #7F1D1D !important; }
body.app-body .cd-status-pill.is-status-waiting   { background: #FEF3C7 !important; color: #92400E !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   REPLY-CARD — Diff-Anzeige für aktualisierte Felder + PDF-Hinweis
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .reply-card-changes {
  background: #FEF3C7;
  border-left: 3px solid #B45309;
  border-radius: 7px;
  padding: 10px 12px;
}
body.app-body .reply-card-changes-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400E;
  margin-bottom: 6px;
}
body.app-body .reply-card-changes ul {
  margin: 0;
  padding-left: 16px;
  list-style: none;
}
body.app-body .reply-card-changes li {
  font-size: 13px;
  color: #1F2937;
  line-height: 1.6;
  margin: 3px 0;
  position: relative;
  padding-left: 14px;
}
body.app-body .reply-card-changes li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #B45309;
  font-weight: 700;
}
body.app-body .reply-card-changes .rcc-from {
  color: #6B7280;
  text-decoration: line-through;
  font-size: 12.5px;
}
body.app-body .reply-card-changes .rcc-arrow {
  color: #B45309;
  font-weight: 700;
  margin: 0 4px;
}
body.app-body .reply-card-changes .rcc-to {
  color: #065F46;
  font-weight: 700;
}

body.app-body .reply-card-pdf {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #1E40AF;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CD-ACTIVITY-STRIP — sichtbarer Brief-versendet / Antwort-empfangen-Track
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .cd-activity {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--p-surface-2);
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius);
  overflow: hidden;
}
body.app-body .cd-act {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}
body.app-body .cd-act.is-active { opacity: 1; background: rgba(255,255,255,0.8); }
body.app-body .cd-act-icon {
  font-size: 18px;
  flex-shrink: 0;
}
body.app-body .cd-act-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
body.app-body .cd-act-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--p-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.app-body .cd-act-when {
  font-size: 11px;
  color: var(--p-muted);
}
body.app-body .cd-act-arrow {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--p-muted);
  font-weight: 700;
  font-size: 16px;
}
body.app-body .cd-act-out.is-active .cd-act-label { color: var(--p-accent); }
body.app-body .cd-act-in.is-active .cd-act-label { color: #065F46; }
body.app-body .cd-act-waiting .cd-act-label { color: var(--p-warn); }
body.app-body .cd-act-waiting { background: #FEF3C7; opacity: 1; }

@media (max-width: 600px) {
  body.app-body .cd-activity { flex-direction: column; }
  body.app-body .cd-act-arrow { display: none; }
  body.app-body .cd-act { border-bottom: 1px solid var(--p-border-soft); }
  body.app-body .cd-act:last-child { border-bottom: none; }
}

/* Auch in der Forderungs-Liste: Mini-Tag wenn Brief gesendet ohne Antwort */
body.app-body .claim-type-pill.is-sent {
  background: #DBEAFE !important;
  color: #1E40AF !important;
  border-color: #93C5FD !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIMELINE: response_received — strukturierte Reply-Anzeige
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .t-reply-head {
  font-size: 14px;
  color: var(--p-text);
  margin-bottom: 4px;
}
body.app-body .t-reply-head strong { font-weight: 700; }
body.app-body .t-reply-from {
  color: var(--p-muted);
  font-weight: 400;
  font-size: 13px;
}
body.app-body .t-reply-subj {
  font-size: 13px;
  color: var(--p-text-soft);
  font-weight: 600;
  margin-bottom: 6px;
  font-style: italic;
}
body.app-body .t-reply-body {
  background: var(--p-surface-2);
  border-left: 2px solid var(--p-border);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--p-text-soft);
  line-height: 1.5;
  border-radius: 4px;
  margin: 6px 0;
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
}
body.app-body .t-reply-summary {
  font-size: 13px;
  color: var(--p-accent);
  margin: 6px 0 4px;
  font-weight: 500;
  background: var(--p-accent-soft);
  padding: 6px 10px;
  border-radius: 6px;
}
body.app-body .t-reply-meta {
  font-size: 12px;
  color: var(--p-muted);
  margin-top: 4px;
}
body.app-body .t-reply-changes { color: #92400E; }

/* ═══════════════════════════════════════════════════════════════════════════
   LETTER-SEND-BLOCK in letterStep3 — Direkt-Versand mit Email-Eingabe
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .letter-send-block {
  margin: 14px 0 8px;
  padding: 14px 16px;
  border-radius: var(--p-radius);
  background: var(--p-surface-2);
  border: 1px solid var(--p-border-soft);
}
body.app-body .lsb-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
body.app-body .lsb-icon { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
body.app-body .lsb-text { flex: 1; min-width: 0; }
body.app-body .lsb-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 2px;
}
body.app-body .lsb-text small {
  font-size: 12.5px;
  color: var(--p-muted);
  line-height: 1.45;
}
body.app-body .lsb-text small strong { display: inline; font-size: inherit; }

body.app-body .lsb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
body.app-body .lsb-controls .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--p-border);
}
body.app-body .lsb-controls .btn-primary {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
}
body.app-body .lsb-controls .btn-primary:hover { background: var(--p-accent-2); }
body.app-body .lsb-controls .btn-secondary {
  background: #fff;
  color: var(--p-text-soft);
}
body.app-body .lsb-controls .btn-secondary:hover {
  background: var(--p-surface-2);
  border-color: var(--p-accent);
}
body.app-body .lsb-controls .lsb-upgrade {
  background: linear-gradient(135deg, var(--p-accent) 0%, var(--p-accent-2) 100%);
  color: #fff;
  text-decoration: none;
  border-color: transparent;
}
body.app-body .lsb-email-input {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--p-border);
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
}
body.app-body .lsb-help, body.app-body .lsb-note {
  flex-basis: 100%;
  font-size: 11.5px;
  color: var(--p-muted);
  margin: 4px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Letter-Actions-Row: bessere Hierarchie
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .letter-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
}
body.app-body .letter-actions-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--p-border);
}
body.app-body .letter-actions-row .btn-ghost {
  background: transparent;
  color: var(--p-muted);
  border-color: transparent;
}
body.app-body .letter-actions-row .btn-ghost:hover {
  background: var(--p-surface-2);
  color: var(--p-text-soft);
}
body.app-body .letter-actions-row .btn-secondary {
  background: #fff;
  color: var(--p-text-soft);
}
body.app-body .letter-actions-row .btn-secondary:hover {
  background: var(--p-surface-2);
  border-color: var(--p-accent);
  color: var(--p-accent);
}
body.app-body .letter-actions-row .grow { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL TOOLS — Modale für Pfändung, P-Konto, Verjährung, Verzugszinsen, Budget, Inkasso
   Stand 2026 mit amtlichen Quellen.
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body .tools-bar-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { body.app-body .tools-bar-grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { body.app-body .tools-bar-grid-6 { grid-template-columns: 1fr; } }

body.app-body .legal-tool-card {
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
}
body.app-body .legal-tool-card #legalToolBody { padding: 24px 28px 16px; }

body.app-body .lt-head {
  border-bottom: 1px solid var(--p-border-soft);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
body.app-body .lt-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-accent);
  background: var(--p-accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
body.app-body .lt-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--p-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
body.app-body .lt-sub {
  font-size: 13.5px;
  color: var(--p-text-soft);
  line-height: 1.5;
  margin: 0;
}

body.app-body .lt-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
body.app-body .lt-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--p-text-soft);
}
body.app-body .lt-form input,
body.app-body .lt-form select {
  padding: 10px 12px;
  border: 1px solid var(--p-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--p-text);
  font-weight: 500;
}
body.app-body .lt-form input:focus,
body.app-body .lt-form select:focus {
  outline: none;
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px var(--p-accent-soft);
}
body.app-body .lt-form .lt-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
body.app-body .lt-form .lt-check input { width: auto; }
body.app-body .lt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { body.app-body .lt-form-grid { grid-template-columns: 1fr; } }
body.app-body .lt-form fieldset {
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius);
  padding: 10px 12px 12px;
  background: var(--p-surface-2);
}
body.app-body .lt-form-grid fieldset:first-of-type,
body.app-body .lt-form-grid > button { grid-column: 1 / -1; }
body.app-body .lt-form fieldset legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-muted);
  padding: 0 6px;
}

body.app-body .lt-btn {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--p-accent);
  align-self: flex-start;
}
body.app-body .lt-btn-primary { background: var(--p-accent); color: #fff; }
body.app-body .lt-btn-primary:hover { background: var(--p-accent-2); }

body.app-body .lt-loading, body.app-body .lt-error {
  font-size: 13.5px;
  text-align: center;
  padding: 20px 0;
  color: var(--p-muted);
}
body.app-body .lt-error { color: var(--p-danger); }

/* ── Result-Karten (numbers, breakdown, interp) ── */
body.app-body .lt-numbers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 18px 0 12px;
}
body.app-body .lt-numbers-2 { grid-template-columns: 1fr 1fr; }
body.app-body .lt-numbers-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
  body.app-body .lt-numbers-2, body.app-body .lt-numbers-3 { grid-template-columns: 1fr; }
}
body.app-body .lt-num {
  padding: 16px 18px;
  border-radius: var(--p-radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid transparent;
}
body.app-body .lt-num small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
body.app-body .lt-num strong {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
body.app-body .lt-num span {
  font-size: 12px;
  opacity: 0.8;
}
body.app-body .lt-num-safe { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
body.app-body .lt-num-danger { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
body.app-body .lt-num-warn { background: #FED7AA; color: #9A3412; border-color: #FDBA74; }
body.app-body .lt-num-info { background: var(--p-accent-soft); color: var(--p-accent); border-color: #BFDBFE; }

body.app-body .lt-interp {
  background: var(--p-surface-2);
  border-left: 3px solid var(--p-accent);
  padding: 14px 16px;
  border-radius: 0 var(--p-radius) var(--p-radius) 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--p-text);
  margin-bottom: 14px;
}

body.app-body .lt-breakdown {
  background: var(--p-surface-2);
  border-radius: var(--p-radius);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
body.app-body .lt-breakdown div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--p-border-soft);
}
body.app-body .lt-breakdown div:last-child { border-bottom: none; }
body.app-body .lt-breakdown span { font-weight: 700; font-variant-numeric: tabular-nums; }

body.app-body .lt-rec {
  background: var(--p-accent-soft);
  border-left: 3px solid var(--p-accent);
  padding: 12px 14px;
  border-radius: 0 var(--p-radius) var(--p-radius) 0;
  font-size: 13.5px;
  color: var(--p-text);
  margin-bottom: 14px;
}

body.app-body .lt-table {
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  border-collapse: collapse;
}
body.app-body .lt-table th, body.app-body .lt-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--p-border-soft);
}
body.app-body .lt-table th {
  background: var(--p-surface-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

body.app-body .lt-expl {
  margin-bottom: 14px;
  border: 1px solid var(--p-border-soft);
  border-radius: var(--p-radius);
  background: #fff;
}
body.app-body .lt-expl summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--p-text-soft);
  cursor: pointer;
  user-select: none;
}
body.app-body .lt-expl summary:hover { background: var(--p-surface-2); }
body.app-body .lt-expl p {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12.5px;
  color: var(--p-muted);
  line-height: 1.5;
}

body.app-body .lt-sources {
  background: var(--p-surface-2);
  border-radius: var(--p-radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
body.app-body .lt-sources-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin-bottom: 6px;
}
body.app-body .lt-sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.app-body .lt-sources li {
  font-size: 12.5px;
  padding: 3px 0;
}
body.app-body .lt-sources a {
  color: var(--p-accent);
  text-decoration: none;
  font-weight: 500;
}
body.app-body .lt-sources a:hover { text-decoration: underline; }
body.app-body .lt-sources a::before { content: '↗ '; opacity: 0.6; }

body.app-body .lt-disclaimer {
  background: #FEF3C7;
  border-left: 3px solid #B45309;
  padding: 10px 14px;
  border-radius: 0 var(--p-radius) var(--p-radius) 0;
  font-size: 12px;
  color: #92400E;
  line-height: 1.55;
  margin: 0;
}
body.app-body .lt-disclaimer a { color: #92400E; text-decoration: underline; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   Pfändungs-Analyse erweitert + Beratungsstellen-Modal + Premium-Tab
   (Stand 2026-05-21)
   ═══════════════════════════════════════════════════════════════════════════ */

body.app-body .lt-cta-row { margin-top: 12px; }
body.app-body .lt-btn-secondary {
  background: #fff;
  border: 1px solid #E1E5EE;
  color: var(--p-fg, #1A1A2E);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 8px;
}
body.app-body .lt-btn-secondary:hover { background: #f7f8fb; border-color: #c5cce0; }
body.app-body .lt-btn-link {
  background: transparent; border: none; color: var(--p-accent, #3b82f6);
  padding: 6px 10px; font-size: 13px; cursor: pointer; font-weight: 500;
}
body.app-body .lt-badge-pro {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  background: rgba(124,156,255,.18); color: #4d6cff; font-weight: 700;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase; margin-left: 6px;
}

body.app-body .lt-card {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 10px;
  padding: 14px 16px; margin: 12px 0;
}
body.app-body .lt-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
body.app-body .lt-card p { margin: 4px 0; font-size: 13.5px; color: #4b5566; }
body.app-body .lt-card-base { border-color: #3b82f6; background: #f8fbff; }
body.app-body .lt-card-tip { background: #fdfbf3; border-color: #f5d97a; }
body.app-body .lt-card-tip ul { margin: 0; padding-left: 20px; }
body.app-body .lt-card-tip li { font-size: 13.5px; margin: 4px 0; }
body.app-body .lt-card-hint { background: #f1f7ff; border-color: #b3d4f5; }
body.app-body .lt-small { font-size: 12px; color: #6b7280; margin-top: 6px; }
body.app-body .lt-result-count { font-size: 14px; margin: 12px 0 8px; color: #4b5566; }
body.app-body .lt-loading { color: #6b7280; text-align: center; padding: 20px 0; }
body.app-body .lt-error { color: #b91c1c; padding: 12px; background: #fef2f2; border-radius: 8px; }
body.app-body .lt-empty { padding: 16px; text-align: center; background: #f9fafb; border-radius: 8px; }
body.app-body .lt-empty p { margin: 0 0 12px; color: #4b5566; }
body.app-body .lt-locked {
  padding: 18px; text-align: center; background: #fefce8; border: 1px solid #fde047;
  border-radius: 10px; color: #713f12;
}

/* Was-wäre-wenn-Szenarien-Grid */
body.app-body .lt-scen-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin: 16px 0;
}
body.app-body .lt-scen {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 10px;
  padding: 12px 14px; transition: all .15s ease;
}
body.app-body .lt-scen-worse { border-color: #fecaca; background: #fff5f5; }
body.app-body .lt-scen-better { border-color: #bbf7d0; background: #f0fdf4; }
body.app-body .lt-scen-label { font-weight: 600; font-size: 12.5px; color: #374151; margin-bottom: 8px; }
body.app-body .lt-scen-num { display: flex; flex-direction: column; }
body.app-body .lt-scen-num small { font-size: 10px; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
body.app-body .lt-scen-num strong { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: #111827; }
body.app-body .lt-scen-delta { margin-top: 6px; font-size: 12px; font-weight: 600; }
body.app-body .lt-scen-worse .lt-scen-delta { color: #b91c1c; }
body.app-body .lt-scen-better .lt-scen-delta { color: #047857; }

/* Details-Akkordeon */
body.app-body .lt-details summary {
  cursor: pointer; padding: 4px 0; font-size: 13.5px;
}
body.app-body .lt-list-norms { list-style: none; padding: 0; margin: 8px 0 0; }
body.app-body .lt-list-norms li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #f1f3f8; font-size: 13px; gap: 12px;
}
body.app-body .lt-list-norms code {
  background: #f3f4f6; padding: 2px 6px; border-radius: 4px;
  font-size: 11px; color: #4b5566; white-space: nowrap;
}

/* Beratungsstellen-Liste */
body.app-body .lt-berat-list {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0;
}
@media (min-width: 720px) {
  body.app-body .lt-berat-list { grid-template-columns: repeat(2, 1fr); }
}
body.app-body .lt-berat-item {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 10px;
  padding: 14px 16px; transition: all .15s ease;
}
body.app-body .lt-berat-item:hover { border-color: #c5cce0; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
body.app-body .lt-berat-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
body.app-body .lt-berat-head h4 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; color: #1A1A2E; }
body.app-body .lt-berat-traeger {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #f3f4f6; color: #4b5566; align-self: flex-start;
}
body.app-body .lt-berat-traeger-caritas { background: rgba(220,38,38,.12); color: #b91c1c; }
body.app-body .lt-berat-traeger-diakonie { background: rgba(124,58,237,.12); color: #6d28d9; }
body.app-body .lt-berat-traeger-awo { background: rgba(245,158,11,.12); color: #b45309; }
body.app-body .lt-berat-traeger-verbraucherzentrale { background: rgba(16,185,129,.12); color: #047857; }
body.app-body .lt-berat-traeger-kommune { background: rgba(59,130,246,.12); color: #1d4ed8; }
body.app-body .lt-berat-traeger-paritaetischer { background: rgba(8,145,178,.12); color: #0e7490; }
body.app-body .lt-berat-traeger-drk { background: rgba(225,29,72,.12); color: #be123c; }
body.app-body .lt-berat-meta {
  font-size: 12.5px; color: #4b5566; line-height: 1.55; margin-bottom: 8px;
}
body.app-body .lt-berat-meta a { color: var(--p-accent, #3b82f6); text-decoration: none; font-weight: 500; }
body.app-body .lt-berat-meta a:hover { text-decoration: underline; }
body.app-body .lt-berat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
body.app-body .lt-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
}
body.app-body .lt-tag-ok { background: rgba(16,185,129,.13); color: #047857; }
body.app-body .lt-tag-info { background: rgba(59,130,246,.13); color: #1d4ed8; }
body.app-body .lt-tag-free { background: rgba(34,197,94,.15); color: #15803d; }
body.app-body .lt-berat-web {
  display: inline-block; margin-top: 4px; font-size: 12.5px;
  color: var(--p-accent, #3b82f6); text-decoration: none; font-weight: 500;
}
body.app-body .lt-berat-web:hover { text-decoration: underline; }

/* Premium-Tab — Share-Links + Beratungs-Pack */
body.app-body .share-links-ul { list-style: none; padding: 0; margin: 0; }
body.app-body .share-link-item {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 10px;
}
body.app-body .share-link-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
body.app-body .share-link-head strong { font-size: 14.5px; }
body.app-body .share-link-exp { font-size: 12px; color: #6b7280; }
body.app-body .share-link-meta { font-size: 12px; color: #4b5566; margin: 6px 0; }
body.app-body .share-link-actions { margin-top: 8px; }
body.app-body .share-link-url {
  display: inline-block; background: #f3f4f6; padding: 4px 8px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 11.5px;
  word-break: break-all; max-width: 100%;
}
body.app-body .btn-sm { padding: 6px 12px; font-size: 12.5px; }
body.app-body .btn-link { background: transparent; border: none; color: var(--p-accent, #3b82f6); text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; }
body.app-body .prof-banner {
  padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13.5px;
}
body.app-body .prof-banner-info { background: #eff6ff; border-left: 3px solid #3b82f6; color: #1e3a8a; }
body.app-body .prof-banner-ok { background: #f0fdf4; border-left: 3px solid #10b981; color: #065f46; }
body.app-body .prof-banner-warn { background: #fffbeb; border-left: 3px solid #f59e0b; color: #78350f; }
body.app-body .prof-banner-error { background: #fef2f2; border-left: 3px solid #ef4444; color: #991b1b; }
body.app-body .prof-empty { color: #6b7280; font-style: italic; padding: 12px 0; }
body.app-body .prof-error { color: #b91c1c; padding: 12px; background: #fef2f2; border-radius: 8px; }
body.app-body .prof-hint { color: #6b7280; font-size: 12.5px; }

/* ── Share-Link PIN-Erstellung + Anzeige (2026-05-21) ── */
body.app-body .share-create-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
@media (max-width: 600px) { body.app-body .share-create-grid { grid-template-columns: 1fr; } }
body.app-body .share-create-block {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 10px; padding: 12px 14px;
}
body.app-body .share-create-block label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #6b7280; margin-bottom: 8px;
}
body.app-body .share-create-pin { background: #fef9c3; border-color: #fde047; }
body.app-body .share-pin-display {
  display: block; font-family: ui-monospace, monospace; font-size: 32px; font-weight: 700;
  letter-spacing: 6px; text-align: center; color: #713f12; padding: 12px 0; margin: 8px 0;
  background: #fff; border-radius: 8px; border: 2px dashed #f59e0b;
}
body.app-body .share-pin-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: rgba(16,185,129,.13); color: #065f46;
}
body.app-body .share-pin-badge-warn { background: rgba(245,158,11,.13); color: #92400e; }
body.app-body .share-link-log {
  margin-top: 8px; font-size: 12px; color: #4b5566;
}
body.app-body .share-link-log summary { cursor: pointer; padding: 4px 0; user-select: none; }
body.app-body .share-access-list { list-style: none; padding: 6px 0 0; margin: 0; }
body.app-body .share-access-list li { padding: 4px 0; border-bottom: 1px solid #f1f3f8; font-size: 11.5px; }
body.app-body .share-access-list li:last-child { border-bottom: none; }
body.app-body .share-access-list code { font-size: 11px; }
body.app-body .share-access-list time { font-weight: 600; color: #374151; }

/* ── Premium-Tab Design-Hardening (2026-05-21) ── */
body.app-body #shareLinkForm {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  body.app-body #shareLinkForm { grid-template-columns: 1fr !important; }
  body.app-body #shareLinkForm button[type=submit] { width: 100%; padding: 12px; }
}
body.app-body #shareLinkForm label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #374151;
}
body.app-body #shareLinkForm label small { font-weight: 400; color: #6b7280; }
body.app-body #shareLinkForm input,
body.app-body #shareLinkForm select {
  padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 14px; background: #fff;
}
body.app-body #shareLinkForm input:focus,
body.app-body #shareLinkForm select:focus { outline: none; border-color: #3b82f6; }

body.app-body .share-link-item {
  background: #fff; border: 1px solid #E1E5EE; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
body.app-body .share-link-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 8px; margin-bottom: 6px;
}
body.app-body .share-link-head strong { font-size: 14.5px; color: #1A1A2E; }
body.app-body .share-link-exp { font-size: 12px; color: #6b7280; font-weight: 500; }
body.app-body .share-link-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  font-size: 12.5px; color: #4b5566; margin: 6px 0 4px;
}
body.app-body .share-link-meta > * { white-space: nowrap; }
body.app-body .share-pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: rgba(16,185,129,.13); color: #065f46;
}
body.app-body .share-pin-badge-warn { background: rgba(245,158,11,.13); color: #92400e; }
body.app-body .share-link-actions {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #f1f3f8;
}

/* Beratungs-Pack-Block */
body.app-body #btnBeratungsPack {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; font-size: 14.5px;
}
body.app-body .prof-actions-row {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
body.app-body .prof-actions-row .prof-hint {
  color: #6b7280; font-size: 12.5px;
}
@media (max-width: 600px) {
  body.app-body .prof-actions-row { flex-direction: column; align-items: stretch; }
  body.app-body #btnBeratungsPack { width: 100%; justify-content: center; }
}

/* share-link-meta chip layout (2026-05-21 v2 — robuster) */
body.app-body .share-link-meta {
  display: flex !important; flex-wrap: wrap; gap: 6px 8px;
  align-items: center; margin: 6px 0 4px;
  font-size: 12.5px;
}
body.app-body .share-meta-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: #f3f4f6; color: #4b5566; white-space: nowrap;
}
body.app-body .share-meta-chip-muted { background: transparent; color: #9ca3af; padding: 3px 0; }

/* Tutorial action button (2026-05-21) */
body.tutorial-active .tour-action-btn:hover { background: #2563eb !important; }

/* ── Beratungs-Vorbereitung (2026-05-21) ── */
body.app-body .prep-intro {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #dbeafe; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px;
}
body.app-body .prep-intro h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; color: #0f172a; }
body.app-body .prep-intro p { color: #475569; margin: 6px 0 0; }
body.app-body .prep-section {
  background: #fff; border: 1px solid #e1e5ee; border-radius: 12px;
  padding: 18px 22px; margin-bottom: 16px;
}
body.app-body .prep-section legend {
  font-size: 15px; font-weight: 700; color: #0b1020; padding: 0 8px;
  background: #fff; margin-left: -8px;
}
body.app-body .prep-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-top: 10px;
}
@media (max-width: 640px) {
  body.app-body .prep-grid { grid-template-columns: 1fr; }
}
body.app-body .prep-grid label,
body.app-body .prep-textarea {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: #374151;
}
body.app-body .prep-grid label small,
body.app-body .prep-textarea small { font-weight: 400; color: #9ca3af; font-size: 11px; }
body.app-body .prep-grid input[type=text],
body.app-body .prep-grid input[type=number],
body.app-body .prep-grid input[type=date],
body.app-body .prep-grid select,
body.app-body .prep-textarea textarea {
  padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 14px; background: #fff; font-family: inherit;
  width: 100%; box-sizing: border-box;
}
body.app-body .prep-grid input:focus,
body.app-body .prep-grid select:focus,
body.app-body .prep-textarea textarea:focus {
  outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
body.app-body .prep-textarea { margin-top: 12px; }
body.app-body .prep-checkbox {
  flex-direction: row !important; align-items: center; gap: 10px;
  background: #f8fafd; border: 1px solid #e1e5ee; border-radius: 8px;
  padding: 10px 14px; cursor: pointer;
}
body.app-body .prep-checkbox input[type=checkbox] {
  width: 18px; height: 18px; margin: 0; cursor: pointer;
}
body.app-body .prep-checkbox span { font-weight: 500; }
body.app-body .prep-highlight {
  background: #fef9c3; border-left: 3px solid #f59e0b; padding-left: 10px;
  border-radius: 6px;
}
body.app-body .prep-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 8px; padding: 18px 0;
  border-top: 1px solid #e5e7eb;
}
body.app-body .prep-saved-hint { color: #10b981; font-size: 12.5px; font-weight: 500; }


/* ═══════════════════════════════════════════════════════════════════
   Index-Seite — Bug-Fixes & Restructuring (2026-05-22)
   ═══════════════════════════════════════════════════════════════════ */

/* Trust-Bar: 4 saubere Karten (verschiedene CSS-Defs konfliktieren — wir überschreiben mit höherer Specificity) */
body .trust-bar { padding: 64px 0; background: #f8fafc; }
body .trust-bar .trust-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 18px !important;
  width: min(1180px, 92%);
  margin: 0 auto;
}
@media (max-width: 980px) { body .trust-bar .trust-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 540px) { body .trust-bar .trust-grid { grid-template-columns: 1fr !important; } }

body .trust-bar .trust-item {
  display: block !important;
  text-align: center !important;
  padding: 28px 20px !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
}
body .trust-bar .trust-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  border-color: #cbd5e1;
}
body .trust-bar .t-icon {
  width: 52px !important;
  height: 52px !important;
  margin: 0 auto 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  color: #2563eb !important;
  display: grid !important;
  place-items: center !important;
  flex: none !important;
  border: 1px solid rgba(37, 99, 235, .1) !important;
}
body .trust-bar .t-icon svg { width: 24px !important; height: 24px !important; }
body .trust-bar .trust-item h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 0 6px !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}
body .trust-bar .trust-item p {
  font-size: 13.5px !important;
  color: #64748b !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* "Was FinoraQ macht / nicht macht" — zwei klare Spalten */
.what-section {
  padding: 64px 0;
  background: #ffffff;
}
.what-section .container { width: min(1180px, 92%); margin: 0 auto; }
.what-section-head { text-align: center; margin-bottom: 36px; }
.what-section-head h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: #0f172a;
}
.what-section-head p { color: #64748b; max-width: 640px; margin: 0 auto; font-size: 15px; line-height: 1.6; }
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 800px) { .what-grid { grid-template-columns: 1fr; } }
.what-col {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 28px;
}
.what-col-yes { border-top: 4px solid #10b981; }
.what-col-no { border-top: 4px solid #ef4444; }
.what-col h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.what-col-yes h3::before {
  content: '✓';
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #d1fae5;
  color: #065f46;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.what-col-no h3::before {
  content: '✗';
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fee2e2;
  color: #991b1b;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.what-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.what-col li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.55;
}
.what-col li:last-child { border-bottom: none; }
.what-col li strong { color: #0f172a; font-weight: 700; }
.what-foot {
  margin-top: 18px;
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Info-Page-Framework (Marketing-Seiten mit echtem Inhalt)
   Stand 2026-05-22
   ═══════════════════════════════════════════════════════════════════ */
.info-page {
  background: #fafbfc;
  padding: 48px 0 96px;
}
.info-page .container { width: min(900px, 92%); margin: 0 auto; }

.info-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2563eb;
  background: #eff6ff;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.info-h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #0f172a;
  margin: 0 0 14px;
}
@media (max-width: 640px) { .info-h1 { font-size: 28px; } }
.info-lead {
  font-size: 17px;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 32px;
  max-width: 720px;
}

.info-toc {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 32px;
}
.info-toc h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 10px;
}
.info-toc ol {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: #334155;
}
.info-toc ol a { color: #1d4ed8; text-decoration: none; }
.info-toc ol a:hover { text-decoration: underline; }

.info-section {
  margin: 40px 0;
  scroll-margin-top: 90px;
}
.info-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}
.info-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 10px;
}
.info-section p {
  font-size: 15.5px;
  line-height: 1.7;
  color: #334155;
  margin: 0 0 14px;
}
.info-section p strong { color: #0f172a; font-weight: 700; }
.info-section ul, .info-section ol {
  font-size: 15.5px;
  line-height: 1.7;
  color: #334155;
  padding-left: 22px;
  margin: 8px 0 18px;
}
.info-section li { margin: 6px 0; }
.info-section a { color: #1d4ed8; text-decoration: underline; text-decoration-color: rgba(29, 78, 216, 0.3); text-underline-offset: 3px; }
.info-section a:hover { text-decoration-color: rgba(29, 78, 216, 1); }

/* Stat-Grid */
.info-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}
.info-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
}
.info-stat-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 6px;
}
.info-stat-label {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 8px;
}
.info-stat-src {
  font-size: 11.5px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  line-height: 1.45;
}
.info-stat-src a { color: #64748b; text-decoration: underline; }

/* Callouts */
.info-callout {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  color: #78350f;
  line-height: 1.6;
}
.info-callout.info-callout-error {
  background: #fef2f2;
  border-color: #dc2626;
  color: #7f1d1d;
}
.info-callout.info-callout-ok {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #14532d;
}
.info-callout strong { font-weight: 700; }

/* Quellen-Apparat (APA-Stil) */
.info-sources {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 48px 0 0;
}
.info-sources h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 12px;
}
.info-sources ol {
  list-style: decimal;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}
.info-sources li { margin: 8px 0; }
.info-sources li a { color: #1d4ed8; word-break: break-all; }

/* Vergleichs-Tabelle */
.info-compare {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0 26px;
  font-size: 14.5px;
}
.info-compare th, .info-compare td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.info-compare th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}
.info-compare tr:last-child td { border-bottom: none; }
.info-compare .ic-yes { color: #16a34a; font-weight: 700; }
.info-compare .ic-no  { color: #dc2626; font-weight: 700; }
.info-compare .ic-maybe { color: #f59e0b; font-weight: 700; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  DARK-MODE Override für die --p-* Variablen · 2026-05-23         ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="dark"] {
  --p-bg:           #0E1116;
  --p-surface:      #161A22;
  --p-surface-2:    #1C2230;
  --p-border:       #2A3140;
  --p-border-soft:  #1F2531;
  --p-text:         #F2F4F7;
  --p-text-soft:    #DCE0E6;
  --p-muted:        #A8B1BD;
  --p-muted-2:      #6D7686;
  --p-accent:       #5CC79B;
  --p-accent-2:     #7AD8B0;
  --p-accent-soft:  #1A2C25;
  --p-success:      #5CC79B;
  --p-success-soft: #1A2C25;
  --p-warn:         #FBB13C;
  --p-warn-soft:    #2A1F0E;
  --p-danger:       #FF7A6B;
  --p-danger-soft:  #2C1818;
  --p-shadow-sm:    0 1px 2px rgba(0,0,0,0.55);
  --p-shadow:       0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --p-shadow-lg:    0 10px 25px -5px rgba(0,0,0,0.55), 0 4px 6px -2px rgba(0,0,0,0.4);
}

/* Header (im Light per Polish hartcodiert weiß) — im Dark anpassen */
html[data-theme="dark"] body.app-body .app-header {
  background: var(--p-surface);
  border-bottom-color: var(--p-border-soft);
}

/* Bell-Button — Polish setzt eigene Backgrounds */
html[data-theme="dark"] .notif-bell { background: var(--p-surface-2); border-color: var(--p-border); color: var(--text); }
html[data-theme="dark"] .notif-bell:hover { background: var(--p-accent-soft); }
html[data-theme="dark"] .notif-panel { background: var(--p-surface); border-color: var(--p-border); color: var(--text); }

/* Brand */
html[data-theme="dark"] body.app-body .brand-text { color: var(--p-text); }
html[data-theme="dark"] body.app-body .brand-dot { color: var(--p-accent); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  DARK-MODE harte Component-Overrides · Fix für Polish-!important ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* Forderungs-Karten (Polish hat hier !important) */
html[data-theme="dark"] body.app-body .claim-card,
html[data-theme="dark"] body.app-body .claim-card.is-claim-paid {
  background: var(--p-surface) !important;
  border-color: var(--p-border) !important;
  color: var(--p-text);
}
html[data-theme="dark"] body.app-body .claim-card:hover {
  border-color: var(--p-accent) !important;
}
html[data-theme="dark"] body.app-body .claim-card.is-claim-paid {
  opacity: 0.55;
}

/* Filter-Tabs (Suche + Tabs) */
html[data-theme="dark"] body.app-body .cf-search,
html[data-theme="dark"] body.app-body .claims-filters,
html[data-theme="dark"] body.app-body .brief-filters {
  background: transparent;
}
html[data-theme="dark"] body.app-body .cf-search { background: var(--p-surface); border-color: var(--p-border); }
html[data-theme="dark"] body.app-body .cf-search input { background: transparent !important; border: 0 !important; color: var(--p-text); }
html[data-theme="dark"] body.app-body .cf-search input::placeholder { color: var(--p-muted-2); }
html[data-theme="dark"] body.app-body .cf-tab { color: var(--p-muted); background: transparent; }
html[data-theme="dark"] body.app-body .cf-tab:hover { color: var(--p-text); }
html[data-theme="dark"] body.app-body .cf-tab.is-active { background: var(--p-text); color: var(--p-bg); }

/* View-Head-Buttons */
html[data-theme="dark"] body.app-body .view-head .btn-mini,
html[data-theme="dark"] body.app-body .btn-mini { background: var(--p-surface); color: var(--p-text); border-color: var(--p-border); }
html[data-theme="dark"] body.app-body .btn-mini:hover { background: var(--p-accent-soft); border-color: var(--p-accent); color: var(--p-text); }

/* Detail-Tabs */
html[data-theme="dark"] body.app-body .dp-tab { color: var(--p-muted); }
html[data-theme="dark"] body.app-body .dp-tab:hover { color: var(--p-text); }
html[data-theme="dark"] body.app-body .dp-tab.is-active { color: var(--p-accent-2); border-bottom-color: var(--p-accent-2); }

/* Profile-Tabs (in /profile?embed=1) */
html[data-theme="dark"] body.app-body .prof-tabs { background: var(--p-surface); border-color: var(--p-border-soft); border-radius: 12px; padding: 6px; }
html[data-theme="dark"] body.app-body .prof-tab { background: transparent; color: var(--p-muted); border: 0; }
html[data-theme="dark"] body.app-body .prof-tab:hover { color: var(--p-text); background: var(--p-surface-2); }
html[data-theme="dark"] body.app-body .prof-tab.is-active { background: var(--p-accent); color: var(--p-bg); font-weight: 600; }

/* Profile-Panes / Cards */
html[data-theme="dark"] body.app-body .prof-pane,
html[data-theme="dark"] body.app-body .prof-card,
html[data-theme="dark"] body.app-body .onb-form,
html[data-theme="dark"] body.app-body fieldset,
html[data-theme="dark"] body.app-body .prof-activity-card,
html[data-theme="dark"] body.app-body .prof-row,
html[data-theme="dark"] body.app-body .prof-avatar-block { background: var(--p-surface); border-color: var(--p-border-soft); color: var(--p-text); }

html[data-theme="dark"] body.app-body fieldset legend,
html[data-theme="dark"] body.app-body .prof-h2,
html[data-theme="dark"] body.app-body .prof-pane h2,
html[data-theme="dark"] body.app-body .prof-pane h3 { color: var(--p-text); }
html[data-theme="dark"] body.app-body .prof-pane p,
html[data-theme="dark"] body.app-body .prof-pane label,
html[data-theme="dark"] body.app-body .prof-meta { color: var(--p-muted); }

/* Profile Activity-Filter */
html[data-theme="dark"] body.app-body .prof-activity-filter,
html[data-theme="dark"] body.app-body .prof-activity-filter button { background: var(--p-surface); color: var(--p-muted); border-color: var(--p-border); }
html[data-theme="dark"] body.app-body .prof-activity-filter button:hover { background: var(--p-surface-2); color: var(--p-text); }
html[data-theme="dark"] body.app-body .prof-activity-filter button.is-active { background: var(--p-text); color: var(--p-bg); }

/* Profile Activity Day-Header */
html[data-theme="dark"] body.app-body .prof-day-label { color: var(--p-muted-2); border-bottom-color: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .prof-act-row { border-bottom-color: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .prof-act-time,
html[data-theme="dark"] body.app-body .prof-act-action { color: var(--p-text); }

/* Buttons in den View-Head-Actions */
html[data-theme="dark"] body.app-body .btn-secondary-mini { background: var(--p-surface); color: var(--p-text); border-color: var(--p-border); }
html[data-theme="dark"] body.app-body .btn-secondary-mini:hover { background: var(--p-accent-soft); border-color: var(--p-accent); }

/* ═══ Chat (FAB + Modal) im Dark Mode ═══ */
/* FAB: grüner Pill statt navy-pastel — auf dunkel besser lesbar */
html[data-theme="dark"] body.app-body .chat-fab,
html[data-theme="dark"] .chat-fab {
  background: var(--p-accent);
  color: var(--p-bg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
html[data-theme="dark"] body.app-body .chat-fab:hover,
html[data-theme="dark"] .chat-fab:hover {
  background: var(--p-accent-2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}

/* Chat-Modal-Card */
html[data-theme="dark"] .chat-card { background: var(--p-surface); border-color: var(--p-border); }
html[data-theme="dark"] .chat-head { border-bottom-color: var(--p-border-soft); }
html[data-theme="dark"] .chat-head-icon { background: var(--p-accent); color: var(--p-bg); }
html[data-theme="dark"] .chat-head-title { color: var(--p-text); }
html[data-theme="dark"] .chat-head-sub { color: var(--p-muted); }
html[data-theme="dark"] .chat-clear { color: var(--p-muted); }
html[data-theme="dark"] .chat-clear:hover { color: var(--p-danger); background: var(--p-danger-soft); }

/* Messages */
html[data-theme="dark"] .chat-msg-user .chat-msg-bubble {
  background: var(--p-accent);
  color: var(--p-bg);
}
html[data-theme="dark"] .chat-msg-assistant .chat-msg-bubble {
  background: var(--p-surface-2);
  color: var(--p-text);
  border-color: var(--p-border);
}

/* Suggestions */
html[data-theme="dark"] .chat-suggestions { border-top-color: var(--p-border-soft); }
html[data-theme="dark"] .chat-sugg {
  background: var(--p-accent-soft);
  color: var(--p-accent-2);
  border-color: rgba(122,216,176,0.25);
}
html[data-theme="dark"] .chat-sugg:hover { background: var(--p-accent); color: var(--p-bg); }

/* Input */
html[data-theme="dark"] .chat-input-row { border-top-color: var(--p-border-soft); }
html[data-theme="dark"] .chat-input-row textarea {
  background: var(--p-surface-2);
  color: var(--p-text);
  border-color: var(--p-border);
}
html[data-theme="dark"] .chat-input-row textarea:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 4px rgba(122,216,176,0.15);
}
html[data-theme="dark"] .chat-input-row textarea::placeholder { color: var(--p-muted-2); }

/* Send-Button */
html[data-theme="dark"] .chat-send { background: var(--p-accent); color: var(--p-bg); }
html[data-theme="dark"] .chat-send:hover:not(:disabled) { background: var(--p-accent-2); }

/* Disclaimer */
html[data-theme="dark"] .chat-disclaimer { color: var(--p-muted); border-top-color: var(--p-border-soft); }
html[data-theme="dark"] .chat-disclaimer a { color: var(--p-accent-2); }

/* Typing-Dots */
html[data-theme="dark"] .chat-typing span { background: var(--p-accent-2); }

/* ─── Inkasso-Scan (Premium-Auto-Scan über eigene Forderungen) ─── */
body.app-body .lt-scan-card {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 18px;
}
body.app-body .lt-scan-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; flex-wrap: wrap; }
body.app-body .lt-scan-head strong { font-size: 15px; color: #1A1A2E; }
body.app-body .lt-scan-badge {
  background: #f59e0b; color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; padding: 3px 8px; border-radius: 6px;
}
body.app-body .lt-scan-sub { font-size: 13.5px; color: #57534e; margin: 0 0 12px; line-height: 1.5; }

body.app-body .lt-divider {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 14px;
  color: #9ca3af; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
body.app-body .lt-divider::before, body.app-body .lt-divider::after {
  content: ''; flex: 1; height: 1px; background: #e5e7eb;
}

body.app-body .lt-premium-lock {
  text-align: center; padding: 24px 16px; margin-top: 14px;
  background: #fff; border: 1px dashed #f59e0b; border-radius: 12px;
}
body.app-body .lt-premium-icon { font-size: 32px; margin-bottom: 4px; }
body.app-body .lt-premium-lock h3 { margin: 0 0 6px; font-size: 17px; color: #92400e; }
body.app-body .lt-premium-lock p { margin: 0 0 14px; color: #57534e; font-size: 13.5px; line-height: 1.5; }

body.app-body .lt-scan-totals {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 16px 0 12px;
}
@media (min-width: 640px) {
  body.app-body .lt-scan-totals { grid-template-columns: repeat(4, 1fr); }
}
body.app-body .lt-scan-totals > div {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px;
}
body.app-body .lt-scan-totals small { font-size: 10px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; display: block; }
body.app-body .lt-scan-totals strong { font-size: 17px; font-weight: 800; color: #111827; display: block; margin-top: 2px; letter-spacing: -.01em; }
body.app-body .lt-scan-totals span { font-size: 11.5px; color: #6b7280; display: block; margin-top: 1px; }
body.app-body .lt-totals-danger { background: #fef2f2; border-color: #fca5a5; }
body.app-body .lt-totals-danger strong { color: #b91c1c; }
body.app-body .lt-totals-safe { background: #f0fdf4; border-color: #86efac; }
body.app-body .lt-totals-safe strong { color: #047857; }

body.app-body .lt-scan-table-wrap { overflow-x: auto; margin: 0 -4px; }
body.app-body .lt-scan-table { width: 100%; border-collapse: collapse; font-size: 13px; }
body.app-body .lt-scan-table thead th {
  text-align: left; padding: 10px 8px; background: #f9fafb;
  font-size: 11.5px; font-weight: 700; color: #4b5563;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid #e5e7eb;
}
body.app-body .lt-scan-table tbody td {
  padding: 10px 8px; border-bottom: 1px solid #f3f4f6; vertical-align: top;
}
body.app-body .lt-scan-table .lt-num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.app-body .lt-row-creditor { font-weight: 600; color: #1A1A2E; font-size: 13.5px; }
body.app-body .lt-row-meta { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
body.app-body .lt-row-danger { background: #fffbf5; }
body.app-body .lt-cell-danger strong { color: #b91c1c; }
body.app-body .lt-cell-safe strong { color: #047857; }
body.app-body .lt-btn-sm {
  display: inline-block; padding: 5px 10px; font-size: 12px; font-weight: 600;
  background: #1A1A2E; color: #fff; border-radius: 6px; text-decoration: none;
  white-space: nowrap;
}
body.app-body .lt-btn-sm:hover { background: #2d2d4a; }
body.app-body .lt-muted { color: #9ca3af; font-size: 12px; }

/* Dark */
html[data-theme="dark"] body.app-body .lt-scan-card { background: linear-gradient(135deg, #3a2a0a 0%, #4a3110 100%); border-color: #b45309; }
html[data-theme="dark"] body.app-body .lt-scan-head strong { color: #fef3c7; }
html[data-theme="dark"] body.app-body .lt-scan-sub { color: #d6d3d1; }
html[data-theme="dark"] body.app-body .lt-divider { color: var(--p-muted); }
html[data-theme="dark"] body.app-body .lt-divider::before, html[data-theme="dark"] body.app-body .lt-divider::after { background: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .lt-premium-lock { background: var(--p-bg-elev); border-color: #b45309; }
html[data-theme="dark"] body.app-body .lt-premium-lock h3 { color: #fcd34d; }
html[data-theme="dark"] body.app-body .lt-premium-lock p { color: var(--p-muted); }
html[data-theme="dark"] body.app-body .lt-scan-totals > div { background: var(--p-bg-elev); border-color: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .lt-scan-totals strong { color: var(--p-text); }
html[data-theme="dark"] body.app-body .lt-totals-danger { background: rgba(185,28,28,.18); }
html[data-theme="dark"] body.app-body .lt-totals-safe { background: rgba(4,120,87,.18); }
html[data-theme="dark"] body.app-body .lt-scan-table thead th { background: var(--p-bg-elev); color: var(--p-muted); border-bottom-color: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .lt-scan-table tbody td { border-bottom-color: var(--p-border-soft); }
html[data-theme="dark"] body.app-body .lt-row-creditor { color: var(--p-text); }
html[data-theme="dark"] body.app-body .lt-row-meta { color: var(--p-muted); }
html[data-theme="dark"] body.app-body .lt-row-danger { background: rgba(180,83,9,.10); }
html[data-theme="dark"] body.app-body .lt-btn-sm { background: var(--p-accent, #3b82f6); }
html[data-theme="dark"] body.app-body .lt-btn-sm:hover { background: var(--p-accent-2, #60a5fa); }

/* ─── Brief-versendet Beruhigungs-Banner (auf eskalierten Cards) ─── */
body.app-body .claim-sent-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0 6px; padding: 9px 12px;
  border-radius: 10px; font-size: 13px;
  background: rgba(4,120,87,0.10);
  border: 1px solid rgba(4,120,87,0.30);
}
body.app-body .claim-sent-banner.is-stale {
  background: rgba(180,83,9,0.10);
  border-color: rgba(180,83,9,0.30);
}
body.app-body .claim-sent-banner .csb-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: #047857; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0;
}
body.app-body .claim-sent-banner.is-stale .csb-icon { background: #b45309; }
body.app-body .claim-sent-banner .csb-main {
  display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0;
}
body.app-body .claim-sent-banner .csb-main strong {
  font-weight: 700; color: #047857; font-size: 13.5px;
  letter-spacing: -0.005em;
}
body.app-body .claim-sent-banner.is-stale .csb-main strong { color: #92400e; }
body.app-body .claim-sent-banner .csb-date {
  font-size: 11.5px; color: #6b7280;
}
body.app-body .claim-sent-banner .csb-tag {
  background: #b45309; color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}

html[data-theme="dark"] body.app-body .claim-sent-banner {
  background: rgba(4,120,87,0.18);
  border-color: rgba(4,120,87,0.40);
}
html[data-theme="dark"] body.app-body .claim-sent-banner.is-stale {
  background: rgba(180,83,9,0.18);
  border-color: rgba(180,83,9,0.40);
}
html[data-theme="dark"] body.app-body .claim-sent-banner .csb-main strong { color: #6ee7b7; }
html[data-theme="dark"] body.app-body .claim-sent-banner.is-stale .csb-main strong { color: #fcd34d; }
html[data-theme="dark"] body.app-body .claim-sent-banner .csb-date { color: var(--p-muted); }
