/* Portal am Rechner, Fassung 2. Navy-Seitenleiste wie der Company Teaser, helle Arbeitsfläche, klare Stufenfarben. */
.portal { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.seite { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 22px 14px 16px; position: sticky; top: 0; height: 100vh; }
.seite .marke { padding: 4px 10px 4px; }
.seite .unterzeile { padding: 0 10px 22px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.6); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.78); font-weight: 750; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.an { background: #fff; color: var(--navy); }
.nav a .badge { margin-left: auto; background: #E39A2D; color: #fff; border-radius: 999px; font-size: 11px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; font-weight: 800; }
.nav a .spaeter { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
.nav a.an .spaeter { background: var(--navy-hell); color: var(--navy); }
.nav .trenner { height: 1px; background: rgba(255,255,255,.12); margin: 12px 8px; }
.person { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 900; font-size: 13px; flex: none; }
.person .wer { font-weight: 800; font-size: 14px; line-height: 1.2; }
.person .wer small { display: block; color: rgba(255,255,255,.6); font-weight: 600; }
.person a { margin-left: auto; color: rgba(255,255,255,.7); }

.haupt { min-width: 0; padding: 26px 34px 56px; }
.seitenkopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.seitenkopf h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; }
.seitenkopf .unter { color: var(--tinte-3); font-size: 14px; margin-top: 3px; font-weight: 600; }
.seitenkopf .rechts { display: flex; gap: 8px; align-items: center; }
.krumen { font-size: 13px; color: var(--tinte-3); margin-bottom: 4px; font-weight: 700; }

.karte { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 20px; min-width: 0; }
.karte > h2, .karte .kopf2 { font-size: 16px; font-weight: 900; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.karte h2 .rechts, .kopf2 .rechts { font-weight: 650; font-size: 13px; color: var(--tinte-3); display: flex; gap: 10px; align-items: center; }
.raster { display: grid; gap: 18px; }
.r4 { grid-template-columns: repeat(4, 1fr); }
.r3 { grid-template-columns: repeat(3, 1fr); }
.r31 { grid-template-columns: 1fr 1fr 1fr .85fr; }
.r21 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
@media (max-width: 1280px) { .r31 { grid-template-columns: repeat(2, 1fr); } .r21 { grid-template-columns: 1fr; } }
.legende { display: flex; gap: 14px; font-size: 12px; color: var(--tinte-3); margin-top: 8px; font-weight: 600; flex-wrap: wrap; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.abschnittstitel { font-size: 13px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--tinte-3); margin: 30px 2px 12px; display: flex; align-items: center; gap: 12px; }

/* Drei-Monats-Karten */
.mkarte { border-radius: 22px; padding: 18px 20px 16px; background: var(--flaeche); box-shadow: var(--schatten); position: relative; overflow: hidden; color: var(--tinte); display: block; }
.mkarte.jetzt { background: var(--navy); color: #fff; }
.mkarte .mkopf { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.mkarte .mkopf .chip { font-size: 11.5px; }
.mkarte.jetzt .mkopf .chip { background: rgba(255,255,255,.14); color: #fff; }
.mkarte .bez { font-size: 12.5px; font-weight: 700; opacity: .7; margin-top: 12px; }
.mkarte .riesig { font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mkarte .stufe { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; margin-top: 6px; }
.mkarte .zeilen { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin-top: 14px; font-size: 13.5px; font-weight: 650; padding-top: 12px; border-top: 1px solid var(--linie); }
.mkarte.jetzt .zeilen { border-top-color: rgba(255,255,255,.14); }
.mkarte .zeilen span:nth-child(odd) { opacity: .72; }
.mkarte .zeilen span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.mkarte .verteil { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 12px; }
.mkarte .verteil i { display: block; }
.mkarte .verteiltext { display: flex; justify-content: space-between; font-size: 12px; font-weight: 750; margin-top: 6px; opacity: .85; }
.mkarte .strich { position: absolute; left: 0; right: 0; top: 0; height: 5px; }

/* Ampel-Tabelle Apartments × Monate (Übersicht) */
table.ampeltab { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13.5px; }
.ampeltab th { font-size: 12px; font-weight: 800; color: var(--tinte-3); text-align: center; padding: 0 4px 4px; white-space: nowrap; }
.ampeltab th:first-child { text-align: left; }
.ampeltab th.jetzt { color: var(--navy); }
.ampeltab td { padding: 0 3px; text-align: center; white-space: nowrap; }
.ampeltab td:first-child { text-align: left; padding-left: 0; }
.ampeltab td .zelle { display: block; padding: 8px 6px; }
.ampeltab tr.klickbar { cursor: pointer; }
.ampeltab tr.klickbar:hover td:first-child b { color: var(--blau); }
.ampeltab .apt b { font-weight: 850; }
.ampeltab .apt small { color: var(--tinte-3); font-weight: 600; margin-left: 5px; }
.ampeltab .apt .hinweis { display: block; font-size: 11.5px; color: var(--orange); font-weight: 750; }
.ampeltab td.trenn { border-left: 2px solid var(--linie); }

table.tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tab th { text-align: left; font-size: 12px; color: var(--tinte-3); font-weight: 800; padding: 9px 10px; border-bottom: 1px solid var(--linie-stark); white-space: nowrap; }
.tab td { padding: 10px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; font-weight: 600; }
.tab th.num, .tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tab tr.klickbar { cursor: pointer; }
.tab tr.klickbar:hover td { background: var(--flaeche-2); }
.tab td .zelle { display: inline-block; padding: 4px 9px; min-width: 86px; text-align: right; }

.kv { display: grid; grid-template-columns: 1fr auto auto; gap: 0 12px; font-size: 13.5px; }
.kv > span { padding: 9px 0; border-top: 1px solid var(--linie); font-weight: 650; }
.kv > span:nth-child(-n+3) { border-top: 0; }
.kv > span.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 850; }
.kv > span.vj { text-align: right; color: var(--tinte-3); font-variant-numeric: tabular-nums; }

/* ---------- GuV-Matrix ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.filter select, .filter input[type=search] { height: 36px; border: 1px solid var(--linie-stark); border-radius: 999px; padding: 0 14px; background: var(--flaeche); font-size: 13.5px; font-weight: 650; }
.filter .luecke { flex: 1; }
.suchfeld { position: relative; }
.suchfeld svg { position: absolute; left: 11px; top: 8px; color: var(--tinte-3); }
.suchfeld input { padding-left: 34px !important; width: 200px; }
.matrixrahmen { overflow: auto; max-height: calc(100vh - 200px); background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 100%; }
.matrix th, .matrix td { padding: 0 4px; height: 34px; text-align: right; white-space: nowrap; }
.matrix td .zelle { display: block; padding: 6px 8px; min-width: 78px; }
.matrix thead th { position: sticky; top: 0; background: var(--flaeche); z-index: 4; font-size: 12px; color: var(--tinte-3); font-weight: 800; height: 46px; border-bottom: 1px solid var(--linie-stark); padding: 0 12px; }
.matrix thead th .lauf { display: inline-block; background: var(--navy); color: #fff; padding: 4px 10px; border-radius: 999px; }
.matrix thead th small { display: block; font-size: 10.5px; font-weight: 700; color: #9CA0AB; }
.matrix th.erste, .matrix td.erste { position: sticky; left: 0; background: var(--flaeche); text-align: left; z-index: 2; min-width: 232px; padding: 0 14px; border-right: 1px solid var(--linie); }
.matrix thead th.erste { z-index: 5; }
.matrix td.sum, .matrix th.sum { background: #F6F7F9; border-right: 1px solid var(--linie-stark); }
.matrix td.jetzt, .matrix th.jetzt { background: #EEF3FA; }
.matrix td.jahr, .matrix th.jahr { border-left: 2px solid var(--linie-stark); }

/* Abschnittszeilen */
.matrix tr.abschnitt td { height: 40px; background: var(--flaeche); border-top: 8px solid var(--papier); }
.matrix tr.abschnitt td.erste { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.matrix tr.abschnitt:first-child td { border-top: 0; }

/* Firma oben */
.matrix tr.firma td { font-weight: 700; border-bottom: 1px solid var(--linie); }
.matrix tr.firma.haupt td { height: 46px; font-size: 14.5px; font-weight: 900; }
.matrix tr.firma.haupt td.erste { color: var(--navy); }
.matrix tr.firma.haupt td .zelle { padding: 8px 8px; }
.matrix tr.firma.leise td { color: var(--tinte-2); font-weight: 650; }

/* Apartment-Kopfzeile */
.matrix tr.apt td { border-top: 1px solid var(--linie); font-weight: 800; }
.matrix tr.apt td.erste { cursor: pointer; }
.matrix tr.apt td.erste .pfeil { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #EEF0F3; color: var(--tinte-2); vertical-align: -6px; margin-right: 8px; transition: transform .15s; }
.matrix tr.apt:not(.offen) td.erste .pfeil svg { transform: rotate(-90deg); }
.matrix tr.apt.offen td.erste .pfeil { background: var(--navy); color: #fff; }
.matrix tr.apt td.erste a { color: var(--tinte); font-size: 14px; }
.matrix tr.apt td.erste a:hover { color: var(--blau); text-decoration: underline; }
.matrix tr.apt td.erste small { color: var(--tinte-3); font-weight: 650; margin-left: 5px; }
.matrix tr.apt.offen td { background: #FAFBFC; }
.matrix tr.apt.offen td.jetzt { background: #EEF3FA; }

/* Aufgeklappte Kennzahlen */
.matrix tr.kz td { height: 30px; background: #FAFBFC; font-weight: 600; color: var(--tinte); }
.matrix tr.kz td.jetzt { background: #EEF3FA; }
.matrix tr.kz td.erste { padding-left: 50px; color: var(--tinte-2); box-shadow: inset 4px 0 0 var(--navy); }
.matrix tr.kz.kosten td { color: var(--tinte-2); }
.matrix tr.kz.kosten td.erste { padding-left: 62px; }
.matrix tr.kz.zwischen td { font-weight: 850; color: var(--tinte); }
.matrix tr.kz.ergebnis td { font-weight: 900; }
.matrix tr.kz.leise td { color: var(--tinte-3); font-size: 12.5px; }
.matrix tr.kz.gruppe td { height: 24px; }
.matrix tr.kz.gruppe td.erste { font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #9CA0AB; padding-top: 6px; }
.matrix tr.kz.letzte td { border-bottom: 1px solid var(--linie-stark); }
.matrix td.aus { color: #C4C6CD; font-weight: 500; }

/* Kennzahlen gesamt unten */
.matrix tr.kgesamt td { height: 32px; color: var(--tinte-2); font-weight: 650; border-bottom: 1px solid var(--linie); }
.matrix tr.kgesamt.gruppe td { height: 26px; border-bottom: 0; }
.matrix tr.kgesamt.gruppe td.erste { font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #9CA0AB; padding-top: 6px; }

/* Stammdaten-Seitenblatt */
.blatt-hinter { position: fixed; inset: 0; background: rgba(14,30,51,.35); z-index: 20; }
.blatt { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; background: var(--flaeche); z-index: 21; box-shadow: -10px 0 40px rgba(14,30,51,.18); display: flex; flex-direction: column; border-radius: 24px 0 0 24px; }
.blatt .bkopf { padding: 22px 24px; border-bottom: 1px solid var(--linie); display: flex; justify-content: space-between; align-items: flex-start; }
.blatt .bkopf h2 { margin: 0; font-size: 21px; font-weight: 900; }
.blatt .binhalt { padding: 20px 24px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.blatt .binhalt .breit { grid-column: 1 / -1; }
.nurlesen { font-size: 13.5px; background: var(--flaeche-2); border-radius: 14px; padding: 12px 14px; color: var(--tinte-2); font-weight: 600; }
.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 750; font-size: 14px; }
.schalter input { appearance: none; width: 44px; height: 26px; background: var(--linie-stark); border-radius: 999px; position: relative; cursor: pointer; margin: 0; }
.schalter input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.schalter input:checked { background: #34A853; }
.schalter input:checked::after { left: 21px; }

.statuskarte { display: flex; gap: 12px; }
.statuskarte .ampel { margin-top: 6px; width: 10px; height: 10px; flex: none; }
.statuskarte .t { font-weight: 850; }
.statuskarte .s { font-size: 13px; color: var(--tinte-3); font-weight: 600; }

.platzhalter { border: 2px dashed var(--linie-stark); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--tinte-2); background: var(--flaeche); font-weight: 600; }
.entwurf { opacity: .45; pointer-events: none; filter: grayscale(1); margin-top: 18px; }

.anmeldeflaeche { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.anmeldeflaeche .links { background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 64px; }
.anmeldeflaeche .links p { color: rgba(255,255,255,.75); font-size: 18px; font-weight: 600; margin: 14px 0 0; }
.anmeldeflaeche .rechts { display: grid; place-items: center; }
.anmeldekarte { width: 380px; display: flex; flex-direction: column; gap: 14px; }
.anmeldekarte h2 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.anmeldekarte .fuss { text-align: center; color: var(--tinte-3); font-size: 12.5px; font-weight: 600; }

/* Übersicht nach dem Live-Status der edelførst-Berichte (03.11.2026) */
.stapel { display: grid; gap: 18px; }
.kzleiste { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .kzleiste { grid-template-columns: repeat(2, 1fr); } }
.kachel { background: var(--flaeche); border-radius: 20px; box-shadow: var(--schatten); border-top: 4px solid var(--navy); padding: 18px 22px; display: flex; flex-direction: column; min-height: 128px; }
.kachel[data-akzent="grau"] { border-top-color: #C9CCD3; }
.kachel[data-akzent="blau"] { border-top-color: #7F9CC4; }
.kachel[data-akzent="gruen"] { border-top-color: #6CC38F; }
.kachel .bez { font-size: 13px; font-weight: 750; color: var(--tinte-3); }
.kachel .wert { font-size: 32px; font-weight: 900; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kachel .zusatz { margin-top: auto; padding-top: 10px; font-size: 12.5px; font-weight: 650; color: var(--tinte-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kachel .chip { font-size: 11px; padding: 2px 8px; }
.legende2 { display: inline-flex; gap: 16px; font-size: 12px; font-weight: 650; color: var(--tinte-2); }
.legende2 span { display: inline-flex; align-items: center; gap: 6px; }
.legende2 i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legende2 i.ziel { height: 0; border-radius: 0; border-top: 2px dashed var(--tinte); opacity: .6; }
.klein { font-size: 12px; font-weight: 600; margin: -6px 0 6px; }
.tab.monate td { padding: 7px 10px; }
.tab.monate td .chip { font-size: 11px; padding: 1px 8px; margin-left: 6px; }
.tab.monate td .zelle { display: inline-block; padding: 4px 10px; border-radius: 8px; min-width: 96px; text-align: right; }
.tab.monate tr.jetzt td { background: #EEF3FA; }
.tab.monate tr.jetzt td:first-child b { color: var(--navy); }
.tab.monate tr.summe td { border-top: 2px solid var(--linie-stark); border-bottom: 0; font-weight: 800; }
.segment.gross button { padding: 8px 20px; font-size: 14px; }
.kachel .wert.neg { color: var(--rot); }

/* Jahresplanung (03.11.2026) */
.tab.plan { font-size: 13px; font-variant-numeric: tabular-nums; }
.tab.plan th, .tab.plan td { padding: 6px 8px; }
.tab.plan tr.gruppen th { text-align: center; color: var(--tinte); border-bottom: 0; padding-bottom: 0; font-size: 12px; }
.tab.plan th.ziel, .tab.plan td.ziel { background: #EEF3FA; }
.tab.plan tr.gruppen th.ziel { color: var(--navy); border-radius: 10px 10px 0 0; }
.tab.plan td.vorl { font-style: italic; }
.tab.plan td.leer { color: #B8BAC2; }
.tab.plan td .zelle { display: inline-block; padding: 3px 8px; border-radius: 8px; min-width: 84px; text-align: right; }
.tab.plan td.ziel { text-align: right; }
.tab.plan .eingabe { position: relative; display: inline-block; }
.tab.plan .eingabe i { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 800; color: var(--navy); pointer-events: none; }
.tab.plan td.ziel input { width: 124px; height: 32px; border: 1px solid var(--linie-stark); border-radius: 9px; padding: 0 21px 0 10px; font: inherit; font-weight: 800; text-align: right; color: var(--navy); background: var(--flaeche); }
.tab.plan td.ziel input:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.tab.plan tr.summe td { border-top: 2px solid var(--linie-stark); border-bottom: 0; font-weight: 800; }
.tab.plan td:nth-child(2), .tab.plan th:nth-child(2) { border-left: 1px solid var(--linie); }

/* Fassung 4 (03.11.2026): Matrix mit Zeitraum und Vergleich, Problemkinder in zwei Gruppen, Datenstand als Log */
.filter .trennstrich { width: 1px; height: 24px; background: var(--linie-stark); }
.vonbis { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--tinte-3); }
.matrixrahmen.vergleich .matrix th:not(.erste), .matrixrahmen.vergleich .matrix td:not(.erste) { min-width: 150px; }
.matrixrahmen.vergleich .matrix td .zelle { min-width: 110px; }
.matrixrahmen.vergleich .matrix thead th { font-size: 13px; }
.pkgruppe + .pkgruppe { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linie); }
.pktitel { font-size: 13px; font-weight: 850; color: var(--tinte-2); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.pktitel span { font-size: 11.5px; font-weight: 800; background: #E4E5E9; color: var(--tinte-2); border-radius: 999px; padding: 1px 8px; }
.tab.log td { vertical-align: top; }
.tab.log td.meldung { white-space: normal; color: var(--tinte-2); font-weight: 600; font-size: 13px; line-height: 1.5; }
.tab.log tr.abw td { background: #FFF8EE; }

/* Fassung 5: Problemkinder „Seit Jänner“ zum Aufklappen */
details.pkgruppe > summary { cursor: pointer; list-style: none; }
details.pkgruppe > summary::-webkit-details-marker { display: none; }
details.pkgruppe > summary::before { content: '▸'; color: var(--tinte-3); }
details.pkgruppe[open] > summary::before { content: '▾'; }
details.pkgruppe[open] > summary { margin-bottom: 10px; }
details.pkgruppe:not([open]) > summary { margin-bottom: 0; }

/* Fassung 6: Problemkinder als Tabelle, aktueller und kommender Monat nebeneinander */
.pkzwei { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pkzwei .pkgruppe + .pkgruppe { margin-top: 0; padding-top: 0; border-top: 0; }
.pkzwei + .pkgruppe { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linie); }
.tab.pktab td { padding: 8px 10px; }
.tab.pktab td.grau { color: var(--tinte-3); }
.tab.pktab td.rot { color: var(--rot); font-weight: 900; }
