/* Handy-Ansicht, Fassung 2. Auf dem Rechner im Telefonrahmen (390 px), am Telefon volle Breite.
   Aufbau wie Banking-Apps: navy Kopfbereich mit dem Wichtigsten, darunter helle Fläche mit Karten. */
body.handy { background: #DADBE0; }
.telefon { max-width: 430px; min-height: 100vh; margin: 0 auto; background: var(--papier); position: relative; padding-bottom: 88px; }
@media (min-width: 600px) {
  body.handy { padding: 24px 0; }
  .telefon { width: 390px; min-height: 844px; border-radius: 40px; box-shadow: 0 0 0 10px #0E1E33, 0 24px 60px rgba(0,0,0,.28); overflow: hidden; }
  .telefon .leiste { position: absolute; }
}

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; background: var(--papier); }
.kopf.navy { background: var(--navy); }
.kopf .zurueck { display: inline-flex; align-items: center; gap: 2px; color: var(--navy); font-weight: 800; padding: 4px 0; }

/* Navy-Bereich mit dem Drei-Monats-Blick */
.buehne { background: var(--navy); color: #fff; padding: 2px 18px 34px; }
.buehne .ueber { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); letter-spacing: .02em; }
.buehne .gross { font-size: 40px; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.buehne .unter { font-size: 13px; color: rgba(255,255,255,.75); font-weight: 600; }
.drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.monatskarte { background: rgba(255,255,255,.08); border-radius: 16px; padding: 11px 10px 10px; color: #fff; display: block; position: relative; overflow: hidden; }
.monatskarte.an { background: #fff; color: var(--tinte); }
.monatskarte .mon { font-size: 12px; font-weight: 800; opacity: .8; display: flex; justify-content: space-between; }
.monatskarte .wert { font-size: 17px; font-weight: 900; margin: 6px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.monatskarte .klein { font-size: 11px; font-weight: 600; opacity: .75; white-space: nowrap; }
.monatskarte .balken { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 8px; gap: 1px; }
.monatskarte .balken i { display: block; }
.monatskarte .stufenstrich { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }

/* Helle Fläche, überlappt den Navy-Bereich */
.blatt { background: var(--papier); border-radius: 26px 26px 0 0; margin-top: -20px; position: relative; padding: 18px 16px 24px; }
.inhalt { padding: 4px 16px 24px; }
h1.titel { font-size: 28px; line-height: 1.12; margin: 4px 0 2px; letter-spacing: -.01em; font-weight: 900; color: var(--tinte); }
.untertitel { color: var(--tinte-3); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
h2.abschnitt { font-size: 18px; font-weight: 900; margin: 24px 2px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--tinte); }
h2.abschnitt:first-child { margin-top: 4px; }
h2.abschnitt small { font-size: 12.5px; font-weight: 700; color: var(--tinte-3); }

.karte { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 13px 13px 12px; }
.kpi .bez { font-size: 12.5px; color: var(--tinte-3); font-weight: 750; }
.kpi .wert { font-size: 23px; font-weight: 900; letter-spacing: -.01em; margin: 3px 0 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .vj { font-size: 12px; color: var(--tinte-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; font-weight: 600; }

/* Apartment-Ampel: Name + drei Monatsfelder */
.ampelliste { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.ampelliste .kopfz, .ampelliste .zeile { display: grid; grid-template-columns: 1fr 68px 68px 68px; gap: 3px; align-items: center; padding: 0 10px 0 14px; }
.ampelliste .kopfz { font-size: 11.5px; font-weight: 800; color: var(--tinte-3); padding-top: 10px; padding-bottom: 6px; text-align: center; }
.ampelliste .kopfz span:first-child { text-align: left; }
.ampelliste .kopfz .jetzt { color: var(--navy); }
.ampelliste .zeile { min-height: 36px; border-top: 1px solid var(--linie); color: inherit; }
.ampelliste .zeile:active { background: var(--flaeche-2); }
.ampelliste .name { font-weight: 800; font-size: 13.5px; line-height: 1.15; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.ampelliste .name small { color: #9CA0AB; font-weight: 600; font-size: 11px; }
.ampelliste .feld { height: 26px; display: grid; place-items: center; font-size: 12px; border-radius: 7px; }
.ampelliste .mehr { display: block; text-align: center; padding: 12px; border-top: 1px solid var(--linie); font-weight: 800; color: var(--blau); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; cursor: pointer; }
.zaehlleiste { display: flex; gap: 8px; margin: 0 2px 10px; flex-wrap: wrap; }
.zaehlleiste .pille { font-size: 12.5px; }

.n30 .kopfzeile { display: flex; justify-content: space-between; align-items: baseline; }
.n30 .gross { font-size: 30px; font-weight: 900; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.n30 .zeile3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; font-size: 12.5px; color: var(--tinte-3); font-weight: 600; }
.n30 .zeile3 b { display: block; color: var(--tinte); font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; }
.tagesbalken { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; align-items: end; height: 64px; }
.tagesbalken i { background: #A9BBD6; border-radius: 3px 3px 0 0; min-height: 3px; }
.tagesbalken i.we { background: var(--navy); }
.tagesachse { display: flex; justify-content: space-between; font-size: 11px; color: var(--tinte-3); margin-top: 5px; font-weight: 600; }

.liste { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.zeile2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--linie); color: inherit; }
.zeile2:first-child { border-top: 0; }
.zeile2 .name { font-weight: 800; }
.zeile2 .name small { color: var(--tinte-3); font-weight: 600; margin-left: 5px; }
.zeile2 .rechts { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--tinte-3); font-weight: 600; }
.zeile2 .pille { font-size: 13.5px; min-width: 84px; text-align: right; }

.gesamtzeile { margin-top: 12px; font-size: 13px; color: var(--tinte-2); display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--flaeche); border-radius: var(--radius); font-weight: 700; }

.guvliste { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 4px 14px; }
.guvliste .z { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--linie); font-size: 14.5px; font-weight: 600; }
.guvliste .z:first-child { border-top: 0; }
.guvliste .z span:last-child { font-variant-numeric: tabular-nums; }
.guvliste .z.kosten span:first-child { color: var(--tinte-2); padding-left: 10px; }
.guvliste .z.zwischen { font-weight: 850; }
.guvliste .z.summe { font-weight: 900; border-top: 2px solid var(--navy); font-size: 16px; align-items: center; }
.guvliste .z .vjw { color: var(--tinte-3); font-size: 12.5px; margin-right: 10px; font-weight: 600; }
.guvliste .gruppe { font-size: 11.5px; font-weight: 800; color: var(--tinte-3); text-transform: uppercase; letter-spacing: .06em; padding: 12px 0 2px; border-top: 1px solid var(--linie); }

.monatswahl { display: flex; align-items: center; justify-content: space-between; background: var(--flaeche); border-radius: 999px; box-shadow: var(--schatten); padding: 4px; margin-bottom: 12px; }
.monatswahl button { width: 40px; height: 40px; border: 0; background: none; color: var(--navy); border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.monatswahl button:disabled { color: var(--linie-stark); }
.monatswahl b { font-size: 15px; font-weight: 850; }

.hero { padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero .bez { font-size: 13px; color: var(--tinte-3); font-weight: 750; }
.hero .wert { font-size: 34px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero .pille { font-size: 12.5px; }

.monatsleiste { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 12px; scrollbar-width: none; margin: 0 -16px; }
.monatsleiste button { flex: none; border: 0; background: var(--flaeche); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 800; color: var(--tinte-2); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); display: inline-flex; align-items: center; gap: 6px; }
.monatsleiste button.an { background: var(--navy); color: #fff; }

.vergleich { width: 100%; border-collapse: collapse; font-size: 14px; font-weight: 600; }
.vergleich th { text-align: right; font-size: 11.5px; color: var(--tinte-3); font-weight: 800; padding: 6px 0 6px 8px; }
.vergleich th:first-child { text-align: left; padding-left: 0; }
.vergleich td { padding: 8px 0 8px 8px; border-top: 1px solid var(--linie); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vergleich td:first-child { text-align: left; padding-left: 0; white-space: normal; }
.vergleich td.vj { color: var(--tinte-3); }
.vergleich tr.kosten td:first-child { color: var(--tinte-2); padding-left: 10px; }
.vergleich tr.zwischen td { font-weight: 850; }
.vergleich tr.summe td { font-weight: 900; border-top: 2px solid var(--navy); }

.status { display: flex; gap: 12px; align-items: flex-start; }
.status .ampel { margin-top: 7px; width: 10px; height: 10px; flex: none; }
.infozeilen .z { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); font-size: 14px; font-weight: 600; }
.infozeilen .z:first-child { border-top: 0; }
.infozeilen .z span:first-child { color: var(--tinte-2); }
.infozeilen .z span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Untere Leiste */
.leiste { position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--linie); padding: 7px 0 calc(9px + env(safe-area-inset-bottom)); z-index: 10; }
.leiste a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: #8A8F9C; position: relative; padding: 4px 0; }
.leiste a.an { color: var(--navy); }
.leiste .badge { position: absolute; top: 0; left: calc(50% + 6px); background: #E39A2D; color: #fff; border-radius: 999px; font-size: 10px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; background: var(--navy); }
@media (min-width: 600px) { .anmeldung { min-height: 844px; } }
.anmeldung .oben { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 28px; color: #fff; }
.anmeldung .oben p { color: rgba(255,255,255,.75); font-weight: 600; margin: 10px 0 0; }
.anmeldung form { background: var(--papier); border-radius: 28px 28px 0 0; padding: 26px 22px 34px; display: flex; flex-direction: column; gap: 14px; }
.anmeldung .knopf.primaer { height: 50px; margin-top: 6px; font-size: 16px; }
.anmeldung .fuss { text-align: center; color: var(--tinte-3); font-size: 12.5px; margin: 6px 0 0; font-weight: 600; }

/* Kompakt (Thomas, 02.11.2026: „viel kompakter, so wenig Scroll wie möglich“) */
.vergleich.kompakt td { padding: 7px 0 7px 6px; font-size: 13.5px; }
.vergleich.kompakt td:last-child { text-align: right; }
.zeile2.eng { padding: 7px 14px; }
.zeile2.eng .pille { font-size: 12.5px; min-width: 76px; padding: 2px 8px; }
.tagesbalken { height: 44px; }

/* Fassung 4 (03.11.2026): Heute = vier Zahlen, laufender Monat, Problemkinder. Datenstand = Log. */
.buehne .segment.hell { background: rgba(255,255,255,.12); }
.buehne .segment.hell button { color: rgba(255,255,255,.8); }
.buehne .segment.hell button.an { background: #fff; color: var(--navy); }
.buehne .gross.neg { color: #FFB4AE; }
.buehne .unter .delta { color: #fff; background: rgba(255,255,255,.14); padding: 1px 7px; border-radius: 999px; }
.kpi .wert { font-size: 20px; }
.zielkarte, .monatkarte { margin-top: 10px; display: block; color: inherit; }
.zkopf { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--tinte-2); }
.zkopf b { font-size: 22px; font-weight: 900; color: var(--tinte); }
.zkopf svg { color: var(--tinte-3); }
.fortschritt { height: 8px; border-radius: 999px; background: #E4E5E9; margin-top: 8px; overflow: hidden; }
.fortschritt i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.mwerte { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; margin-top: 10px; }
.mwerte small { display: block; font-size: 11px; font-weight: 700; color: var(--tinte-3); }
.mwerte b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mwerte b.neg { color: var(--rot); }
.mfuss { margin-top: 10px; font-size: 12.5px; font-weight: 650; color: var(--tinte-2); }
.pkmehr { margin-top: 12px; }
.pkmehr summary { cursor: pointer; font-weight: 800; color: var(--tinte-2); font-size: 13.5px; padding: 4px 2px 8px; }
.log .logz { padding: 10px 14px; border-top: 1px solid var(--linie); }
.log .logz:first-child { border-top: 0; }
.log .logz.abw { background: #FFF8EE; }
.log .lkopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.log .lmeld { font-size: 12px; color: var(--tinte-3); font-weight: 600; margin-top: 3px; line-height: 1.5; }

/* Fassung 5 (03.11.2026): Kopf plakativer, Kacheln ohne Untertexte, Monat klarer */
.buehne .riesig { font-size: 46px; font-weight: 900; letter-spacing: -.025em; line-height: 1.05; margin: 18px 0 8px; font-variant-numeric: tabular-nums; }
.buehne .riesig.neg { color: #FFB4AE; }
.kpi .wert { margin-bottom: 0; }
.kpi.ziel .bez { display: flex; justify-content: space-between; align-items: center; }
.kpi .haken { width: 20px; height: 20px; border-radius: 50%; background: #DCF2E3; color: #17603A; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.kpi.ziel .fortschritt { height: 5px; margin-top: 10px; }
.kpi.ziel.erreicht .fortschritt i { background: #3E9F66; }
.monatkarte { padding: 16px; }
.monatkarte .zkopf { font-size: 14px; }
.mgross { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mgross b { font-size: 32px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.mgross b.neg { color: var(--rot); }
.mgross .delta { font-size: 13px; background: #F2F3F5; padding: 3px 8px; border-radius: 999px; }
.mklein { font-size: 12px; font-weight: 700; color: var(--tinte-3); margin-top: 4px; }
.monatkarte .mwerte { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--linie); padding-top: 12px; margin-top: 14px; }
.monatkarte .mwerte b { font-size: 17px; }
.monatkarte .mwerte .pille { margin-left: 6px; font-size: 11.5px; padding: 1px 7px; vertical-align: 2px; }
.pkkopf { font-size: 13px; font-weight: 850; color: var(--tinte-2); margin: 14px 2px 8px; display: flex; gap: 8px; align-items: center; }
h2.abschnitt + .pkkopf { margin-top: 0; }
.pkkopf span { font-size: 11.5px; font-weight: 800; background: #E4E5E9; border-radius: 999px; padding: 1px 8px; }

/* Fassung 6 (03.11.2026): Problemkinder als Zahlenzeilen — Ergebnis und Umsatz zu Vorjahr immer sichtbar */
.pkspalten, .pkz2 { display: grid; grid-template-columns: 1fr 82px 56px; gap: 8px; align-items: center; padding: 0 14px; }
.pkspalten { font-size: 11px; font-weight: 800; color: var(--tinte-3); padding-top: 9px; padding-bottom: 6px; }
.pkspalten span:not(:first-child) { text-align: right; }
.pkz2 { min-height: 54px; border-top: 1px solid var(--linie); color: inherit; padding-top: 8px; padding-bottom: 8px; }
.pkz2 .name { font-weight: 850; font-size: 14.5px; min-width: 0; }
.pkz2 .erg, .pkz2 .ums { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tinte-3); font-size: 14px; white-space: nowrap; }
.pkz2 .rot { color: var(--rot); font-weight: 900; font-size: 16px; }

/* Fassung 7: Problemkinder plakativ — Name und zwei große Zahlen */
.pkspalten, .pkz2 { grid-template-columns: 1fr 96px 66px; }
.pkz2 { min-height: 50px; }
.pkz2 .name { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkz2 .erg, .pkz2 .ums { font-size: 16px; }
.pkz2 .rot { font-size: 18px; }
.monatkarte + .monatkarte { margin-top: 10px; }

/* Fassung 8: Umschalter schaltet die ganze Seite (Jahr und Monate) — darum ohne Jahreszahl; das Jahr steht bei der großen Zahl */
.buehne .unter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.buehne .jahrmarke { font-weight: 850; color: #fff; }
