/* Tagwerk – Modul „Retouren“ (Vorsilbe rt-). Schlichtes Grund-CSS: Abstände, Raster, 390 px ohne Querscrollen. Die Gestaltung folgt in gestaltung.css. */

.rt-kennzahlen { margin-top: 0; }
.rt-kz { cursor: default; }

/* ---------- Auswertungen ---------- */
.rt-paar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 20px; align-items: start; }
@media (min-width: 900px) { .rt-paar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rt-block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 16px; min-width: 0; }
.rt-blockkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rt-blockkopf h2 { margin: 0; font-size: 17px; }
.rt-sub { color: var(--leise); font-size: 13px; }

.rt-balkenliste, .rt-rang { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rt-balkenzeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.rt-balkenname { min-width: 0; overflow-wrap: anywhere; }
.rt-balken { grid-column: 1 / -1; grid-row: 2; display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.rt-balken i { display: block; height: 100%; background: var(--akzent); }
.rt-balkenzahl { grid-column: 2; grid-row: 1; display: flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.rt-balkenzahl small { color: var(--leise); }

.rt-rangzeile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.rt-rangzeile:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.rt-rangzeile.gesetzt { background: var(--akzent-weich); }
.rt-rangtext { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.rt-rangtext b { overflow-wrap: anywhere; }
.rt-ranggrund { flex-basis: 100%; color: var(--leise); font-size: 12.5px; }
.rt-rangstueck { flex: none; color: var(--leise); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-rangstueck b { color: var(--text); }

/* ---------- Bild-Kacheln ---------- */
.rt-kachel { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--leise); font-weight: 600; }
.rt-bild { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-mehrbilder { align-self: center; color: var(--leise); font-size: 13px; }

.rt-zusatz { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--leise); white-space: nowrap; }

/* ---------- Liste ---------- */
.rt-werkzeug { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.rt-reiter { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.rt-anz { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.rt-grundwahl { width: auto; max-width: 100%; min-width: 0; }
.rt-aktivfilter { margin-bottom: 12px; }
.rt-artikelchip svg { margin-left: 4px; }
.rt-liste { display: flex; flex-direction: column; gap: 10px; }
.rt-keine { color: var(--leise); }
.rt-alle { margin-top: 10px; }

.rt-karte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); min-width: 0; }
.rt-karte.erledigt { opacity: .6; }
.rt-bilder { display: flex; gap: 6px; flex-wrap: wrap; }
.rt-inhalt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rt-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rt-kunde { overflow-wrap: anywhere; }
.rt-meta, .rt-letzte, .rt-notiztext { color: var(--leise); font-size: 13px; overflow-wrap: anywhere; }
.rt-notiztext { white-space: pre-wrap; }
.rt-positionen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rt-positionen li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rt-pos { overflow-wrap: anywhere; }
.rt-grund, .rt-status { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--leise); }
.rt-grund.groesse { color: var(--p3); } .rt-grund.geschmack { color: var(--p2); } .rt-grund.mangel { color: var(--warn); }
.rt-status.nachfassen { color: var(--warn); } .rt-status.kontaktiert { color: var(--p3); } .rt-status.erledigt { color: var(--gut); }
.rt-aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rt-aktionen .knopf { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
@media (min-width: 720px) {
  .rt-karte { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; }
  .rt-bilder { flex-direction: column; flex-wrap: nowrap; }
  .rt-aktionen { justify-content: flex-end; }
}

.rt-alt { margin-top: 20px; color: var(--leise); }
.rt-alt summary { cursor: pointer; }
.rt-altliste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-altliste li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; overflow-wrap: anywhere; }

/* ---------- Fenster ---------- */
.rt-fenster { padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-width: 0; }
.rt-fenster h3 { margin: 0; font-size: 20px; }
.rt-fenster h4 { margin: 0 0 6px; font-size: 13px; }
.rt-fenster label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--leise); }
.rt-kontext, .rt-hinweis, .rt-absender { margin: 4px 0 0; color: var(--leise); font-size: 13px; overflow-wrap: anywhere; }
.rt-vorlagenwahl, .rt-nachfassen-wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-nachfassen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rt-nachfassen-label { color: var(--leise); font-size: 13px; }
.rt-rueckfrage { padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.rt-rueckfrage p { margin: 0 0 8px; }
.rt-rueckfrage-knoepfe, .rt-fensterreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-fensterreihe .knopf { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.rt-fensterreihe .rt-absender { flex-basis: 100%; margin: 0; }
/* 1.9: Absenderwahl im Antwort-Fenster */
.rt-fensterreihe .rt-von-feld { flex: 1 1 100%; order: -1; }
.rt-von { min-width: 0; max-width: 100%; }
.rt-vorlagenliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rt-vorlage { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linie); }
.rt-vorlagentext { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.rt-vorlagentext small { color: var(--leise); }
.rt-vorlagenaktionen { display: flex; gap: 6px; align-items: center; }
.rt-tag { font-size: 11.5px; color: var(--leise); }
.rt-platzhalter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; color: var(--leise); font-size: 13px; }
