/* ObjektCheck – Design aus der Claude-Design-Vorlage "Immo Rechner" */
:root {
  --navy: #0a1f44;
  --navy-2: #102a59;
  --navy-line: #2a4579;
  --blue: #2b63ff;
  --blue-hover: #1f50e0;
  --blue-soft: #e8efff;
  --blue-pale: #cddaff;
  --bg: #f3f6fb;
  --card: #fff;
  --line: #e3e9f2;
  --line-2: #d5deea;
  --line-3: #edf1f6;
  --text: #0d1b2e;
  --text-2: #3d4c63;
  --muted: #5b6b82;
  --muted-2: #8a99ad;
  --on-navy: #bcd0f5;
  --on-navy-2: #9fb4dc;
  --pos-bg: #e6f7ef; --pos-line: #b6e6cf; --pos: #0c8a5b; --pos-strong: #06603f; --pos-text: #2f6b52;
  --neg-bg: #fdecec; --neg-line: #f4c3c3; --neg: #c4302b; --neg-strong: #a3221e; --neg-text: #8a3431;
  --warn-bg: #fff6e0; --warn-line: #f3d98c; --warn: #c98a00; --warn-strong: #8a5d00;
  --hl: #eef3ff;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
button { font-family: var(--font); }
input::placeholder { color: #9aa8bb; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.app-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.app-header .inner { max-width: 1320px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; border-radius: 11px; background: var(--blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--on-navy-2); font-weight: 500; letter-spacing: .04em; }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.07); padding: 4px; border-radius: 12px; margin-left: auto; }
.tab { height: 36px; padding: 0 16px; border-radius: 9px; border: none; cursor: pointer; font: 600 14px var(--font); background: transparent; color: #c9d6ee; display: flex; align-items: center; }
.tab.active { background: #fff; color: var(--navy); }
.badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 11px; align-items: center; justify-content: center; margin-left: 6px; }

/* ---------- Layout ---------- */
main.page { max-width: 1320px; width: 100%; margin: 0 auto; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 240px; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: .08em; }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; text-wrap: pretty; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--text); font: 600 14px var(--font); cursor: pointer; }
.btn:hover { background: #eef3fb; }
.btn-outline { border-color: var(--blue); color: var(--blue); font-weight: 700; }
.btn-outline:hover { background: #eef3ff; }
.btn-primary { border: none; background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(43,99,255,.6); }
.btn-primary:hover { background: var(--blue-hover); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 22px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-result { position: sticky; top: 92px; }

/* ---------- Karten & Eingaben ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.step { width: 24px; height: 24px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-title { font-weight: 700; font-size: 15px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field-label { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.hint { display: inline-flex; width: 14px; height: 14px; border-radius: 7px; background: #e7edf6; color: var(--muted); font-size: 10px; font-weight: 800; align-items: center; justify-content: center; cursor: help; flex-shrink: 0; }
.input { display: flex; align-items: center; height: 44px; border: 1px solid var(--line-2); border-radius: 11px; background: #f9fbfe; padding: 0 12px; gap: 8px; }
.input:focus-within { border-color: var(--blue); background: #fff; }
.input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: 600 15px var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.input .suffix { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.field-note { font-size: 11px; line-height: 1.3; color: var(--muted-2); }

/* Finanzierung (dunkle Karte) */
.card-dark { background: var(--navy); border: none; color: #fff; }
.card-dark .step { background: var(--blue); color: #fff; }
.card-dark .card-head .aside { margin-left: auto; font-size: 12px; color: var(--on-navy-2); text-align: right; }
.card-dark .field-label { color: var(--on-navy); }
.card-dark .input { border-color: var(--navy-line); background: var(--navy-2); }
.card-dark .input:focus-within { border-color: var(--blue); background: var(--navy-2); }
.card-dark .input input { color: #fff; }
.card-dark .input .suffix { color: var(--on-navy-2); }
.input-ek { height: 56px; border: 2px solid var(--blue) !important; border-radius: 13px; padding: 0 16px; }
.input-ek input { font: 700 22px var(--font) !important; }
.input-ek .suffix { font-size: 15px !important; font-weight: 700 !important; }
.nk-box { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--navy-line); border-radius: 13px; background: var(--navy-2); padding: 14px 16px; }
.nk-box .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.nk-box .row1 span:first-child { font-weight: 600; color: var(--on-navy); }
.nk-box .row1 span:last-child { color: var(--on-navy-2); }
.nk-sum { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nk-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 16px; }
.nk-items div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--navy-line); }
.nk-items span:first-child { color: var(--on-navy); }
.nk-items span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.small-navy { font-size: 11px; color: var(--on-navy-2); }
.label-navy { font-size: 12px; font-weight: 600; color: var(--on-navy); margin-top: 4px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { flex: 1; min-width: 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 11px; cursor: pointer; text-align: left; font: 700 14px var(--font); border: 1px solid var(--navy-line); background: var(--navy-2); color: #fff; }
.seg-btn.on { border: 2px solid var(--blue); background: var(--blue); }
.seg-btn small { font-size: 11px; font-weight: 500; color: var(--blue-pale); }
.quote-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: rgba(255,255,255,.06); border-radius: 11px; padding: 12px 14px; }
.quote-box .q { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.quote-box .q b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.quote-box .q span { font-size: 11px; color: var(--on-navy-2); }
.quote-box .t { flex: 1; min-width: 200px; font-size: 13px; line-height: 1.45; color: #dbe5fa; text-wrap: pretty; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.link-navy { color: #9fbdff; align-self: flex-start; font-size: 12.5px; margin-top: -6px; }
.fin-sum { display: flex; flex-direction: column; border: 1px solid var(--navy-line); border-radius: 13px; background: var(--navy-2); padding: 6px 14px; }
.fs-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--navy-line); font-size: 14px; color: #dbe5fa; font-variant-numeric: tabular-nums; }
.fs-row span:last-child { font-weight: 700; color: #fff; white-space: nowrap; }
.fs-row.sub span { font-weight: 700; color: #fff; }
.fs-row small { font-size: 11px; color: var(--on-navy-2); font-weight: 500; margin-left: 4px; }
.fs-toggle { width: 100%; background: transparent; border: none; border-bottom: 1px dashed var(--navy-line); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.fs-toggle:hover span:first-child { color: #fff; }
.fs-row.total { border-bottom: none; font-size: 17px; padding-top: 12px; }
.fs-row.total span { color: #fff; font-weight: 800; }
.fs-row.total span:last-child { font-size: 22px; }
.nk-detail { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 12px; border-bottom: 1px dashed var(--navy-line); }
.kredit-display { height: 44px; border-radius: 11px; background: rgba(43,99,255,.18); padding: 0 12px; display: flex; align-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

/* Aufklappbare Karten */
.card-collapse { padding: 0; gap: 0; overflow: hidden; }
.collapse-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 16px 20px; border: none; background: transparent; cursor: pointer; font: 700 15px var(--font); color: var(--text); text-align: left; }
.collapse-btn .icon { width: 24px; height: 24px; border-radius: 7px; background: #eef1f6; color: var(--muted); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.collapse-btn .summary { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted-2); text-align: right; }
.collapse-body { padding: 0 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.subgroup-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.collapse-body .input { height: 42px; }
.collapse-body .input input { font-size: 14px; }

/* ---------- Ergebnis ---------- */
.cf-card { border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 16px; border: 1px solid; }
.cf-card.pos { background: var(--pos-bg); border-color: var(--pos-line); color: var(--pos-text); }
.cf-card.neg { background: var(--neg-bg); border-color: var(--neg-line); color: var(--neg-text); }
.cf-card.neutral { background: #fff; border-color: var(--line); color: var(--muted); }
.neutral .pill { background: #8a99ad; } .neutral .pill .dot { background: #e3e9f2; }
.neutral .cf-value { color: #b7c3d4; }
.cf-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 16px; color: #fff; font-weight: 700; font-size: 13px; }
.pill .dot { width: 8px; height: 8px; border-radius: 4px; }
.pos .pill { background: var(--pos); } .pos .pill .dot { background: #8ff0c4; }
.neg .pill { background: var(--neg); } .neg .pill .dot { background: #ffb3ae; }
.cf-basis { font-size: 13px; font-weight: 600; }
.basis-toggle { margin-left: auto; display: flex; gap: 2px; background: rgba(255,255,255,.65); padding: 3px; border-radius: 10px; }
.basis-toggle button { height: 28px; padding: 0 10px; border: none; border-radius: 8px; background: transparent; font: 600 12px var(--font); color: inherit; cursor: pointer; }
.basis-toggle button.on { background: #fff; box-shadow: 0 1px 3px rgba(10,31,68,.15); color: var(--text); }
.cf-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cf-value { font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pos .cf-value { color: var(--pos-strong); } .neg .cf-value { color: var(--neg-strong); }
.cf-unit { font-size: 18px; font-weight: 700; }
.cf-meta { display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }

.ampel { border-radius: 18px; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); background: #fff; }
.ampel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lights { display: flex; gap: 5px; background: var(--navy); padding: 6px 8px; border-radius: 12px; }
.lights i { width: 14px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.15); display: block; }
.lights i.r.on { background: #ff5a52; box-shadow: 0 0 8px #ff5a52; }
.lights i.y.on { background: #ffc531; box-shadow: 0 0 8px #ffc531; }
.lights i.g.on { background: #2fd38a; box-shadow: 0 0 8px #2fd38a; }
.ampel-title { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 160px; }
.ampel-title b { font-size: 16px; font-weight: 800; }
.ampel-title span { font-size: 12px; color: var(--muted); }
.link-btn { border: none; background: transparent; color: var(--blue); font: 600 13px var(--font); cursor: pointer; padding: 4px 0; }
.link-btn:hover { text-decoration: underline; }
.crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.crit div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: #f6f8fc; }
.crit .mark { width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; }
.crit .gruen .mark { background: var(--pos); } .crit .gelb .mark { background: var(--warn); } .crit .rot .mark { background: var(--neg); }
.crit .txt { display: flex; flex-direction: column; min-width: 0; }
.crit .txt b { font-weight: 700; color: var(--text); }
.crit .txt span { color: var(--muted); font-variant-numeric: tabular-nums; }
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-top: 4px; border-top: 1px solid var(--line-3); }
.targets .input { height: 40px; }
.targets .input input { font-size: 14px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rate-card { grid-column: 1 / -1; background: var(--blue); color: #fff; border-radius: 18px; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.rate-card > div { display: flex; flex-direction: column; gap: 6px; }
.rate-card > div + div { border-left: 1px solid rgba(255,255,255,.25); padding-left: 16px; }
.rate-card .l { font-size: 12px; font-weight: 600; color: var(--blue-pale); }
.rate-card .v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rate-card .s { font-size: 12px; color: var(--blue-pale); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11px; color: var(--muted-2); }
.kpi-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: 700 14px var(--font); color: var(--text); text-align: left; }
.kpi-toggle:hover { border-color: #a9c0f5; }
.kt-icon { width: 24px; height: 24px; border-radius: 7px; background: #eef1f6; color: var(--muted); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kt-title { letter-spacing: .02em; }
.kt-sum { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; }
.kpi-group { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }

.lines { display: flex; flex-direction: column; gap: 4px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.line span:first-child { color: var(--text-2); }
.line span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line.total { border: none; padding-top: 12px; font-size: 16px; font-weight: 800; }
.line.total span { color: var(--text); font-weight: 800; }

.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-head span:last-child { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bars div { flex: 1; border-radius: 3px 3px 0 0; background: #bcd0ff; min-height: 1px; }
.bars div.fix { background: #8fb0ff; }
.bars div:hover { background: var(--blue); }
.chart-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); gap: 8px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Detailrechnung ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; align-items: start; }
.sec-title { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.sec-note { font-size: 12px; color: var(--muted-2); text-wrap: pretty; }
.sec-head { display: flex; flex-direction: column; gap: 3px; }
.tbl { display: flex; flex-direction: column; font-size: 13px; }
.tbl .tr { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px; gap: 10px; padding: 7px 8px; border-bottom: 1px solid var(--line-3); }
.tbl .tr.one { grid-template-columns: minmax(0, 1fr) 140px; }
.tbl .tr > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .tr > span:first-child { color: var(--text-2); }
.tbl .th { border-bottom: 2px solid var(--navy); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .03em; padding: 8px; }
.tbl .th > span:first-child { color: var(--muted); }
.tbl .tr.strong { font-weight: 700; background: var(--hl); }
.tbl .tr.strong > span:first-child { color: var(--text); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ytable { display: flex; flex-direction: column; font-size: 12px; font-variant-numeric: tabular-nums; }
.ytable .tr { display: grid; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line-3); text-align: right; }
.ytable .tr:hover { background: #f5f8fd; }
.ytable .tr > span:first-child { text-align: left; font-weight: 700; }
.ytable .th { border-bottom: 2px solid var(--navy); font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px; }
.ytable .th:hover { background: transparent; }
.ytable .b { font-weight: 700; }
.ytable .blue { font-weight: 700; color: var(--blue-hover); }
.ytable .tr.switch { background: #fff6e0; }
.ytable .tr.end { background: var(--hl); }
.neg-num { color: var(--neg-strong); }

/* ---------- Historie ---------- */
.filter { display: flex; gap: 4px; background: #e7edf6; padding: 4px; border-radius: 12px; }
.filter button { height: 34px; padding: 0 14px; border-radius: 9px; border: none; cursor: pointer; font: 600 13px var(--font); background: transparent; color: var(--muted); }
.filter button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(10,31,68,.12); }
.empty { background: #fff; border: 1px dashed #cfd9e8; border-radius: 18px; padding: 48px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { font-size: 17px; } .empty span { color: var(--muted); font-size: 14px; }
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(90px, 1fr)) auto auto; gap: 14px; align-items: center; }
.hist:hover { border-color: #a9c0f5; }
.hist .name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.hist .name > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hist .name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .name span { font-size: 12px; color: var(--muted-2); }
.hist .stat { display: flex; flex-direction: column; gap: 2px; }
.hist .stat span { font-size: 11px; color: var(--muted-2); font-weight: 600; }
.hist .stat b { font-variant-numeric: tabular-nums; }
.dot-ampel { width: 12px; height: 12px; border-radius: 6px; flex-shrink: 0; background: #cfd9e8; }
.dot-ampel.gruen { background: #2fd38a; } .dot-ampel.gelb { background: #ffc531; } .dot-ampel.rot { background: #ff5a52; }
.cf-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-chip.pos { background: var(--pos-bg); color: var(--pos-strong); }
.cf-chip.neg { background: var(--neg-bg); color: var(--neg-strong); }
.hist .btns { display: flex; gap: 8px; justify-content: flex-end; }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font: 600 13px var(--font); color: var(--text); cursor: pointer; }
.btn-sm:hover { background: #eef3fb; }
.btn-del { width: 36px; padding: 0; border-color: #f0d3d3; color: var(--neg); font-size: 16px; font-weight: 700; }
.btn-del:hover { background: var(--neg-bg); }

/* ---------- Report (PDF für Bank) ---------- */
.report-bar { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; }
.report-bar .inner { max-width: 880px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-bar .ghost { height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--navy-line); background: transparent; color: #fff; font: 600 14px var(--font); cursor: pointer; }
.report-bar .info { font-size: 13px; color: var(--on-navy-2); }
.report-bar .print { margin-left: auto; height: 40px; padding: 0 18px; border-radius: 11px; border: none; background: var(--blue); color: #fff; font: 700 14px var(--font); cursor: pointer; }
.report-wrap { padding: 28px 16px 60px; display: flex; justify-content: center; }
.report { width: 100%; max-width: 820px; background: #fff; box-shadow: 0 10px 40px -20px rgba(10,31,68,.35); padding: 40px 44px; display: flex; flex-direction: column; gap: 26px; font-size: 12px; color: var(--text); }
.r-head { display: flex; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 18px; }
.r-head .logo { border-radius: 10px; }
.r-head .t { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.r-head .t small { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--blue); }
.r-head .t b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.r-head .t span { font-size: 12px; color: var(--muted); }
.r-head .d { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11px; color: var(--muted); }
.r-head .d b { color: var(--text); }
.r-tiles { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 10px; }
.r-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.r-tile span { font-size: 10px; font-weight: 600; color: var(--muted); }
.r-tile b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-tile.pos { background: var(--pos-bg); border-color: var(--pos-line); } .r-tile.pos span { color: var(--pos); font-weight: 700; } .r-tile.pos b { color: var(--pos-strong); font-size: 18px; } .r-tile.pos small { color: var(--pos-text); font-size: 10px; }
.r-tile.neg { background: var(--neg-bg); border-color: var(--neg-line); } .r-tile.neg span { color: var(--neg); font-weight: 700; } .r-tile.neg b { color: var(--neg-strong); font-size: 18px; } .r-tile.neg small { color: var(--neg-text); font-size: 10px; }
.r-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.r-col { display: flex; flex-direction: column; gap: 22px; }
.r-sec { display: flex; flex-direction: column; break-inside: avoid; }
.r-sec-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--navy); padding-bottom: 6px; border-bottom: 1px solid var(--navy); }
.r-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 6px; border-bottom: 1px solid var(--line-3); }
.r-row span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.r-row.strong { font-weight: 700; background: var(--hl); }
.r-row.total { font-weight: 800; background: var(--navy); color: #fff; border-radius: 6px; border-bottom: none; margin-top: 2px; }
.r-row.total small { color: var(--on-navy); font-weight: 600; }
.r-row.muted { color: var(--muted); font-size: 11px; }
.r-row small { font-size: 10px; color: var(--muted); font-weight: 500; }
.r-tiles.r-tiles4 { grid-template-columns: repeat(4, 1fr); }
.r-tile small { font-size: 10px; color: var(--muted); }
.r-glance { margin: -12px 0 0; font-size: 11.5px; color: var(--text-2); line-height: 1.5; padding: 8px 12px; background: #f6f8fc; border-radius: 8px; }
.r-narrow { max-width: 560px; }
.r-appendix { break-before: page; page-break-before: always; display: flex; flex-direction: column; gap: 22px; }
.r-app-title { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: 8px; }
.r-grid6.r-grid4 { grid-template-columns: 90px repeat(3, 1fr); }
.r-grid6 small, .r-grid5 small { font-size: 9px; font-weight: 700; color: var(--warn-strong); margin-left: 4px; }
.r-grid6.switch { background: #fff6e0; }
.r-grid6 b.pos { color: var(--pos-strong); } .r-grid6 b.neg { color: var(--neg-strong); }
.r-grid3 { display: grid; grid-template-columns: 1fr 130px 130px; gap: 10px; padding: 5px 6px; border-bottom: 1px solid var(--line-3); }
.r-grid3 span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.r-grid3.th { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--navy); border-bottom: 1px solid var(--navy); padding: 0 0 6px; }
.r-grid3.strong { font-weight: 700; background: var(--hl); }
.r-plan { break-before: page; }
.r-forecast { break-inside: avoid; display: flex; flex-direction: column; }
.r-fc-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.r-fc-summary div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.r-fc-summary span { font-size: 10px; font-weight: 600; color: var(--muted); }
.r-fc-summary b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-fc-summary b.pos { color: var(--pos-strong); } .r-fc-summary b.neg { color: var(--neg-strong); }
.r-chart { width: 100%; height: 150px; display: block; margin-top: 4px; }
.r-chart-cap { font-size: 9.5px; color: var(--muted); margin: 4px 0 8px; line-height: 1.4; }
.r-grid6 { display: grid; grid-template-columns: 90px repeat(5, 1fr); gap: 8px; padding: 3px 6px; border-bottom: 1px solid var(--line-3); font-variant-numeric: tabular-nums; font-size: 11px; }
.r-grid6 span:not(:first-child) { text-align: right; }
.r-grid6.th { font-weight: 800; letter-spacing: .04em; color: var(--navy); border-bottom: 1px solid var(--navy); font-size: 10px; }
.r-grid5 { display: grid; grid-template-columns: 50px repeat(4, 1fr); gap: 8px; padding: 3px 6px; border-bottom: 1px solid var(--line-3); font-variant-numeric: tabular-nums; font-size: 11px; }
.r-grid5 span:not(:first-child) { text-align: right; }
.r-grid5.th { font-weight: 800; letter-spacing: .06em; color: var(--navy); border-bottom: 1px solid var(--navy); padding-bottom: 6px; }
.r-grid5.switch { background: #fff6e0; }
.r-foot { margin: 0; font-size: 10px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; text-wrap: pretty; }

/* ---------- Toast & Dialog ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(10,31,68,.5); z-index: 20; }

/* ---------- Exposé: Eingabe ---------- */
.t-short { display: none; }
.aside-muted { margin-left: auto; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.input select { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: 600 15px var(--font); color: var(--text); appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 18px; background-image: linear-gradient(45deg, transparent 50%, #8a99ad 50%), linear-gradient(135deg, #8a99ad 50%, transparent 50%); background-position: calc(100% - 7px) 55%, calc(100% - 2px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.area { width: 100%; border: 1px solid var(--line-2); border-radius: 11px; background: #f9fbfe; padding: 10px 12px; font: 500 14px/1.5 var(--font); color: var(--text); resize: vertical; outline: none; }
.area:focus { border-color: var(--blue); background: #fff; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 16px; border: 2px dashed #c4d3ec; border-radius: 14px; background: #f6f9ff; cursor: pointer; text-align: center; }
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone b { color: var(--blue); font-size: 15px; }
.dropzone span { font-size: 12px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-grid:empty { display: none; }
.photo { display: flex; flex-direction: column; gap: 6px; }
.ph-img { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e7edf6; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge { position: absolute; left: 6px; top: 6px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.ph-cap { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; font: 500 12px var(--font); background: #f9fbfe; outline: none; min-width: 0; }
.ph-cap:focus { border-color: var(--blue); }
.ph-btns { display: flex; gap: 4px; }
.ph-btns .btn-sm { height: 30px; padding: 0 9px; font-size: 13px; }
.ph-btns .btn-del { width: 30px; margin-left: auto; }
.chk-list { display: flex; flex-direction: column; }
.chk { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-3); }
.chk:last-child { border-bottom: none; }
.chk-label { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; gap: 5px; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font: 600 12.5px var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip:hover { background: #f1f5fb; }
.chip.on.tone-good { background: var(--pos); border-color: var(--pos); color: #fff; }
.chip.on.tone-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.chip.on.tone-bad { background: var(--neg); border-color: var(--neg); color: #fff; }
.chip.on.tone-na { background: var(--muted); border-color: var(--muted); color: #fff; }
.chk-note { grid-column: 1 / -1; height: 34px; border: 1px solid var(--line-3); border-radius: 9px; padding: 0 10px; font: 500 13px var(--font); background: #fbfcfe; outline: none; color: var(--text); }
.chk-note:focus { border-color: var(--blue); background: #fff; }
.warn-box { background: var(--neg-bg); border: 1px solid var(--neg-line); color: var(--neg-strong); border-radius: 11px; padding: 10px 12px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.xp-preview { gap: 14px; }
.xp-cover { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #e7edf6; display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 13px; font-weight: 600; }
.xp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xp-head { display: flex; flex-direction: column; gap: 4px; }
.xp-head b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.xp-head span:last-child { font-size: 13px; color: var(--muted); }
.xp-sum { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.xp-sum .s { height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.xp-sum .good { background: var(--pos-bg); color: var(--pos-strong); }
.xp-sum .warn { background: var(--warn-bg); color: var(--warn-strong); }
.xp-sum .bad { background: var(--neg-bg); color: var(--neg-strong); }
.xp-sum .open { color: var(--muted); font-weight: 600; }
.xp-desc { font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-line; max-height: 340px; overflow: auto; }
.xp-hl { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text); }

/* ---------- Exposé: A4-Dokument ---------- */
.x-wrap { padding: 28px 12px 60px; display: flex; justify-content: center; }
.x-pages { display: flex; flex-direction: column; gap: 24px; }
.x-page { width: 210mm; height: 297mm; background: #fff; box-shadow: 0 10px 40px -20px rgba(10,31,68,.35); padding: 14mm 16mm 0; display: flex; flex-direction: column; overflow: hidden; color: var(--text); font-size: 12.5px; position: relative; }
.x-top { display: flex; justify-content: flex-end; padding-bottom: 8mm; }
.x-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--navy); }
.x-brand .logo { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.x-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.x-foot { height: 16mm; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--navy); font-size: 9.5px; color: var(--muted); }
.x-meta { font-size: 11px; color: var(--muted); white-space: pre-wrap; }
.x-h1 { margin: 2px 0 10px; font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.x-hero { height: 150mm; border-radius: 10px; overflow: hidden; background: #e7edf6; }
.x-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-empty { display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-weight: 600; }
.x-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.x-facts div { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.x-facts span { font-size: 9.5px; font-weight: 600; color: var(--muted); }
.x-facts b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.x-h2 { margin: 0 0 4px; font-size: 19px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.x-h2.big { font-size: 22px; font-weight: 700; margin-top: 6px; }
.x-h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.x-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin: 4px 0 8px; }
.x-ph { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.x-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #e7edf6; }
.x-ph figcaption { font-size: 9.5px; color: var(--muted); }
.x-label { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.x-text { display: flex; flex-direction: column; gap: 8px; line-height: 1.55; font-size: 12.5px; text-wrap: pretty; }
.x-text p { margin: 0; }
.x-hr { border: none; border-top: 1px solid var(--navy); margin: 8px 0 2px; width: 100%; }
.x-ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.x-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14mm; margin-bottom: 8px; }
.x-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-content: start; }
.x-dl dt { color: var(--muted); }
.x-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.x-energy { display: inline-block; min-width: 22px; padding: 1px 5px; border-radius: 4px; font-size: 10.5px; font-weight: 800; color: #fff; background: #8fc43c; text-align: center; margin-right: 4px; }
.x-energy.k-App, .x-energy.k-Ap, .x-energy.k-A { background: #00a650; } .x-energy.k-B { background: #50b848; } .x-energy.k-C { background: #b5d334; color: #1d2b0b; }
.x-energy.k-D { background: #fff200; color: #3d3a00; } .x-energy.k-E { background: #fdb913; color: #3d2a00; } .x-energy.k-F { background: #f37021; } .x-energy.k-G { background: #ed1c24; }
.x-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.x-chk-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12mm; align-content: start; }
.x-chk-sec { display: flex; flex-direction: column; break-inside: avoid; }
.x-chk-sec .x-label { color: var(--navy); font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 5px; border-bottom: 1px solid var(--navy); margin: 8px 0 2px; }
.x-chk { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line-3); align-items: start; font-size: 11.5px; }
.x-dot { width: 16px; height: 16px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #fff; margin-top: 1px; }
.x-dot.good { background: var(--pos); } .x-dot.warn { background: var(--warn); } .x-dot.bad { background: var(--neg); } .x-dot.na { background: #b7c3d4; }
.x-q { color: var(--text-2); }
.x-a { text-align: right; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; max-width: 46mm; }
.x-a small { font-weight: 500; color: var(--muted); font-size: 10px; text-align: right; }
.x-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9mm 12mm; }
.x-grid .x-ph img { aspect-ratio: 4 / 3; }
.x-map { position: relative; overflow: hidden; border-radius: 8px; background: #eef1f4; max-width: 100%; margin: 4px 0 10px; }
.x-map img { position: absolute; width: 256px; height: 256px; max-width: none; }
.x-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.x-attr { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.85); font-size: 8.5px; padding: 2px 5px; color: #555; }
.x-over { color: #ffc9c5; font-weight: 700; }

@media (max-width: 640px) {
  .t-long { display: none; } .t-short { display: inline; }
  .chk { grid-template-columns: 1fr; }
  .chips { justify-content: flex-start; }
  .x-wrap { padding: 16px 0 40px; }
}
@media print {
  .x-wrap { padding: 0; display: block; }
  .x-pages { zoom: 1 !important; gap: 0; display: block; }
  .x-page { box-shadow: none; break-after: page; page-break-after: always; height: 296.5mm; }
  .x-page:last-child { break-after: auto; page-break-after: auto; }
}

.restore-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-strong); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; }
.restore-bar b { color: var(--text); }
.restore-btns { display: flex; gap: 8px; }

/* ---------- Passwort-Sperre ---------- */
body.locked > :not(.gate):not(script):not(style) { display: none !important; }
.gate { position: fixed; inset: 0; z-index: 50; background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-card { width: 100%; max-width: 360px; background: #fff; border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.gate-card .logo { width: 52px; height: 52px; border-radius: 14px; }
.gate-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.gate-sub { font-size: 14px; color: var(--muted); text-align: center; }
.gate-input { width: 100%; margin-top: 6px; }
.gate-card .btn { width: 100%; }
.gate-err { font-size: 13px; font-weight: 600; color: var(--neg); }
.gate-card.shake { animation: gate-shake .35s; }
@keyframes gate-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Profil & Anmeldung ---------- */
.brand { cursor: pointer; border-radius: 12px; }
.brand:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.profile { position: relative; }
.profile-btn { width: 40px; height: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font: 800 15px var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.profile-btn:hover { background: rgba(255,255,255,.18); }
.profile-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; max-width: 80vw; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(10,31,68,.45); padding: 14px; display: flex; flex-direction: column; gap: 4px; z-index: 20; }
.pm-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.pm-email { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-logout { margin-top: 10px; width: 100%; color: var(--neg); border-color: #f0d3d3; }
.pm-logout:hover { background: var(--neg-bg); }
.auth-card { gap: 10px; }
.auth-switch { display: flex; gap: 4px; background: #e7edf6; padding: 4px; border-radius: 12px; width: 100%; }
.auth-switch button { flex: 1; height: 34px; border: none; border-radius: 9px; background: transparent; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.auth-switch button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(10,31,68,.12); }
.auth-field { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.auth-field span { font-size: 12px; font-weight: 600; color: var(--muted); }
.auth-ok { font-size: 13px; font-weight: 600; color: var(--pos); text-align: center; }
@media (max-width: 640px) {
  .profile { order: 2; margin-left: auto; }
  .tabs { order: 3; }
}

/* ---------- Sanierungsrechner ---------- */
.reno-sub { margin: 6px 4px -6px; }
.room-card { gap: 12px; }
.room-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.room-m2 { width: 150px; }
.room-m2 .input { height: 40px; }
.room-z { justify-content: flex-start; }
.rm-list { display: flex; flex-direction: column; gap: 6px; }
.rm { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-3); border-radius: 10px; cursor: pointer; font-size: 13.5px; background: #fbfcfe; }
.rm.on { border-color: #b9ccf7; background: var(--hl); }
.rm input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; cursor: pointer; }
.rm-label { flex: 1; min-width: 0; }
.rm-badge { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--warn-strong); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.rm-n { width: 96px; flex-shrink: 0; }
.rm-n .input { height: 34px; padding: 0 8px; }
.rm-n .input input { font-size: 13px; }
.reno-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.rs span { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rs b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rs small { font-size: 11.5px; line-height: 1.4; }
.rs.firma { background: var(--navy); color: #fff; } .rs.firma span, .rs.firma small { color: var(--on-navy); }
.rs.diy { background: var(--pos-bg); border: 1px solid var(--pos-line); color: var(--pos-strong); } .rs.diy small { color: var(--pos-text); }
.reno-save { gap: 4px; }
.pos-num { color: var(--pos-strong) !important; font-weight: 800 !important; }
.reno-apply { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.reno-apply .btn { flex: 1; min-width: 180px; }
.reno-empty { gap: 6px; } .reno-empty span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.reno-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue); padding: 4px 0; }
.muted { color: var(--muted-2); font-weight: 500; }
.price-tbl .tr.pr { grid-template-columns: minmax(0, 1fr) 120px 120px; align-items: center; }
.price-tbl .input { height: 36px; padding: 0 8px; }
.price-tbl .input input { font-size: 13px; text-align: right; }
@media (max-width: 640px) {
  .reno-sum { grid-template-columns: 1fr; }
  .room-m2 { width: 120px; }
  .price-tbl .tr.pr { grid-template-columns: minmax(0, 1fr) 92px 92px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .col-result { position: static; }
  .hist { grid-template-columns: 1fr 1fr; }
  .hist .name { grid-column: 1 / -1; }
  .hist .btns { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .app-header .inner { padding: 12px 16px; gap: 12px; }
  .tabs { margin-left: 0; width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
  main.page { padding: 20px 16px 48px; }
  h1 { font-size: 24px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; padding: 0 10px; }
  .cf-value { font-size: 46px; }
  .card-dark .card-head { flex-wrap: wrap; }
  .card-dark .card-head .aside { margin-left: 0; text-align: left; width: 100%; }
  .basis-toggle { margin-left: 0; }
  .tbl .tr { grid-template-columns: minmax(0, 1fr) 100px 100px; font-size: 12px; }
  .report { padding: 24px 18px; }
  .r-tiles, .r-tiles.r-tiles4, .r-fc-summary { grid-template-columns: 1fr 1fr; }
  .r-grid6 { grid-template-columns: 70px repeat(5, 1fr); font-size: 10px; }
  .r-2col { grid-template-columns: 1fr; }
  .r-grid3 { grid-template-columns: 1fr 90px 90px; }
}

/* ---------- Druck / PDF ---------- */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .report-wrap { padding: 0; }
  .report { box-shadow: none; padding: 0; max-width: none; }
  .r-tiles { grid-template-columns: 1.3fr repeat(4, 1fr); }
  .r-2col { grid-template-columns: 1fr 1fr; }
}
