/* Moneytracker – Designsystem im Stil einer macOS-App.
   Schrift: ausschließlich Inter (SIL Open Font License, selbst gehostet – siehe /fonts/Inter-LICENSE.txt). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}

/* ---------- Farben (hell zuerst, Dunkel als eigene Stufen wie macOS) ---------- */
:root {
  --window: #f5f5f7; --content: #ffffff; --sidebar: rgba(236, 236, 238, 0.86); --toolbar: rgba(250, 250, 252, 0.82);
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6; --line: rgba(0, 0, 0, 0.1); --line-strong: rgba(0, 0, 0, 0.16);
  --row-alt: #f6f6f8; --hover: rgba(0, 0, 0, 0.045); --control: #ffffff; --control-track: rgba(118, 118, 128, 0.14);
  --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: rgba(15, 118, 110, 0.12); --focus: rgba(15, 118, 110, 0.35);
  --select: #0f766e; --select-ink: #ffffff; --select-muted: rgba(0, 0, 0, 0.07);
  --neg: #c4262e; --pos: #1d8a3e;
  --pill-pos: #d4f2c7; --pill-pos-ink: #14532d; --pill-zero: rgba(118, 118, 128, 0.14); --pill-zero-ink: #55555a;
  --pill-neg: #fbdcda; --pill-neg-ink: #a1171d; --pill-warn: #fcebc0; --pill-warn-ink: #7c4a03;
  --rta-pos: #ddf3d1; --rta-zero: rgba(118, 118, 128, 0.1); --rta-neg: #fbe0de;
  --series-1: #2a78d6; --series-2: #eb6834;
  --shadow-control: 0 0.5px 1px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  --shadow-window: 0 20px 50px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  --radius: 10px; --radius-sm: 6px; --tabbar-h: 54px; --side-w: 240px; --toolbar-h: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --window: #1e1e1e; --content: #262626; --sidebar: rgba(40, 40, 42, 0.86); --toolbar: rgba(38, 38, 40, 0.82);
    --text: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73; --line: rgba(255, 255, 255, 0.1); --line-strong: rgba(255, 255, 255, 0.16);
    --row-alt: #2b2b2d; --hover: rgba(255, 255, 255, 0.06); --control: #3a3a3c; --control-track: rgba(118, 118, 128, 0.24);
    --accent: #2dd4bf; --accent-ink: #042f2e; --accent-soft: rgba(45, 212, 191, 0.16); --focus: rgba(45, 212, 191, 0.4);
    --select: #0f766e; --select-ink: #ffffff; --select-muted: rgba(255, 255, 255, 0.1);
    --neg: #ff6961; --pos: #4cd964;
    --pill-pos: #1f4d2b; --pill-pos-ink: #bbf7d0; --pill-zero: rgba(118, 118, 128, 0.26); --pill-zero-ink: #c7c7cc;
    --pill-neg: #5a1d1a; --pill-neg-ink: #ffc9c6; --pill-warn: #4a3509; --pill-warn-ink: #fde68a;
    --rta-pos: #1f3d1f; --rta-zero: rgba(118, 118, 128, 0.2); --rta-neg: #4a1d1b;
    --series-1: #3987e5; --series-2: #d95926;
    --shadow-control: 0 0.5px 1px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --shadow-window: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
    color-scheme: dark;
  }
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--window); color: var(--text);
  font: 13px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11"; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); } .small { font-size: 11.5px; }
.neg { color: var(--neg); } .pos { color: var(--pos); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.center { text-align: center; }
.ico { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; align-items: center; justify-content: center; font-size: 16px; }
.ico svg { width: 100%; height: 100%; }

/* ---------- Fensteraufbau ---------- */
.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 88px); }
body.public .main { padding-bottom: 24px; }
.view { max-width: 760px; margin: 0 auto; padding: 12px 16px; }
body.wide .view { max-width: 1280px; }

/* Titelleiste (mobil bzw. öffentliche Seiten) */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; min-height: var(--toolbar-h);
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--toolbar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 650; font-size: 14px; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 22px; height: 22px; border-radius: 5px; }
.topnav { display: flex; gap: 6px; align-items: center; flex-shrink: 0; margin-left: auto; }
.topnav a { font-weight: 500; padding: 4px 8px; }
.menu-btn { display: none; border: 0; background: none; padding: 4px; border-radius: var(--radius-sm); cursor: pointer; color: var(--muted);
  width: 30px; height: 28px; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn:hover { background: var(--hover); }
body.app .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 420px) { .topnav .hide-narrow { display: none; } }
/* Sprachauswahl (Flagge + Name) in der oberen Leiste */
.topnav a { white-space: nowrap; }
.topnav .lang-select { width: auto; max-width: 9.5em; height: 28px; font-size: 13px; }
@media (max-width: 420px) { .topnav .lang-select { max-width: 4.2em; } }

/* ---------- Seitenleiste (Source List wie in macOS) ---------- */
.sidebar { display: none; }
body.app .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  background: var(--sidebar); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border-right: 1px solid var(--line); color: var(--text); overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 12px) 10px 12px; transform: translateX(-100%); transition: transform .2s ease; }
body.app.menu-open .sidebar { transform: none; box-shadow: var(--shadow-window); }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 25; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; color: var(--text); border-radius: var(--radius-sm); }
.side-user:hover { text-decoration: none; }
.side-user img { border-radius: 6px; }
.side-user strong { display: block; font-size: 13px; font-weight: 650; }
.side-user span { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 165px; }
.side-nav a, .side-acc, .side-foot a { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 28px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 13px; }
.side-nav a .ico, .side-foot a .ico { color: var(--accent); }
.side-nav a:hover, .side-acc:hover, .side-foot a:hover { background: var(--select-muted); text-decoration: none; }
.side-nav a.active, .side-acc.active, .side-foot a.active { background: var(--select); color: var(--select-ink); }
.side-nav a.active .ico, .side-foot a.active .ico { color: var(--select-ink); }
.side-group { margin-top: 14px; }
.side-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: default;
  padding: 2px 8px 4px; font-size: 11px; font-weight: 600; color: var(--faint); }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after { content: '›'; margin-left: 6px; font-size: 13px; transform: rotate(90deg); transition: transform .15s; opacity: 0; }
.side-group summary:hover::after { opacity: 1; }
.side-group:not([open]) summary::after { transform: none; }
.side-group summary .label { flex: 1; }
.side-group summary .num { font-weight: 500; }
.side-acc { justify-content: space-between; padding-left: 12px; }
.side-acc .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-acc .num { color: var(--muted); font-size: 12px; }
.side-acc.active .num { color: var(--select-ink); }
.side-acc .num.negpill { color: var(--neg); font-weight: 600; }
.side-acc.active .num.negpill { color: var(--select-ink); }
.side-add { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0 8px; height: 28px; border: 0; background: none;
  color: var(--muted); cursor: pointer; border-radius: var(--radius-sm); font-size: 13px; text-align: left; }
.side-add .ico { width: 13px; height: 13px; flex-basis: 13px; }
.side-add:hover { background: var(--select-muted); color: var(--text); }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line); }

@media (min-width: 960px) {
  body.app .sidebar { transform: none; }
  body.app .main { margin-left: var(--side-w); padding-bottom: 40px; }
  body.app .topbar, body.app .tabbar, body.app .fab, body.app .backdrop { display: none !important; }
  body.app .view { max-width: none; padding: 0 24px 24px; }
  /* Seitenkopf wird zur Werkzeugleiste des Fensters */
  body.app .page-head { position: sticky; top: 0; z-index: 6; margin: 0 -24px 16px; padding: 10px 24px; min-height: var(--toolbar-h);
    background: var(--toolbar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line); }
}

/* ---------- Tabbar & FAB (mobil) ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--toolbar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; line-height: var(--tabbar-h); color: var(--muted); font-size: 11px; font-weight: 500; }
.tabbar a:hover { text-decoration: none; }
.tabbar a.active { color: var(--accent); font-weight: 650; }
.fab { position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); z-index: 6;
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  font-size: 28px; line-height: 1; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); cursor: pointer; }

/* ---------- Flächen & Listen ---------- */
.card { background: var(--content); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.card h2 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 4px 6px; }
.section-title h2 { margin: 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 15px; font-weight: 700; }
.page-head .spacer { flex: 1; }
.big { font-size: 26px; font-weight: 700; margin: 2px 0; letter-spacing: -0.01em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stats .num { text-align: left; font-weight: 650; font-size: 15px; }

.list { list-style: none; margin: 0; padding: 0; background: var(--content); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; min-height: 34px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li:nth-child(even) { background: var(--row-alt); }
.list li.clickable { cursor: default; }
.list li.clickable:hover { background: var(--hover); }
.list .grow { flex: 1; min-width: 0; }
.list .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .sub { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.child { padding-left: 30px; }
.list li.archived { opacity: .5; }
.day { margin: 14px 4px 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 26px 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar > input, .toolbar > select { flex: 1 1 180px; width: auto; }
.monthnav { display: flex; align-items: center; gap: 10px; }
.monthnav strong { font-size: 15px; font-weight: 700; min-width: 8.5em; }
.stepper { display: inline-flex; background: var(--control); border-radius: var(--radius-sm); box-shadow: var(--shadow-control); }
.round-btn { width: 28px; height: 24px; border: 0; background: none; color: var(--text); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; padding: 0; }
.round-btn + .round-btn { border-left: 1px solid var(--line); }
.round-btn .ico { width: 13px; height: 13px; flex-basis: 13px; }
.round-btn:hover { background: var(--hover); }
.round-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.round-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Bedienelemente (macOS) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 24px; padding: 0 11px;
  border: 0; border-radius: var(--radius-sm); background: var(--control); color: var(--text); box-shadow: var(--shadow-control);
  cursor: default; font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(0.98); }
.btn:active { filter: brightness(0.94); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0.5px 1px rgba(0, 0, 0, .2); }
.btn.danger { color: var(--neg); }
.btn.link { background: none; box-shadow: none; color: var(--accent); padding: 0 4px; height: auto; font-weight: 500; }
.btn.link:hover { text-decoration: underline; filter: none; }
.btn:disabled { opacity: .45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { height: 22px; padding: 0 10px; border: 0; border-radius: 11px; background: var(--control-track); color: var(--text);
  font-size: 12px; font-weight: 500; cursor: default; }
.chip:hover { filter: brightness(0.97); }
.chip.active { background: var(--select); color: var(--select-ink); }

input, select, textarea { width: 100%; height: 26px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: var(--control);
  box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; }
textarea { height: auto; min-height: 64px; padding: 6px 8px; resize: vertical; }
select { padding-right: 24px; }
input[type=checkbox], input[type=radio] { width: 14px; height: 14px; box-shadow: none; accent-color: var(--accent); margin: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
label { display: block; margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.check { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: 13px; }
label.check input { margin-top: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amount-input { height: 40px; font-size: 22px; font-weight: 650; text-align: right; }
/* Segmentschalter */
.segmented { display: inline-flex; padding: 2px; gap: 2px; border-radius: 7px; background: var(--control-track); margin-bottom: 4px; }
.segmented button { flex: 1; border: 0; background: none; height: 20px; padding: 0 12px; border-radius: 5px; font-size: 12px; font-weight: 500;
  cursor: default; white-space: nowrap; color: var(--text); }
.segmented button.active { background: var(--control); box-shadow: var(--shadow-control); font-weight: 600; }
.segmented button:disabled:not(.active) { opacity: .4; }
dialog .segmented { display: flex; }
.error { color: var(--neg); font-size: 12px; margin: 8px 0 0; min-height: 1em; }

/* Dialoge als macOS-Sheet */
dialog { width: min(480px, calc(100vw - 24px)); max-height: 90vh; margin: auto; padding: 0; border: 0; border-radius: 12px;
  background: var(--window); color: var(--text); box-shadow: var(--shadow-window); }
dialog::backdrop { background: rgba(0, 0, 0, .2); }
dialog form { padding: 18px 20px calc(16px + env(safe-area-inset-bottom)); }
dialog h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-align: center; }
.actions { display: flex; gap: 8px; margin-top: 18px; }
.actions .spacer { flex: 1; }
@media (max-width: 599px) { dialog { margin: auto auto 0; border-radius: 14px 14px 0 0; width: 100vw; max-width: 100vw; } }

/* ---------- Verfügbar-Pillen & Zu verteilen ---------- */
.pill { display: inline-block; min-width: 4.8em; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px;
  font-variant-numeric: tabular-nums; text-align: right; }
.pill.pos { background: var(--pill-pos); color: var(--pill-pos-ink); }
.pill.zero { background: var(--pill-zero); color: var(--pill-zero-ink); font-weight: 500; }
.pill.neg { background: var(--pill-neg); color: var(--pill-neg-ink); }
.pill.warn { background: var(--pill-warn); color: var(--pill-warn-ink); }
.pill-btn { border: 0; background: none; padding: 0; cursor: default; border-radius: 999px; }
.pill-btn:hover .pill { box-shadow: 0 0 0 2px var(--focus); }
.pill-btn:disabled:hover .pill { box-shadow: none; }
.rta { display: flex; align-items: center; gap: 14px; padding: 6px 14px; border-radius: 8px; background: var(--rta-zero); min-width: 210px;
  border: 0; text-align: left; color: inherit; font: inherit; cursor: default; }
button.rta:hover { filter: brightness(0.98); }
.rta.pos { background: var(--rta-pos); } .rta.neg { background: var(--rta-neg); }
.rta .amount { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rta .label { font-size: 11px; color: var(--muted); }
.rta .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); color: var(--window);
  display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.month-note { margin-top: 4px; height: 22px; box-shadow: none; background: transparent; color: var(--muted); padding: 0 6px;
  font-size: 12px; max-width: 26em; }
.month-note:hover { box-shadow: inset 0 0 0 1px var(--line); }
.month-note:focus { color: var(--text); background: var(--control); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Budget-Ansicht (Tabelle wie in einer Mac-App) ---------- */
.plan { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1200px) { .plan { grid-template-columns: minmax(0, 1fr) 300px; } }
.plan-table { background: var(--content); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 104px 106px; align-items: center; gap: 10px;
  padding: 3px 12px; min-height: 30px; border-top: 1px solid var(--line); }
.prow:nth-child(odd):not(.group):not(.head) { background: var(--row-alt); }
.prow:hover:not(.head):not(.group) { background: var(--hover); }
.prow.head { border-top: 0; min-height: 26px; font-size: 11px; color: var(--muted); font-weight: 600; background: var(--content); }
.prow.group { background: var(--window); font-weight: 650; min-height: 28px; }
.prow.group .name { display: flex; align-items: center; gap: 4px; }
.prow .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow.child .name { padding-left: 20px; }
.prow .name button { border: 0; background: none; padding: 0; cursor: default; color: inherit; text-align: left; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; font-weight: inherit; }
.prow .name button:hover { color: var(--accent); }
.prow .toggle { color: var(--muted); width: 14px; font-size: 10px; }
.prow .budget-input { height: 22px; text-align: right; font-variant-numeric: tabular-nums; box-shadow: none; background: transparent; padding: 0 6px; }
.prow .budget-input:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.prow .budget-input:focus { background: var(--control); box-shadow: inset 0 0 0 1px var(--line-strong); }
.prow a.col-activity { color: inherit; }
.prow a.col-activity:hover { color: var(--accent); }
.prow .sub-activity { display: none; }
.prow.archived { opacity: .5; }
.goal { height: 3px; border-radius: 2px; background: var(--pill-zero); margin-top: 3px; overflow: hidden; max-width: 200px; }
.goal span { display: block; height: 100%; background: var(--pill-warn-ink); }
.goal.done span { background: var(--pos); }
.goal-text { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }
@media (max-width: 640px) {
  .prow { grid-template-columns: minmax(0, 1fr) 78px 86px; padding: 6px 10px; gap: 6px; }
  .prow .name { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .prow.child .name { padding-left: 10px; }
  .prow .col-activity { display: none; }
  .prow .sub-activity { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
  .prow .budget-input { padding: 0 4px; }
  .pill { min-width: 0; padding: 1px 7px; }
  .page-head .rta { flex: 1 1 100%; min-width: 0; }
  .page-head .spacer { display: none; }
}
.side-panel .card h2 { display: flex; justify-content: space-between; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.kv.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 650; }
.warn-box { background: var(--rta-neg); color: var(--pill-neg-ink); border-radius: 8px; padding: 7px 10px; margin: 6px 0; text-align: center; font-weight: 600; }
.warn-text { color: var(--pill-warn-ink); }
.quick { display: grid; gap: 6px; }
.quick .btn { justify-content: space-between; height: 26px; }

/* ---------- Konto-Register (Tabelle mit Zebra-Streifen) ---------- */
.register-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--content); }
.register { width: 100%; border-collapse: collapse; }
.register th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--content); position: sticky; top: 0; }
.register td { padding: 5px 10px; vertical-align: middle; }
.register tbody tr:nth-child(even) td { background: var(--row-alt); }
.register tr.clickable { cursor: default; }
.register tr.clickable:hover td { background: var(--hover); }
.register .num, .register th.num { text-align: right; }
.register .note { color: var(--muted); max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.register td.date { white-space: nowrap; }
.register td.cat { white-space: nowrap; max-width: 17em; overflow: hidden; text-overflow: ellipsis; }
.register td.num { white-space: nowrap; }
tr.scheduled td, li.scheduled { color: var(--muted); }
.only-wide { display: none; } .only-narrow { display: block; }
@media (min-width: 960px) { .only-wide { display: block; } .only-narrow { display: none; } }
.acc-summary { display: flex; flex-wrap: wrap; gap: 24px; }
.acc-summary .num { text-align: left; font-size: 17px; font-weight: 700; }
.badge { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--pill-warn); color: var(--pill-warn-ink);
  font-size: 10.5px; font-weight: 600; vertical-align: 1px; }
.period-bar { align-items: flex-start; gap: 10px 14px; }
.period-seg { flex: 0 0 auto; margin: 0; }
.range { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-inputs input { width: auto; flex: 1 1 140px; max-width: 170px; }
.range .chips { margin: 0; }

/* ---------- Auswertung (Diagramme) ---------- */
.viz { position: relative; }
.viz-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.viz-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.viz-legend .s1::before { background: var(--series-1); } .viz-legend .s2::before { background: var(--series-2); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 180px; align-items: end; border-bottom: 1px solid var(--line); padding: 0 2px; }
.bar-group { display: flex; gap: 2px; align-items: end; height: 100%; position: relative; }
.bar-group:hover { background: var(--hover); border-radius: 5px 5px 0 0; }
.bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 0; }
.bar.s1 { background: var(--series-1); } .bar.s2 { background: var(--series-2); }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; font-size: 10.5px; color: var(--muted); text-align: center; padding-top: 4px; }
.tooltip { position: absolute; z-index: 10; pointer-events: none; background: var(--content); color: var(--text); border-radius: 8px;
  padding: 7px 10px; font-size: 11.5px; box-shadow: var(--shadow-window); white-space: nowrap; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1.6fr) 92px; gap: 10px; align-items: center; padding: 4px 0; }
.hbar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { height: 10px; background: var(--pill-zero); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--series-2); border-radius: 0 4px 4px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.data-table th, .data-table td { padding: 4px 8px; border-top: 1px solid var(--line); text-align: right; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
details summary { cursor: default; }
.grid2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Verwaltung, Mein Konto, Import ---------- */
.order-btns { display: flex; gap: 4px; }
.icon-mini { width: 22px; height: 20px; border: 0; background: var(--control); box-shadow: var(--shadow-control); border-radius: 5px;
  cursor: default; color: var(--muted); font-size: 11px; }
.icon-mini:hover { color: var(--accent); }
.loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.sessions .current { font-weight: 600; color: var(--accent); }
.danger-zone { border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
#import h3 { margin: 16px 0 6px; font-size: 13px; }
#import .register td { padding: 4px 10px; }
fieldset.choices { border: 0; padding: 0; margin: 12px 0 0; }
fieldset.choices legend { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; padding: 0; }
label.choice { margin: 0; padding: 8px 10px; background: var(--content); border: 1px solid var(--line); border-top-width: 0; }
label.choice:first-of-type { border-top-width: 1px; border-radius: 8px 8px 0 0; }
label.choice:last-of-type { border-radius: 0 0 8px 8px; }
label.choice:has(input:checked) { background: var(--accent-soft); }

/* ---------- Hinweise ---------- */
.banner { margin: 10px 16px 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; background: var(--pill-warn); color: var(--pill-warn-ink); }
.banner.expired { background: var(--pill-neg); color: var(--pill-neg-ink); }
.banner a { color: inherit; font-weight: 650; text-decoration: underline; }
@media (min-width: 960px) { body.app .banner { margin: 12px 24px 0; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 84px); z-index: 40;
  background: rgba(30, 30, 32, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; padding: 8px 14px;
  border-radius: 10px; max-width: 90vw; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
@media (min-width: 960px) { .toast { bottom: 24px; left: calc(50% + var(--side-w) / 2); } body.public .toast { left: 50%; } }
.toast.error { background: rgba(160, 24, 30, .94); }

/* ---------- Öffentliche Seiten ---------- */
.hero { text-align: center; padding: 40px 4px 10px; }
.hero h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 750; }
.hero p { color: var(--muted); font-size: 16px; margin: 0 auto 22px; max-width: 32em; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta .btn { height: 34px; padding: 0 18px; font-size: 14px; border-radius: 8px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 28px 0; }
.feature { background: var(--content); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.feature-ico { width: 26px; height: 26px; flex-basis: 26px; color: var(--accent); }
.feature h3 { margin: 8px 0 4px; font-size: 13.5px; font-weight: 650; }
.feature p { margin: 0; color: var(--muted); font-size: 12.5px; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.price { background: var(--content); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.price.highlight { box-shadow: 0 0 0 2px var(--accent); border-color: transparent; }
.price .amount { font-size: 26px; font-weight: 750; margin: 6px 0 2px; letter-spacing: -0.01em; }
.price .tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 600; }
.footer { text-align: center; font-size: 11.5px; color: var(--muted); margin: 32px 0 8px; }
.footer a { color: var(--muted); margin: 0 8px; }
.login { max-width: 360px; margin: 6vh auto 0; padding: 20px; box-shadow: var(--shadow-window); border: 0; }
.login h2 { text-align: center; font-size: 15px; }
.login .btn.primary { width: 100%; margin-top: 16px; height: 30px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.legal { max-width: 720px; margin: 0 auto; padding: 16px; font-size: 14px; line-height: 1.55; }
.legal h1 { font-size: 22px; } .legal h2 { font-size: 15px; margin-top: 1.6em; }

.price .btn { margin-top: 10px; }
.chips.nearby { align-items: center; margin: -4px 0 12px; }
.side-acc[draggable=true] { cursor: grab; }
.side-acc.dragging { opacity: .45; }
.search-sums { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: -4px 0 12px; }
.search-sums > div { display: flex; align-items: baseline; gap: 8px; }

/* Kontoansicht (breit): Kopfbereich bleibt stehen, nur die Buchungstabelle scrollt – ab der Spaltenzeile */
@media (min-width: 960px) {
  body.app[data-route="transactions"] .main { display: flex; flex-direction: column; height: 100vh; padding-bottom: 0; }
  body.app[data-route="transactions"] .view { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; box-sizing: border-box; }
  body.app[data-route="transactions"] .view > * { flex: none; }
  body.app[data-route="transactions"] .view > .tx-list { flex: 1 1 auto; min-height: 240px; display: flex; flex-direction: column; margin-bottom: 8px; }
  .tx-list > .only-wide { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .tx-list .register-wrap { flex: 1; min-height: 0; overflow: auto; }
  .tx-list .register th { z-index: 1; }
}

/* Honeypot im Kontaktformular (für Menschen unsichtbar) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
