/* ======================================================================
   Unterhalt (Fixkosten › Unterhalt): Monat für Monat, Ausgleich, Einkommen 12 Monate, deine Angaben
   ====================================================================== */
.uh { display: grid; gap: 12px; min-width: 0; }
/* oben: Monatsraster breit, Angaben schmal; unten: Ausgleich und Einkommen – nebeneinander immer gleich hoch */
.uh-r1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.uh-r2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
@media (max-width: 1100px) { .uh-r1, .uh-r2 { grid-template-columns: minmax(0, 1fr); } }
.uh .s5-teil h3 small { font-weight: 500; margin-left: 4px; }
.uh-klein { font-size: 12.5px; line-height: 1.45; margin: 0; }
.uh-fuss { margin-top: auto; padding-top: 4px; }
.uh-knoepfe { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.uh .s5-kt-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; white-space: normal; }
.uh-orient { font-size: 11px; font-weight: 650; color: var(--text-2); background: var(--mark); border-radius: 99px; padding: 1px 7px; margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
.uh-nur-druck { display: none; }

/* Eingaben */
.uh input[type="text"], .uh input[type="number"], .uh input[type="date"], .uh input[type="month"], .uh select {
  font: inherit; font-size: 13.5px; width: 100%; min-width: 0; min-height: 32px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.uh input[type="checkbox"] { width: 15px; height: 15px; margin: 0; flex: none; accent-color: var(--accent); }
.uh-x { border: 0; background: none; color: var(--muted); font-size: 19px; line-height: 1; padding: 0; width: 30px; min-height: 32px; border-radius: 8px; cursor: pointer; }
.uh-x:hover { color: var(--aus-text); background: var(--surface-2); }

/* ---------------------------------------------------------------- Karte A: Monat für Monat */
#uh-a { container-type: inline-size; }
.uh-tabw { min-width: 0; }
.uh-tab { font-size: 13.5px; }
.uh-tab th { white-space: normal; vertical-align: bottom; position: static; padding: 7px 8px; line-height: 1.3; }
.uh-tab th small { display: block; font-weight: 500; font-size: 11.5px; white-space: nowrap; }
.uh-tab td { padding: 6px 8px; white-space: nowrap; }
.uh-tab td:first-child { white-space: normal; }
.uh-tab tfoot td { font-weight: 700; border-top: 1.5px solid var(--border-strong); border-bottom: 0; }
.uh-warn { display: inline-block; margin-left: 5px; color: var(--aus-text); font-weight: 800; cursor: help; }
.uh-warnung { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 11px; border-radius: 9px; background: rgba(224, 96, 46, .1); color: var(--aus-text); font-size: 13px; line-height: 1.45; }
.uh-warnung > span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.uh-grund { font-size: 12.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
/* am Handy (und wenn die Karte zu schmal für alle Spalten ist): eine Liste je Monat statt der Tabelle */
.uh-liste { display: none; gap: 8px; }
.uh-lm { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.uh-lm-k { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 650; }
.uh-lm-t { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.uh-lm-t > span:nth-child(even) { text-align: right; white-space: nowrap; }
@container (max-width: 760px) { .uh-tab { display: none; } .uh-liste { display: grid; } }
@media (max-width: 600px) { .uh-tab { display: none; } .uh-liste { display: grid; } }

/* ---------------------------------------------------------------- Deine Angaben */
.uh-ein { display: grid; gap: 6px; }
.uh-kind-z { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) 30px; gap: 6px; align-items: center; }
.uh-soll-z { display: grid; grid-template-columns: minmax(0, 125px) minmax(0, 1fr) minmax(0, 110px) 30px; grid-template-areas: "ab art c x" "gr gr gr x"; gap: 6px; padding: 7px; border: 1px solid var(--border); border-radius: 10px; align-items: center; }
.uh-s-ab { grid-area: ab; } .uh-s-art { grid-area: art; } .uh-s-c { grid-area: c; } .uh-s-gr { grid-area: gr; } .uh-s-x { grid-area: x; align-self: start; }
.uh-s-c, .uh-po-c, .uh-bav { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); min-width: 0; }
.uh .uh-bav input { width: 80px; flex: none; }
.uh-bav { flex-wrap: wrap; }
.uh-tags { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.uh-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px; border: 1px solid var(--border); border-radius: 99px; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.uh-tag:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.uh-tag small { color: var(--muted); }
@media (max-width: 600px) {
  .uh-soll-z { grid-template-columns: minmax(0, 1fr) minmax(0, 110px) 30px; grid-template-areas: "ab c x" "art art x" "gr gr x"; }
  .uh-kind-z { grid-template-columns: minmax(0, 1fr) minmax(0, 130px) 30px; }
}

/* ---------------------------------------------------------------- Karte B: Ausgleich */
.uh-po { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t t" "c e" "n n"; gap: 6px 10px; padding: 9px 10px; border: 1px solid var(--aus); border-radius: 10px; background: rgba(224, 96, 46, .06); align-items: center; }
.uh-po.erl { border-color: var(--border); background: none; color: var(--text-2); }
.uh-po.erl:not(:has(input)) { grid-template-areas: "t t"; }
.uh-po-t { grid-area: t; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.uh-po-c { grid-area: c; } .uh .uh-po-c input { width: 120px; flex: none; }
.uh-po-e { grid-area: e; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.uh-po-n { grid-area: n; }
.uh-gr { border-bottom: 1px solid var(--border); }
.uh-gr > summary, .uh-gr-s { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 2px; font-size: 14px; cursor: pointer; }
.uh-gr > summary small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.uh-gr-s { font-weight: 700; cursor: default; border-bottom: 0; }
.uh-bl { display: grid; padding: 0 0 6px; }
.uh-bz { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 4px 4px; font: inherit; font-size: 13px; color: inherit; cursor: pointer; border-radius: 6px; }
.uh-bz:hover { background: var(--surface-2); }
.uh-bz-d { color: var(--muted); white-space: nowrap; }
.uh-bz-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.uh-bz b { white-space: nowrap; font-weight: 600; }
.uh-info > summary { font-size: 13px; color: var(--text-2); cursor: pointer; padding: 4px 2px; }
@media (max-width: 600px) { .uh-bz { grid-template-columns: minmax(0, 1fr) auto; } .uh-bz-d { grid-column: 1 / -1; font-size: 12px; } }

/* ---------------------------------------------------------------- Karte C: Einkommen 12 Monate */
.uh-ende { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.uh-ende select { width: auto; }
.uh-zr { margin: 0; font-size: 13px; color: var(--text-2); }
.uh-el { display: grid; }
.uh-ez { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); align-items: baseline; font-size: 14px; }
.uh-ez small { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.uh-ez > b { white-space: nowrap; }
.uh-ez.uh-summe { font-weight: 750; }
.uh-ez.uh-summe + .uh-ez.uh-summe { border-bottom: 0; }
.uh-ez.uh-info-z { font-size: 13.5px; color: var(--text-2); }
.uh-ez.uh-info-z > b { font-weight: 600; }
.uh-anlagen > summary { font-size: 13px; color: var(--text-2); cursor: pointer; padding: 4px 0; }
.uh-anlagen ol { margin: 4px 0 0; padding-left: 22px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.uh-anlagen li { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Drucken/PDF: nur die gewählte Karte */
@media print {
  body.uh-druck *:not(.uh-pfad):not(.uh-druckziel):not(.uh-druckziel *) { display: none !important; }
  body.uh-druck .uh-pfad { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important;
    max-width: none !important; width: auto !important; height: auto !important; overflow: visible !important; position: static !important; }
  body.uh-druck .uh-druckziel { display: flex !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; container-type: normal; }
  body.uh-druck .uh-druckziel .uh-nicht-drucken, body.uh-druck .uh-druckziel .s5-kt-r { display: none !important; }
  body.uh-druck .uh-druckziel .uh-nur-druck { display: block !important; margin: 0; font-size: 11px; color: #555; }
  body.uh-druck .uh-druckziel .uh-tab { display: table !important; font-size: 11.5px; }
  body.uh-druck .uh-druckziel .uh-liste { display: none !important; }
  body.uh-druck .uh-druckziel .uh-tab tr { break-inside: avoid; }
  body.uh-druck .uh-druckziel .zl { color: inherit; text-decoration: none; border: 0; }
  body.uh-druck .uh-druckziel .neg { color: #b3401a !important; }
  body.uh-druck { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Hinweis aus den Familienangaben (z. B. Kind volljährig) */
.uh-hinweis { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid #e0b252; background: rgba(224, 178, 82, .12); color: var(--text); font-size: 14px; line-height: 1.45; }
