/* Haushaltskasse. Banking-Look, Systemschrift, Hell und Dunkel nach System. */

:root {
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #EDF0F5;
  --line: #E1E5EC;
  --text: #0F172A;
  --text-2: #5B6577;
  --text-3: #8C96A8;
  --accent: #1E40AF;
  --accent-hover: #1A379A;
  --accent-soft: #E4EAFB;
  --on-accent: #FFFFFF;
  --plus: #15803D;
  --plus-soft: #DDF4E6;
  --minus: #B91C1C;
  --minus-soft: #FBE4E4;
  --warn: #C2410C;
  --warn-soft: #FDE9DD;
  --fix: #A3AEC2;
  --fix-2: #C9D1DE;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-sheet: 0 -12px 40px rgba(15, 23, 42, .18);
  --radius: 16px;
  --radius-s: 10px;
  --tab-h: 66px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220;
    --surface: #141C2D;
    --surface-2: #1C2538;
    --line: #27324A;
    --text: #E8ECF4;
    --text-2: #A3ACBF;
    --text-3: #6E7A91;
    --accent: #7E9DFF;
    --accent-hover: #97B0FF;
    --accent-soft: #1D2B52;
    --on-accent: #0B1220;
    --plus: #4ADE80;
    --plus-soft: #12321F;
    --minus: #F87171;
    --minus-soft: #3A1B1B;
    --warn: #FB923C;
    --warn-soft: #3A2414;
    --fix: #4E5B76;
    --fix-2: #3A4560;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, .6);
  }
}

:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #141C2D;
  --surface-2: #1C2538;
  --line: #27324A;
  --text: #E8ECF4;
  --text-2: #A3ACBF;
  --text-3: #6E7A91;
  --accent: #7E9DFF;
  --accent-hover: #97B0FF;
  --accent-soft: #1D2B52;
  --on-accent: #0B1220;
  --plus: #4ADE80;
  --plus-soft: #12321F;
  --minus: #F87171;
  --minus-soft: #3A1B1B;
  --warn: #FB923C;
  --warn-soft: #3A2414;
  --fix: #4E5B76;
  --fix-2: #3A4560;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
ul { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 0 calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
@media (min-width: 760px) {
  .app { max-width: 640px; }
  .tabbar { max-width: 640px; }
}

.screen { padding: 8px 16px 0; }
.screen-unter { padding-top: 0; }

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0 14px;
}
.kopf h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.kopf-einfach { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 18px; }
.kopf-einfach h1 { font-size: 26px; letter-spacing: -.02em; }
.kopf-sub { color: var(--text-2); font-size: 14px; }
.kopf-unter { justify-content: flex-start; padding-top: 10px; }
.kopf-unter h1 { flex: 1; font-size: 20px; }

.zeitraum { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; }
.zeitraum h1 { flex: 1; min-width: 0; text-align: center; font-size: 17px; white-space: nowrap; }
.iconbtn {
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text);
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn:disabled { color: var(--text-3); cursor: default; background: none; }
.textbtn { color: var(--accent); font-weight: 600; padding: 6px 4px; }
.textbtn:hover { color: var(--accent-hover); }

.segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}
.segment { flex: none; }
.segment button {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.segment button.aktiv { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.segment-art { width: 100%; margin: 4px 0 14px; }
.segment-art button { flex: 1; text-align: center; padding: 9px 0; }

.saldo-block { padding: 6px 4px 18px; }
.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.saldo {
  margin-top: 4px;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.saldo.plus { color: var(--plus); }
.saldo.minus { color: var(--minus); }
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
  margin-top: 16px;
}
.kz { display: flex; flex-direction: column; gap: 1px; }
.kz .label { font-size: 10.5px; }
.kz strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kz.plus strong { color: var(--plus); }
.kz.minus strong { color: var(--minus); }
.kz.betont strong { color: var(--accent); }

.hinweise { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.hinweis-zeile {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--warn-soft);
  color: var(--text);
  text-align: left;
  font-size: 14px;
}
.hinweis-zeile .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.hinweis-zeile strong { font-weight: 600; }
.hinweis-zeile .chev { margin-left: auto; }

.karte {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.karte-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.karte h2 { font-size: 14px; font-weight: 600; }
.karte-sub { font-size: 12px; color: var(--text-3); }
.karte p { color: var(--text-2); font-size: 14px; }
.stapel { display: flex; flex-direction: column; gap: 12px; }

.legende { font-size: 11px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-fix { background: var(--fix); }
.sw-var { background: var(--accent); margin-left: 6px; }
.chart-wrap { position: relative; height: 160px; }
.ring-wrap { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; }
.chart-ring { position: relative; width: 132px; height: 132px; }
@media (max-width: 430px) {
  .ring-wrap { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .chart-ring { width: 148px; height: 148px; }
  .ring-liste { width: 100%; }
}
.ring-mitte {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  text-align: center;
}
.ring-mitte strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-mitte span { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.ring-liste { display: flex; flex-direction: column; gap: 2px; }
.ring-liste button {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center;
  width: 100%; padding: 5px 6px; border-radius: 8px;
  text-align: left; font-size: 13px;
}
.ring-liste button:hover { background: var(--surface-2); }
.ring-liste .farbe { width: 10px; height: 10px; border-radius: 50%; }
.ring-liste .betrag { font-variant-numeric: tabular-nums; font-weight: 600; }
.ring-liste .anteil { color: var(--text-3); font-size: 12px; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.leer-hinweis { color: var(--text-3); font-size: 13px; padding: 12px 0; text-align: center; }

.budget-liste { display: flex; flex-direction: column; gap: 12px; }
.budget-zeile { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; }
.budget-zeile .kuerzel { width: 30px; height: 30px; font-size: 11px; }
.budget-info { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.budget-info strong { font-weight: 600; }
.budget-info span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.budget-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.budget-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.budget-zeile.warn .budget-fill { background: var(--warn); }
.budget-zeile.ueber .budget-fill { background: var(--minus); }
.budget-zeile.ueber .budget-info span { color: var(--minus); font-weight: 600; }

.filterzeile {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.filterzeile::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.aktiv { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.chip-reset { color: var(--minus); border-style: dashed; }
.chip svg { width: 15px; height: 15px; }
.suchfeld { margin-bottom: 10px; }
.suchfeld input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.filter-summe { font-size: 12px; color: var(--text-3); padding: 0 4px 8px; }

.liste { display: flex; flex-direction: column; gap: 4px; }
.tag-kopf {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 4px 6px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tag-kopf span { font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; font-weight: 500; }
.buchung {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}
.buchung:hover { background: var(--surface-2); }
.buchung .titel { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; }
.buchung .titel svg { width: 14px; height: 14px; color: var(--text-3); }
.buchung .notiz { font-size: 12.5px; color: var(--text-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buchung .betrag { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; white-space: nowrap; }
.betrag.plus { color: var(--plus); }
.betrag.minus { color: var(--text); }
.kuerzel {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--kf, var(--accent));
  background: color-mix(in srgb, var(--kf, var(--accent)) 16%, var(--surface));
  flex: none;
}
.kuerzel.archiv { color: var(--text-3); background: var(--surface-2); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  margin: 0 auto;
  max-width: 480px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
}
.tab.aktiv { color: var(--accent); }
.tab-plus { position: relative; }
.plus-kreis {
  width: 56px; height: 56px;
  margin-top: -26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .15s ease;
}
.tab-plus:hover .plus-kreis { transform: scale(1.05); background: var(--accent-hover); }
.tab-plus:active .plus-kreis { transform: scale(.96); }

.menue { padding: 0; overflow: hidden; }
.menue-zeile {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 15px 16px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.menue-zeile:last-child { border-bottom: 0; }
.menue-zeile:hover { background: var(--surface-2); }
.menue-zeile > span:first-child { flex: 1; }
.menue-wert { color: var(--text-3); font-size: 13px; }
.menue-rot { color: var(--minus); font-weight: 600; }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-top: 2px solid var(--text-3); transform: rotate(45deg); flex: none; }
.version { text-align: center; font-size: 12px; color: var(--text-3); padding: 16px 0; }
.hinweis-klein { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.hinweis-oben { padding: 0 2px 12px; }

.fk-gruppe { margin-bottom: 14px; }
.fk-gruppe .label { padding: 6px 4px; }
.fk-zeile {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  margin-bottom: 4px;
}
.fk-zeile:hover { background: var(--surface-2); }
.fk-zeile .titel { font-weight: 500; }
.fk-zeile .meta { font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fk-zeile .betrag { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.fk-zeile .betrag small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.fk-zeile.pausiert { opacity: .6; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
}
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.aktion-unten { padding: 8px 0 4px; }

.kat-zeile {
  display: grid; grid-template-columns: 38px 1fr auto auto; gap: 10px; align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 4px;
}
.kat-zeile .titel { font-weight: 500; }
.kat-zeile .meta { font-size: 12px; color: var(--text-3); }
.kat-zeile.archiv { opacity: .65; }
.kat-zeile .haupt { text-align: left; }
.pfeile { display: flex; flex-direction: column; gap: 2px; }
.pfeile button { width: 26px; height: 20px; border-radius: 6px; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.pfeile button:hover { background: var(--surface-2); color: var(--text); }
.pfeile button:disabled { opacity: .3; cursor: default; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: background .12s ease, transform .1s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: var(--line); }
.btn-ghost { color: var(--accent); }
.btn-danger { background: var(--minus-soft); color: var(--minus); }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }

.feld { display: flex; flex-direction: column; gap: 5px; }
.feld > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.feld input, .feld select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 44px;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.feld select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.feld input:focus, .feld select:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.feld-reihe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.feld-reihe-kuerzel { grid-template-columns: 48px minmax(0, 1fr) 72px; align-items: end; }
.feld-kurz input { text-transform: uppercase; text-align: center; }
form.stapel .feld + .feld { margin-top: 0; }
#fixkosten-form, #kategorie-form { display: flex; flex-direction: column; gap: 12px; }
.fehler { color: var(--minus); font-size: 13px; font-weight: 500; }

.schalter-zeile { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; cursor: pointer; }
.schalter-zeile input { position: absolute; opacity: 0; width: 0; height: 0; }
.schalter { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.schalter-zeile input:checked + .schalter { background: var(--plus); }
.schalter-zeile input:checked + .schalter::after { transform: translateX(18px); }
.schalter-zeile input:focus-visible + .schalter { outline: 2px solid var(--accent); outline-offset: 2px; }

.login { padding: 40px 8px 0; display: flex; flex-direction: column; gap: 24px; }
.login-marke { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.marke-zeichen {
  width: 64px; height: 64px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 22px; letter-spacing: .02em;
}
.login-marke h1 { font-size: 24px; letter-spacing: -.02em; }
.login-form { display: flex; flex-direction: column; gap: 14px; background: var(--surface); padding: 18px; border-radius: var(--radius); }
.login .hinweis-klein { text-align: center; }

.export-pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0;
  transition: opacity .18s ease;
}
.sheet-backdrop.offen { opacity: 1; }
.sheet {
  width: 100%; max-width: 480px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px 0;
  overflow-x: hidden;
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet-backdrop.offen .sheet { transform: translateY(0); }
.sheet-griff { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 4px auto 10px; }
.sheet-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-kopf h2 { font-size: 17px; font-weight: 700; }
.sheet-hinweis {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 10px;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
}
.sheet-hinweis button { color: var(--accent); font-weight: 600; margin-left: auto; }
.sheet-aktionen {
  display: flex; gap: 10px;
  position: sticky; bottom: 0;
  margin-top: 12px;
  padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  box-shadow: 0 -10px 12px -8px rgba(15, 23, 42, .08);
}
.sheet-kurz .auswahl-liste { max-height: 60dvh; overflow-y: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

.betrag-feld {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 10px;
}
.betrag-vz { font-size: 34px; font-weight: 600; color: var(--minus); width: 24px; text-align: center; }
.betrag-vz.plus { color: var(--plus); }
.betrag-feld input {
  flex: 1;
  border: 0; background: none;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  padding: 0;
}
.betrag-feld input:focus { outline: none; }
.betrag-feld input::placeholder { color: var(--text-3); }
.betrag-euro { font-size: 24px; font-weight: 600; color: var(--text-3); }

.kacheln {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 14px;
}
.kachel {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 0;
  padding: 9px 4px 8px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.15;
  text-align: center;
}
.kachel .kuerzel { width: 34px; height: 34px; font-size: 11.5px; }
.kachel.aktiv { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.kachel span:last-child { width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; overflow-wrap: anywhere; hyphens: auto; }

.auswahl-liste button {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  width: 100%; padding: 9px 8px; border-radius: 10px; text-align: left;
}
.auswahl-liste button:hover { background: var(--surface-2); }
.auswahl-liste .kuerzel { width: 34px; height: 34px; font-size: 11.5px; }
.auswahl-liste .haken { color: var(--accent); font-weight: 700; }

.farben { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.farbe-btn { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; }
.farbe-btn.aktiv { border-color: var(--text); }
.kuerzel-vorschau { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--kf); background: color-mix(in srgb, var(--kf) 16%, var(--surface)); }

.dialog-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dialog {
  width: 100%; max-width: 340px;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.dialog h2 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.dialog p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.dialog-aktionen { display: flex; gap: 10px; margin-top: 18px; }
.dialog-aktionen .btn { flex: 1; }
.dialog.gefahr #dialog-ok { background: var(--minus); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%);
  z-index: 75;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}
.toast .textbtn { color: var(--accent-soft); }
@media (prefers-color-scheme: dark) { .toast .textbtn { color: var(--accent); } }

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-backdrop, .plus-kreis, .btn, .schalter, .schalter::after { transition: none; }
}

.kontostand {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  text-align: left;
}
.kontostand .label { font-size: 10.5px; }
.kontostand strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kontostand .chev { margin-left: 4px; }
.kontostand-vergleich { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: var(--text-2); }
.kontostand-vergleich strong { font-variant-numeric: tabular-nums; color: var(--text); }
.laden { color: var(--text-3); font-size: 13px; text-align: center; padding: 20px 0; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; padding: 8px 12px; text-align: center; font-size: 13px; background: var(--warn-soft); color: var(--text); }
a.btn { text-decoration: none; }
