/* Home 3.0 — Zielbild-Übersicht (Begehung 02.07.2026).
   Design-Tokens aus docs/superpowers/begehung_mockups/_shared.css, bewusst
   KOMPLETT unter .home-v3 gescopt: der app-weite Stil bleibt unangetastet,
   die Tokens gelten NUR in der neuen v3-Ansicht (Feature-Flag). */

.home-v3 {
  --ink: #1e293b;
  --ink-soft: #64748b;
  --ink-faint: #94a3b8;
  --hv3-bg: #eaeef4;
  --card: #ffffff;
  --line: #d7dee8;
  --ok: #16a34a; --ok-bg: #f0fdf4;
  --warn: #d97706; --warn-bg: #fffbeb;
  --crit: #dc2626; --crit-bg: #fef2f2;
  --neutral-badge: #f1f5f9;
  --accent: #2563eb; --accent-soft: #eff6ff; --accent-ring: #bfdbfe;

  /* Voll-Breite + getönter Seiten-Hintergrund: blutet über das Padding der
     App-Shell (.shell-content: 24px / clamp(16px,3vw,32px)) hinaus. */
  margin: -24px calc(clamp(16px, 3vw, 32px) * -1);
  padding: 22px 28px 60px;
  min-height: calc(100% + 48px);
  box-sizing: border-box;
  background: var(--hv3-bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.home-v3 * { box-sizing: border-box; }

/* App-weit setzen h1/h2 die Display-Serif (--font-display) — im Zielbild ist
   ALLES Inter. Gleicher Konter wie .stift: font-family erben. */
.home-v3 h1, .home-v3 h2, .home-v3 h3 { font-family: inherit; }

/* ── Banner-Slot (Wächter/Sync-Alarm oberhalb des Page-Heads) ── */
.home-v3 .banner-slot { margin-bottom: 14px; }

/* ── Page-Head ── */
.home-v3 .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.home-v3 .page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; margin: 0; }
.home-v3 .page-head h1 .picon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.home-v3 .page-head h1 .picon svg { width: 18px; height: 18px; stroke-width: 2.2; }
.home-v3 .page-head .sub { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
.home-v3 .head-right { display: flex; align-items: center; gap: 14px; }
.home-v3 .stand { font-size: 11.5px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.home-v3 .stand .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); }

/* ── Buttons ── */
.home-v3 .btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.home-v3 .btn svg { width: 14px; height: 14px; stroke-width: 2.2; }
.home-v3 .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.home-v3 .btn.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.home-v3 .btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

/* ── Sektionen ── */
.home-v3 .section { margin-bottom: 22px; }
.home-v3 .section > .shead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.home-v3 .section > .shead h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #475569; display: flex; align-items: center; gap: 8px; margin: 0; }
.home-v3 .section > .shead h2::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); flex: none; }
.home-v3 .section > .shead .hint { font-size: 12px; color: var(--ink-faint); }
.home-v3 .section > .shead .spacer { flex: 1; }

/* ── Karten & Grids ── */
.home-v3 .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04); }
.home-v3 a.card { text-decoration: none; color: var(--ink); display: block; }
.home-v3 .grid { display: grid; gap: 12px; }
.home-v3 .g2 { grid-template-columns: repeat(2, 1fr); }
.home-v3 .g4 { grid-template-columns: repeat(4, 1fr); }
.home-v3 .split { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }

/* ── Zonen-Tags ── */
.home-v3 .zone-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); padding: 2px 9px; border-radius: 99px; }

/* ── Tageslage-Band (EQ-Ring + Statuszeilen) ── */
.home-v3 .lage { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
/* a.status-card explizit: schlägt das display:block von a.card (gleiche
   Spezifität, spätere Regel), sonst stapeln Ring und Zahlen untereinander. */
.home-v3 .status-card, .home-v3 a.status-card { display: flex; align-items: center; gap: 26px; padding: 20px 24px; }
.home-v3 .ring-wrap { position: relative; width: 148px; height: 148px; flex: none; }
.home-v3 .ring-wrap svg { transform: rotate(-90deg); }
.home-v3 .ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.home-v3 .ring-center .big { font-size: 27px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.home-v3 .ring-center .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.home-v3 .stat-rows { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.home-v3 .stat-row { display: flex; align-items: baseline; gap: 10px; }
.home-v3 .stat-row .k { width: 52px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
.home-v3 .stat-row .v { font-size: 19px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.home-v3 .stat-row .bar { flex: 1; height: 7px; border-radius: 99px; background: var(--neutral-badge); overflow: hidden; margin-left: 6px; }
.home-v3 .stat-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.home-v3 .vjz { font-size: 12px; color: var(--ink-soft); padding-top: 10px; border-top: 1px dashed var(--line); }

/* ── Finanz-Wochenblock ── */
.home-v3 .week-bars text { font-size: 9.5px; fill: var(--ink-faint); font-family: inherit; }
.home-v3 .week-bars .val { fill: var(--ink-soft); font-weight: 600; }
.home-v3 .mini-row { display: flex; align-items: center; gap: 9px; padding: 8px 0 0; border-top: 1px solid var(--line); margin-top: 9px; font-size: 12.5px; }
.home-v3 .mini-row .t { font-weight: 600; }
.home-v3 .mini-row .m { color: var(--ink-soft); }
.home-v3 .mini-row .btn { margin-left: auto; }

/* ── EQ-Hero (v2-Zielbild: dunkle Verlaufs-Karte im Tageslage-Band) ── */
.home-v3 a.eq-hero, .home-v3 .eq-hero {
  display: block; border: none; color: #fff; padding: 20px 24px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #10304f 0%, #153a60 55%, #1b4a7c 100%);
}
.home-v3 .eq-hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .22), transparent 65%); pointer-events: none; }
.home-v3 .eq-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.home-v3 .eq-lbl { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fc0e2; }
.home-v3 .eq-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.home-v3 .eq-v { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.home-v3 .eq-delta { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.home-v3 .eq-delta.up { background: rgba(52, 211, 153, .18); color: #6ee7b7; }
.home-v3 .eq-delta.down { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.home-v3 .eq-fc { text-align: right; flex: none; }
.home-v3 .eq-fc .fl { font-size: 10.5px; color: #9fc0e2; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.home-v3 .eq-fc .fv { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 1px; }
.home-v3 .eq-fc .fs { font-size: 11px; color: #bcd2e8; }
.home-v3 .eq-spark { margin: 12px 0 2px; position: relative; z-index: 1; }
.home-v3 .eq-spark svg { width: 100%; height: auto; display: block; }
.home-v3 .eq-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: #8fb0d0; font-weight: 600; }
.home-v3 .eq-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); margin: 14px 0; overflow: hidden; position: relative; z-index: 1; }
.home-v3 .eq-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #34d399, #4ade80); }
.home-v3 .eq-legend { display: flex; gap: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.home-v3 .eq-legend div { font-size: 11px; color: #bcd2e8; font-weight: 600; letter-spacing: .04em; }
.home-v3 .eq-legend b { display: block; color: #fff; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.01em; }
.home-v3 .eq-legend b.warn { color: #fbbf24; }
.home-v3 .eq-foot { margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: #bcd2e8; position: relative; z-index: 1; }
.home-v3 .eq-foot strong { color: #fff; }

/* ── Finanz-Woche: gestapelte Kanal-Balken (Kanalfarben des Zielbilds) ── */
.home-v3 .fw-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 132px; margin-top: 6px; }
.home-v3 .fw-day { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 8px; padding: 4px 5px 0; }
.home-v3 .fw-day.today { background: linear-gradient(180deg, #eaf1fe, #f5f8ff); outline: 1.5px solid var(--accent-ring); }
.home-v3 .fw-sum { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-v3 .fw-stack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 5px; overflow: hidden; min-height: 3px; }
.home-v3 .fw-stack i { display: block; width: 100%; }
.home-v3 .fw-x { text-align: center; font-size: 10.5px; color: var(--ink-faint); font-weight: 600; margin-top: 6px; }
.home-v3 .fw-x.today { color: var(--accent); font-weight: 800; }
.home-v3 .fw-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.home-v3 .fw-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ── Arbeits-Kacheln (Zone 1) ── */
/* a.work-tile explizit: schlägt display:block von a.card (wie a.status-card). */
.home-v3 .work-tile, .home-v3 a.work-tile { display: flex; align-items: center; gap: 11px; padding: 13px 15px; text-decoration: none; color: var(--ink); }
.home-v3 .work-tile .n { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.home-v3 .work-tile .t { font-size: 12px; font-weight: 600; color: var(--ink-soft); line-height: 1.25; }
.home-v3 .work-tile .icon { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.home-v3 .work-tile .icon svg { width: 16px; height: 16px; stroke-width: 2.1; }

/* ── Arbeitslisten ── */
.home-v3 .wl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.home-v3 .wl-head h3 { font-size: 13px; font-weight: 700; margin: 0; }
.home-v3 .wl-head .hint { font-size: 11.5px; color: var(--ink-faint); }
.home-v3 .worklist { display: flex; flex-direction: column; }
.home-v3 .worklist .row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); }
.home-v3 .worklist .row:first-child { border-top: none; }
.home-v3 .worklist .who { font-weight: 600; }
.home-v3 .worklist .meta { color: var(--ink-soft); font-size: 12.5px; }
.home-v3 .worklist .age { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
/* Ohne .age (z.B. Quittungs-Zeilen) rückt der Button an den rechten Rand;
   mit .age gewinnt deren auto-Margin (Button bleibt direkt daneben). */
.home-v3 .worklist .actions { display: flex; gap: 6px; margin-left: auto; }
.home-v3 .worklist .row > .min-w-0 { min-width: 0; }

/* ── Status-Chips ── */
.home-v3 .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 99px; }
.home-v3 .chip.ok { color: var(--ok); background: var(--ok-bg); }
.home-v3 .chip.warn { color: var(--warn); background: var(--warn-bg); }
.home-v3 .chip.crit { color: var(--crit); background: var(--crit-bg); }
.home-v3 .chip.neutral { color: var(--ink-soft); background: var(--neutral-badge); }
.home-v3 .chip .cdot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.home-v3 a.chip { text-decoration: none; }
.home-v3 .delta { font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 99px; }
.home-v3 .delta.up { color: var(--ok); background: var(--ok-bg); }
.home-v3 .delta.down { color: var(--crit); background: var(--crit-bg); }

/* ── Feed (Der Puls) ── */
.home-v3 .feed { display: flex; flex-direction: column; }
.home-v3 .feed .frow { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.home-v3 .feed .frow:first-child { border-top: none; }
.home-v3 .feed .fic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.home-v3 .feed .fic svg { width: 13px; height: 13px; stroke-width: 2.2; }
.home-v3 .fic.pay { background: var(--ok-bg); color: var(--ok); }
.home-v3 .fic.tik { background: var(--accent-soft); color: var(--accent); }
.home-v3 .fic.mem { background: #f5f3ff; color: #7c3aed; }
.home-v3 .fic.sys { background: var(--neutral-badge); color: var(--ink-soft); }
.home-v3 .feed .ft { color: var(--ink-faint); font-size: 11px; white-space: nowrap; margin-left: auto; }
.home-v3 .feed .fsub { color: var(--ink-faint); }

/* ── Mitglieder-Netto ── */
.home-v3 .netto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.home-v3 .netto .nv { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.home-v3 .netto .nl { font-size: 10.5px; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.home-v3 .bestand { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }

/* ── Kommunikation (nächste Versände) ── */
.home-v3 .komm .krow { display: flex; gap: 9px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; align-items: baseline; }
.home-v3 .komm .krow:first-child { border-top: none; }
.home-v3 .komm .kt { font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: 11.5px; width: 82px; flex: none; }

/* ── System-Ampel (eine Zeile) ── */
.home-v3 .sysline { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--ink-soft); padding: 10px 16px; flex-wrap: wrap; }
.home-v3 .sysline .si { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.home-v3 .sysline .si .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); }
.home-v3 .sysline .si.crit { color: var(--crit); font-weight: 600; }
.home-v3 .sysline .si.crit .dot { background: var(--crit); }
.home-v3 .sysline .sys-link { margin-left: auto; }

/* ── Leerzustand („Nichts wartet ✓") ── */
.home-v3 .empty-state { display: flex; align-items: center; gap: 9px; padding: 18px 6px; color: var(--ink-faint); font-size: 12.5px; }
.home-v3 .empty-state .es-icon { width: 26px; height: 26px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; flex: none; }
.home-v3 .empty-state .es-icon svg { width: 14px; height: 14px; stroke-width: 2.4; }
.home-v3 .empty-state .es-check { color: var(--ok); font-weight: 700; }

/* ── Responsiv (Shell wird schmal / Tablet) ── */
@media (max-width: 1180px) {
  .home-v3 .split { grid-template-columns: 1fr; }
  .home-v3 .lage { grid-template-columns: 1fr; }
  .home-v3 .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .home-v3 { padding: 16px 14px 40px; }
  .home-v3 .g2, .home-v3 .g4 { grid-template-columns: 1fr; }
  .home-v3 .page-head { flex-direction: column; }
  .home-v3 .status-card { flex-direction: column; align-items: flex-start; gap: 16px; }
}
