/* HausManager – ein Stylesheet, keine Fremdquellen. */

:root {
  /* Kategorische Farben je Vermoegensart, geprueft mit dem Palettenvalidator (hell und dunkel). */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6;
  --pos: #2a78d6; --neg: #e34948;
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-2: #eef0ed;
  --text: #1b2421;
  --muted: #5d6b66;
  --line: #d9ded9;
  --accent: #1f5f5b;
  --accent-text: #ffffff;
  --accent-soft: #e2efed;
  --good: #1e7a46;
  --warn: #8a5a00;
  --bad: #b3261e;
  --warn-soft: #fbf0d9;
  --bad-soft: #fbe4e2;
  --good-soft: #e0f1e6;
  --dot-green: #2e9e5b;
  --dot-yellow: #e0a100;
  --dot-red: #d23c33;
  --s1: #1f5f5b;
  --s2: #3f7fc4;
  --s3: #8a8f8c;
  --s4: #c2571a;
  --s5: #7a4fb5;
  --shadow: 0 1px 2px rgba(20, 30, 28, 0.06), 0 4px 16px rgba(20, 30, 28, 0.05);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #0ca30c; --c7: #9085e9;
    --pos: #3987e5; --neg: #e66767;
    --bg: #121615;
    --surface: #1b211f;
    --surface-2: #252c2a;
    --text: #e8ecea;
    --muted: #9aa8a3;
    --line: #313a37;
    --accent: #5fbdb5;
    --accent-text: #0c1a18;
    --accent-soft: #1f3331;
    --good: #6fcf97;
    --warn: #f0c060;
    --bad: #ff8a80;
    --warn-soft: #3a2f14;
    --bad-soft: #3d1c1a;
    --good-soft: #17301f;
    --s1: #5fbdb5;
    --s2: #7fb2ee;
    --s3: #8e9995;
    --s4: #f09559;
    --s5: #b596e8;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
h3 { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9rem; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.pre { white-space: pre-wrap; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big { font-size: 1.15rem; font-weight: 600; }
.boot { text-align: center; color: var(--muted); padding: 4rem 1rem; }

/* ---------------------------------------------------------------- Rahmen */

.top {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--accent); text-decoration: none; letter-spacing: -0.01em; }
.household { color: var(--muted); font-size: 0.9rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
select.household { color: var(--text); width: auto; padding: 0.25rem 0.5rem; }

.nav {
  display: flex; gap: 0.25rem; overflow-x: auto; padding: 0 0.75rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 0.7rem 0.75rem; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; font-size: 0.95rem;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.view { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.crumb { margin-bottom: 0.5rem; font-size: 0.9rem; }
.crumb a { text-decoration: none; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.title-row h1 { margin: 0 0.25rem 0 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; box-shadow: var(--shadow); }
.tile-label { color: var(--muted); font-size: 0.85rem; }
.tile-value { font-size: 1.55rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--muted); font-size: 0.85rem; }

.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.toolbar input[type="search"] { flex: 1 1 180px; max-width: 320px; }
.toolbar select { width: auto; }
.empty { text-align: center; padding: 1.5rem 0.5rem; color: var(--muted); }
.empty .row { justify-content: center; }

/* ---------------------------------------------------------------- Bedienelemente */

.btn {
  font: inherit; font-size: 0.93rem; font-weight: 550; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.9rem; border-radius: 9px; min-height: 2.4rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-quiet { border-color: transparent; background: transparent; color: var(--bad); }
.btn.danger-quiet:hover { background: var(--bad-soft); }
.btn.block { width: 100%; margin-top: 0.5rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.icon-btn { font-size: 1.5rem; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.5rem 0.65rem; width: 100%; min-height: 2.4rem;
}
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--accent); vertical-align: -0.15rem; }
textarea { resize: vertical; }
label { font-size: 0.9rem; }
label select { width: auto; margin: 0 0.25rem; }
.check { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.5rem 0; }

.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: 0.1em;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--accent-soft); color: var(--accent); }

.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none; background: var(--line); }
.dot-green { background: var(--dot-green); }
.dot-yellow { background: var(--dot-yellow); }
.dot-red { background: var(--dot-red); }

/* ---------------------------------------------------------------- Listen und Tabellen */

.list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.list-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--surface-2); margin: 0 -0.6rem; padding-left: 0.6rem; padding-right: 0.6rem; border-radius: 8px; }
.list-row select { width: auto; flex: none; }
.list-row .btn { flex: none; }
.deadline { font-size: 0.9rem; color: var(--muted); text-align: right; max-width: 15rem; }
.list-sum { text-align: right; color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }
.hints { list-style: none; margin: 0; padding: 0; }
.hints li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.35rem 0; }
.hints a { color: var(--text); text-decoration: none; }
.hints a:hover { text-decoration: underline; }

.details { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.35rem 1rem; margin: 0 0 0.75rem; }
.details dt { color: var(--muted); font-size: 0.9rem; }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th { text-align: left; color: var(--muted); font-weight: 550; font-size: 0.82rem; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr.clickable:hover td { background: var(--surface-2); }

details summary { cursor: pointer; color: var(--accent); margin: 0.5rem 0; font-size: 0.93rem; }

/* ---------------------------------------------------------------- Formulare und Dialoge */

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.85rem 1rem; }
.form-heading { grid-column: 1 / -1; margin: 0.75rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.form-heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.field-check { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; grid-column: 1 / -1; }
.field-check small { flex-basis: 100%; }
.req { color: var(--bad); }
.with-suffix { display: flex; align-items: center; gap: 0.4rem; }
.with-suffix span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.form > .btn { grid-column: 1 / -1; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 16, 14, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 3vh 0.75rem;
}
/* Kopf und Knoepfe bleiben stehen, nur der Inhalt scrollt. */
.modal {
  background: var(--surface); border-radius: 14px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex; flex-direction: column; max-height: 94vh;
}
.modal-wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0.75rem 0.75rem 1.25rem; border-bottom: 1px solid var(--line); flex: none; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.modal-actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 14px 14px; flex: none;
}

/* Abschnitte im Formular */
.form-section { grid-column: 1 / -1; display: block; border-top: 1px solid var(--line); padding-top: 1rem; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section > h3 { margin: 0 0 0.75rem; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.form-section > .form-note { margin-top: -0.4rem; }
details.form-section > summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 0.6rem; margin: 0;
  color: var(--text); font-weight: 600; font-size: 0.95rem;
}
details.form-section > summary::-webkit-details-marker { display: none; }
details.form-section > summary::before { content: '›'; color: var(--muted); font-size: 1.2rem; line-height: 1; width: 0.7rem; transition: transform 0.15s; }
details.form-section[open] > summary::before { transform: rotate(90deg); }
details.form-section > summary small { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
details.form-section[open] > summary { margin-bottom: 0.85rem; }
.pair { display: flex; gap: 0.5rem; align-items: center; }
.pair > * { flex: 1 1 0; min-width: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.1rem; }
.chip {
  font: inherit; font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.form-preview {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.25rem; font-size: 0.92rem;
  padding: 0.7rem 1.25rem; background: var(--accent-soft); border-top: 1px solid var(--line);
}
.form-preview:empty { display: none; }
.form-preview .dot { vertical-align: -0.05rem; }
.modal-actions .danger-quiet { margin-right: auto; }

#toast-root { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 0.5rem; width: min(92vw, 30rem); }
.toast { background: #1b2421; color: #fff; padding: 0.7rem 1rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); font-size: 0.93rem; }
.toast-error { background: #8f1d17; }

/* ---------------------------------------------------------------- Anmeldung */

.auth { max-width: 440px; margin: 0 auto; padding: 8vh 1rem 3rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.75rem 1.5rem; box-shadow: var(--shadow); }
.auth-card .brand { display: block; margin-bottom: 1rem; }
.auth-card .form { grid-template-columns: 1fr; }
.auth-card h1 { font-size: 1.4rem; }
.auth-links { margin: 1rem 0 0; font-size: 0.92rem; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.85rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.auth-foot { text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 1rem; }
.recovery-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; font-weight: 600;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 0.9rem; margin: 0.75rem 0;
  text-align: center; overflow-wrap: anywhere; user-select: all; letter-spacing: 0.02em;
}
.qr { width: 190px; height: 190px; display: block; margin: 0 auto 0.75rem; border-radius: 8px; }

/* ---------------------------------------------------------------- Diagramme */

.chart-box { margin: 0 0 0.75rem; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick, .chart .bar-label { fill: var(--muted); font-size: 12px; }
.chart .bar-label { fill: var(--text); }
.chart .line { stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.dashed { stroke-dasharray: 5 4; }
.chart .marker { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .s1 { stroke: var(--s1); } .chart .point.s1 { fill: var(--s1); }
.chart .s2 { stroke: var(--s2); } .chart .point.s2 { fill: var(--s2); }
.chart .s3 { stroke: var(--s3); } .chart .point.s3 { fill: var(--s3); }
.chart .s4 { stroke: var(--s4); } .chart .point.s4 { fill: var(--s4); }
.chart .s5 { stroke: var(--s5); } .chart .point.s5 { fill: var(--s5); }
.chart .point { stroke: var(--surface); stroke-width: 1.5; }
.chart .bar { fill: var(--s3); }
.chart .bar.active { fill: var(--s1); }
.chart .bar.planned { fill: var(--s2); }
.chart .bar.cancelled { fill: var(--s4); }
.chart .bar.open { opacity: 0.75; }
.chart .bar.current { stroke: var(--text); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch { width: 0.9rem; height: 3px; border-radius: 2px; display: inline-block; }
.swatch.s1 { background: var(--s1); } .swatch.s2 { background: var(--s2); } .swatch.s3 { background: var(--s3); }
.swatch.s4 { background: var(--s4); }
/* gestrichelte Linie im Legendenschluessel: Farbe bleibt, Maske schneidet die Luecken */
.swatch.dashed { -webkit-mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 7px); mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 7px); }
.swatch.s5 { background: var(--s5); }
/* Vermoegens-Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1rem; }
.dash-grid > .card { margin-bottom: 1rem; }
.section-title { margin: 1.75rem 0 0.75rem; font-size: 1.15rem; }
.card-title { display: flex; align-items: center; gap: 0.5rem; }
.tile-hero .tile-value { font-size: 1.9rem; }
.tile-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tile-delta { font-size: 0.85rem; color: var(--muted); }
.tile-delta .good, .tile-delta .bad { font-weight: 600; font-variant-numeric: tabular-nums; }
.spark { width: 96px; height: 28px; flex: none; }
.spark-line { stroke: var(--s3); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.segmented { gap: 0.25rem; }
.seg {
  font: inherit; font-size: 0.85rem; padding: 0.3rem 0.75rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.seg.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.ranked li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: 0.75rem; align-items: center; }
.ranked-name { display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; min-width: 0; overflow-wrap: anywhere; }
.ranked-track { height: 14px; display: block; }
.ranked-bar { display: block; height: 100%; background: var(--c1); border-radius: 0 4px 4px 0; }
.ranked-value { font-variant-numeric: tabular-nums; font-size: 0.92rem; text-align: right; white-space: nowrap; }
.ranked-value small { color: var(--muted); }
.swatch-box { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; flex: none; }
i.key { width: 0.8rem; height: 2px; display: inline-block; vertical-align: middle; border-radius: 1px; }
.c1 { --k: var(--c1); } .c2 { --k: var(--c2); } .c3 { --k: var(--c3); } .c4 { --k: var(--c4); }
.c5 { --k: var(--c5); } .c6 { --k: var(--c6); } .c7 { --k: var(--c7); }
.swatch-box[class*=" c"], i.key[class*=" c"] { background: var(--k); }
.chart .bar-seg { fill: var(--k, var(--c1)); }
.chart .bar-seg.pos { fill: var(--pos); }
.chart .bar-seg.neg { fill: var(--neg); }
.chart .hit { fill: transparent; }
.chart .bar-group { outline: none; cursor: default; }
.chart .bar-group:hover .bar-seg, .chart .bar-group:focus-visible .bar-seg { filter: brightness(1.12); }
.chart .bar-group:focus-visible .hit { stroke: var(--accent); stroke-width: 1; }
.chart-readout strong { color: var(--text); }
@media (max-width: 640px) {
  .ranked li { grid-template-columns: 1fr auto; }
  .ranked-track { grid-column: 1 / -1; order: 3; }
}
.chart-readout { font-size: 0.85rem; color: var(--muted); min-height: 1.3rem; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Kuendigungsschreiben */

.letter {
  background: #fff; color: #111; max-width: 21cm; margin: 1rem auto; padding: 2.2cm 2cm; border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow); font-size: 11.5pt; line-height: 1.5;
}
.letter-sender { font-size: 9.5pt; color: #444; margin-bottom: 1.2cm; }
.letter-recipient { min-height: 3cm; }
.letter-date { text-align: right; }
.letter-subject { margin: 0.8cm 0; }
.letter-sign { margin-top: 1.6cm; }

/* ---------------------------------------------------------------- schmale Bildschirme */

@media (max-width: 640px) {
  .view { padding: 1rem 0.75rem 4rem; }
  .card { padding: 0.9rem 1rem; }
  .top .btn { padding: 0.4rem 0.5rem; }
  .details { grid-template-columns: 1fr; gap: 0 0; }
  .details dd { margin-bottom: 0.6rem; }
  .contract-row { flex-wrap: wrap; }
  .contract-row .deadline { order: 3; flex-basis: 100%; text-align: left; max-width: none; padding-left: 1.45rem; }
  .list-row { flex-wrap: wrap; }
  .tile-value { font-size: 1.35rem; }
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal, .modal-wide { max-width: none; border-radius: 0; height: 100%; max-height: none; }
  .modal-actions { border-radius: 0; }
  .letter { padding: 1.2cm 1cm; }
  /* Tabellen werden zu gestapelten Zeilen mit Beschriftung links. */
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td, td:first-child, td:last-child { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: 0.15rem 0; text-align: right; white-space: normal; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; text-align: left; flex: none; }
  .chart .tick, .chart .bar-label { font-size: 11px; }
}

/* ---------------------------------------------------------------- Druck */

@media print {
  body { background: #fff; color: #000; }
  .no-print, #toast-root, #modal-root, .auth-foot { display: none !important; }
  .view { max-width: none; padding: 0; }
  .card, .auth-card { box-shadow: none; border: 0; }
  .letter { border: 0; box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .recovery-code { border: 1px solid #000; background: #fff; font-size: 14pt; }
}
