/* Análise · Clientes */
.cl-wrap { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cl-wrap[hidden] { display: none !important; }
.cl-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cl-back { align-self: flex-start; font-size: 13px; }
.cl-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cl-gap { height: 14px; }

/* RFM-Erklärung */
.cl-seg-explain { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.cl-seg-explain-title { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.cl-seg-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.cl-seg-dl dt { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; white-space: nowrap; }
.cl-seg-dl dd { color: var(--text-sec); margin: 0; }

/* Reaktivierung: lange Liste in scrollbarer Fläche */
.cl-react .ta-card-head { flex-wrap: wrap; }
.cl-react .ta-table-wrap { max-height: 420px; overflow: auto; }
.cl-react-foot { font-size: 12px; padding-top: 8px; }

/* Tabs */
.cl-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.cl-tab { padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--text-sec); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.cl-tab:hover { color: var(--text); }
.cl-tab.is-active { color: var(--text); border-bottom-color: var(--rose); }
.cl-panels { min-width: 0; }
.cl-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cl-panel[hidden] { display: none !important; }
.cl-area { min-width: 0; }
.cl-panel .ta-toolbar { margin-bottom: 12px; }

/* Stammdaten */
.cl-info-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cl-dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cl-f { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 10px; font-size: 13px; }
.cl-f dt { color: var(--text-muted); }
.cl-f dd { margin: 0; overflow-wrap: anywhere; }
.cl-pre { white-space: pre-wrap; }

/* Notizen */
.cl-note-input { width: 100%; }
.cl-note-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.cl-notes { display: flex; flex-direction: column; gap: 10px; }
.cl-note { padding: 12px 14px; }
.cl-note-head { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.cl-note-head > .ta-muted { flex: 1; min-width: 0; }
.cl-note-btns { display: flex; gap: 4px; }
.cl-note-btns[hidden] { display: none; }
.cl-note-text { margin: 8px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-note-edit { margin-top: 8px; }

@media (max-width: 900px) {
  .cl-seg-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cl-seg-dl dd { margin-bottom: 8px; padding-left: 22px; }
  .cl-react .ta-card-actions { justify-content: flex-start; }
  .cl-f { grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); }
}

.cl-wrap .ta-input[type="search"] { min-width: 280px; }
@media (max-width: 900px) { .cl-wrap .ta-input[type="search"] { min-width: 0; width: 100%; } .cl-wrap .ta-toolbar { width: 100%; } .cl-wrap .ta-toolbar .ta-field:first-child { flex: 1; } }

/* Mobil: Grid-Spalte darf schmaler als der Inhalt werden (sonst sprengen breite Tabellen/Heatmaps die Seite) */
@media (max-width: 900px) {
  .ta-main { grid-template-columns: minmax(0, 1fr); }
  .ta-content, .ta-views, .ta-view { min-width: 0; }
}
@media (max-width: 900px) {
  .cl-wrap .ta-card-head { flex-direction: column; align-items: stretch; }
  .cl-wrap .ta-card-actions { justify-content: flex-start; }
}
