:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --text: #13201d;
  --muted: #5d6b67;
  --line: #e2e8e6;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #dff3ef;
  --danger: #c2413a;
  --danger-soft: #fbe7e5;
  --warn: #a8620a;
  --warn-soft: #fdf1dc;
  --ok: #1f8a57;
  --ok-soft: #e1f4ea;
  --shadow: 0 1px 2px rgba(16, 24, 22, .06), 0 4px 16px rgba(16, 24, 22, .06);
  --radius: 18px;
  --tabbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1416;
    --surface: #131f21;
    --surface-2: #18272a;
    --text: #e8efed;
    --muted: #93a39f;
    --line: #22343a;
    --brand: #2dd4bf;
    --brand-ink: #062320;
    --brand-soft: #123a36;
    --danger: #f2837b;
    --danger-soft: #3a1e1c;
    --warn: #f1b45a;
    --warn-soft: #3a2c15;
    --ok: #5fd39a;
    --ok-soft: #15322a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1416; --surface: #131f21; --surface-2: #18272a; --text: #e8efed; --muted: #93a39f; --line: #22343a;
  --brand: #2dd4bf; --brand-ink: #062320; --brand-soft: #123a36; --danger: #f2837b; --danger-soft: #3a1e1c;
  --warn: #f1b45a; --warn-soft: #3a2c15; --ok: #5fd39a; --ok-soft: #15322a; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 96px);
  outline: none;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 16px; }
.page-head h1 { font-size: 28px; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

h2.section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 4px 8px; font-weight: 650; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.card.flush { padding: 4px 0; }

.hero { background: var(--brand); color: var(--brand-ink); }
.hero .label { opacity: .85; font-size: 14px; }
.hero .big { font-size: 38px; font-weight: 750; letter-spacing: -.03em; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.hero .split { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.hero .split b { font-variant-numeric: tabular-nums; }
.hero .bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; margin: 12px 0 8px; display: flex; }
.hero .bar i { display: block; height: 100%; background: currentColor; opacity: .9; }
.hero .muted { opacity: .8; font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 17px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.banner {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
  text-align: left; cursor: pointer; font-weight: 600;
}
.banner .grow { flex: 1; }
.banner small { display: block; font-weight: 400; opacity: .85; }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.banner.info { background: var(--brand-soft); color: var(--brand); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; min-height: 60px;
  border-top: 1px solid var(--line);
  cursor: pointer; background: none; width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0;
}
.list > li:first-child .row, .list > .row:first-child { border-top: 0; }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .amount small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.amount.plus { color: var(--ok); }

.date-chip {
  width: 46px; flex: none; text-align: center; border-radius: 12px; padding: 5px 0;
  background: var(--surface-2); line-height: 1.05;
}
.date-chip b { display: block; font-size: 18px; }
.date-chip span { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.date-chip.overdue { background: var(--danger-soft); color: var(--danger); }
.date-chip.overdue span { color: inherit; }
.date-chip.today, .date-chip.soon { background: var(--warn-soft); color: var(--warn); }
.date-chip.today span, .date-chip.soon span { color: inherit; }

/* Kachel links: Firmenlogo auf Weiß oder Symbol der Kategorie in ihrer Farbe */
.dot { --c: var(--muted); width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--c) 20%, var(--surface-2)); color: var(--c); }
.dot svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dot.logo { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.dot.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pill { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 99px; vertical-align: 1px; }
.pill.debit { background: var(--brand-soft); color: var(--brand); }
.pill.manual { background: var(--warn-soft); color: var(--warn); }
.pill.overdue { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.muted { background: var(--surface-2); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); font-weight: 650;
}
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row .btn { flex: 1; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chips button {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; color: var(--muted);
}
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.month-nav button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.month-nav strong { font-size: 17px; }

.cat-bars .cb { margin: 10px 0; }
.cat-bars .cb-head { display: flex; justify-content: space-between; font-size: 14px; }
.cat-bars .cb-head span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.cat-bars .track { height: 8px; border-radius: 99px; background: var(--surface-2); margin-top: 4px; overflow: hidden; }
.cat-bars .track i { display: block; height: 100%; border-radius: 99px; }

.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.empty .icon { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv:first-child { border-top: 0; }
.kv span:first-child { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.note.err { color: var(--danger); }
code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }

/* Tabbar und FAB */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; }

.fab {
  position: fixed; z-index: 11; right: max(16px, calc(50vw - 264px)); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px);
  width: 58px; height: 58px; border-radius: 20px; border: 0; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 20px rgba(15, 118, 110, .35);
  display: grid; place-items: center;
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.4; }
.fab[hidden] { display: none; }

/* Bottom-Sheet */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
  max-height: 92vh; max-height: 92dvh;
  border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .2);
}
.sheet::backdrop { background: rgba(5, 12, 11, .45); }
.sheet[open] { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 10px auto 0; }
#sheet-body { padding: 8px 16px calc(env(safe-area-inset-bottom) + 20px); }
.sheet h2 { font-size: 20px; margin: 8px 0 14px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 10px 12px; font-size: 16px;
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.amount-input { font-size: 24px !important; font-weight: 700; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 13px; border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 10px 6px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.toggle input { width: 22px; height: 22px; accent-color: var(--brand); }

.search { margin-bottom: 10px; }
.bank-list { max-height: 50vh; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); }
.bank-list .row { min-height: 52px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 90px); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  max-width: calc(100vw - 32px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Monatsansicht in der Übersicht */
.hero-nav { display: flex; align-items: center; justify-content: space-between; margin: -6px -6px 10px; }
.hero-nav strong { font-size: 17px; }
.hero-nav button {
  width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: inherit; display: grid; place-items: center;
}
.hero-nav button svg { width: 20px; height: 20px; }
.hero .split + .split { margin-top: 4px; }
h2.sum-head { display: flex; justify-content: space-between; }
h2.sum-head span:last-child { font-variant-numeric: tabular-nums; }
.row.done .title, .row.done .amount { color: var(--muted); }

/* Kategorien antippbar, Details im Bottom-Sheet */
.cat-bars button.cb { display: block; width: 100%; border: 0; background: none; padding: 6px 0; margin: 4px 0; text-align: left; cursor: pointer; color: inherit; border-radius: 10px; }
.cat-bars button.cb:active { background: var(--surface-2); }
.cat-bars .chev { color: var(--muted); font-weight: 400; margin-left: 4px; }
.cat-bars .cb.static .note { font-size: 13px; margin: 0; display: inline; }
.sheet-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 4px; }

/* Kontostand im Ausgaben-Tab */
.hero .kv-hero { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .22); font-variant-numeric: tabular-nums; }
.hero .kv-hero:first-of-type { margin-top: 8px; }
.hero .kv-hero.strong { font-weight: 700; font-size: 17px; }
.stats.two { grid-template-columns: 1fr 1fr; }

/* Monatskarte auf der Übersicht */
.month-card .hero-nav { margin: -4px -4px 8px; }
.month-card .hero-nav button { background: var(--surface-2); }
.month-card .kv { align-items: baseline; }
.month-card .kv b { font-variant-numeric: tabular-nums; }
.month-card .kv.big-kv span { color: var(--text); font-weight: 600; }
.month-card .kv.big-kv b { font-size: 22px; }
.month-card .kv.sub { border-top: 0; padding: 2px 0 2px 12px; font-size: 14px; }
.month-card .kv.sub small { color: var(--muted); }
.month-card .kv.sub span:last-child { font-variant-numeric: tabular-nums; }
.month-card .kv.strong span, .month-card .kv.strong b { color: var(--text); font-weight: 700; font-size: 17px; }
/* "Vorgemerkt" im Kontostand antippbar */
.hero button.kv-hero { width: 100%; background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .22); color: inherit; cursor: pointer; text-align: left; }
.hero button.kv-hero:disabled { cursor: default; }
.hero .chev { opacity: .7; margin-left: 4px; }
.sheet { touch-action: pan-y; }

/* Rückfrage "Ist das ein Vertrag?" */
.ask { border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.ask-head { display: flex; gap: 12px; align-items: center; }
.ask-head strong { font-size: 17px; }
.ask-head .note { margin: 0; }
.ask-badge { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 18px; }
.ask-item { display: flex; align-items: center; gap: 12px; padding: 12px 0 2px; }
.ask-item.boxed { background: var(--surface-2); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.ask-item .main { flex: 1; min-width: 0; }
.ask-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-item .meta { color: var(--muted); font-size: 13px; }
.ask-item .amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-btn { display: block; width: 100%; margin-top: 10px; padding: 6px 0 0; border: 0; background: none; color: var(--brand); font-weight: 650; font-size: 14px; cursor: pointer; text-align: center; }
.link-btn.inline { display: inline; width: auto; margin: 0; padding: 0; font-size: inherit; }

/* Preisänderung, Vergleich mit dem Vormonat */
.trend { font-size: 13px; font-weight: 650; margin-top: 2px; }
.trend.up, .delta.up { color: var(--warn); }
.trend.down, .delta.down { color: var(--ok); }
.delta { font-weight: 600; font-size: 14px; }
.plus { color: var(--ok); }
.minus { color: var(--danger); }
.balance-kv { margin-top: 10px; }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner.static { cursor: default; }

/* Sortierung der Verträge */
.sort-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0 2px 4px; padding: 0 4px 0 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; color: var(--muted); }
.sort-pill select { border: 0; background: none; font-weight: 700; color: var(--text); padding: 9px 6px; min-height: 40px; cursor: pointer; }
.sort-pill select:focus-visible { outline: 2px solid var(--brand); border-radius: 8px; }
h2.sum-head .count { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Sortierhilfe */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-grid button { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 14px; font-weight: 600; cursor: pointer; }
.cat-grid button:active { background: var(--surface-2); }
.cat-grid .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }

/* Vertragsdetail */
.detail-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 6px; }
.detail-head h2 { margin: 0; }
.detail-head .note { margin: 2px 0 0; }
.dot.big { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
.detail-amount { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 12px; }
.detail-amount b { font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.detail-amount span { color: var(--muted); }

/* Monatsrückblick */
.review-hero { display: flex; align-items: center; gap: 16px; background: var(--brand-soft); border-radius: 16px; padding: 16px; margin-bottom: 10px; }
.review-hero .k { color: var(--muted); font-size: 14px; }
.review-hero .v { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.cal-badge { flex: none; width: 40px; padding: 6px 0; border-radius: 10px; background: var(--surface); color: var(--brand); font-weight: 800; font-size: 12px; text-align: center; text-transform: uppercase; letter-spacing: .04em; box-shadow: var(--shadow); }
.cal-badge.big { width: 56px; padding: 14px 0; font-size: 15px; }
.review-teaser .chev { font-size: 22px; opacity: .7; }

/* App-Sperre */
body.locked #app, body.locked .toast { visibility: hidden; }
.lock { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); overflow-y: auto; }
.lock[hidden] { display: none; }
.lock-inner { width: 100%; max-width: 320px; text-align: center; padding: 24px 0; }
.lock-logo { width: 64px; height: 64px; border-radius: 18px; }
.lock h1 { font-size: 22px; margin: 10px 0 4px; }
.lock-msg { color: var(--muted); font-size: 14px; min-height: 40px; margin: 0 0 14px; }
.lock-msg.err { color: var(--danger); font-weight: 600; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 22px; justify-items: center; }
.key { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 26px; font-weight: 600; cursor: pointer; display: grid; place-items: center; }
.key:active { background: var(--brand-soft); }
.key.icon { background: none; box-shadow: none; color: var(--brand); }
.key.icon svg { width: 30px; height: 30px; }
.lock-forgot { margin-top: 22px; border: 0; background: none; color: var(--muted); font-size: 14px; text-decoration: underline; cursor: pointer; padding: 8px; }
.pin-input { font-size: 24px !important; letter-spacing: .4em; text-align: center; }
#sheet-body { outline: none; }
.ask-item .meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Größere Kachel im Detail */
.dot.big svg { width: 27px; height: 27px; }

/* Einnahmen im Tab Verträge, wie die Verträge nach Turnus */
h2.income-head { display: flex; justify-content: space-between; margin-top: 32px; font-size: 18px; text-transform: none; letter-spacing: -.01em; color: var(--text); font-weight: 750; }
h2.income-head .plus { font-size: 14px; font-weight: 650; color: var(--ok); }
h3.sub-head { display: flex; justify-content: space-between; margin: 14px 4px 8px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
h3.sub-head .count { color: var(--muted); font-weight: 500; }
.detail-amount b.plus { color: var(--ok); }

/* Karte "App schützen" */
.ask-badge.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Symbol vor jeder Kategorie in den Balken */
.cb-name { display: inline-flex; align-items: center; gap: 8px; }
.cb-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.cb-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Wischen zwischen den Tabs: die Seite folgt dem Finger, ohne dass die Seite seitlich scrollt */
/* Nur der Inhaltsbereich scrollt, nicht die Seite: die Leiste unten bleibt fest stehen (auch beim
   Tab-Wechsel und beim Ziehen am Seitenanfang). */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
#view { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
#view { touch-action: pan-y; }

/* Verlauf je Absender/Händler: Summe der letzten 6 Monate als Säulen */
.month-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; margin: 6px 0 14px; }
.mc-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.mc-val { font-size: 11px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-bar { display: flex; align-items: flex-end; width: 100%; height: 92px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.mc-bar i { display: block; width: 100%; border-radius: 8px 8px 0 0; }
.mc-lab { font-size: 12px; color: var(--muted); }
.mc-col.now .mc-lab, .mc-col.now .mc-val { color: var(--text); font-weight: 700; }
