/* ==========================================================
   Backpack Budget – Aussehen
   Farben stehen alle oben als "Variablen". Wenn du etwas
   umfärben willst, änderst du nur diese Zeilen.
   ========================================================== */

:root {
  /* ---- Hell: Tageslicht ----
     Heller Stein statt Weiss, Schiefer-Marine als Akzent. Bewusst
     KEIN Gruen als Akzent: Gruen bedeutet in dieser App "im
     Budget", und eine Farbe darf nicht zwei Dinge heissen. */
  --grund:        #f1f2f0;
  --karte:        #ffffff;
  --rand:         #dde0dd;
  --text:         #171a1d;
  --text-leise:   #636a71;

  /* Alles Bedienbare: Knöpfe, aktive Kacheln, Fokus, Datenbalken */
  --akzent:       #2d4463;
  --akzent-weich: #e7eaf0;
  --auf-akzent:   #ffffff;

  /* Ausschliesslich der Budgetstand – die Ampel */
  --gut:          #1f6a4f;
  --gut-weich:    #e3efe9;
  --warn:         #96610f;
  --gefahr:       #a8402f;
  --gefahr-weich: #f7e9e6;

  --schatten:     0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --radius:       14px;
}

/* ---- Dunkel: Kompass ----
   Tiefes Marineblau, Silber als Schrift- und Linienfarbe. Die
   Karten haben keine andersfarbige Fuellung, sondern eine feine
   silberne Kante. Die einzige Farbe im Bild ist der Ampelbalken. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund:        #0a1322;
    --karte:        #0e1928;
    --rand:         #223146;
    --text:         #e4e9f0;
    --text-leise:   #8b98ab;

    --akzent:       #c3ccd9;
    --akzent-weich: #16243a;
    --auf-akzent:   #0a1322;

    --gut:          #3fbf87;
    --gut-weich:    #102a22;
    --warn:         #d9a441;
    --gefahr:       #e0685a;
    --gefahr-weich: #2e1c19;

    --schatten:     0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --grund:        #0a1322;
  --karte:        #0e1928;
  --rand:         #223146;
  --text:         #e4e9f0;
  --text-leise:   #8b98ab;

  --akzent:       #c3ccd9;
  --akzent-weich: #16243a;
  --auf-akzent:   #0a1322;

  --gut:          #3fbf87;
  --gut-weich:    #102a22;
  --warn:         #d9a441;
  --gefahr:       #e0685a;
  --gefahr-weich: #2e1c19;

  --schatten:     0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

/* Versteckte Bereiche wirklich verstecken – schlägt jede
   display-Regel weiter unten. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 92px;
}

/* ---------- Kopfzeile ---------- */

.kopf { padding: 18px 18px 8px; max-width: 620px; margin: 0 auto; }
.kopf-zeile { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--akzent-weich); color: var(--akzent);
  border-radius: 11px; font-size: 17px;
}
.kopf-titel { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.kopf-sub   { font-size: 13px; color: var(--text-leise); }

/* ---------- Grundlayout ---------- */

main { max-width: 620px; margin: 0 auto; padding: 8px 18px 24px; }
.view { display: flex; flex-direction: column; gap: 14px; }

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 16px;
}

.kachel-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-leise); margin-bottom: 10px;
}
.kachel-sub { font-size: 13px; color: var(--text-leise); margin-top: 4px; }
.hinweis { font-size: 13px; color: var(--text-leise); margin: 0 0 14px; }
.hinweis.mini { font-size: 12.5px; margin: 8px 0 0; }
.trenner { height: 1px; background: var(--rand); margin: 18px 0 16px; }

/* ---------- Abgleich-Punkt in der Kopfzeile ---------- */

.sync-punkt {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-leise);
}
.sync-punkt.ok      { background: var(--gut); }
.sync-punkt.laeuft  { background: var(--warn); animation: pulsieren 1.1s ease-in-out infinite; }
.sync-punkt.fehler  { background: var(--gefahr); }
@keyframes pulsieren { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .sync-punkt.laeuft { animation: none; } }

.sync-stand {
  font-size: 13px; font-weight: 550; color: var(--text-leise);
  background: var(--grund); border-radius: 9px; padding: 9px 12px; margin-bottom: 4px;
}
.sync-stand.ok     { color: var(--gut); }
.sync-stand.fehler { color: var(--gefahr); }

/* ---------- Startablauf ----------
   Legt sich über alles, solange keine Reise eingerichtet ist.
   Eine Frage pro Bildschirm, grosse Felder, kein Scrollen. */

.start {
  position: fixed; inset: 0; z-index: 70;
  background: var(--grund); color: var(--text);
  display: flex; flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
}
.start-buehne { flex: 1; display: flex; align-items: center; justify-content: center; }
.start-seite { width: 100%; max-width: 26rem; }

.start-marke {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--akzent-weich); color: var(--akzent); font-size: 24px; margin-bottom: 22px;
}
.start-seite h1 {
  font-size: 1.85rem; font-weight: 680; line-height: 1.15;
  letter-spacing: -.025em; margin: 0 0 12px; text-wrap: balance;
}
.start-seite p { font-size: 16px; color: var(--text-leise); margin: 0 0 18px; }
.start-seite input, .start-seite select { font-size: 17px; padding: 14px 14px; }
.start-seite .feld-label { margin-top: 0; }

.start-frage {
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--akzent); margin-bottom: 10px;
}
.start-hilfe { font-size: 13.5px; color: var(--text-leise); margin: 10px 0 0; }

/* Kleine Veranschaulichungen statt Bildschirmfotos - die muessten
   bei jeder Designaenderung neu erzeugt werden. */
.start-bild {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 14px;
  padding: 18px; margin-bottom: 22px; display: block;
}
.sb-betrag { font-size: 30px; font-weight: 650; letter-spacing: -.02em; display: block; }
.sb-kacheln { display: flex; gap: 7px; margin-top: 14px; }
.sb-kacheln i {
  flex: 1; text-align: center; font-style: normal; font-size: 19px;
  padding: 9px 0; border-radius: 9px; background: var(--grund);
  border: 1px solid var(--rand);
}
.sb-kacheln i.an { background: var(--akzent-weich); border-color: var(--akzent); }
.sb-gross { font-size: 34px; font-weight: 680; letter-spacing: -.03em; display: block; }
.sb-balken {
  display: block; height: 7px; border-radius: 99px; margin-top: 14px;
  background: color-mix(in srgb, var(--text-leise) 18%, transparent); overflow: hidden;
}
.sb-balken i { display: block; height: 100%; border-radius: 99px; background: var(--gut); }

.start-ergebnis {
  font-size: 2.7rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--gut); font-variant-numeric: tabular-nums; margin-bottom: 8px;
}

.start-fuss { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.start-punkte { display: flex; gap: 6px; }
.start-punkte i {
  width: 6px; height: 6px; border-radius: 99px; display: block;
  background: color-mix(in srgb, var(--text-leise) 35%, transparent);
  transition: width .2s ease, background-color .2s ease;
}
/* Der aktive Punkt wird zur Pille - allein ueber die Farbe waere er
   auf Marineblau zu schwach zu unterscheiden. */
.start-punkte i.an { width: 18px; background: var(--akzent); }
.start-knoepfe { display: flex; gap: 10px; width: 100%; max-width: 26rem; }
.start-ueberspringen {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; color: var(--text-leise); padding: 4px 10px;
}
.start-ueberspringen:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Hinweis auf die Beispielreise ---------- */

.beispiel-leiste {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--warn); color: #15110a;
  padding: 8px 14px; font-size: 12.5px; font-weight: 600;
}
.beispiel-leiste button {
  flex: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: rgba(0,0,0,.22); color: inherit;
}
.beispiel-leiste button:focus-visible { outline: 2px solid #15110a; outline-offset: 1px; }

/* ---------- Kopfzeile: eine Leiste statt drei ---------- */

.kopf-zeile { display: flex; align-items: center; gap: 12px; }
.kopf-text { flex: 1; min-width: 0; }
.kopf-titel { font-size: 17px; font-weight: 650; letter-spacing: -.01em;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-sub   { font-size: 13px; color: var(--text-leise);
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kopf-waehrung {
  display: flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--karte);
  color: var(--text); font-family: inherit;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.kopf-waehrung:active { transform: translateY(1px); }
.kopf-waehrung:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Umrechnung unter dem Betrag ---------- */

.umrechnung {
  font-size: 13.5px; font-weight: 550; color: var(--akzent);
  margin-top: 2px;
}
.umrechnung.unbekannt { color: var(--warn); }

/* ---------- Dialog ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 12, 18, .55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
@media (min-width: 34rem) { .overlay { align-items: center; } }

.dialog {
  background: var(--karte); border: 1px solid var(--rand);
  border-radius: 16px; padding: 22px;
  width: 100%; max-width: 30rem;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.dialog h2 {
  margin: 0 0 6px; font-size: 19px; font-weight: 650; letter-spacing: -.01em;
}

.kurs-hinweis {
  margin-top: 14px; padding: 11px 14px; border-radius: 10px;
  background: var(--grund); font-size: 13.5px; color: var(--text-leise);
}
.kurs-feld {
  width: 9.5rem !important; display: inline-block !important;
  padding: 6px 9px !important; font-size: 14px !important;
  font-variant-numeric: tabular-nums; margin: 0 4px;
  background: var(--karte) !important;
}
.kurs-hinweis.ok { background: var(--gut-weich); color: var(--gut); font-weight: 550; }
.kurs-hinweis.warn { background: var(--gefahr-weich); color: var(--gefahr); font-weight: 550; }

/* ---------- Orte-Auswertung ---------- */

.orte { display: flex; flex-direction: column; gap: 3px; }

/* Eine Zeile je Stadt. Der Vergleichsbalken liegt als Fuellung im
   Hintergrund der Zeile - das spart die halbe Hoehe gegenueber
   einem eigenen Balken darunter, und bei zwoelf Staedten ist das
   der Unterschied zwischen Ueberblick und Bleiwueste. */
.ort-zeile {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: baseline;
  padding: 9px 11px; border-radius: 9px; cursor: pointer;
  background: var(--grund);
}
.ort-fuellung {
  position: absolute; inset: 0; width: 0;
  background: color-mix(in srgb, var(--akzent) 12%, transparent);
  border-radius: 9px; pointer-events: none;
}
.ort-zeile > :not(.ort-fuellung) { position: relative; }
.ort-zeile:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.ort-titel { font-size: 14.5px; font-weight: 550; overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
.ort-tage { font-size: 12px; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.ort-pro-tag { font-size: 14.5px; font-weight: 620; font-variant-numeric: tabular-nums; }

/* ---------- Stadt-Detail im eigenen Feld ---------- */

.od-kopf { margin: 2px 0 20px; }
.od-gross {
  font-size: 34px; font-weight: 680; letter-spacing: -.025em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.od-sub { font-size: 13.5px; color: var(--text-leise); margin-top: 4px; }
.od-liste { display: flex; flex-direction: column; gap: 14px; }
.od-kat { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: baseline; }
.od-kat .name { font-size: 14.5px; }
.od-kat .betrag { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.od-kat .schiene {
  grid-column: 2 / 4; height: 4px; border-radius: 999px; margin-top: -6px;
  background: color-mix(in srgb, var(--text-leise) 15%, transparent);
}
.od-kat .schiene i { display: block; height: 100%; border-radius: 999px; background: var(--akzent); }
.od-kat .anteil { grid-column: 2 / 4; font-size: 12px; color: var(--text-leise); margin-top: -2px; }

/* ---------- Sicherungs-Erinnerung ---------- */

.sicherung { border-color: var(--warn); }
.sicherung-titel { font-size: 16px; font-weight: 650; margin-bottom: 6px; color: var(--warn); }
.sicherung .knopf { flex: none; }
.sicherung-stand {
  font-size: 13px; font-weight: 550; color: var(--text-leise);
  background: var(--grund); border-radius: 9px; padding: 9px 12px; margin-bottom: 14px;
}

/* ---------- Einrichtungs-Hinweis ---------- */

.setup { border-color: var(--akzent); background: var(--akzent-weich); }
.setup-titel { font-size: 17px; font-weight: 650; margin-bottom: 6px; }
.setup .hinweis { color: var(--text); opacity: .8; }
.setup .knopf { flex: none; }

/* ---------- Heute-Karte ---------- */

.heute-karte, .karte.heute { touch-action: pan-y; }
.karte.heute:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

.tag-leiste {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: -4px -6px 0;
}
.heute-label { font-size: 13px; color: var(--text-leise); text-align: center; flex: 1; }
.tag-pfeil {
  border: none; background: none; cursor: pointer; flex: none;
  color: var(--text-leise); font-size: 20px; line-height: 1;
  padding: 4px 10px; border-radius: 8px; font-family: inherit;
}
.tag-pfeil:disabled { opacity: .22; cursor: default; }
.tag-pfeil:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

.zurueck-heute {
  display: block; margin: 10px auto 0; padding: 5px 13px;
  border: 1px solid var(--rand); background: var(--grund); color: var(--text-leise);
  border-radius: 999px; font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.heute-betrag {
  font-size: 42px; font-weight: 680; letter-spacing: -.03em;
  margin: 4px 0 14px; font-variant-numeric: tabular-nums;
}
.heute-betrag.negativ { color: var(--gefahr); }

.balken {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--text-leise) 18%, transparent);
}
.balken-fuell {
  height: 100%; width: 0%; border-radius: 999px;
  background: var(--gut); transition: width .35s ease, background-color .35s ease;
}
.balken-fuell.warnung { background: var(--warn); }
.balken-fuell.drueber { background: var(--gefahr); }

.heute-fuss { font-size: 13px; color: var(--text-leise); margin-top: 9px; }

.rat { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.rat-satz {
  margin: 0; font-size: 14px; line-height: 1.5;
  padding: 11px 13px; border-radius: 10px;
  background: var(--grund); color: var(--text);
}
.rat-satz.lob     { background: var(--gut-weich); color: var(--gut); font-weight: 550; }
.rat-satz.warnung { background: var(--gefahr-weich); color: var(--gefahr); font-weight: 550; }

/* ---------- Eingabefeld ---------- */

.feld-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-leise); margin: 14px 0 6px;
}
.formular > .feld-label:first-of-type { margin-top: 0; }

input[type=text], input[type=date], select {
  width: 100%; padding: 11px 12px;
  background: var(--grund);
  border: 1px solid var(--rand); border-radius: 10px;
  color: var(--text); font-size: 15px; font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }

.betrag-zeile { display: flex; align-items: baseline; gap: 8px; }
.betrag-eingabe {
  font-size: 36px !important; font-weight: 650; padding: 4px 0 !important;
  background: none !important; border: none !important;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.betrag-eingabe:focus { outline: none; }
.waehrung { font-size: 22px; color: var(--text-leise); }

.kat-kacheln {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px;
}
.kat-kachel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 13px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--grund);
  color: var(--text); font-size: 14px; font-family: inherit; text-align: left;
}
.kat-kachel-icon { font-size: 22px; line-height: 1; }
/* Bei ungerader Anzahl steht die letzte Kachel sonst halb allein –
   also laesst man sie ueber beide Spalten laufen. */
.kat-kachel:last-child:nth-child(odd) { grid-column: span 2; flex-direction: row; align-items: center; gap: 10px; }
.kat-kachel.aktiv {
  background: var(--akzent-weich); border-color: var(--akzent);
  color: var(--akzent); font-weight: 620;
}

.mehr-schalter {
  margin-top: 14px; padding: 0; border: none; background: none; cursor: pointer;
  color: var(--text-leise); font-size: 13.5px; font-family: inherit; font-weight: 600;
}
.mehr-schalter span { font-size: 11px; }
.mehr-panel { margin-top: 4px; }

.verteil-hinweis {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px;
  background: var(--akzent-weich); color: var(--akzent);
  font-size: 13.5px; font-weight: 550;
}

.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--grund);
  color: var(--text); font-size: 13.5px; font-family: inherit;
}
.chip.aktiv {
  background: var(--akzent-weich); border-color: var(--akzent);
  color: var(--akzent); font-weight: 600;
}

.formular-knoepfe { display: flex; gap: 10px; margin-top: 18px; }

.knopf {
  flex: 1; padding: 12px 16px; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
  border: 1px solid var(--rand); background: var(--karte); color: var(--text);
}
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.knopf.still   { background: var(--grund); }
.knopf.klein   { flex: none; padding: 11px 14px; font-size: 14px; }
.knopf.gefahr  { margin-top: 10px; color: var(--gefahr); background: none; }
.knopf.loeschen{ color: var(--gefahr); background: var(--grund); }
.knopf:active  { transform: translateY(1px); }

/* ---------- Listen ---------- */

.listen-kopf {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-leise); padding: 6px 2px 0;
}
.tag-kopf {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--text-leise);
  padding: 14px 2px 6px; font-weight: 600;
}
.posten {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px;
  align-items: center;
  background: var(--karte); border: 1px solid var(--rand);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer; text-align: left; width: 100%;
  color: inherit; font-family: inherit;
}
.posten-icon  { font-size: 19px; }
.posten-titel { font-size: 14.5px; font-weight: 550; }
.posten-sub   { font-size: 12.5px; color: var(--text-leise); margin-top: 1px; }
.posten-betrag{ font-size: 15px; font-weight: 620; font-variant-numeric: tabular-nums; }
.leer { color: var(--text-leise); font-size: 14px; padding: 20px 2px; text-align: center; }

/* ---------- Auswertung ---------- */

.prognose-wert { font-size: 24px; font-weight: 660; letter-spacing: -.02em; }
.prognose-wert.gut     { color: var(--gut); }
.prognose-wert.schlecht{ color: var(--gefahr); }

.zahlen-gitter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px;
}
.zahl { background: var(--grund); border-radius: 11px; padding: 12px 13px; }
.zahl-label { font-size: 12px; color: var(--text-leise); }
.zahl-wert  { font-size: 16px; font-weight: 620; margin-top: 2px;
              font-variant-numeric: tabular-nums; }

.kat-liste { display: flex; flex-direction: column; gap: 12px; }
.kat-zeile { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; }
.kat-name  { font-size: 14px; }
.kat-schiene {
  grid-column: 2 / 4; height: 5px; border-radius: 999px; margin-top: -4px;
  background: color-mix(in srgb, var(--text-leise) 15%, transparent);
}
.kat-schiene i { display: block; height: 100%; border-radius: 999px; background: var(--akzent); }
.kat-betrag { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--text-leise); }

/* ---------- Reisekasse ---------- */

.salden, .ausgleich { display: flex; flex-direction: column; gap: 10px; }
.saldo-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.saldo-name  { font-size: 14.5px; }
.saldo-wert  { font-size: 14.5px; font-weight: 620; font-variant-numeric: tabular-nums; }
.saldo-wert.plus  { color: var(--gut); }
.saldo-wert.minus { color: var(--gefahr); }
.ausgleich-zeile {
  background: var(--grund); border-radius: 10px; padding: 12px 14px;
  font-size: 14.5px; display: flex; justify-content: space-between; gap: 10px;
}
.ausgleich-zeile b { font-variant-numeric: tabular-nums; }

/* ---------- Einstellungen ---------- */

.ergebnis-karte { border-color: var(--akzent); }
.ergebnis-wert {
  font-size: 30px; font-weight: 680; letter-spacing: -.02em;
  color: var(--akzent); font-variant-numeric: tabular-nums;
}

/* ---------- Rücklagen ---------- */

.ruecklagen { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ruecklage {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px;
  align-items: center;
  background: var(--grund); border: 1px solid var(--rand);
  border-radius: 11px; padding: 10px 12px;
}
.ruecklage input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--akzent); }
.ruecklage > div { min-width: 0; }
.r-name { font-size: 14.5px; font-weight: 550; }
.r-name.bezahlt { text-decoration: line-through; opacity: .55; }
.r-sub  { font-size: 12px; color: var(--text-leise); margin-top: 1px; }
.r-betrag {
  width: 92px !important; padding: 7px 9px !important; text-align: right;
  font-size: 14px !important; font-variant-numeric: tabular-nums;
  background: var(--karte) !important;
}
.r-weg {
  border: none; background: none; cursor: pointer;
  color: var(--text-leise); font-size: 17px; line-height: 1; padding: 0 2px;
}
.ruecklage-neu { display: flex; flex-direction: column; gap: 10px; }
.knopf.breit { flex: 1; }
.ruecklage.nur-lesen { grid-template-columns: auto 1fr auto; }

.fusszeile {
  text-align: center; font-size: 12px; color: var(--text-leise);
  margin: 4px 0 0; opacity: .8;
}

.personen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.person-tag {
  display: flex; align-items: center; gap: 8px;
  background: var(--grund); border: 1px solid var(--rand);
  border-radius: 999px; padding: 7px 8px 7px 14px; font-size: 14px;
}
.person-tag button {
  border: none; background: none; cursor: pointer;
  color: var(--text-leise); font-size: 16px; line-height: 1; padding: 0 4px;
}
.zeile-eingabe { display: flex; gap: 8px; }

/* ---------- Tableiste unten ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--karte) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--rand);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: none; cursor: pointer;
  color: var(--text-leise); font-size: 11px; font-family: inherit; padding: 7px 0;
}
.tab span { font-size: 18px; line-height: 1; }
.tab.aktiv { color: var(--akzent); font-weight: 600; }

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

.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--grund);
  padding: 11px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,.22); z-index: 50; max-width: 90vw;
}
