/* 🗓 Termine & Historie: Reiter in der Adressmaske und Klärliste */
/* Mit dem dritten Reiter wird die Leiste in schmalen Spalten zu breit: lieber umbrechen als aus dem Bild rutschen */
.adr-reiter { flex-wrap:wrap; overflow-x:visible; }
.th-reiter { padding:4px 0 8px; }
.th-stand { margin:0 0 12px; font-size:13px; }
.th-filter { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; margin-bottom:12px; }
.th-f { display:flex; flex-direction:column; gap:3px; flex:1 1 150px; min-width:0; max-width:240px; font-size:12px; font-weight:600; color:var(--muted); }
.th-f select { width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid var(--line); border-radius:10px; font:inherit; font-weight:400; font-size:14px; color:var(--ink); background:#fff; }
.th-anzahl { font-size:13px; color:var(--muted); margin-left:auto; padding-bottom:8px; white-space:nowrap; }
.th-leer { padding:24px 12px; text-align:center; }

.th-liste { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.th-zeile { display:grid; grid-template-columns:150px minmax(0, 1fr); gap:6px 16px; padding:12px 4px; border-bottom:1px solid var(--line); }
.th-zeile.geplant { background:#fff8f0; box-shadow:inset 3px 0 0 #f39200; padding-left:10px; }
.th-zeile.storniert { opacity:.6; }
.th-zeile.storniert .th-titel { text-decoration:line-through; }
.th-wann { font-size:14px; line-height:1.35; }
.th-wann b { display:block; }
.th-wann span { display:block; color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
.th-was { min-width:0; overflow-wrap:anywhere; }
.th-kopf { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:4px; }
.th-art { font-size:12px; font-weight:600; padding:2px 8px; border-radius:999px; background:#eeebe6; color:#4a443e; }
.th-art-montage { background:#dcecf3; color:#1f4e63; }
.th-art-kundendienst { background:#dcf1ea; color:#1d5a48; }
.th-art-wartung { background:#e4f1dc; color:#35592a; }
.th-art-aufmass { background:#e6e6e6; color:#444444; }
.th-art-beratung { background:#fbeed9; color:#7a4d10; }
.th-st { font-size:12px; font-weight:600; padding:2px 8px; border-radius:999px; }
.th-st.geplant { background:#f39200; color:#fff; }
.th-st.storniert { background:#c8c2ba; color:#2d2926; }
.th-q { font-size:12px; color:var(--muted); }
.th-titel { font-weight:600; font-size:15px; line-height:1.35; }
.th-notiz { font-size:14px; line-height:1.4; color:#4a443e; margin-top:2px; }
.th-ohne { font-size:13px; margin:0; }
.th-unsicher { font-size:12px; color:#8a6200; margin-top:4px; }
.th-wer { display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:6px; font-size:13px; }
.th-wer-p { display:inline-flex; align-items:center; gap:5px; }
.th-kz { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 4px; box-sizing:border-box; border-radius:999px; background:#3b3632; color:#fff; font-size:10px; font-weight:700; letter-spacing:.02em; }
.th-fuss { display:flex; flex-wrap:wrap; gap:4px 14px; align-items:center; margin-top:6px; font-size:13px; }
.th-fuss .link, .th-verworfen .link { background:none; border:0; padding:4px 0; font:inherit; color:var(--red); text-decoration:underline; cursor:pointer; }
.th-fuss .th-weg { color:var(--muted); }

/* Klärliste */
.th-klaer { background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:16px 18px; }
.th-klaer h2 { margin:0 0 6px; font-size:20px; }
.th-klaer .th-filter { align-items:center; margin:12px 0; }
.th-klaer .adr-filter { padding:0; border:0; }
.th-klaer input[type=search] { flex:1 1 200px; min-width:0; box-sizing:border-box; padding:8px 12px; border:1px solid var(--line); border-radius:10px; font:inherit; font-size:14px; }
.th-gruppen { list-style:none; margin:0; padding:0; }
.th-gr { padding:12px 0; border-top:1px solid var(--line); }
.th-gr-kopf { overflow-wrap:anywhere; }
.th-grund::before { content:"· "; }
.th-gr-det { margin:6px 0; font-size:13px; }
.th-gr-det summary { cursor:pointer; color:var(--muted); padding:4px 0; }
.th-gr-det ul { margin:4px 0 0; padding-left:18px; }
.th-gr-det li { margin:4px 0; overflow-wrap:anywhere; }
.th-kands { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.th-sucherg:empty { display:none; }
.th-kand { display:flex; flex-direction:column; gap:1px; text-align:left; padding:8px 12px; min-height:44px; box-sizing:border-box; max-width:100%; background:#faf8f5; border:1px solid var(--line); border-radius:10px; font:inherit; font-size:14px; color:inherit; cursor:pointer; overflow-wrap:anywhere; }
.th-kand:hover { background:#fff4ec; border-color:var(--red); }
.th-kand span { font-size:12px; color:var(--muted); }
.th-gr-fuss { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.th-verworfen { margin-top:14px; font-size:13px; }
.th-verworfen summary { cursor:pointer; color:var(--muted); }

@media (max-width:640px) {
  .th-zeile { grid-template-columns:minmax(0, 1fr); gap:4px; padding:12px 2px; }
  .th-zeile.geplant { padding-left:10px; }
  .th-wann { display:flex; flex-wrap:wrap; gap:0 8px; align-items:baseline; }
  .th-wann br { display:none; }
  .th-f { flex:1 1 calc(50% - 5px); max-width:none; }
  .th-f:first-child { flex-basis:100%; }
  .th-f select, .th-klaer input[type=search] { font-size:16px; }
  .th-fuss .link { padding:8px 0; }
  /* Drei Reiter passen nicht nebeneinander: Der aktive darf nicht aus dem Bild rutschen */
  .adr-reiter { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); overflow:visible; }
  .adr-reiter button { white-space:normal; line-height:1.2; font-size:13px; padding-left:4px; padding-right:4px; text-align:center; }
  .th-anzahl { margin-left:0; padding-bottom:0; }
  .th-klaer { padding:12px; }
  .th-kand { width:100%; }
}
