/*
 * Visvero CRM – Listen, Detailseiten, Formulare, Aufgaben (Aufgabe 14, neuer Look Aufgabe 11).
 * Nur Tokens aus tokens.css (keine festen Farbwerte). Bausteine (Knöpfe, Eingabefelder, Tabellen, Reiter,
 * Abzeichen, Karten, Kennzahl-Karten) kommen aus app.css; hier stehen nur Anordnung und Seitenteile.
 * Gestaltung: Glaskarten, großer Kopf, höchstens ein Abzeichen pro Eintrag, viel Luft.
 */
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.center { display: flex; justify-content: center; text-align: center; margin-top: 8px; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); font-weight: 500; }
.today-text { color: var(--accent-text); font-weight: 600; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cell-sub { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.link-btn:hover { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
/* Text auf höchstens 1 bzw. 2 Zeilen kürzen (voller Text im title) */
.clamp-1, .clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
/* Icons mit Markenverlauf (Kennzahlen, Kontaktzeile im Detailkopf) */
.detail-kpi .i-grad, .detail-meta .i-grad { stroke: url(#g-icon); }

/* ---------- Werkzeugleiste ----------
 * Kleine Felder (input-sm) sind so hoch wie kleine Knöpfe (36 px). Auswahlfelder behalten genug Innenabstand
 * rechts, damit der Pfeil nie den Text berührt. In der Listen-Werkzeugleiste ist alles 42 px hoch wie die Knöpfe. */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.toolbar-search { position: relative; flex: 1 1 280px; max-width: 400px; display: flex; align-items: center; }
.toolbar-search svg { position: absolute; left: 14px; color: var(--text-muted); pointer-events: none; }
.toolbar-search .input { padding-left: 42px; width: 100%; height: 42px; }
.toolbar-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input-sm { height: 36px; font-size: 13px; padding: 0 12px; width: auto; max-width: 220px; border-radius: 10px; }
.input-sm:focus, .input-sm:focus-visible { border-radius: 10px; }
select.input.input-sm:not([multiple]) { padding-right: 34px; background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; }
/* Filter als Pillen wie in der Vorlage; gesetzter Filter: Verlaufsrand und Glühen */
.filter-select { position: relative; width: auto; max-width: 240px; height: 42px; font-size: 14px; font-weight: 500; border-radius: 999px; background-color: var(--surface); border-color: var(--border-strong); color: var(--text); }
select.input.filter-select:not([multiple]) { padding: 0 38px 0 16px; background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%; }
.filter-select:focus, .filter-select:focus-visible { border-radius: 999px; }
.filter-select.is-active { border-color: var(--brand-g2); background-color: var(--pill-active-bg); box-shadow: 0 0 0 1px var(--brand-g2), var(--glow); }
.list-toolbar .btn { height: 42px; }

/* ---------- Liste (Glas-Tabelle) ---------- */
.list-card { overflow: hidden; padding: 10px 8px 4px; }
.list-body.is-loading { opacity: .55; transition: opacity var(--dur-fast) var(--ease); }
.list-card .table th:first-child, .list-card .table td:first-child { padding-left: 20px; }
.list-card .table th:last-child, .list-card .table td:last-child { padding-right: 20px; }
.list-card .table td { vertical-align: middle; padding-top: 16px; padding-bottom: 16px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-hover); }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.th-sort:hover { color: var(--text); }
.sort-ind { color: var(--text-muted); font-size: 11px; opacity: .6; }
[aria-sort="ascending"] .sort-ind, [aria-sort="descending"] .sort-ind { color: var(--accent-text); opacity: 1; }
.cell-main { min-width: 200px; max-width: 340px; display: grid; gap: 3px; }
.cell-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
a.cell-title:hover { color: var(--text); }
.cell-main .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-link { max-width: 240px; }
.table td.cell-quiet { color: var(--text-muted); font-size: 13px; }
.status-cell { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; white-space: nowrap; min-width: 120px; }
/* Score: fünf kleine Balken, gefüllte im Markenverlauf */
.score-meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.score-meter i { width: 6px; height: 16px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.score-meter i.on { background: var(--brand-text-gradient); border-color: transparent; box-shadow: 0 0 8px var(--glow-color); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 10px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--text-muted); }
.pager:empty { display: none; }
.pager-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.list-count { font-variant-numeric: tabular-nums; }
.pager-buttons { display: flex; align-items: center; gap: 10px; }
.card-list { display: flex; flex-direction: column; }
.list-card-item { display: block; padding: 16px; border-bottom: 1px solid var(--hairline); color: var(--text); }
.card-list li:last-child .list-card-item { border-bottom: 0; }
.list-card-item:hover { text-decoration: none; background: var(--surface-hover); }
.list-card-item > div { display: grid; gap: 6px; }
.card-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-item-head strong { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card-item-head .badge { flex: none; }
.card-item-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.phone-only { display: none; }
@media (max-width: 767.98px) {
  .desktop-only { display: none !important; }
  .phone-only { display: flex; }
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .toolbar-search { max-width: none; flex-basis: 100%; }
  .toolbar-filters { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .toolbar-filters::-webkit-scrollbar { display: none; }
  .input-sm, .filter-select, .toolbar-filters .btn { flex: none; }
  .list-card { padding: 4px; }
}

/* ---------- Lade-Skelett ---------- */
.skeleton-list { display: grid; gap: 0; }
.skeleton-row { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--hairline); }
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-hover), var(--surface-2), var(--surface-hover)); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------- Formulare ----------
 * Abschnitte als ruhige Flächen mit großem Titel; Felder in zwei Spalten, am Handy einspaltig. */
.form { display: grid; gap: 14px; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); transition: border-color var(--dur-fast) var(--ease); }
.form-section[open] { background: transparent; }
.form-section > summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; cursor: pointer; border-radius: var(--radius);
}
.form-section > summary:hover .form-section-title { color: var(--text); }
.form-section > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: none; }
.form-section > summary::-webkit-details-marker { display: none; }
.form-section-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.005em; color: var(--text); }
.form-section > summary svg { flex: none; transition: transform var(--dur-fast) var(--ease); color: var(--text-muted); }
.form-section:not([open]) > summary svg { transform: rotate(-90deg); }
.form-section-body { padding: 2px 18px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.section-note { margin: 0 0 14px; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-section > summary { padding: 14px 16px; }
  .form-section-body { padding: 2px 16px 18px; }
}
.req { color: var(--danger); }
/* .textarea, select.input: zentral in app.css (Bausteine) */
.field-check { justify-content: center; min-height: 44px; }
.form-grid .field-check { align-self: end; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.checkbox { width: 18px; height: 18px; accent-color: var(--brand-g2); flex: none; cursor: pointer; margin: 0; }
.checkbox:disabled { cursor: not-allowed; }
.input-file { height: auto; padding: 10px 14px; cursor: pointer; }
.input-file::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 12px; margin-right: 12px; cursor: pointer; }
.alert-warning { background: var(--warning-bg); color: var(--text); }
.alert-warning svg { color: var(--warning); }
.alert-text { margin: 4px 0 8px; }
.alert-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.picker { position: relative; }
.picker .input { padding-right: 44px; width: 100%; }
.picker-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.picker-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-overlay); padding: 6px; max-height: 260px; overflow-y: auto; }
.picker-option { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--text); }
.picker-option:hover, .picker-option:focus-visible { background: var(--surface-hover); }
.picker-empty { padding: 10px; color: var(--text-muted); font-size: 13px; }
.radio-group { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.radio-group legend { margin-bottom: 8px; padding: 0; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.radio-card:hover { background: var(--surface-hover); }
.radio-card:has(input:checked) { border-color: var(--brand-g2); background: color-mix(in srgb, var(--brand-g2) 8%, transparent); box-shadow: 0 0 0 1px var(--brand-g2); }
.radio-card input { margin-top: 3px; accent-color: var(--brand-g2); }
.radio-hint { display: block; }
.impact { list-style: disc; padding-left: 20px; color: var(--text-muted); display: grid; gap: 2px; }

/* ---------- Detailseiten ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.back-link:hover { color: var(--text); text-decoration: none; }
/* Sperr-Hinweis: rot getönt mit rotem Rand, Text in Textfarbe (nie weiße Schrift auf Rot) */
.banner-danger {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px;
  border-radius: var(--radius); background: var(--danger-bg); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
}
.banner-danger svg { flex: none; margin-top: 1px; color: var(--danger); }
.banner-danger strong { color: var(--danger); }
.detail-header { align-items: flex-start; margin-bottom: 24px; }
.detail-title { display: grid; gap: 10px; min-width: 0; flex: 1 1 420px; }
.detail-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.detail-title-row .badge { flex: none; }
.detail-name { overflow-wrap: anywhere; min-width: 0; }
.detail-facts { margin: 0; font-size: 16px; color: var(--text-muted); }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-muted); }
.item-meta:empty { display: none; }
.item-meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.detail-meta { font-size: 14px; gap: 8px 22px; }
.detail-header .page-actions { padding-top: 6px; }
/* Kennzahlen im Kopf (kpi-card aus app.css) */
.kpi-row.detail-kpis { margin-bottom: 20px; }
.kpi-row.detail-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-kpi .kpi-label { display: flex; align-items: center; gap: 8px; }
.detail-kpi .kpi-foot { min-width: 0; }
.detail-kpi .kpi-foot > span { min-width: 0; }
.kpi-score { display: inline-flex; align-items: center; gap: 12px; }
.kpi-score .score-meter i { width: 8px; height: 22px; }
.kpi-value .is-overdue { color: var(--danger); -webkit-text-fill-color: var(--danger); }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.highlights:empty { display: none; }
.highlight {
  position: relative; padding: 14px 18px 14px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
/* farbige Leuchtkante links statt Flächenfarbe */
.highlight::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--text-muted); }
.highlight-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.highlight-text { font-size: 15px; overflow-wrap: anywhere; }
.highlight-accent::before { background: var(--brand-gradient-v); box-shadow: 0 0 10px var(--glow-color-strong); }
.highlight-warning::before { background: var(--warning); }
.highlight-danger::before { background: var(--danger); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1023.98px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-main { min-width: 0; display: grid; gap: 20px; align-content: start; }
.detail-main.card { display: block; }
.detail-side { display: grid; gap: 14px; }
.side-section {
  background: var(--card-sheen), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px 20px; -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
}
.side-section h3, .section-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.005em; margin-bottom: 12px; }
.side-section .kv { grid-template-columns: 116px 1fr; gap: 8px 12px; font-size: 13.5px; }
.card.pad { padding: 20px 22px; }
.company-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 500; }
/* .tabs, .tab, .tab-count: zentral in app.css (Bausteine) */
.tab-panel { padding: 20px 22px 22px; }
.tab-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-intro { margin: 0; color: var(--text-muted); }
.stack { display: grid; gap: 12px; }
.item-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-inner); padding: 14px 16px; display: grid; gap: 10px; transition: border-color var(--dur-fast) var(--ease); }
.item-card:hover { border-color: var(--border-strong); }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.item-head-main { display: grid; gap: 2px; min-width: 0; }
.item-title { font-weight: 600; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
a.item-title:hover { color: var(--text); }
.deal-side { display: grid; justify-items: end; gap: 6px; white-space: nowrap; }
.deal-value { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.consents { display: grid; gap: 4px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.consent svg { flex: none; margin-top: 2px; }
.consent.yes svg { color: var(--success); }
.consent.no { color: var(--text-muted); }
.consent-text { color: var(--text-muted); font-size: 12.5px; font-style: italic; }
.consent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.consent-card {
  background: var(--card-sheen), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 12px; align-content: start;
}
.consent-card .section-title { margin-bottom: 0; }
.consent-card.yes { border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.consent-card .kv { grid-template-columns: 70px 1fr; gap: 6px 10px; font-size: 13px; }
.consent-card .btn { justify-self: start; }
.appt-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.appt.is-past { opacity: .7; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.note-box { display: grid; gap: 10px; margin-bottom: 22px; }
.note-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; align-items: center; }
.timeline { position: relative; display: grid; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 1px; background: var(--hairline); }
.tl-item { display: flex; gap: 14px; position: relative; }
.tl-icon { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-raised); color: var(--text-muted); border: 1px solid var(--border); }
.tl-anruf { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 40%, transparent); }
.tl-notiz { color: var(--warning); }
.tl-body { min-width: 0; display: grid; gap: 2px; padding-top: 4px; }
.tl-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.tl-head .text-faint { font-size: 12.5px; }
.tl-note { white-space: pre-wrap; font-size: 14px; margin-top: 2px; }
@media (max-width: 767.98px) {
  .detail-title { flex-basis: 100%; }
  .detail-facts { font-size: 15px; }
  .kpi-row.detail-kpis, .kpi-row.detail-kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .detail-kpis .kpi-card { padding: 16px; }
  .detail-kpis .kpi-value { font-size: 24px; }
  .kpi-score .score-meter i { width: 6px; height: 18px; }
  .tab-panel { padding: 16px; }
  .card.pad { padding: 18px; }
}

/* ---------- Aufgaben ----------
 * Oben drei Kennzahlen (Sprung zur Gruppe), darunter die Gruppen als Glaskarten. Überfällig: rote Leuchtkante,
 * Erledigt leiser. Verschieben als leise Pillenspur, höchstens ein Abzeichen („Hoch“) je Zeile. */
.task-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.task-kpi { position: relative; display: grid; gap: 6px; padding: 20px 22px; overflow: hidden; }
.task-kpi:hover { text-decoration: none; }
.task-kpi-label { font-size: 13px; font-weight: var(--weight-medium); color: var(--text-muted); }
.task-kpi-value {
  font-family: var(--font-display); font-weight: var(--weight-display); font-size: 34px; line-height: 1.1; letter-spacing: -0.02em;
  background: var(--brand-text-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.task-kpi.tone-danger:not(.is-empty) .task-kpi-value { background: none; color: var(--danger); -webkit-text-fill-color: var(--danger); }
.task-kpi.tone-danger:not(.is-empty)::before, .task-group.tone-danger::before {
  content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--danger); box-shadow: 0 0 14px var(--danger);
}
.task-kpi.is-empty { cursor: default; }
.task-kpi.is-empty:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.task-groups { display: grid; gap: 20px; }
.task-group { position: relative; padding: 8px 0 6px; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.task-group.tone-danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.group-title {
  display: flex; align-items: center; gap: 10px; padding: 14px 22px 10px;
  font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
}
.tone-danger .group-title { color: var(--danger); }
.is-done-group .task-row:not(:hover) { opacity: .8; }
.task-list { display: grid; }
.task-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 22px; border-top: 1px solid var(--hairline); transition: background-color var(--dur-fast) var(--ease); }
.task-group .task-row:hover { background: var(--surface-hover); }
.task-list .task-row:first-child { border-top: 0; }
.tab-panel .task-row, .card.pad .task-row { padding-left: 0; padding-right: 0; }
.task-row .checkbox { margin-top: 3px; }
.task-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.task-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.task-row.is-done .task-title { text-decoration: line-through; color: var(--text-muted); font-weight: 500; }
.task-main .badge { height: 22px; font-size: 12px; padding: 0 8px; vertical-align: 1px; }
.task-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.shift { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.shift-btn {
  height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px;
  font-weight: var(--weight-medium); cursor: pointer; color: var(--text-muted); white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.shift-btn:hover { background: var(--pill-active-bg); color: var(--text); }
.toggle-pill { padding: 0 16px; height: 42px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: var(--weight-medium); }
.toggle-pill:has(input:checked) { border-color: var(--brand-g2); box-shadow: 0 0 0 1px var(--brand-g2), var(--glow); }
@media (max-width: 767.98px) {
  .task-kpis { gap: 10px; margin-bottom: 18px; }
  .task-kpi { padding: 14px 14px 12px; }
  .task-kpi-value { font-size: 26px; }
  .group-title { padding: 12px 16px 8px; font-size: 17px; }
  .task-row { flex-wrap: wrap; padding: 14px 16px; }
  .task-actions { width: 100%; padding-left: 32px; }
  .detail-header .page-actions { width: 100%; padding-top: 0; }
}

/* ---------- Import-Assistent ---------- */
.imp-body { display: grid; gap: 22px; }
.imp-panel { display: grid; gap: 18px; }
.imp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.imp-step { position: relative; display: flex; align-items: center; gap: 10px; padding-bottom: 12px; color: var(--text-muted); font-size: 14px; font-weight: 500; min-width: 0; }
.imp-step::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--hairline); }
.imp-step.is-done::after { background: var(--border-strong); }
.imp-step.is-current { color: var(--text); font-weight: 600; }
.imp-step.is-current::after { background: var(--brand-gradient); box-shadow: 0 0 10px var(--glow-color-strong); }
.imp-step-num { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; border: 1px solid var(--border-strong); font-variant-numeric: tabular-nums; }
.imp-step.is-current .imp-step-num { border-color: var(--brand-g2); box-shadow: 0 0 0 1px var(--brand-g2), var(--glow); }
.imp-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-file { display: grid; gap: 8px; }
.imp-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.imp-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.imp-count { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.imp-count-num { font-family: var(--font-display); font-weight: var(--weight-display); font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }
.imp-count-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }
.imp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-muted); }
.tone-success .imp-dot { background: var(--success); }
.tone-warning .imp-dot { background: var(--warning); }
.tone-danger .imp-dot { background: var(--danger); }
.tone-accent .imp-dot { background: var(--accent-text); }
.imp-table { border: 1px solid var(--border); border-radius: var(--radius); }
.imp-table .table td { vertical-align: middle; }
.mapping-table select { min-width: 200px; }
@media (max-width: 767.98px) {
  .imp-steps { grid-template-columns: repeat(4, minmax(0, auto)); }
  .imp-step:not(.is-current) .imp-step-label { display: none; }
  /* Zuordnung am Handy: je Spalte ein Block (Name, Beispiel, Auswahl in voller Breite) statt Querscrollen */
  .mapping-table thead { display: none; }
  .mapping-table, .mapping-table tbody, .mapping-table tr, .mapping-table td { display: block; width: 100%; }
  .mapping-table tr { padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
  .mapping-table tr:last-child { border-bottom: 0; }
  .mapping-table td, .mapping-table tr:last-child td { padding: 0; border: 0; }
  .mapping-table td:nth-child(2) { margin: 2px 0 10px; }
  .mapping-table select { min-width: 0; width: 100%; }
}

/* Termin-Einladung: Statuszeile (Formular, Kalender-Detail) und Einstellungs-Reiter */
.invite-status { display: grid; gap: 6px; justify-items: start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.invite-status.is-warn { background: var(--warning-bg); }
.invite-status-line { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.invite-status-line svg { flex: none; margin-top: 2px; }
.invite-status-line.is-ok svg { color: var(--success); }
.invite-status-line.is-warn { color: var(--text); }
.invite-status-line.is-warn svg { color: var(--warning); }
.invite-mailboxes { width: 100%; border-collapse: collapse; }
.invite-mailboxes th, .invite-mailboxes td { text-align: left; padding: 6px 8px 6px 0; vertical-align: middle; }
.invite-placeholders code { margin-right: 6px; white-space: nowrap; }
.invite-type-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Einstellungen › API-Schlüssel: einmalig angezeigter Schlüssel */
.api-key-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: 0; }
