/* Konta · Aussehen
   Handy zuerst: Leiste unten, Blätter kommen von unten. Ab 900 px: Seitenleiste links.
   Farben nur über die Variablen hier - hell und dunkel. Diagrammfarben (--reihe-1/2)
   sind gegen beide Flächen geprüft (Kontrast, Farbsehschwäche). */

:root {
  color-scheme: light;
  --flaeche: #f6f6f3;
  --flaeche-2: #edece7;
  --karte: #fdfdfc;
  --tinte: #0b0b0b;
  --tinte-2: #52514e;
  --leise: #6b6a65;
  --linie: #e1e0d9;
  --linie-stark: #c3c2b7;
  --rand: rgba(11, 11, 11, 0.08);
  --akzent: #1c5cab;
  --akzent-text: #1c5cab;
  --akzent-hell: #cde2fb;
  --plus: #006300;
  --gefahr: #c0362c;
  --warn-bg: #fbeae7;
  --warn-text: #8a2219;
  --info-bg: #e6f0fc;
  --reihe-1: #2a78d6;
  --reihe-2: #eb6834;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.08);
  --eingabe-bg: #ffffff;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --flaeche: #0d0d0d;
    --flaeche-2: #242422;
    --karte: #1a1a19;
    --tinte: #f0efec;
    --tinte-2: #c3c2b7;
    --leise: #9a988f;
    --linie: #2c2c2a;
    --linie-stark: #44443f;
    --rand: rgba(255, 255, 255, 0.08);
    --akzent: #256abf;
    --akzent-text: #6da7ec;
    --akzent-hell: #184f95;
    --plus: #0ca30c;
    --gefahr: #e66767;
    --warn-bg: #3a1d1a;
    --warn-text: #f3b1a9;
    --info-bg: #14263d;
    --reihe-1: #3987e5;
    --reihe-2: #d95926;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
    --eingabe-bg: #121211;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--flaeche);
  color: var(--tinte);
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--akzent-text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent-text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- Rahmen ---------- */

.rahmen { min-height: 100vh; }
.seitenleiste { display: none; }
.hauptbereich { min-width: 0; }
.kopfzeile {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--flaeche) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kopfzeile h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.kopf-knoepfe { display: flex; gap: 4px; }
main { padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); outline: none; }

nav.unten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--karte);
  border-top: 1px solid var(--linie);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; color: var(--leise); text-decoration: none; font-size: 11px; font-weight: 500;
}
.tab .ic { width: 22px; height: 22px; }
.tab.aktiv { color: var(--akzent-text); }
.punkt { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--gefahr); }

.fab {
  position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 11;
  width: 56px; height: 56px; border-radius: 18px; border: 0;
  background: var(--akzent); color: #fff; box-shadow: var(--schatten);
  display: grid; place-items: center; cursor: pointer;
}
.fab .ic { width: 26px; height: 26px; }

.knopf-icon {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--tinte);
}
.knopf-icon:hover { background: var(--flaeche-2); }
.knopf-icon.arbeitet .ic { animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.zahl-punkt {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--gefahr); color: #fff; font-size: 10px; font-weight: 700; font-style: normal;
  display: grid; place-items: center;
}

@media (min-width: 900px) {
  .rahmen { display: grid; grid-template-columns: 248px 1fr; }
  .seitenleiste {
    display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 0; height: 100vh; padding: 20px 14px;
    border-right: 1px solid var(--linie); background: var(--karte);
  }
  .marke-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 8px; color: var(--tinte); text-decoration: none; font-weight: 700; font-size: 18px; }
  .seitenleiste nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .seite-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--tinte-2); text-decoration: none; font-weight: 500;
  }
  .seite-link:hover { background: var(--flaeche-2); }
  .seite-link.aktiv { background: var(--flaeche-2); color: var(--tinte); font-weight: 650; }
  .seite-link .punkt { position: static; margin-left: auto; }
  nav.unten, .fab { display: none; }
  .kopfzeile { padding: 18px 32px 12px; }
  .kopfzeile h1 { font-size: 26px; }
  main { padding: 4px 32px 48px; }
  .ansicht { max-width: 920px; }
}

/* ---------- Bausteine ---------- */

.ansicht { display: flex; flex-direction: column; gap: 14px; }
.karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 14px 16px;
}
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.karte-kopf h2 { font-size: 16px; font-weight: 650; }

.held { padding: 10px 2px 4px; }
.held-name { font-size: 14px; color: var(--tinte-2); font-weight: 500; }
.held-wert { font-size: 44px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; margin: 2px 0 4px; }
.held-unter { font-size: 14px; color: var(--tinte-2); }
.held.klein .held-wert { font-size: 34px; }
@media (min-width: 900px) { .held-wert { font-size: 52px; } .held.klein .held-wert { font-size: 38px; } }

.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .kacheln { grid-template-columns: repeat(4, 1fr); } }
.kachel { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.blatt .kachel { background: var(--flaeche); }
.kachel-name { font-size: 13px; color: var(--tinte-2); }
.kachel-wert { font-size: 20px; font-weight: 650; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel-unter { font-size: 12px; color: var(--leise); margin-top: 2px; }

.liste { display: flex; flex-direction: column; }
.zeile {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 2px; border: 0; border-bottom: 1px solid var(--linie);
  background: none; text-align: left; color: inherit; text-decoration: none; cursor: default;
}
.liste > .zeile:last-child { border-bottom: 0; }
button.zeile, a.zeile { cursor: pointer; }
button.zeile:hover, a.zeile:hover { background: color-mix(in srgb, var(--flaeche-2) 50%, transparent); }
.zeile-haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zeile-name { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile-unter { font-size: 13px; color: var(--tinte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .ic:last-child { color: var(--leise); }
.zeile.umbruch { flex-wrap: wrap; }
.zeile.umbruch .zeile-haupt { flex: 1 1 200px; }
.zeile.umbruch .knopfreihe { margin-left: auto; }
.symbol { width: 38px; height: 38px; border-radius: 12px; background: var(--flaeche-2); display: grid; place-items: center; flex: none; color: var(--tinte-2); }
.symbol .ic { width: 19px; height: 19px; }
.tag { font-size: 12px; font-weight: 650; color: var(--tinte-2); padding: 14px 2px 2px; letter-spacing: 0.02em; }
.buchungen .tag:first-child { padding-top: 2px; }
.marke { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--flaeche-2); color: var(--tinte-2); font-size: 11px; font-weight: 500; vertical-align: 1px; }
.meldung.ungelesen .zeile-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent-text); margin-right: 6px; vertical-align: 1px; }

.betrag { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.betrag.plus, .plus { color: var(--plus); }
.betrag-block { display: flex; flex-direction: column; align-items: flex-end; }
.betrag-block small { font-size: 12px; color: var(--tinte-2); }
.datum-kachel { width: 40px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; flex: none; }
.datum-kachel b { font-size: 17px; }
.datum-kachel small { font-size: 11px; color: var(--tinte-2); }

.hinweis-zeile {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
  text-decoration: none; color: var(--tinte); font-size: 14px;
}
.hinweis-zeile span { flex: 1; min-width: 0; }
.hinweis-zeile.warn { background: var(--warn-bg); color: var(--warn-text); }
.hinweis-zeile.info { background: var(--info-bg); }
.warn { color: var(--gefahr); }
.warn .ic { width: 16px; height: 16px; vertical-align: -3px; }
.ok-text { color: var(--plus); display: flex; align-items: center; gap: 6px; }
.leise { color: var(--tinte-2); font-size: 14px; }
.hinweis { color: var(--tinte-2); font-size: 14px; }
.hinweis .ic { width: 16px; height: 16px; vertical-align: -3px; }
.einleitung { color: var(--tinte-2); font-size: 15px; }
.leer { text-align: center; padding: 28px 12px; color: var(--tinte-2); }
.leer p { max-width: 460px; margin: 0 auto; }
.laedt { color: var(--tinte-2); text-align: center; padding: 32px 12px; }
.notiz { white-space: pre-wrap; color: var(--tinte-2); font-size: 14px; }
.link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; text-decoration: none; font-weight: 500; }
.link .ic { width: 16px; height: 16px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
code { background: var(--flaeche-2); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.hilfe-liste { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.hilfe-liste li { margin: 4px 0; }
.abschnitt { font-size: 13px; font-weight: 650; color: var(--tinte-2); margin: 18px 0 6px; letter-spacing: 0.03em; text-transform: uppercase; }

details.mehr > summary { cursor: pointer; font-weight: 600; padding: 6px 0; list-style-position: inside; }
details.karte > summary { padding: 0; }
details.mehr[open] > summary { margin-bottom: 8px; }

/* ---------- Knöpfe ---------- */

.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knopfreihe.mitte { justify-content: center; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 9px 16px; border-radius: 12px;
  border: 1px solid var(--linie-stark); background: var(--karte); color: var(--tinte);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: var(--flaeche-2); }
.knopf .ic { width: 18px; height: 18px; }
.knopf.haupt { background: var(--akzent); color: #fff; border-color: transparent; }
.knopf.haupt:hover { background: color-mix(in srgb, var(--akzent) 88%, #000); }
.knopf.leise { background: transparent; }
.knopf.gefahr { background: var(--gefahr); border-color: transparent; color: #fff; }
.knopf.gefahr-text { color: var(--gefahr); }
.knopf.klein { min-height: 34px; padding: 5px 11px; font-size: 14px; border-radius: 10px; }
.knopf.breit { width: 100%; }
.knopf:disabled, .knopf.arbeitet { opacity: 0.6; cursor: progress; }
.knopf-text { all: unset; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.knopf-text:focus-visible { outline: 2px solid var(--akzent-text); }

/* ---------- Formulare ---------- */

.feld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.feld-name { font-size: 13px; font-weight: 600; color: var(--tinte-2); }
.feld-hilfe { font-size: 12px; color: var(--leise); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font-size: 16px; border: 1px solid var(--linie-stark); border-radius: 11px;
  background: var(--eingabe-bg); color: var(--tinte);
}
input:disabled { opacity: 0.6; }
textarea { min-height: 0; resize: vertical; }
input[type=file] { font-size: 14px; max-width: 100%; }
input[type=date] { -webkit-appearance: none; appearance: none; }
.betrag-eingabe { font-variant-numeric: tabular-nums; text-align: right; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 380px) { .zweispaltig { grid-template-columns: 1fr; } }
.mit-knopf { display: flex; gap: 8px; align-items: center; }
.mit-knopf input { flex: 1; }

.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 6px 0 10px; font-size: 15px; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-spur { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--linie-stark); flex: none; transition: background 0.15s; }
.schalter-spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.schalter input:checked + .schalter-spur { background: var(--akzent); }
.schalter input:checked + .schalter-spur::after { transform: translateX(18px); }
.schalter input:focus-visible + .schalter-spur { outline: 2px solid var(--akzent-text); outline-offset: 2px; }
.regel .schalter { margin: 0; }

.segmente { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--flaeche-2); margin-bottom: 12px; }
.feld .segmente { margin: 0; }
.segment { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--tinte-2); }
.segment.an { background: var(--karte); color: var(--tinte); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.filterzeile { display: flex; flex-wrap: wrap; gap: 8px; }
.filterzeile select { flex: 1 1 140px; width: auto; }
.suche { position: relative; flex: 1 1 100%; display: block; }
.suche .ic { position: absolute; left: 12px; top: 12px; color: var(--leise); }
.suche input { padding-left: 40px; }
@media (min-width: 900px) { .suche { flex: 2 1 260px; } }
.summen { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--tinte-2); padding: 4px 2px; }

/* ---------- Blatt (Dialog) ---------- */

dialog.blatt {
  margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh;
  padding: 0; border: 0; border-radius: 20px 20px 0 0;
  background: var(--karte); color: var(--tinte);
  display: flex; flex-direction: column;
  animation: hoch 0.2s ease-out;
}
dialog.blatt:not([open]) { display: none; }
dialog.blatt::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.blatt.geht { animation: runter 0.16s ease-in forwards; }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } }
@keyframes runter { to { transform: translateY(40px); opacity: 0; } }
.blatt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 6px 18px; }
.blatt-kopf h2 { font-size: 18px; font-weight: 700; }
.blatt-inhalt { padding: 6px 18px 12px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.blatt-fuss {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie);
}
.blatt-fuss .gefahr-text { margin-right: auto; }
@media (min-width: 700px) {
  dialog.blatt { margin: auto; width: 540px; border-radius: 20px; max-height: 86vh; }
  dialog.blatt.breit { width: 760px; }
  .blatt-fuss { padding-bottom: 14px; }
}
.frage { font-size: 16px; padding: 4px 0 8px; }
.buchung-kopf { text-align: center; padding: 4px 0 14px; display: flex; flex-direction: column; gap: 3px; }
.betrag-gross { font-size: 32px; font-weight: 650; font-variant-numeric: tabular-nums; }
.zweck-voll { font-size: 14px; color: var(--tinte-2); word-break: break-word; margin-top: 6px; }
.vorschau { background: var(--flaeche-2); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.vorschau:empty { display: none; }
.vorschau p { margin: 3px 0; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px;
  background: var(--tinte); color: var(--flaeche); font-size: 15px; font-weight: 500;
  box-shadow: var(--schatten); transition: opacity 0.18s, transform 0.18s;
}
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.toast.fehler { background: var(--gefahr); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- Diagramme ---------- */

.diagramm { position: relative; }
.legende { display: flex; gap: 16px; font-size: 13px; color: var(--tinte-2); margin-bottom: 6px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.schluessel { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.schluessel.reihe-1, .linie.reihe-1 { background: var(--reihe-1); }
.schluessel.reihe-2, .linie.reihe-2 { background: var(--reihe-2); }
.diagramm-flaeche { width: 100%; }
.diagramm svg { display: block; overflow: visible; }
.diagramm .gitter { stroke: var(--linie); stroke-width: 1; }
.diagramm .achse { stroke: var(--linie-stark); stroke-width: 1; }
.diagramm .achsen-text { fill: var(--leise); font-size: 11px; font-variant-numeric: tabular-nums; }
.diagramm path.reihe-1 { fill: var(--reihe-1); }
.diagramm path.reihe-2 { fill: var(--reihe-2); }
.diagramm .treffer { fill: transparent; }
.diagramm .gruppe { cursor: default; outline: none; }
.diagramm .gruppe.an .treffer { fill: var(--flaeche-2); fill-opacity: 0.6; }
.tooltip {
  position: absolute; top: 26px; z-index: 2; pointer-events: none; min-width: 190px; white-space: nowrap;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; box-shadow: var(--schatten);
  padding: 8px 10px; font-size: 13px; color: var(--tinte-2);
}
.tooltip b { color: var(--tinte); font-variant-numeric: tabular-nums; }
.tooltip-titel { font-weight: 600; color: var(--tinte); margin-bottom: 2px; }
.linie { display: inline-block; width: 12px; height: 2px; border-radius: 1px; margin-right: 6px; vertical-align: middle; }
.tabelle-auf { margin-top: 6px; }
.tabelle-auf > summary { font-size: 13px; color: var(--tinte-2); cursor: pointer; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.tabelle th { text-align: left; font-weight: 600; color: var(--tinte-2); font-size: 13px; }
.tabelle th, .tabelle td { padding: 7px 8px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle tr.aktuell td { background: var(--flaeche-2); }
.tabelle-rahmen { overflow-x: auto; }

.balkenliste { display: flex; flex-direction: column; }
.balken-zeile {
  display: grid; grid-template-columns: minmax(96px, 36%) 1fr auto; align-items: center; gap: 10px;
  padding: 7px 0; border: 0; background: none; text-align: left; width: 100%; color: inherit; font-size: 14px;
}
button.balken-zeile { cursor: pointer; border-radius: 8px; }
button.balken-zeile:hover .balken-name { text-decoration: underline; }
.balken-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balken-spur { height: 12px; display: block; }
.balken-fuellung { display: block; height: 100%; background: var(--reihe-1); border-radius: 0 4px 4px 0; }
.balken-wert { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }

.meter { display: block; height: 8px; border-radius: 4px; background: var(--akzent-hell); overflow: hidden; margin: 10px 0 6px; }
.meter-fuellung { display: block; height: 100%; background: var(--akzent); border-radius: 4px; }

/* ---------- Kredite, Verträge, Regeln ---------- */

button.karte { width: 100%; text-align: left; cursor: pointer; display: block; color: inherit; font: inherit; }
button.karte:hover { border-color: var(--linie-stark); }
.kredit-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.kredit-kopf > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.kredit-rest { font-size: 21px; font-weight: 650; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.kredit-rest small { font-size: 12px; font-weight: 500; color: var(--tinte-2); }
.kredit-fakten { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; color: var(--tinte-2); }
.kredit .warn { display: block; font-size: 13px; margin-top: 6px; }

.vorlagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 700px) { .vorlagen { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.vorlage {
  display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--linie); background: var(--flaeche); cursor: pointer; color: inherit;
}
.vorlage:hover { border-color: var(--linie-stark); }
.vorlage span { font-size: 13px; color: var(--tinte-2); }
.zeile.regel .zeile-unter { white-space: normal; }
.zeile.regel.aus .zeile-name, .zeile.regel.aus .zeile-unter { opacity: 0.55; }

/* ---------- Bank, Import, Verbindungen ---------- */

.bankliste { max-height: 46vh; overflow-y: auto; margin: 4px 0 12px; border: 1px solid var(--linie); border-radius: 12px; }
.bankliste > p { padding: 12px; }
.bank {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--linie);
  background: none; text-align: left; cursor: pointer; color: inherit;
}
.bank:last-child { border-bottom: 0; }
.bank:hover { background: var(--flaeche-2); }
.bank > span:nth-of-type(1), .bank > span:nth-child(2) { flex: 1; min-width: 0; }
.bank img, .verbindung img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.bank-logo-leer { width: 32px !important; height: 32px; flex: none !important; border-radius: 8px; background: var(--flaeche-2); display: grid; place-items: center; font-weight: 700; color: var(--tinte-2); }
.verbindung { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 2px; border-bottom: 1px solid var(--linie); }
.verbindung:last-child { border-bottom: 0; }
.verbindung .zeile-haupt { flex: 1 1 180px; }
.import-format { color: var(--plus); display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 8px 0; }
.import-bereich { margin-top: 4px; }
.vorschau-liste { border: 1px solid var(--linie); border-radius: 12px; padding: 0 12px; margin: 8px 0; }
.vorschau-liste .zeile { font-size: 14px; padding: 8px 0; }
.vorschau-liste .zeile:last-child { border-bottom: 0; }
.vorschau-liste .zeile-name { flex: 1; min-width: 0; }

/* ---------- Willkommen, Anmelden ---------- */

.willkommen .karte { padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.gross { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
#app.eingang { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.eingang-karte {
  width: 100%; max-width: 400px; background: var(--karte); border: 1px solid var(--rand); border-radius: 20px;
  padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--schatten);
}
.eingang-karte img { border-radius: 14px; }
.eingang-karte h1 { font-size: 26px; font-weight: 700; }
.eingang-form { margin-top: 10px; display: flex; flex-direction: column; }
.eingang-form .warn:empty { display: none; }
.eingang-form .warn { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
