/*
    Support-Design (TD, docs/design/tickets/SPEC-Umsetzung.md Abschnitt 1, docs/TD-Bausteine.md).

    Eigene Datei neben app.css, damit die parallelen Pakete nicht in app.css kollidieren. Jeder Agent schreibt
    nur in seinen Abschnitt (Köpfe unten, SPEC 5.3). Farben nur über Tokens; neue Tokens stehen im :root-Block.

    Die Bausteinklassen sd-* sind eigene Namen und wirken auch ohne Bereichsklasse (Dialoge und Popups rendern
    teils außerhalb des Seitenbaums). Die Dichte des Support-Bereichs (13 px, Container-Abfragen, angeglichene
    Knöpfe und Felder) gilt nur unter .icp-sd – die übrigen Seiten bleiben unverändert.
*/

:root {
    /* Zwischentöne */
    --icp-primary-tint: #F5F8FC;
    --icp-danger-tint: #FBF6F5;
    --icp-warning-tint: #FBF9F4;
    --icp-queue-tint: #FFFDF8;
    --icp-warning-muted: #8A7550;
    --icp-danger-hover: #A93226;
    --icp-success-hover: #E3EFE8;

    /* Anwesenheit (Farben wie Microsoft Teams) */
    --icp-presence-available: #6BB700;
    --icp-presence-busy: #C50F1F;
    --icp-presence-away: #FFAA44;
    --icp-presence-offline: #A3ADBB;

    /* Radien und Schatten */
    --icp-radius-md: 8px;
    --icp-shadow-popover: 0 12px 32px rgba(16, 24, 40, .14);
    --icp-shadow-float: 0 16px 40px rgba(16, 24, 40, .16);
    --icp-shadow-float-strong: 0 16px 40px rgba(16, 24, 40, .20);
    --icp-shadow-drawer: -8px 0 24px rgba(16, 24, 40, .10);
    --icp-overlay: rgba(16, 24, 40, .45);
    --icp-overlay-soft: rgba(16, 24, 40, .18);

    /* Schriftstufen im Support-Bereich */
    --sd-font-3xs: 10.5px;
    --sd-font-2xs: 11px;
    --sd-font-xs: 12px;
    --sd-font-meta: 12.5px;
    --sd-font-base: 13px;
    --sd-font-sm: 14px;
    --sd-h1: 22px;
    --sd-h1-lg: 24px;
}

/* === Grundlagen (W1-E) === */

/* ---------- Bereich ---------- */

/* Maße wie im Design: Rahmen und Innenabstand zählen zur Höhe */
.icp-sd,
[class^="sd-"],
[class*=" sd-"] {
    box-sizing: border-box;
}

.icp-sd {
    container-type: inline-size;
    container-name: sd;
    font-size: var(--sd-font-base);
    color: var(--icp-text);
    font-variant-numeric: tabular-nums;
}

.icp-sd h1.sd-h1 {
    margin: 0;
    font-size: var(--sd-h1);
    font-weight: 700;
    letter-spacing: -.02em;
}

.icp-sd h1.sd-h1--lg {
    font-size: var(--sd-h1-lg);
}

.sd-label-caps {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-muted { color: var(--icp-text-meta); }
.sd-faint { color: var(--icp-text-faint); }
.sd-spacer { flex: 1; }

/* Töne: jede Tonklasse setzt Text, Fläche, Rahmen, Punkt */
.sd-tone--default { --sd-t-fg: var(--icp-neutral); --sd-t-bg: var(--icp-neutral-soft); --sd-t-bd: var(--icp-neutral-border); --sd-t-dot: var(--icp-neutral-dot); --sd-t-tint: var(--icp-surface-alt); }
.sd-tone--primary { --sd-t-fg: var(--icp-primary); --sd-t-bg: var(--icp-primary-soft); --sd-t-bd: var(--icp-primary-border); --sd-t-dot: var(--icp-primary); --sd-t-tint: var(--icp-primary-tint); }
.sd-tone--info { --sd-t-fg: var(--icp-info); --sd-t-bg: var(--icp-info-soft); --sd-t-bd: var(--icp-info-border); --sd-t-dot: var(--icp-info-dot); --sd-t-tint: var(--icp-surface-alt); }
.sd-tone--success { --sd-t-fg: var(--icp-success); --sd-t-bg: var(--icp-success-soft); --sd-t-bd: var(--icp-success-border); --sd-t-dot: var(--icp-success-dot); --sd-t-tint: var(--icp-surface-alt); }
.sd-tone--warning { --sd-t-fg: var(--icp-warning); --sd-t-bg: var(--icp-warning-soft); --sd-t-bd: var(--icp-warning-border); --sd-t-dot: var(--icp-warning-dot); --sd-t-tint: var(--icp-warning-tint); }
.sd-tone--danger { --sd-t-fg: var(--icp-danger); --sd-t-bg: var(--icp-danger-soft); --sd-t-bd: var(--icp-danger-border); --sd-t-dot: var(--icp-danger-dot); --sd-t-tint: var(--icp-danger-tint); }

.sd-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--sd-t-dot, var(--icp-neutral-dot));
}

/* ---------- Karte (1.3.1) ---------- */

.sd-card {
    background: var(--icp-surface);
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius);
    box-shadow: var(--icp-shadow-sm);
    overflow: hidden;
    min-width: 0;
}

.sd-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sd-card-head h2 {
    margin: 0;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-card--lg > .sd-card-head {
    min-height: 46px;
}

.sd-card--lg > .sd-card-head h2 {
    font-size: var(--sd-font-sm);
    letter-spacing: -.01em;
}

.sd-card-count {
    display: inline-block;
    padding: 0 6px;
    border-radius: var(--icp-radius-chip);
    background: var(--icp-neutral-soft);
    color: var(--icp-text-meta);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    line-height: 18px;
}

.sd-card-head-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sd-card-head-end--full {
    flex: 1;
    margin-left: 0;
}

.sd-card-link {
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    text-decoration: none;
    white-space: nowrap;
}

.sd-card-link:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-card-note {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    white-space: nowrap;
}

/* ---------- Kachelleiste (1.3.2) ---------- */

.sd-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.sd-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    font-size: var(--sd-font-base);
    color: inherit;
    margin: 0;
    padding: 10px 12px 11px 12px;
    border: none;
    background: var(--icp-surface);
    box-shadow: inset -1px 0 0 var(--icp-surface-head), inset 0 -1px 0 var(--icp-surface-head);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}

.sd-tile:hover { background: var(--icp-bg-soft); }

.sd-tile-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-meta);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-tile-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-tile-value {
    display: block;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--icp-text);
}

.sd-tile-value--danger { color: var(--icp-danger); }
.sd-tile-value--warning { color: var(--icp-warning); }

.sd-tile--active,
.sd-tile--active:hover {
    background: var(--icp-primary-tint);
    box-shadow: inset 0 -2px 0 var(--icp-primary), inset -1px 0 0 var(--icp-surface-head), inset 0 -1px 0 var(--icp-surface-head);
}

.sd-tile--active .sd-tile-label {
    color: var(--icp-primary);
    font-weight: 600;
}

/* ---------- Punkt-Text, Pille (1.3.3) ---------- */

.sd-dotlabel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 20px;
    font-size: var(--sd-font-meta);
    font-weight: 500;
    color: var(--icp-text-body);
    white-space: nowrap;
}

.sd-dotlabel .sd-icon { color: var(--sd-t-dot); }

.sd-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: var(--icp-radius-chip);
    background: var(--sd-t-bg);
    color: var(--sd-t-fg);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    white-space: nowrap;
}

.sd-pill .sd-dot { width: 5px; height: 5px; }
.sd-pill .sd-icon { color: var(--sd-t-dot); }

/* ---------- SLA-Chip und SLA-Uhr (1.3.3) ---------- */

.sd-sla { min-width: 0; }

.sd-sla-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--icp-radius-chip);
    background: var(--sd-t-bg);
    color: var(--sd-t-fg);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    white-space: nowrap;
}

.sd-sla-chip--bold { font-weight: 700; }

.sd-sla-chip--short {
    height: 26px;
    padding: 0 9px;
    border-radius: var(--icp-radius-xs);
    font-size: var(--sd-font-base);
    font-weight: 700;
}

.sd-sla-sub {
    margin-top: 2px;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-sla--short .sd-sla-sub { margin-top: 1px; }

.sd-clock-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-clock-label {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-base);
    color: var(--icp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-clock-due {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
    white-space: nowrap;
}

.sd-clock .sd-sla-chip { padding: 0 8px; }

.sd-clock-bar {
    height: 4px;
    margin-top: 6px;
    border-radius: 3px;
    background: var(--icp-chart-track);
    overflow: hidden;
}

.sd-clock-fill {
    height: 4px;
    border-radius: 3px;
    background: var(--sd-t-dot);
}

.sd-clock--compact {
    padding: 9px 16px;
    background: var(--icp-surface);
    min-width: 0;
}

.sd-clock--compact .sd-clock-row { gap: 6px; }

.sd-clock--compact .sd-clock-label {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-clock--compact .sd-sla-chip {
    height: 20px;
    padding: 0 7px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
}

.sd-clock--compact .sd-clock-bar { margin-top: 7px; }

/* ---------- Symbole, Avatare, Firmen-Kachel (1.3.4, 1.3.5) ---------- */

.sd-icon {
    display: inline-block;
    flex: 0 0 auto;
    fill: currentColor;
    vertical-align: middle;
}

.sd-channel { color: var(--icp-text-weak); }

/* CC: Ticket, bei dem ich in CC stehe (nicht zuständig) – Badge vor dem Betreff */
.sd-cc-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 16px;
    padding: 0 5px;
    border-radius: 4px;
    border: 1px solid var(--icp-primary-border);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
}

.sd-urgency--urgent { color: var(--icp-warning-dot); }
.sd-urgency--outage { color: var(--icp-danger-dot); }

.sd-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.sd-avatar--me {
    background: var(--icp-primary);
    color: #fff;
}

/* Verlauf: Ton mit Rahmen (Kunde info, Notiz warning, Alarm danger) */
.sd-avatar--toned {
    background: var(--sd-t-bg);
    color: var(--sd-t-fg);
    border: 1px solid var(--sd-t-bd);
}

.sd-avatar--toned.sd-tone--primary {
    background: var(--icp-primary);
    color: #fff;
    border-color: var(--icp-primary);
}

.sd-avatar--framed { border: 1px solid var(--icp-primary-border); }
.sd-avatar--me.sd-avatar--framed { border-color: var(--icp-primary); }

.sd-presence {
    position: absolute;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-sizing: border-box;
}

.sd-presence--available { background: var(--icp-presence-available); }
.sd-presence--busy { background: var(--icp-presence-busy); }
.sd-presence--away { background: var(--icp-presence-away); }
.sd-presence--offline { background: var(--icp-presence-offline); }

.sd-company {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--icp-surface);
    border: 1px solid var(--icp-border);
    color: var(--icp-info);
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

/* ---------- Anwesenheit (1.3.6) ---------- */

.sd-viewer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    height: 20px;
    padding: 0 6px 0 4px;
    border-radius: var(--icp-radius-pill);
    background: var(--icp-info-soft);
    color: var(--icp-info);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    white-space: nowrap;
}

.sd-viewer--typing {
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
}

/* ---------- Ticketzeile (1.3.9) ---------- */

.sd-rows { min-width: 0; }

.sd-row,
.sd-row-head {
    display: grid;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    min-width: 0;
}

.sd-row--cockpit,
.sd-row--customer {
    grid-template-columns: 72px minmax(220px, 2.4fr) minmax(88px, .55fr) minmax(150px, 1fr) minmax(130px, .85fr) 84px;
}

.sd-row--narrow-a {
    grid-template-columns: 28px 72px minmax(220px, 2.4fr) minmax(88px, .55fr) minmax(150px, 1fr) minmax(130px, .85fr) 84px;
}

.sd-row--narrow-b {
    grid-template-columns: 28px 112px 72px minmax(220px, 2.4fr) minmax(88px, .55fr) minmax(150px, 1fr) minmax(64px, .4fr) 84px;
}

.sd-row--wide {
    grid-template-columns: 28px 76px minmax(260px, 2.4fr) minmax(180px, 1.2fr) minmax(92px, .55fr) minmax(130px, .8fr) minmax(150px, 1fr) minmax(130px, .8fr) minmax(88px, .5fr) 84px;
}

.sd-row-head {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    background: var(--icp-surface-alt);
    border-bottom: 1px solid var(--icp-border);
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-text-faint);
    white-space: nowrap;
}

.sd-row {
    min-height: 50px;
    background: var(--icp-surface);
    border-bottom: 1px solid var(--icp-surface-head);
    cursor: pointer;
}

.sd-row:hover { background: var(--icp-bg-soft); }
.sd-row--compact { min-height: 38px; }
.sd-row--needs { box-shadow: inset 3px 0 0 var(--icp-primary); }

.sd-row--cursor {
    background: var(--icp-bg-soft);
    box-shadow: inset 0 0 0 1px var(--icp-primary-accent);
}

.sd-row--needs.sd-row--cursor { box-shadow: inset 3px 0 0 var(--icp-primary), inset 0 0 0 1px var(--icp-primary-accent); }
.sd-row--selected,
.sd-row--selected:hover { background: var(--icp-primary-soft); }

.sd-cell { min-width: 0; }
.sd-cell--right { text-align: right; }

.sd-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1.5px solid var(--icp-border-strong);
    border-radius: 4px;
    background: #fff;
    color: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

.sd-check--on {
    border-color: var(--icp-primary);
    background: var(--icp-primary);
}

.sd-num {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sd-num a,
.sd-num span {
    font-size: var(--sd-font-meta);
    font-weight: 500;
    color: var(--icp-text-meta);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sd-row--cockpit .sd-num a,
.sd-row--customer .sd-num a,
.sd-row--cockpit .sd-num span,
.sd-row--customer .sd-num span { font-size: var(--sd-font-base); }

.sd-num a:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-subject-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sd-subject {
    font-size: var(--sd-font-sm);
    font-weight: 500;
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-subject--needs { font-weight: 700; }
.sd-row--cockpit .sd-subject--needs,
.sd-row--customer .sd-subject--needs { font-weight: 600; }

.sd-sub-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.sd-sub {
    min-width: 0;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-sub--warning {
    color: var(--icp-warning);
    font-weight: 600;
}

.sd-tag {
    flex: 0 0 auto;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-weak);
    line-height: 16px;
}

.sd-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.sd-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-meta);
    white-space: nowrap;
}

.sd-assignee > span:last-child { overflow: hidden; text-overflow: ellipsis; }

.sd-unassigned {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-weak);
    white-space: nowrap;
}

.sd-tech {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.sd-tech-name {
    font-size: var(--sd-font-base);
    color: var(--icp-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tech-team {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
    white-space: nowrap;
}

.sd-customer-name {
    font-size: var(--sd-font-base);
    font-weight: 500;
    color: var(--icp-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-customer-name--warning { color: var(--icp-warning); }

.sd-contact-name {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-updated {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
    text-align: right;
    white-space: nowrap;
}

.sd-row--wide .sd-updated { color: var(--icp-text-meta); }

.sd-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

/* Zeilen-Symbolknopf (1.3.8) */
.sd-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}

a.sd-iconbtn {
    text-decoration: none;
}

.sd-iconbtn:hover {
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
}

.sd-iconbtn--callback {
    background: var(--icp-success-soft);
    color: var(--icp-success-dot);
}

.sd-iconbtn--callback:hover {
    background: var(--icp-success-hover);
    color: var(--icp-success-dot);
}

/* Kopfzeilen-Symbolknopf */
.sd-iconbtn--head {
    width: 34px;
    height: 34px;
    border-radius: var(--icp-radius-sm);
    color: var(--icp-text-soft);
}

.sd-iconbtn--head:hover {
    background: var(--icp-surface-hover);
    color: var(--icp-primary);
}

/* ---------- Gruppenkopf (Liste B) ---------- */

.sd-group-head {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 36px;
    padding: 0 12px;
    background: var(--sd-t-tint);
    border-top: 1px solid var(--icp-border);
    border-bottom: 1px solid var(--icp-border);
}

.sd-group-head .sd-dot { width: 8px; height: 8px; }

.sd-group-label {
    font-size: var(--sd-font-base);
    font-weight: 700;
    color: var(--sd-t-fg);
}

.sd-group-count {
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-text-faint);
}

/* ---------- Popover, Menü, Schublade (1.3.10) ---------- */

.sd-popover-anchor { position: relative; }

.sd-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    background: transparent;
}

.sd-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    max-width: calc(100vw - 32px);
    padding: 6px;
    background: var(--icp-surface);
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius);
    box-shadow: var(--icp-shadow-md);
    text-align: left;
}

.sd-popover--left { right: auto; left: 0; }

.sd-popover--fixed {
    position: fixed;
    top: 60px;
    right: 16px;
    border-radius: var(--icp-radius-lg);
    box-shadow: var(--icp-shadow-float);
}

.sd-popover-title {
    padding: 6px 10px 4px 10px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-menu-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.sd-menu-item:hover { background: var(--icp-surface-hover); }

.sd-menu-label {
    display: block;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-menu-item--danger .sd-menu-label { color: var(--icp-danger); }

.sd-menu-sub {
    display: block;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

.sd-drawer-backdrop {
    position: fixed;
    inset: var(--icp-appbar-h) 0 0 0;
    z-index: 50;
    background: var(--icp-overlay-soft);
}

.sd-drawer {
    position: fixed;
    top: var(--icp-appbar-h);
    right: 0;
    bottom: 0;
    z-index: 51;
    width: min(720px, 94vw);
    display: flex;
    flex-direction: column;
    background: var(--icp-surface);
    border-left: 1px solid var(--icp-border);
    box-shadow: var(--icp-shadow-drawer);
}

.sd-drawer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    flex: 0 0 52px;
    padding: 0 10px 0 16px;
    border-bottom: 1px solid var(--icp-border);
}

.sd-drawer-head h2 {
    margin: 0;
    font-size: var(--sd-font-sm);
    font-weight: 600;
}

.sd-drawer-sub {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-drawer-close {
    width: 32px;
    height: 32px;
    color: var(--icp-text-soft);
}

.sd-drawer-close:hover {
    background: var(--icp-surface-hover);
    color: var(--icp-primary);
}

.sd-drawer-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* ---------- Eingaben und Schalter (1.3.7) ---------- */

.sd-segmented {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    box-sizing: border-box;
}

.sd-segment {
    height: 32px;
    padding: 0 11px;
    border: none;
    border-radius: var(--icp-radius-chip);
    background: transparent;
    color: var(--icp-text-soft);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.sd-segment:hover { color: var(--icp-primary); }

.sd-segment--active,
.sd-segment--active:hover {
    background: var(--icp-primary);
    color: #fff;
}

.sd-options {
    display: grid;
    gap: 5px;
}

.sd-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-soft);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.sd-options--dots .sd-option { justify-content: flex-start; }
.sd-option .sd-dot { width: 6px; height: 6px; }
.sd-option > span:last-child { overflow: hidden; text-overflow: ellipsis; }

.sd-option:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }

.sd-option--active,
.sd-option--active:hover {
    background: var(--sd-t-bg);
    color: var(--sd-t-fg);
    border-color: var(--sd-t-dot);
}

.sd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-soft);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.sd-chip:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }
.sd-chip--24 { height: 24px; }
.sd-chip--28 { height: 28px; }
.sd-chip--30 { height: 30px; }
.sd-chip--icon { width: 28px; padding: 0; }

.sd-chip--active,
.sd-chip--active:hover {
    background: var(--icp-primary);
    border-color: var(--icp-primary);
    color: #fff;
}

.sd-time {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.sd-time-chip {
    height: 28px;
    min-width: 38px;
    padding: 0 7px;
    font-weight: 600;
}

.sd-stepper {
    display: inline-flex;
    align-items: center;
    height: 28px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    overflow: hidden;
    background: var(--icp-surface);
    box-sizing: border-box;
}

.sd-stepper button {
    width: 26px;
    height: 100%;
    padding: 0;
    border: none;
    background: var(--icp-surface);
    color: var(--icp-text-muted);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

.sd-stepper button:hover { color: var(--icp-primary); background: var(--icp-primary-soft); }
.sd-stepper button:disabled { color: var(--icp-icon-idle); background: var(--icp-surface); cursor: default; }

.sd-stepper-value {
    min-width: 58px;
    text-align: center;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-primary);
    line-height: 26px;
    border-left: 1px solid var(--icp-surface-head);
    border-right: 1px solid var(--icp-surface-head);
}

.sd-stepper-value--zero { color: var(--icp-text-weak); }

.sd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-body);
    cursor: pointer;
    user-select: none;
}

.sd-toggle-track {
    position: relative;
    width: 28px;
    height: 16px;
    flex: 0 0 28px;
    border-radius: var(--icp-radius-pill);
    background: var(--icp-border-strong);
}

.sd-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
}

.sd-toggle--on .sd-toggle-track { background: var(--icp-primary); }
.sd-toggle--on .sd-toggle-knob { left: 14px; }

/* ---------- Knöpfe (1.3.8) ---------- */

.sd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.sd-btn:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); text-decoration: none; }
.sd-btn--30 { height: 30px; padding: 0 10px; font-size: var(--sd-font-meta); }
.sd-btn--34 { height: 34px; }
.sd-btn--38 { height: 38px; }

.sd-btn--primary {
    background: var(--icp-primary);
    border-color: var(--icp-primary);
    color: #fff;
}

.sd-btn--primary:hover { background: var(--icp-primary-hover); border-color: var(--icp-primary-hover); color: #fff; }

.sd-btn--quiet {
    border-color: transparent;
    background: transparent;
    color: var(--icp-text-meta);
}

.sd-btn--quiet:hover { border-color: transparent; color: var(--icp-primary); }

.sd-btn--danger {
    height: 36px;
    border-radius: var(--icp-radius-md);
    background: var(--icp-danger-dot);
    border-color: var(--icp-danger-dot);
    color: #fff;
}

.sd-btn--danger:hover { background: var(--icp-danger-hover); border-color: var(--icp-danger-hover); color: #fff; }

.sd-btn--success {
    height: 40px;
    border-radius: var(--icp-radius-md);
    background: var(--icp-success-dot);
    border-color: var(--icp-success-dot);
    color: #fff;
    font-size: 13.5px;
}

.sd-btn--success:hover { background: var(--icp-success); border-color: var(--icp-success); color: #fff; }

/* Syncfusion-Knöpfe im Support-Bereich angleichen */
.icp-sd .e-btn.sd-btn--34 { height: 34px; font-size: var(--sd-font-base); }
.icp-sd .e-btn.sd-btn--36 { height: 36px; font-size: var(--sd-font-base); }

/* Textfelder im Support-Bereich (1.3.7) */
.sd-input {
    width: 100%;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-text);
    box-sizing: border-box;
}

.sd-input:focus,
.sd-input:focus-visible {
    outline: none;
    border-color: var(--icp-primary);
    box-shadow: 0 0 0 3px var(--icp-primary-ring);
}

/* ---------- Weitere Kleinteile (1.3.11) ---------- */

.sd-know {
    padding: 6px 9px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-base);
}

.sd-know-list {
    padding: 8px 10px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface-alt);
}

.sd-know-item {
    display: flex;
    gap: 7px;
    margin-bottom: 3px;
    font-size: var(--sd-font-base);
    line-height: 1.45;
    color: var(--icp-text-body);
}

.sd-know-item:last-child { margin-bottom: 0; }
.sd-know-bullet { color: var(--icp-warning-dot); }

.sd-ai {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--icp-info-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-info-soft);
}

.sd-ai-text {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-base);
    line-height: 1.5;
    color: var(--icp-text-body);
}

.sd-ai-regen {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    white-space: nowrap;
    cursor: pointer;
}

.sd-ai-regen:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-ai--suggest {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-color: var(--icp-primary-border);
    border-radius: var(--icp-radius);
    background: var(--icp-surface);
    box-shadow: var(--icp-shadow-sm);
}

.sd-ai-title {
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-ai-sub {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

.sd-ai--suggest .sd-ai-text { min-width: 180px; }

.sd-ai-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-empty {
    padding: 28px 14px;
    text-align: center;
    font-size: var(--sd-font-base);
    color: var(--icp-text-faint);
}

.sd-empty--lg {
    padding: 48px 14px;
    font-size: var(--sd-font-sm);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-shortcuts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 9px 12px;
    background: var(--icp-surface-alt);
    border-top: 1px solid var(--icp-surface-head);
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-shortcuts b {
    font-weight: 600;
    color: var(--icp-text-muted);
}

.sd-key {
    display: inline-flex;
    justify-content: center;
    min-width: 44px;
    padding: 1px 6px;
    border: 1px solid var(--icp-border);
    border-bottom-width: 2px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface-alt);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-text-body);
    box-sizing: border-box;
}

.sd-newbanner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--icp-info-border);
    background: var(--icp-info-soft);
    color: var(--icp-link);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    cursor: pointer;
}

.sd-newbanner:hover { background: var(--icp-primary-soft); }

.sd-hours-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-size: var(--sd-font-meta);
}

.sd-hours-label { color: var(--icp-text-subtle); }

.sd-hours-text {
    font-weight: 600;
    color: var(--icp-text);
    white-space: nowrap;
}

.sd-hours-bar {
    height: 5px;
    margin-top: 6px;
    border-radius: 3px;
    background: var(--icp-chart-track);
    overflow: hidden;
}

.sd-hours-fill {
    height: 5px;
    border-radius: 3px;
    background: var(--icp-info-dot);
}

.sd-hours-fill--warning { background: var(--icp-warning-dot); }

.sd-clock-live { font-variant-numeric: tabular-nums; }

.sd-filepill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px 0 8px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-pill);
    background: var(--icp-surface);
    font-size: var(--sd-font-base);
    color: var(--icp-link);
    text-decoration: none;
}

/* ---------- Musterseite /entwicklung/support-bausteine ---------- */

.sd-sample {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 32px;
}

.sd-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
    align-items: start;
}

.sd-sample-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
}

.sd-sample-body--col {
    flex-direction: column;
    align-items: stretch;
}

.sd-sample-caption {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
}

.sd-sample-clocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--icp-surface-head);
    border-top: 1px solid var(--icp-surface-head);
}

.sd-sample-scroll { overflow-x: auto; }
.sd-sample-scroll > .sd-row--cockpit,
.sd-sample-scroll > .sd-row--customer { min-width: 812px; }
.sd-sample-scroll > .sd-row--narrow-a { min-width: 848px; }
.sd-sample-scroll > .sd-row--narrow-b,
.sd-sample-scroll > .sd-group-head { min-width: 902px; }
.sd-sample-scroll > .sd-row--wide { min-width: 1318px; }

.sd-sample-presence {
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--sd-t-fg);
}

/* === Einstellungen (W1-A/B/D) === */

/* === W2-A Kopf, Navigation, Cockpit, Liste === */

/* Höchstbreite der Shell für ALLE Support-Seiten im Design (Cockpit, Tickets, Ticketansicht, Neues Ticket, Kunden):
   Wurzel .icp-sd direkt in .icp-page → volle Inhaltsbreite (das Design misst bis 2.268 px). Eigene Grenzen setzen die
   Seiten innen (z. B. Neues Ticket ab 2.300 px höchstens 2.000 px). Seiten im alten Aufbau behalten 1.560 px. */
.icp-page:has(> .icp-sd) { max-width: none; }

/* ---------- Kopfzeile (SPEC 2.1) ---------- */

.sdh-appbar { gap: 12px; }
.sdh-appbar .icp-breadcrumb { font-size: var(--sd-font-sm); flex: 0 1 auto; }

/* Timer-Pille: 32 hoch, Primär-Fläche, Punkt in Gefahr-Farbe, „Stopp“ 24 hoch */
.sdh-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 4px 0 10px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    white-space: nowrap;
    box-sizing: border-box;
}

.sdh-timer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--icp-danger-dot);
}

.sdh-timer-num {
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-primary);
    text-decoration: none;
}

.sdh-timer-num:hover { text-decoration: underline; color: var(--icp-primary); }

.sdh-timer-time {
    min-width: 62px;
    font-size: var(--sd-font-base);
    font-weight: 600;
}

.sdh-timer-stop {
    height: 24px;
    padding: 0 8px;
    border: none;
    border-radius: var(--icp-radius-chip);
    background: var(--icp-primary);
    color: #fff;
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    cursor: pointer;
}

.sdh-timer-stop:hover { background: var(--icp-primary-hover); }
.sdh-timer-stop:disabled { opacity: .6; cursor: default; }

/* Suche: 38 hoch; 292 px (≥ 1.450 Inhaltsbreite), 200 px (≥ 1.150), sonst nur Symbol */
.sdh-search.icp-global-search {
    height: 38px;
    width: 38px;
    flex: 0 1 38px;
    min-width: 38px;
    justify-content: center;
    padding: 0;
    border-radius: var(--icp-radius-sm);
    font-size: var(--sd-font-sm);
    color: var(--icp-text-faint);
    overflow: hidden;
}

.sdh-search.icp-global-search > span { display: none; }

@media (min-width: 1442px) {
    .sdh-search.icp-global-search {
        width: 200px;
        flex-basis: 200px;
        justify-content: flex-start;
        padding: 0 10px;
    }

    .sdh-search.icp-global-search > span { display: inline; }
    .sdh-search.icp-global-search > span:first-of-type {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sdh-search .icp-global-search-hint { font-size: var(--sd-font-xs); border-radius: var(--icp-radius-xs); }
}

@media (min-width: 1742px) {
    .sdh-search.icp-global-search { width: 292px; flex-basis: 292px; }
}

/* Benutzer: Avatar 24 mit Anwesenheitspunkt, Kurzname erst bei breiter Kopfzeile (≥ 1.250 Inhaltsbreite) */
.sdh-user {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 6px 0 8px;
    border: none;
    border-radius: var(--icp-radius-sm);
    background: transparent;
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-sm);
    font-weight: 500;
    cursor: pointer;
}

.sdh-user:hover { background: var(--icp-surface-hover); }
.sdh-user-name { display: none; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 1542px) {
    .sdh-user-name { display: inline; }
}

@media (max-width: 1541.98px) {
    .sdh-appbar { gap: 8px; }
}

.sdh-user-menu { min-width: 230px; }
.sdh-user-menu .sd-popover-title { padding-top: 4px; }

.sdh-avail { display: flex; align-items: center; gap: 9px; width: 100%; }
.sdh-avail-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.sdh-avail--active { color: var(--icp-primary); font-weight: 600; }
.sdh-avail .flex-1 { flex: 1; }

/* ---------- Cockpit (SPEC 2.3) ---------- */

.sdc-head {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.sdc-head-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.sdc-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sdc-head-actions { display: flex; align-items: center; gap: 7px; }
/* TK-Kill-Switch: Pille „Automatische Mails aus“ neben „Live“ */
.sdc-mail-off { display: inline-flex; text-decoration: none; }

.sdc-team-select {
    height: 34px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%23667085'%3E%3Cpath d='M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    appearance: none;
    cursor: pointer;
}

.sdc-team-select:hover { border-color: var(--icp-primary-border); }
.sdc-team-select:focus-visible { outline: none; border-color: var(--icp-primary); box-shadow: 0 0 0 3px var(--icp-primary-ring); }

.icp-sd .sd-card:has(> .sd-tiles) { margin-bottom: 14px; }
.sdc-tiles-skeleton { padding: 12px 14px; margin-bottom: 14px; }

.sdc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

@container sd (min-width: 1250px) {
    .sdc-grid { grid-template-columns: minmax(0, 1fr) 360px; }
}

@container sd (min-width: 2000px) {
    .sdc-grid { grid-template-columns: minmax(0, 1fr) 420px; }
}

.sdc-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sdc-pad { padding: 12px 14px; }

.sdc-list-dot { width: 8px; height: 8px; }
.sdc-list-title { margin: 0; font-size: var(--sd-font-sm); font-weight: 600; letter-spacing: -.01em; color: var(--icp-text); }
.sdc-list .sd-card-head-end--full { gap: 8px; }

.sdc-all {
    display: block;
    padding: 10px 14px;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    text-decoration: none;
    text-align: center;
}

.sdc-all:hover { color: var(--icp-primary); text-decoration: underline; }

/* Team */
.sdc-team-colhead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
    padding: 7px 14px 3px 14px;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    text-align: right;
}

.sdc-member {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 9px 14px;
    border-top: 1px solid var(--icp-border-soft);
}

.sdc-member-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
    align-items: center;
}

.sdc-member-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sdc-member-text { min-width: 0; }
.sdc-member-name { font-size: var(--sd-font-base); font-weight: 600; color: var(--icp-text); }

.sdc-member-status {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-meta);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sdc-presence { font-weight: 600; color: var(--sd-t-fg); }

.sdc-member-open {
    font-size: 18px;
    font-weight: 600;
    text-align: right;
    color: var(--icp-text);
    text-decoration: none;
}

.sdc-member-open:hover { color: var(--icp-primary); text-decoration: underline; }

.sdc-work {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-left: 40px;
    padding: 5px 8px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-info-soft);
    color: var(--icp-info);
    font-size: var(--sd-font-xs);
    text-decoration: none;
}

.sdc-work:hover { background: var(--icp-primary-soft); color: var(--icp-info); }
.sdc-work-verb, .sdc-work-num { flex: 0 0 auto; }
.sdc-work-num { font-weight: 600; }
.sdc-work-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Telefon */
.sdc-queue { font-size: var(--sd-font-xs); font-weight: 600; color: var(--icp-text-subtle); white-space: nowrap; }
.sdc-queue--waiting { color: var(--icp-warning); }

.sdc-call {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sdc-call--own { cursor: pointer; }
.sdc-call--own:hover { background: var(--icp-bg-soft); }
.sdc-call--queue { background: var(--icp-queue-tint); }

.sdc-call-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: var(--sd-t-bg);
    color: var(--sd-t-dot);
}

.sdc-call-text { flex: 1; min-width: 0; }
.sdc-call-title, .sdc-call-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdc-call-title { font-size: var(--sd-font-base); font-weight: 600; color: var(--icp-text); }
.sdc-call-sub { font-size: var(--sd-font-xs); color: var(--icp-text-subtle); }
.sdc-call-time { font-size: var(--sd-font-meta); font-weight: 600; color: var(--icp-success); }
.sdc-call-time--wait { color: var(--icp-warning); }

.sdc-take {
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--icp-success-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-success-soft);
    color: var(--icp-success);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    cursor: pointer;
}

.sdc-take:hover { background: var(--icp-success-hover); }

/* Aktive Alarme */
.sdc-alarm {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sdc-alarm-main { display: flex; align-items: flex-start; gap: 9px; }
.sdc-alarm-main .sd-dot { margin-top: 6px; }
.sdc-alarm-text { flex: 1; min-width: 0; }
.sdc-alarm-title { font-size: var(--sd-font-base); font-weight: 500; color: var(--icp-text); }
.sdc-alarm-sub { font-size: var(--sd-font-xs); color: var(--icp-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdc-alarm-actions { display: flex; align-items: center; gap: 6px; margin-left: 16px; }
.sdc-none { padding: 12px 14px; font-size: var(--sd-font-meta); color: var(--icp-text-faint); }

.sdc-smallbtn {
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    cursor: pointer;
}

.sdc-smallbtn:hover { border-color: var(--icp-primary); color: var(--icp-primary); }
.sdc-smallbtn--quiet { border-color: transparent; background: transparent; color: var(--icp-text-meta); }
.sdc-smallbtn--quiet:hover { border-color: transparent; }

/* Heute */
.sdc-agenda {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sdc-agenda--past { opacity: .5; }
.sdc-agenda--now { box-shadow: inset 3px 0 0 var(--icp-info-dot); }
.sdc-agenda--now .sdc-agenda-time { color: var(--icp-info); }
.sdc-agenda-time { font-size: var(--sd-font-meta); font-weight: 600; color: var(--icp-text-body); }
.sdc-agenda-title { font-size: var(--sd-font-base); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdc-agenda-sub { font-size: var(--sd-font-xs); color: var(--icp-text-subtle); }

/* Für mich */
.sdc-linkbtn {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sdc-linkbtn:hover { color: var(--icp-primary); text-decoration: underline; }

.sdc-mention {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    margin: 0;
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.sdc-mention:hover { background: var(--icp-bg-soft); }
.sdc-mention-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sdc-mention-line { font-size: var(--sd-font-meta); color: var(--icp-text-muted); }
.sdc-mention-line b { color: var(--icp-text); font-weight: 600; }
.sdc-mention-excerpt { font-size: var(--sd-font-meta); color: var(--icp-text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdc-mention-when { font-size: var(--sd-font-xs); color: var(--icp-text-weak); }
.sdc-mention-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; }
.sdc-mention-dot--unread { background: var(--icp-primary); }

/* ---------- Ticketliste (SPEC 2.4) ---------- */

.sdl-head {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.sdl-head-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.sdl-headline { font-size: var(--sd-font-base); color: var(--icp-text-meta); }
.sdl-head-actions { display: flex; align-items: center; gap: 7px; }

.sdl-keybtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    color: var(--icp-text-muted);
    cursor: pointer;
}

.sdl-keybtn:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }

.sdl-grid {
    display: grid;
    gap: 12px;
    align-items: start;
}

.sdl-rail-col { position: sticky; top: 0; min-width: 0; }
.sdl-main { min-width: 0; }

/* Ansichtsleiste */
.sdl-rail { padding: 6px; }

.sdl-rail-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 33px;
    margin: 0;
    padding: 0 9px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.sdl-rail-item:hover { background: var(--icp-surface-hover); }

.sdl-rail-item--active,
.sdl-rail-item--active:hover {
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--icp-primary);
}

.sdl-rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdl-rail-star { color: var(--icp-warning-dot); }

.sdl-count {
    padding: 0 5px;
    border-radius: var(--icp-radius-chip);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-text-weak);
}

.sdl-count--danger { background: var(--icp-danger-soft); color: var(--icp-danger); }
.sdl-count--warning { background: var(--icp-warning-soft); color: var(--icp-warning); }

.sdl-rail-group {
    padding: 12px 9px 4px 9px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sdl-rail-saved { display: flex; align-items: center; }
.sdl-rail-saved > .sdl-rail-item { flex: 1; min-width: 0; }

.sdl-rail-more {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 26px;
    flex: 0 0 22px;
    padding: 0;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}

.sdl-rail-saved:hover .sdl-rail-more,
.sdl-rail-more:focus-visible { display: inline-flex; }
.sdl-rail-more:hover { color: var(--icp-primary); background: var(--icp-primary-soft); }

.sdl-rail-sep { height: 1px; margin: 6px 4px; background: var(--icp-surface-head); }
.sdl-rail-save { padding: 8px 9px 4px 9px; }

.sdl-rail-savebtn {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sdl-rail-savebtn:hover { color: var(--icp-primary); text-decoration: underline; }

.sdl-form { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 4px 4px; font-size: var(--sd-font-base); }
.sdl-form-actions { display: flex; gap: 6px; }

.sdl-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-body);
    cursor: pointer;
}

.sdl-check--menu { padding: 7px 10px; border-radius: var(--icp-radius-xs); }
.sdl-check--menu:hover { background: var(--icp-surface-hover); }
.sdl-menu-sep { height: 1px; margin: 4px 2px; background: var(--icp-surface-head); }

/* Reiter (schmal oder Variante B): brechen um statt waagerecht zu scrollen (1366 px) */
.sdl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2px;
    padding: 0 10px;
    border-bottom: 1px solid var(--icp-border);
}

.sdl-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 8px;
    border: none;
    background: transparent;
    color: var(--icp-text-muted);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.sdl-tab:hover { color: var(--icp-primary); }
.sdl-tab .sdl-count { font-size: var(--sd-font-xs); }

.sdl-tab--active {
    color: var(--icp-primary);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--icp-primary);
}

/* Werkzeugleiste */
.sdl-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 51px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sdl-search {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 290px;
    height: 29px;
    padding: 0 10px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-bg-soft);
    color: var(--icp-text-weak);
    box-sizing: border-box;
}

.sdl-search:focus-within { border-color: var(--icp-primary); box-shadow: 0 0 0 3px var(--icp-primary-ring); background: var(--icp-surface); }

.sdl-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-text);
}

.sdl-search input::-webkit-search-cancel-button { display: none; }

.sdl-search-key {
    padding: 0 5px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-chip);
    background: var(--icp-surface);
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-text-faint);
}

.sdl-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.sdl-sep { width: 1px; height: 22px; margin: 0 2px; background: var(--icp-border); }
.sdl-total { font-size: var(--sd-font-meta); color: var(--icp-text-faint); white-space: nowrap; }

.sdl-toolbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-soft);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    cursor: pointer;
}

.sdl-toolbtn:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }
.sdl-toolbtn--icon { width: 26px; justify-content: center; padding: 0; }
.sdl-toolbtn--active { border-color: var(--icp-primary-border); background: var(--icp-primary-soft); color: var(--icp-primary); }

.sdl-toolbtn-count {
    padding: 0 5px;
    border-radius: var(--icp-radius-chip);
    background: var(--icp-primary);
    color: #fff;
    font-size: var(--sd-font-2xs);
    line-height: 16px;
}

/* Auswahl-Leiste */
.sdl-selbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 51px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--icp-primary-border);
    background: var(--icp-primary-soft);
}

.sdl-selbar-count { margin-right: 6px; font-size: var(--sd-font-base); font-weight: 600; color: var(--icp-primary); }

.sdl-selbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    color: var(--icp-text-body);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.sdl-selbtn:hover { border-color: var(--icp-primary); color: var(--icp-primary); }
.sdl-selbtn:disabled { opacity: .55; cursor: default; }
.sdl-selbtn--danger:hover { border-color: var(--icp-danger-dot); color: var(--icp-danger); }
.sdl-selbtn--primary { border-color: var(--icp-primary); background: var(--icp-primary); color: #fff; }
.sdl-selbtn--primary:hover { background: var(--icp-primary-hover); color: #fff; }
.sdl-selbtn--icon { width: 30px; justify-content: center; padding: 0; }
.sdl-selbtn--on { border-color: var(--icp-primary); color: var(--icp-primary); }

.sdl-selclear {
    height: 30px;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sdl-selclear:hover { color: var(--icp-primary); text-decoration: underline; }

/* aktive Filter-Chips */
.sdl-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sdl-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 4px 0 8px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-size: var(--sd-font-xs);
    font-weight: 500;
}

.sdl-active-filter button {
    display: inline-flex;
    padding: 2px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.sdl-active-filter button:hover { background: var(--icp-surface); }

/* Tabelle */
.sdl-table { min-width: 0; overflow-x: auto; }
.sdl-table--busy { opacity: .65; transition: opacity .1s; }
.sdl-skeleton { padding: 14px; }
.sdl-empty-action { margin-top: 12px; font-weight: 400; }
.sdl-rowwrap { position: relative; }
.sdl-more-anchor { position: absolute; top: 34px; right: 14px; width: 26px; height: 0; }

/* breite Tabelle mit ausgeblendeten Spalten: eigenes Raster, Zellen der Spalte weg */
.sdl-cols .sd-row--wide { grid-template-columns: var(--sdl-wide-cols); }
.sdl-hide-4 .sd-row--wide > :nth-child(4),
.sdl-hide-7 .sd-row--wide > :nth-child(7),
.sdl-hide-9 .sd-row--wide > :nth-child(9) { display: none; }
.sdl-cols .sd-row-head.sd-row--wide > :nth-child(n) { display: block; }

.sdl-sort {
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.sdl-sort:hover, .sdl-sort--active { color: var(--icp-primary); }

/* Fußleiste: Blättern */
.sdl-pager { display: inline-flex; align-items: center; gap: 8px; }

.sdl-pagesize {
    height: 24px;
    padding: 0 4px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-muted);
}

.sdl-pagebtn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.sdl-pagebtn:hover:not(:disabled) { border-color: var(--icp-primary-border); color: var(--icp-primary); }
.sdl-pagebtn:disabled { color: var(--icp-icon-idle); cursor: default; }

/* Griff zwischen Liste und Vorschau */
.sdl-grip {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 150px);
    min-height: 480px;
    margin: 0 -9px;
    cursor: col-resize;
    z-index: 5;
}

.sdl-grip-line { width: 1px; height: 100%; border-radius: 2px; background: transparent; }
.sdl-grip--drag .sdl-grip-line { width: 2px; background: var(--icp-primary); }

.sdl-grip-knob {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 36px;
    margin-top: -18px;
    border: 1px solid var(--icp-border-strong);
    border-radius: 4px;
    background: var(--icp-surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.sdl-grip--drag .sdl-grip-knob { border-color: var(--icp-primary); }

/* Vorschau */
.sdl-preview {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    min-height: 480px;
}

.sdl-preview-none { margin: auto; font-size: var(--sd-font-sm); color: var(--icp-text-faint); }
.sdl-preview-loading { padding: 16px; }

.sdl-pv-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 12px 16px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sdl-pv-titles { flex: 1; min-width: 0; }
.sdl-pv-titleline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.sdl-pv-num { font-size: 16px; font-weight: 700; color: var(--icp-text-weak); }
.sdl-pv-subject { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; text-wrap: pretty; color: var(--icp-text); }

.sdl-pv-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
}

.sdl-pv-channel { display: inline-flex; align-items: center; gap: 5px; }
.sdl-pv-channel .sd-icon { color: var(--icp-text-weak); }
.sdl-pv-dot { color: var(--icp-icon-idle); }
.sdl-pv-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.sdl-pv-btn { height: 32px; font-size: var(--sd-font-meta); }
.sd-btn.sdl-pv-btn:not(.sd-btn--primary) { color: var(--icp-text-muted); }

.sdl-pv-clocks,
.sdl-pv-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--icp-surface-head);
    border-bottom: 1px solid var(--icp-surface-head);
}

.sdl-pv-clocks:empty { display: none; }

.sdl-pv-fact { min-width: 0; padding: 9px 16px; background: var(--icp-surface); font-size: var(--sd-font-base); }
.sdl-pv-fact .sd-label-caps { margin-bottom: 2px; }
.sdl-pv-strong { display: block; font-weight: 600; color: var(--icp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.sdl-pv-customer { color: var(--icp-link); }
.sdl-pv-customer:hover { color: var(--icp-primary); text-decoration: underline; }
.sdl-pv-sub { font-size: var(--sd-font-meta); color: var(--icp-text-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdl-pv-link { font-size: var(--sd-font-meta); color: var(--icp-link); text-decoration: none; }
.sdl-pv-link:hover { text-decoration: underline; }

.sdl-pv-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
}

.sdl-pv-msg { padding: 10px 12px; border: 1px solid var(--icp-border); border-radius: var(--icp-radius-md); background: var(--icp-surface); }
.sdl-pv-msg--customer { border-color: var(--icp-info-border); background: var(--icp-info-soft); }
.sdl-pv-msg--note { border-style: dashed; border-color: var(--icp-warning-border); background: var(--icp-warning-soft); }

.sdl-pv-msg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sdl-pv-author { font-weight: 600; color: var(--icp-text); }

.sdl-pv-msg-text {
    margin-top: 4px;
    font-size: var(--sd-font-base);
    line-height: 1.5;
    color: var(--icp-text-body);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sdl-pv-event { display: flex; align-items: center; gap: 8px; padding-left: 4px; font-size: var(--sd-font-meta); color: var(--icp-text-soft); }
.sdl-pv-event .sd-dot { width: 6px; height: 6px; }

/* Schnellansicht: Aktionen (19.11.2026). Die Karte schneidet nichts ab – Menüs und Auswahlen ragen über den Rand. */
.sd-card.sdl-preview { overflow: visible; }
.sdl-pv-head { border-bottom: none; padding-bottom: 8px; }

.sdl-pv-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px 16px;
}

.sdl-pv-bar .sd-btn .sd-icon { flex: 0 0 auto; }
.sd-btn.sdl-pv-more { width: 30px; padding: 0; }

/* Schmale Vorschau (ab 440 px): Nebenknöpfe ohne Symbol, damit die Leiste in einer Zeile bleibt */
@container (max-width: 520px) {
    .sdl-pv-bar { gap: 5px; }
    .sdl-pv-bar .sd-btn.sdl-pv-btn { padding: 0 8px; }
    .sdl-pv-bar .sd-btn.sdl-pv-btn:not(.sd-btn--primary):not(.sdl-pv-more) .sd-icon { display: none; }
}

.sdl-pv-confirm { display: flex; flex-direction: column; gap: 10px; padding: 4px 10px 6px 10px; font-size: var(--sd-font-base); color: var(--icp-text-body); }
.sdl-pv-confirm-actions { display: flex; justify-content: flex-end; gap: 6px; }
.sd-btn.sdl-pv-danger { border-color: var(--icp-danger); background: var(--icp-danger); color: #fff; }
.sd-btn.sdl-pv-danger:hover { border-color: var(--icp-danger-hover); background: var(--icp-danger-hover); color: #fff; }

.sdl-pv-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 16px 0 16px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface-alt);
    font-size: var(--sd-font-base);
    color: var(--icp-text-body);
}

.sdl-pv-notice .sd-icon { color: var(--icp-text-weak); flex: 0 0 auto; }
.sdl-pv-notice-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sdl-pv-notice-btn {
    padding: 4px 8px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sdl-pv-notice-btn:hover { background: var(--icp-primary-soft, var(--icp-surface)); color: var(--icp-primary); }

.sdl-pv-facts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Verlauf und Antwort-Editor scrollen gemeinsam; Kopf, Felder und Uhren bleiben stehen */
.sdl-pv-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.sdl-pv-body .sdl-pv-thread { flex: 0 0 auto; overflow: visible; }
.sdl-pv-composer .sd-composer { border-bottom: 1px solid var(--icp-surface-head); }

/* Priorität, Kategorie, Team, Agent: TicketPropertiesPanel mit Compact – Etikett oben, Feld darunter, 2–4 Spalten */
.sdl-preview { container-type: inline-size; }

.sd-card.sd-tv-props--compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 10px 16px 12px 16px;
    border: none;
    border-top: 1px solid var(--icp-surface-head);
    border-bottom: 1px solid var(--icp-surface-head);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

@container (min-width: 720px) {
    .sd-card.sd-tv-props--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sd-tv-props--compact .sd-tv-props-grids,
.sd-tv-props--compact .sd-tv-proprows { display: contents; }
.sd-tv-props--compact .sd-tv-props-grids > div { order: 2; min-width: 0; }
.sd-tv-props--compact .sd-tv-caps { margin-bottom: 4px; }
/* Zuständig (19.11.2026): breite Zeile mit Bild, vollem Namen, Status und × – in der Schnellansicht über zwei Spalten */
.sd-tv-props--compact .sd-tv-props-grids > .sd-tv-assignee-cell { grid-column: span 2; }
.sd-tv-props--compact .sd-tv-assignee-cell .sd-tv-caps-row { margin-bottom: 4px; }
.sd-tv-props--compact .sd-tv-assignee-cell .sd-agent-select-field { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
.sd-tv-props--compact .sd-tv-assignee-cell .sd-agent-select-clear { flex-basis: 32px; }

.sd-tv-props--compact .sd-tv-proprow {
    display: block;
    min-height: 0;
    padding: 0;
    cursor: default;
}

.sd-tv-props--compact .sd-tv-proprow:hover { background: transparent; }

.sd-tv-props--compact .sd-tv-proprow-label {
    display: block;
    width: auto;
    margin-bottom: 4px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-tv-props--compact .sd-tv-proprow-value {
    display: block;
    height: 32px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2398A2B3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 6px center / 16px;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    line-height: 30px;
    cursor: pointer;
}

.sd-tv-props--compact .sd-tv-proprow-value:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }
.sd-tv-props--compact .sd-tv-proprow--static .sd-tv-proprow-value { cursor: default; }
.sd-tv-props--compact .sd-tv-proprow-value--empty { color: var(--icp-text-weak); }

/* Auswahl so breit wie das Feld – rechts nie über den Rand der Vorschau */
.sd-tv-props--compact .sd-popover {
    left: 0;
    right: 0;
    width: auto !important;
    min-width: 200px;
}

/* Kurzbefehle „?“ (GlobalShortcuts.razor, ShortcutCatalog): Gruppen in zwei Spalten, Zeilen 34 */
.e-dialog.icp-kb-dialog { width: min(760px, calc(100vw - 32px)) !important; }
.icp-kb { columns: 2 300px; column-gap: 28px; }
.icp-kb-group { break-inside: avoid; margin-bottom: 16px; }
.icp-kb-head { margin: 0 0 2px; }
.icp-kb .sd-key { min-width: 72px; }

.sdl-keys-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 34px;
    border-bottom: 1px solid var(--icp-surface-head);
    font-size: var(--sd-font-base);
    color: var(--icp-text-body);
}

.sdl-keys-row .sd-key { flex: 0 0 auto; }

/* === W2-B Ticketansicht === */

/* Ticketansicht /tickets/{id} nach Design (SPEC 2.5, docs/TD-W2B.md). Alles unter .sd-tv bzw. eigenen Klassen sd-tv-, sd-composer-,
   sd-msg-; Breiten über Container-Abfragen an .icp-sd (Inhaltsbreite w wie im Design). */

/* ---------- Seitenkopf ---------- */

.sd-tv-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.sd-tv-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-top: 2px;
    padding: 0;
    border: none;
    border-radius: var(--icp-radius-sm);
    background: transparent;
    color: var(--icp-text-soft);
    cursor: pointer;
}

.sd-tv-back:hover { background: var(--icp-surface-hover); color: var(--icp-primary); }

.sd-tv-titleblock { flex: 1; min-width: 0; }

.sd-tv-titlerow {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.sd-tv-num {
    font-size: var(--sd-h1-lg);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--icp-text-weak);
    white-space: nowrap;
}

.icp-sd h1.sd-tv-subject {
    margin: 0;
    font-size: var(--sd-h1-lg);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
    color: var(--icp-text);
    text-wrap: pretty;
    cursor: text;
    outline: none;
}

.sd-tv-subject-input {
    flex: 1;
    min-width: 280px;
    height: 36px;
    font-size: 18px;
    font-weight: 600;
}

.sd-tv-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
}

.sd-tv-sep { color: var(--icp-icon-idle); }

.sd-tv-channel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sd-tv-channel .sd-icon { color: var(--icp-text-weak); }

.sd-tv-customer {
    font-weight: 600;
    color: var(--icp-link);
    text-decoration: none;
}

.sd-tv-customer:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-tv-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.sd-tv-pager {
    display: flex;
    height: 38px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    overflow: hidden;
    box-sizing: border-box;
}

.sd-tv-pager button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--icp-text-soft);
    cursor: pointer;
}

.sd-tv-pager button:hover { background: var(--icp-surface-hover); color: var(--icp-primary); }

.sd-tv-pos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
    white-space: nowrap;
    border-left: 1px solid var(--icp-surface-head);
    border-right: 1px solid var(--icp-surface-head);
}

.sd-tv-morebtn { width: 38px; padding: 0; color: var(--icp-text-muted); }
.sd-tv-actions .sd-btn:not(.sd-btn--primary) { color: var(--icp-text-muted); }
.sd-tv-actions .sd-btn:not(.sd-btn--primary):hover { color: var(--icp-primary); }

/* ---------- Banner ---------- */

.sd-tv-presence {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 9px 14px;
    border: 1px solid var(--sd-t-bd);
    border-radius: var(--icp-radius);
    background: var(--sd-t-bg);
    color: var(--sd-t-fg);
    font-size: var(--sd-font-base);
}

.sd-tv-presence-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: var(--sd-t-dot);
    color: #fff;
    font-size: var(--sd-font-2xs);
    font-weight: 600;
}

.sd-tv-presence-text { font-weight: 600; }
.sd-tv-presence-since { color: var(--icp-text-meta); }

.sd-tv .icp-tv-state { margin-bottom: 12px; }

.sd-tv-review {
    margin-bottom: 12px;
    background: var(--icp-surface);
    border: 1px solid var(--icp-warning-border);
    border-radius: var(--icp-radius);
    box-shadow: var(--icp-shadow-sm);
    overflow: hidden;
}

.sd-tv-review-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: var(--icp-warning-soft);
    border-bottom: 1px solid var(--icp-warning-border);
    color: var(--icp-warning);
}

.sd-tv-review-icon { color: var(--icp-warning-dot); }

.sd-tv-review-head h2 {
    margin: 0;
    font-size: var(--sd-font-sm);
    font-weight: 600;
    color: var(--icp-warning);
}

.sd-tv-review-sender { font-size: var(--sd-font-base); }

.sd-tv-review-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    color: var(--icp-warning);
    cursor: pointer;
    user-select: none;
}

.sd-check--warm.sd-check--on { background: var(--icp-warning); border-color: var(--icp-warning); }

.sd-tv-review-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sd-tv-review-row:last-child { border-bottom: none; }
.sd-tv-review-text { flex: 1; min-width: 0; }

.sd-tv-review-name {
    font-size: var(--sd-font-sm);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-tv-review-why {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

/* ---------- Raster (SPEC 2.5: Seitenleiste 340/372/672/800/880, Abstand 12/20/32) ---------- */

.sd-tv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 12px;
    row-gap: 12px;
    align-items: start;
}

.sd-tv-main,
.sd-tv-sidecol {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.sd-tv-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 12px;
    align-items: start;
    min-width: 0;
}

@container sd (min-width: 1150px) {
    .sd-tv-grid { grid-template-columns: minmax(0, 1fr) 372px; }
}

@container sd (min-width: 1400px) {
    .sd-tv-grid { grid-template-columns: minmax(0, 1fr) 672px; column-gap: 20px; }
    .sd-tv-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@container sd (min-width: 1800px) {
    .sd-tv-grid { grid-template-columns: minmax(0, 1fr) 800px; column-gap: 32px; }
    .sd-tv-side { column-gap: 16px; }
}

@container sd (min-width: 2200px) {
    .sd-tv-grid { grid-template-columns: minmax(0, 1fr) 880px; }
}

@container sd (max-width: 860px) {
    .sd-tv-grid { grid-template-columns: minmax(0, 1fr); }
    .sd-tv-head { flex-wrap: wrap; }
}

/* Fokusmodus: nur Hauptspalte, ab 1.600 px höchstens 1.240 breit, mittig */
.sd-tv--focus .sd-tv-grid { grid-template-columns: minmax(0, 1fr); }

@container sd (min-width: 1600px) {
    .sd-tv--focus .sd-tv-grid { max-width: 1240px; margin: 0 auto; }
}

/* ---------- Karten der Ticketansicht ---------- */

.sd-tv .sd-card-head {
    min-height: 0;
    padding: 10px 14px;
}

.sd-tv .sd-card-head h2 {
    font-size: var(--sd-font-sm);
    letter-spacing: -.01em;
}

.sd-tv-card-body { padding: 12px 14px; }

.sd-tv-empty {
    padding: 12px 14px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-faint);
}

.sd-tv-head-note {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-tv-time .sd-card-head-end { flex: 1; margin-left: 0; }

.sd-tv-headlink,
.sd-tv-linkbtn {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    white-space: nowrap;
    cursor: pointer;
}

.sd-tv-headlink:hover,
.sd-tv-linkbtn:hover { color: var(--icp-primary); text-decoration: underline; }
.sd-tv-headsep { color: var(--icp-icon-idle); }

.sd-tv-caps { margin-bottom: 6px; }

.sd-tv-caps-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 6px;
}

.sd-tv-caps-row .sd-label-caps { flex: 1; }

.sd-tv-caps-note {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
}

/* „Mir zuweisen“ neben ZUSTÄNDIG */
.sd-tv-caps-link {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}
.sd-tv-caps-link:hover { text-decoration: underline; }

.sd-tv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 0 14px;
}

.sd-tv-row-label {
    width: 118px;
    flex: 0 0 118px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

.sd-tv-row-value {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-base);
    font-weight: 500;
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-row-value--empty { color: var(--icp-text-weak); }
.sd-tv-rows { padding: 4px 0 8px 0; }

.sd-tv-collapse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    color: var(--icp-text-muted);
    cursor: pointer;
}

/* Eigenschaften */
.sd-tv-props-grids {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px 6px 14px;
}

.sd-tv-tech { display: block; }
.sd-tv-proprows { padding: 2px 0 6px 0; }
.sd-tv-proprow-anchor { display: block; }

.sd-tv-proprow {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 0 14px;
    cursor: pointer;
}

.sd-tv-proprow:hover { background: var(--icp-surface-alt); }
.sd-tv-proprow--static { cursor: default; }
.sd-tv-proprow--static:hover { background: transparent; }

.sd-tv-proprow-label {
    width: 118px;
    flex: 0 0 118px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

.sd-tv-proprow-value {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-base);
    font-weight: 500;
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-proprow-value--empty { color: var(--icp-text-weak); }

.sd-tv-proprow-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sd-tag.sd-tv-tag {
    padding: 0 6px;
    border: 1px solid var(--icp-border);
    border-radius: 4px;
    background: var(--icp-neutral-soft);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-soft);
    line-height: 18px;
}

.sd-tv-addtag {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-link);
    line-height: 20px;
}

.sd-tv-pop-body { padding: 4px; }
.sd-tv-pop-body--line { padding: 2px 4px 6px 4px; }

/* SLA */
.sd-tv-clocks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px 14px;
}

/* Kontakt */
.sd-tv-contact-person,
.sd-tv-contact-company {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    font-size: var(--sd-font-base);
}

.sd-tv-contact-company {
    gap: 7px;
    border-top: 1px solid var(--icp-surface-head);
}

.sd-tv-contact-namerow,
.sd-tv-contact-companyrow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-tv-contact-name {
    font-size: var(--sd-font-sm);
    font-weight: 600;
    color: var(--icp-text);
}

.sd-tv-contact-name--empty { font-weight: 500; color: var(--icp-text-weak); }

.sd-tv-vip {
    padding: 0 5px;
    border: 1px solid var(--icp-warning-border);
    border-radius: 4px;
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-2xs);
    font-weight: 700;
    letter-spacing: .04em;
}

.sd-tv-contact-role { color: var(--icp-text-subtle); }

.sd-tv-contact-lines {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 2px;
}

.sd-tv-contact-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-link);
    text-decoration: none;
    cursor: pointer;
}

.sd-tv-contact-line:hover { color: var(--icp-primary); text-decoration: underline; }
.sd-tv-contact-suffix { color: var(--icp-text-faint); font-size: var(--sd-font-xs); }

.sd-tv-contact-open,
.sd-tv-contact-open a {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
    text-decoration: none;
}

.sd-tv-contact-open a:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-tv-contact-companyrow { align-items: baseline; gap: 6px; }

.sd-tv-contact-companyname {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: var(--icp-text);
}

.sd-tv-contact-number {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-tv-kv {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sd-tv-kv-label {
    width: 104px;
    flex: 0 0 104px;
    color: var(--icp-text-subtle);
}

.sd-tv-kv-value {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    color: var(--icp-text-body);
}

.sd-tv-kv-value--empty { color: var(--icp-text-weak); }

.sd-tv-kv-link {
    font-weight: 600;
    color: var(--icp-link);
    text-decoration: none;
}

.sd-tv-kv-link:hover { color: var(--icp-primary); text-decoration: underline; }
.sd-tv-kv-more { color: var(--icp-text-faint); }

.sd-tv-kv-system {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--sd-font-meta);
}

.sd-tv-kv-system .sd-dot { width: 6px; height: 6px; }
.sd-tv-contact-company .sd-hours { margin-top: 2px; }
.sd-tv-contact-company .sd-hours-label { font-size: var(--sd-font-base); color: var(--icp-text-muted); }
.sd-tv-contact-company .sd-hours-text { font-size: var(--sd-font-base); }

.sd-tv-contact-know {
    padding: 10px 14px 12px 14px;
    border-top: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-tv-contact-tickets {
    border-top: 1px solid var(--icp-surface-head);
    padding: 8px 14px 10px 14px;
    font-size: var(--sd-font-base);
}

.sd-tv-contact-tickets summary {
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sd-tv-contact-listtitle {
    margin: 8px 0 2px 0;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-meta);
}

/* Zeiterfassung */
.sd-tv-timer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sd-tv-timer-clock {
    flex: 1;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--icp-icon-idle);
}

.sd-tv-timer-clock--running { color: var(--icp-primary); }

.sd-tv-timer-other {
    flex-basis: 100%;
    order: 3;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-tv-timer-btn {
    height: 32px;
    padding: 0 11px;
    font-size: var(--sd-font-meta);
    gap: 5px;
}

.sd-tv-key { color: var(--icp-text-weak); font-weight: 600; }
.sd-btn--primary .sd-tv-key { color: var(--icp-primary-accent); }
.sd-tv-time-flag { display: inline-flex; color: var(--icp-warning-dot); }

.sd-tv-time-review {
    margin: 10px 14px 4px 14px;
    padding: 8px 10px;
    border: 1px solid var(--icp-warning-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-meta);
}

.sd-tv-time-review-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.sd-tv-time-review ul { margin: 4px 0; padding-left: 20px; }

.sd-tv-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 14px;
    border: none;
    border-bottom: 1px solid var(--icp-border-soft);
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    text-align: left;
    cursor: pointer;
}

.sd-tv-entry:hover { background: var(--icp-surface-alt); }
.sd-tv-entry:last-child { border-bottom: none; }

.sd-tv-entry-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sd-tv-entry-what {
    color: var(--icp-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-entry-meta {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
}

.sd-tv-entry-missing { color: var(--icp-warning); }

.sd-tv-entry-dur {
    font-weight: 600;
    color: var(--icp-text);
    white-space: nowrap;
}

/* Betroffen */
.sd-tv-aff-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
    cursor: pointer;
}

.sd-tv-aff-row:hover,
.sd-tv-aff-row--open { background: var(--icp-bg-soft); }

.sd-tv-aff-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-info-soft);
    color: var(--icp-info);
}

.sd-tv-aff-icon--sm { width: 24px; height: 24px; flex-basis: 24px; }

.sd-tv-aff-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sd-tv-aff-name {
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-aff-sub {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-pill.sd-tv-aff-state {
    gap: 5px;
    padding: 0 8px;
    font-size: var(--sd-font-xs);
}

.sd-tv-aff-remove {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 0;
    border: none;
    border-radius: var(--icp-radius-chip);
    background: transparent;
    color: var(--icp-neutral-dot);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.sd-tv-aff-remove:hover { background: var(--icp-danger-soft); color: var(--icp-danger); }

.sd-tv-aff-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px 10px 52px;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface-alt);
    font-size: var(--sd-font-meta);
}

.sd-tv-aff-grid {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 3px 10px;
}

.sd-tv-aff-grid > span:nth-child(odd) { color: var(--icp-text-subtle); }

.sd-tv-aff-othertitle,
.sd-tv-aff-none {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-weak);
}

.sd-tv-aff-othertitle { margin-top: 2px; font-weight: 600; color: var(--icp-text-meta); }

.sd-tv-aff-other {
    display: flex;
    gap: 7px;
    min-width: 0;
    text-decoration: none;
}

.sd-tv-aff-other-num { flex: 0 0 auto; color: var(--icp-text-meta); }
.sd-tv-aff-other-subject { color: var(--icp-link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-tv-aff-other-status { flex: 0 0 auto; color: var(--icp-text-weak); }
.sd-tv-aff-other:hover .sd-tv-aff-other-subject { text-decoration: underline; }

.sd-tv-aff-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 600;
}

.sd-tv-aff-links a { color: var(--icp-link); text-decoration: none; }
.sd-tv-aff-links a:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-tv-aff-picker {
    border-top: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-tv-aff-pick-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sd-tv-aff-search.sd-input { flex: 1 1 160px; min-width: 0; height: 30px; width: auto; }

.sd-tv-aff-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sd-tv-aff-kinds .sd-chip { border-radius: var(--icp-radius-chip); padding: 0 8px; font-size: var(--sd-font-xs); }

.sd-tv-aff-hint {
    padding: 7px 12px 2px 12px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-subtle);
}

.sd-tv-aff-list { max-height: 260px; overflow-y: auto; }

.sd-tv-aff-pick-empty {
    padding: 10px 12px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-tv-aff-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 7px 12px;
    border: none;
    border-top: 1px solid var(--icp-border-soft);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.sd-tv-aff-option:hover { background: var(--icp-surface-hover); }
.sd-tv-aff-option--on { background: var(--icp-primary-tint); }

.sd-tv-aff-pickstate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--sd-font-xs);
    color: var(--sd-t-fg);
    white-space: nowrap;
}

.sd-tv-aff-pickstate .sd-dot { width: 6px; height: 6px; }

/* Verknüpft */
.sd-tv-rel-progress {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 9px 14px 6px 14px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-tv-rel-progress > span:first-child { flex: 1; font-weight: 600; }

.sd-tv-rel-bar {
    flex-basis: 100%;
    height: 4px;
    border-radius: 3px;
    background: var(--icp-chart-track);
    overflow: hidden;
}

.sd-tv-rel-fill { height: 4px; border-radius: 3px; background: var(--icp-success-dot); }

.sd-tv-rel-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
    cursor: pointer;
}

.sd-tv-rel-row:hover { background: var(--icp-surface-alt); }
.sd-tv-rel-row:last-child { border-bottom: none; }
.sd-tv-rel-icon { display: inline-flex; color: var(--icp-text-weak); }

.sd-tv-rel-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sd-tv-rel-title {
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-rel-sub {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
}

.sd-tv-rel-remove { opacity: 0; }
.sd-tv-rel-row:hover .sd-tv-rel-remove,
.sd-tv-rel-remove:focus-visible { opacity: 1; }

/* To-dos */
.sd-tv-todo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
}

.sd-tv-todo-text {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-base);
    color: var(--icp-text-body);
}

.sd-tv-todo--done .sd-tv-todo-text { color: var(--icp-text-weak); text-decoration: line-through; }

.sd-tv-todo-due {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
    white-space: nowrap;
}

.sd-tv-todo--overdue .sd-tv-todo-due { color: var(--icp-danger); font-weight: 600; }
.sd-tv-todo-remove { opacity: 0; width: 22px; height: 22px; }
.sd-tv-todo:hover .sd-tv-todo-remove,
.sd-tv-todo-remove:focus-visible { opacity: 1; }

.sd-tv-todo-add {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-tv-todo-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sd-tv-todo-add-row .sd-input { width: auto; flex: 1 1 110px; height: 30px; }
.sd-tv-todo-add-actions { justify-content: flex-end; }

/* Ticket aus dem Portal */
.sd-tv-request-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--icp-surface-head);
}

.sd-tv-request-grid > div {
    min-width: 0;
    padding: 10px 14px;
    background: var(--icp-surface);
}

.sd-tv-request-grid .sd-label-caps { margin-bottom: 3px; }
.sd-tv-request-wide { grid-column: 1 / -1; }

.sd-tv-request-value {
    font-size: var(--sd-font-sm);
    font-weight: 500;
    color: var(--icp-text);
    overflow-wrap: anywhere;
}

.sd-tv-request-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--sd-font-base);
}

.sd-tv-request-table th {
    padding: 6px 14px;
    background: var(--icp-surface-alt);
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-text-faint);
    text-align: right;
}

.sd-tv-request-table th:first-child,
.sd-tv-request-table td:first-child { text-align: left; }

.sd-tv-request-table td {
    padding: 7px 14px;
    border-top: 1px solid var(--icp-border-soft);
    text-align: right;
}

.sd-tv-request-delta { font-weight: 600; }

/* ---------- Gesprächskarte ---------- */

.sd-tv-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 10px;
    border-bottom: 1px solid var(--icp-border);
}

.sd-tv-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-sm);
    font-weight: 500;
    color: var(--icp-text-meta);
    cursor: pointer;
}

.sd-tv-tab:hover,
.sd-tv-tab--open { color: var(--icp-primary); }

.sd-tv-tab--active {
    font-weight: 600;
    color: var(--icp-primary);
    box-shadow: inset 0 -2px 0 var(--icp-primary);
}

.sd-tv-tab-count {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-weak);
}

.sd-btn.sd-tv-focus {
    height: 28px;
    padding: 0 8px;
    gap: 5px;
    border-radius: var(--icp-radius-xs);
    font-size: var(--sd-font-meta);
    color: var(--icp-text-soft);
}

.sd-btn.sd-tv-focus:hover { background: var(--icp-surface-hover); color: var(--icp-primary); }

.sd-tv-conv .icp-ticket-attachments { margin: 10px 14px 0 14px; }
.sd-tv-summary { margin: 14px 14px 0 14px; }
.sd-tv-thread { min-width: 0; }

.sd-tv-order {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 8px 10px;
}

/* Antwortbereich */
.sd-composer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px 14px;
    border-bottom: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-composer--collapsed { padding: 10px 14px; }
.sd-composer--warm { background: var(--icp-warning-soft); }
.sd-tv-thread + .sd-composer { border-top: 1px solid var(--icp-surface-head); border-bottom: none; }

.sd-composer-modes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 6px;
}

.sd-composer-mode {
    height: 32px;
    padding: 0 11px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text-meta);
    cursor: pointer;
}

.sd-composer-mode:hover { color: var(--icp-primary); }

.sd-composer-mode--active,
.sd-composer-mode--active:hover {
    background: var(--icp-surface);
    color: var(--icp-text);
    box-shadow: 0 0 0 1px var(--icp-border), 0 1px 2px rgba(16, 24, 40, .06);
}

.sd-composer-mode--note.sd-composer-mode--active { color: var(--icp-warning); }

.sd-composer-key {
    margin-left: 2px;
    font-weight: 500;
    color: var(--icp-text-weak);
}

.sd-composer-draft {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-faint);
}

.sd-composer .sd-btn--30 { padding: 0 9px; gap: 5px; }

.sd-btn.sd-composer-ai {
    border-color: var(--icp-primary-border);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
}

.sd-composer-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-composer-label {
    width: 28px;
    flex: 0 0 28px;
    color: var(--icp-text-weak);
}

.sd-composer-to {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 500;
    color: var(--icp-text-body);
    text-align: left;
    cursor: pointer;
}

.sd-composer-to:disabled { cursor: default; }
.sd-composer-to:not(:disabled):hover { color: var(--icp-primary); }
.sd-composer-to--muted { color: var(--icp-text-weak); }
.sd-composer-to--static { cursor: default; }

.sd-composer-link {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sd-composer-link:hover { color: var(--icp-primary); text-decoration: underline; }
.sd-composer-from { color: var(--icp-text-meta); white-space: nowrap; }

.sd-composer-from-select {
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-body);
}

.sd-composer-chips { flex: 1 1 280px; min-width: 200px; max-width: 520px; }
.sd-composer-chips--fwd { flex: 0 1 280px; }
.sd-composer .icp-chipin-box { min-height: 28px; padding: 2px 6px; }
.sd-composer .icp-chipin-input { font-size: var(--sd-font-meta); }
.sd-composer-more { margin-left: auto; }

.sd-composer-ccgrid {
    display: grid;
    grid-template-columns: 28px minmax(0, 520px);
    align-items: center;
    gap: 6px 10px;
    font-size: var(--sd-font-meta);
}

.sd-composer .sd-toggle { font-size: var(--sd-font-meta); }

.sd-composer-collision {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--icp-warning-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-base);
}

.sd-composer-collision .sd-icon { color: var(--icp-warning-dot); }
.sd-composer-collision-text { flex: 1; font-weight: 600; }

.sd-composer-collision-cancel,
.sd-composer-collision-send {
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--icp-warning-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-warning);
    cursor: pointer;
}

.sd-composer-collision-send {
    border-color: var(--icp-warning);
    background: var(--icp-warning);
    color: #fff;
}

/* Plan 3.22: Schöner schreiben / Übersetzen – Vorschlag neben dem Original */
.sd-btn.sd-composer-assist { color: var(--icp-text-body); }
.sd-btn.sd-composer-assist .sd-icon { color: var(--icp-primary); }

.sd-composer-proposal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-surface);
}

.sd-composer-proposal-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.sd-composer-proposal-head > .sd-icon { color: var(--icp-primary); }
.sd-composer-proposal-title { font-size: var(--sd-font-base); font-weight: 600; color: var(--icp-text); }

.sd-composer-proposal-warn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-warning-soft);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-warning);
}

.sd-composer-proposal-warn .sd-icon { color: var(--icp-warning-dot); }

.sd-composer-proposal-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

@media (max-width: 900px) {
    .sd-composer-proposal-cols { grid-template-columns: minmax(0, 1fr); }
}

.sd-composer-proposal-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface-alt);
}

.sd-composer-proposal-col--new { border-color: var(--icp-primary-border); background: var(--icp-primary-soft); }

.sd-composer-proposal-label {
    padding: 6px 10px 0 10px;
    font-size: var(--sd-font-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-composer-proposal-body,
.sd-composer-original {
    max-height: 260px;
    overflow: auto;
    padding: 4px 10px 8px 10px;
    font-size: var(--sd-font-sm);
    line-height: 1.5;
    color: var(--icp-text-body);
    overflow-wrap: anywhere;
}

.sd-composer-proposal-body p,
.sd-composer-original p { margin: 0 0 6px 0; }
.sd-composer-proposal-body img,
.sd-composer-original img { max-width: 100%; max-height: 120px; width: auto; height: auto; }

.sd-composer-origline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--sd-font-meta);
}

.sd-composer-origline-meta { color: var(--icp-text-weak); }

.sd-composer-original {
    border: 1px dashed var(--icp-border-strong);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
    padding-top: 8px;
}

.sd-composer .e-richtexteditor {
    border-color: var(--icp-border-strong);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
}

.sd-composer--warm .e-richtexteditor { border-color: var(--icp-warning-border); }
.sd-composer .e-richtexteditor .e-rte-content .e-content { min-height: 112px; font-size: var(--sd-font-sm); line-height: 1.5; }

.sd-composer .e-richtexteditor.e-focused {
    border-color: var(--icp-primary);
    box-shadow: 0 0 0 3px var(--icp-primary-ring);
}

.sd-composer-fwdopts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.sd-composer-time {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.sd-composer-time-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.sd-composer-time-icon { color: var(--icp-text-subtle); }

.sd-composer-time-label {
    margin-right: 2px;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-text-muted);
}

.sd-composer-time .sd-stepper { margin-left: 4px; }

.sd-composer-types {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sd-composer-types .sd-chip { padding: 0 8px; font-weight: 600; }

.sd-composer-billing {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-composer-billhint {
    margin-left: -8px;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
}

.sd-composer-more { font-weight: 700; letter-spacing: .05em; }

.sd-composer-timefull {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.sd-composer-timefull .icp-reply-time { width: 100%; }

.sd-composer-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.sd-composer-hint {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-composer-send {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

/* Verlauf */
.sd-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px;
}

.sd-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    scroll-margin-top: 80px;
}

.sd-msg-box {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius);
    background: var(--icp-surface-alt);
}

.sd-msg--employee .sd-msg-box {
    border-color: var(--icp-primary-border);
    background: var(--icp-primary-soft);
}

.sd-msg--note .sd-msg-box {
    border: 1px dashed var(--icp-warning-dot);
    background: var(--icp-warning-soft);
}

.sd-msg-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
}

.sd-msg-author { font-weight: 600; color: var(--icp-text); }
.sd-msg-when { white-space: nowrap; }

.sd-msg-internal {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 6px;
    border: 1px solid var(--icp-warning-border);
    border-radius: var(--icp-radius-chip);
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-meta);
    font-weight: 600;
}

.sd-msg-raw {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-link);
    text-decoration: none;
}

.sd-msg-mailhead {
    margin-top: 1px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-subtle);
    overflow-wrap: anywhere;
}

.sd-msg-body {
    margin-top: 4px;
    font-size: var(--sd-font-sm);
    line-height: 1.5;
    color: var(--icp-text-body);
    overflow-wrap: anywhere;
}

.sd-msg-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sd-filepill-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-filepill--blocked { color: var(--icp-text-meta); }
.sd-filepill:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }

.sd-msg-event {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 44px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-soft);
}

.sd-msg-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--icp-neutral-dot);
}

.sd-msg-event--internal .sd-msg-event-dot { background: var(--icp-warning-dot); }
.sd-msg-event-when { color: var(--icp-text-weak); }

/* ---------- Menüs, Zeitleiste, Zusammenführen ---------- */

.sd-tv-menu-empty {
    padding: 8px 10px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-faint);
}

.sd-tv-menu-empty a { color: var(--icp-link); font-weight: 600; }
.sd-tv-menu-search { padding: 2px 2px 6px 2px; }
.sd-tv-menu-scroll { max-height: 360px; overflow-y: auto; }
.sd-tv-menu-scroll--tall { max-height: min(70vh, 640px); }
.sd-tv-choices { display: block; }

.sd-tv-menu-foot {
    margin-top: 4px;
    padding: 6px 10px 2px 10px;
    border-top: 1px solid var(--icp-surface-head);
}

a.sd-menu-item { text-decoration: none; }

.sd-menu-item.sd-tv-choice {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-tv-choice .sd-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-tv-choice .sd-menu-sub { flex: 0 0 auto; }
.sd-tv-choice--on { background: var(--icp-primary-tint); }
/* Tastatur (Pfeiltasten) – hervorgehobener Eintrag der Auswahl */
.sd-tv-choice--active,
.sd-tv-choice--active:hover { background: var(--icp-surface-hover); box-shadow: inset 2px 0 0 var(--icp-primary); }

/* CC in der Seitenleiste: Chips je Person mit ×, „+ CC“ */
.sd-tv-cc { display: block; }
.sd-tv-cc-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 26px;
}
.sd-tv-cc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    max-width: 100%;
    padding: 0 2px 0 4px;
    border: 1px solid var(--icp-border);
    border-radius: 12px;
    background: var(--icp-surface);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text);
}
.sd-tv-cc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-tv-cc-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}
.sd-tv-cc-remove:hover,
.sd-tv-cc-remove:focus-visible { background: var(--icp-danger-soft, var(--icp-surface-hover)); color: var(--icp-danger, var(--icp-text)); }
.sd-tv-cc-add {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 24px;
    padding: 0 8px;
    border: 1px dashed var(--icp-border);
    border-radius: 12px;
    background: transparent;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}
.sd-tv-cc-add:hover { background: var(--icp-surface-hover); }
.sd-tv-choice-check { color: var(--icp-primary); }
.sd-tv-canned-item .sd-menu-label { font-weight: 600; }

.sd-tv-tl-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-input.sd-tv-tl-actor { width: auto; height: 28px; font-size: var(--sd-font-meta); }
.sd-tv-tl { padding: 6px 0; }

.sd-tv-tl-head,
.sd-tv-tl-row {
    display: grid;
    /* Datum und Uhrzeit vollständig („19.11.2026 11:35“), der Satz bekommt den Rest und bricht um */
    grid-template-columns: 17ch minmax(0, 1fr);
    gap: 14px;
    padding: 0 14px;
}

.sd-tv-tl-head {
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--icp-border);
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-text-faint);
}

.sd-tv-tl-row {
    align-items: baseline;
    min-height: 38px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--icp-border-soft);
    font-size: var(--sd-font-base);
}

.sd-tv-tl-when { color: var(--icp-text-meta); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-tv-tl-text { color: var(--icp-text); line-height: 1.4; overflow-wrap: anywhere; }
/* Profilbild des Agenten vor dem Satz (19.11.2026) */
.sd-tv-tl-text { display: flex; align-items: flex-start; gap: 8px; }
.sd-tv-tl-text > .sd-avatar { margin-top: 1px; }

.sd-tv-merge { display: flex; flex-direction: column; gap: 4px; }
.sd-tv-merge-title { margin: 10px 0 4px 0; }

.sd-tv-merge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 8px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.sd-tv-merge-row:hover { background: var(--icp-surface-hover); }

.sd-tv-merge-num {
    width: 56px;
    flex: 0 0 56px;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text-body);
}

.sd-tv-merge-subject {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-sm);
    color: var(--icp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-tv-merge-when {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
    white-space: nowrap;
}

/* ---------- Druckansicht /tickets/{id}/druck ---------- */

.sd-print-page {
    min-height: 100vh;
    padding: 16px;
    background: var(--icp-bg);
    font-size: var(--sd-font-base);
    color: var(--icp-text);
}

.sd-print-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    max-width: 900px;
    margin: 0 auto 12px auto;
}

.sd-print {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 32px;
    background: var(--icp-surface);
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius);
}

.sd-print-brand {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--icp-text-weak);
}

.sd-print-head h1 {
    margin: 4px 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.sd-print-num { color: var(--icp-text-weak); }

.sd-print-facts {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 3px 12px;
    margin: 0 0 18px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--icp-border);
}

.sd-print-facts dt { color: var(--icp-text-subtle); }
.sd-print-facts dd { margin: 0; }

.sd-print-msg {
    padding: 10px 0 12px 0;
    border-bottom: 1px solid var(--icp-border-soft);
    break-inside: avoid;
}

.sd-print-msg--internal { padding-left: 10px; border-left: 3px solid var(--icp-warning-dot); }

.sd-print-msg-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.sd-print-msg-when { margin-left: auto; color: var(--icp-text-meta); }
.sd-print-msg-mail,
.sd-print-msg-files { font-size: var(--sd-font-meta); color: var(--icp-text-subtle); }
.sd-print-msg-files { margin-top: 4px; }

.sd-print-event {
    padding: 4px 0;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-print-empty { padding: 48px; text-align: center; font-weight: 600; }

@media print {
    .sd-print-page { padding: 0; background: #fff; }
    .sd-print-bar { display: none; }
    .sd-print { max-width: none; padding: 0; border: none; }
}

/* === W2-C Erfassung, Kunde, Anruf === */

/* Neues Ticket (SPEC 2.6) – Seite /tickets/neu und Dialog (Alt+N). Raster nach Inhaltsbreite wie im Design. */

.sd-nt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sd-nt-head {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.sd-nt-head h1 { flex: 1; }

.sd-nt-keys {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-nt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.sd-nt-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.sd-nt-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

@container sd (min-width: 1200px) {
    .sd-nt-grid { grid-template-columns: minmax(0, 1fr) 360px; }
}

@container sd (min-width: 1900px) {
    .sd-nt-grid { grid-template-columns: minmax(0, 1fr) 760px; }
    .sd-nt-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@container sd (min-width: 2300px) {
    .sd-nt { max-width: 2000px; margin: 0 auto; width: 100%; }
}

/* Im Dialog (1.200 px) schon ab 880 px zweispaltig */
@container sd (min-width: 880px) {
    .sd-nt--dialog .sd-nt-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

.sd-nt-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.sd-nt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sd-nt-label {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-meta);
}

.sd-nt-input {
    height: 36px;
    padding: 0 10px;
    border-radius: var(--icp-radius-sm);
}

/* Kandidatenliste der Kundensuche */
.sd-nt-cands {
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    overflow: hidden;
    background: var(--icp-surface);
}

.sd-nt-cand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    border: none;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    font-family: inherit;
    text-align: left;
    color: var(--icp-text);
    cursor: pointer;
}

.sd-nt-cand:hover,
.sd-nt-cand--active { background: var(--icp-bg-soft); }

.sd-nt-cand-text { flex: 1; min-width: 0; }

.sd-nt-cand-name {
    font-size: var(--sd-font-base);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-cand-sub {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-cand-open {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-weak);
    white-space: nowrap;
}

.sd-nt-cand--internal {
    padding: 8px 11px;
    border-bottom: none;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-nt-cand-empty {
    padding: 8px 11px;
    border-bottom: 1px solid var(--icp-border-soft);
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

/* Gewählter Kunde */
.sd-nt-chosen {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-primary-tint);
}

.sd-nt-chosen-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-chosen-name { font-size: var(--sd-font-base); font-weight: 600; }
.sd-nt-chosen-nr { font-size: var(--sd-font-meta); color: var(--icp-text-subtle); }

.sd-nt-link {
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sd-nt-link:hover { color: var(--icp-primary); text-decoration: underline; }

.sd-nt-people {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sd-nt-people .sd-chip { padding: 0 10px; }

.sd-nt-newcontact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-surface-alt);
}

.sd-nt-newcontact-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.sd-nt-hint {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

/* Beschreibung (Rich-Text) */
.sd-nt-editor .e-richtexteditor {
    border-color: var(--icp-border-strong);
    border-radius: var(--icp-radius-sm);
    overflow: hidden;
}

.sd-nt-editor .e-richtexteditor .e-rte-content .e-content {
    min-height: 160px;
    font-size: var(--sd-font-base);
    line-height: 1.5;
}

.sd-nt-editor--internal .e-richtexteditor { border-style: dashed; border-color: var(--icp-warning-dot); }
.sd-nt-editor--internal .e-richtexteditor .e-rte-content { background: var(--icp-warning-soft); }

/* Betrifft */
.sd-nt-aff-chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sd-nt-aff-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 4px 0 8px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-primary-tint);
    font-size: var(--sd-font-meta);
    font-weight: 600;
    color: var(--icp-primary);
}

.sd-nt-x {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.sd-nt-aff {
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    overflow: hidden;
}

.sd-nt-aff-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--icp-surface-head);
    color: var(--icp-text-weak);
}

.sd-nt-aff-search input {
    flex: 1 1 180px;
    min-width: 0;
    height: 26px;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-text);
}

.sd-nt-aff-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sd-nt-aff-kinds .sd-chip { padding: 0 8px; border-radius: var(--icp-radius-chip); font-size: var(--sd-font-xs); }

.sd-nt-aff-hint {
    padding: 7px 11px 3px 11px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-subtle);
}

.sd-nt-aff-list {
    max-height: 264px;
    overflow-y: auto;
}

.sd-nt-aff-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 11px;
    border: none;
    border-top: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    font-family: inherit;
    text-align: left;
    color: var(--icp-text);
    cursor: pointer;
}

.sd-nt-aff-row:hover { background: var(--icp-bg-soft); }
.sd-nt-aff-row--on { background: var(--icp-primary-tint); }

.sd-nt-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1.5px solid var(--icp-icon-idle);
    border-radius: 4px;
    background: var(--icp-surface);
    color: #fff;
}

.sd-nt-aff-row--on .sd-nt-box {
    border-color: var(--icp-primary);
    background: var(--icp-primary);
}

.sd-nt-kind {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: var(--icp-radius-xs);
    background: var(--icp-info-soft);
    color: var(--icp-info);
}

.sd-nt-aff-text { flex: 1; min-width: 0; }

.sd-nt-aff-name {
    font-size: var(--sd-font-base);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-aff-sub {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--sd-font-xs);
    color: var(--sd-t-fg);
    white-space: nowrap;
}

.sd-nt-state .sd-dot { width: 6px; height: 6px; }

.sd-nt-aff-empty {
    padding: 10px 11px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

/* Fußleiste der linken Karte */
.sd-nt-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-nt-foot .sd-toggle { min-width: 0; }
.sd-nt-foot .sd-toggle > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-nt-foot .sd-toggle--off-locked { cursor: default; }
.sd-nt-foot .sd-btn--primary { padding: 0 14px; }

/* Eigenschaften */
.sd-nt-props { padding: 6px 0; }

.sd-nt-prop {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 7px 14px;
}

.sd-nt-prop-label {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-nt-select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-text);
    outline: none;
    cursor: pointer;
}

.sd-nt-select:focus-visible {
    border-color: var(--icp-primary);
    box-shadow: 0 0 0 3px var(--icp-primary-ring);
}

.sd-nt-prio {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 32px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    overflow: hidden;
}

.sd-nt-prio button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 0 4px;
    border: none;
    border-right: 1px solid var(--icp-surface-head);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-text-body);
    cursor: pointer;
}

.sd-nt-prio button:last-child { border-right: none; }
.sd-nt-prio button:hover { color: var(--icp-primary); }
.sd-nt-prio .sd-dot { width: 6px; height: 6px; flex: 0 0 6px; }
.sd-nt-prio button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sd-nt-prio button.sd-nt-prio--on,
.sd-nt-prio button.sd-nt-prio--on:hover {
    background: var(--icp-primary);
    color: #fff;
}

.sd-nt-prio--on .sd-dot { background: #fff; }

.sd-nt-sla {
    margin-top: 4px;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-faint);
}

.sd-nt-divider {
    height: 1px;
    margin: 6px 0;
    background: var(--icp-surface-head);
}

.sd-nt-time {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 6px;
}

/* Weitere Angaben (E8) */
.sd-nt-more-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: none;
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-base);
    font-weight: 600;
    color: var(--icp-text);
    text-align: left;
    cursor: pointer;
}

.sd-nt-more-toggle:hover { color: var(--icp-primary); }
.sd-nt-more-toggle .sd-icon { margin-left: auto; color: var(--icp-text-weak); }

.sd-nt-more-count {
    padding: 0 6px;
    border-radius: var(--icp-radius-chip);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    line-height: 18px;
}

.sd-nt-more-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--icp-surface-head);
}

.sd-nt-urgency {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Rechte Spalte: Hinweis, offene Tickets, Kontakt */
.sd-nt-empty-card {
    padding: 14px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
    line-height: 1.5;
}

.sd-nt-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    font-family: inherit;
    text-align: left;
    color: var(--icp-text);
    cursor: pointer;
}

.sd-nt-open:hover { background: var(--icp-bg-soft); }

.sd-nt-open-line {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.sd-nt-open-num {
    flex: 0 0 auto;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-nt-open-subject {
    font-size: var(--sd-font-base);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-open-sub {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-open-none {
    padding: 12px 14px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-vip {
    padding: 0 5px;
    border-radius: 4px;
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-size: var(--sd-font-2xs);
    font-weight: 700;
    line-height: 17px;
}

.sd-nt-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    font-size: var(--sd-font-base);
}

.sd-nt-contact a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--icp-link);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-nt-facts {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 5px 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--icp-surface-head);
    font-size: var(--sd-font-base);
}

.sd-nt-facts > :nth-child(odd) { color: var(--icp-text-subtle); }

.sd-nt-know {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--icp-surface-head);
}

.sd-nt-know .sd-know { font-size: var(--sd-font-base); }

/* Kundenakte – Reiter „Support“ (KA, docs/KA-Kundenakte-Support.md; vorher die Seite /support/kunden, SPEC 2.7) */

.sd-ku-text { flex: 1; min-width: 0; }

.sd-ku-sub {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-ku-person-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sd-ku-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    padding: 0;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}

.sd-ku-btn:hover { background: var(--icp-primary-soft); color: var(--icp-primary); }

.sd-ka {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sd-ka-head-rule {
    flex: 1 1 260px;
    min-width: 0;
    font-size: var(--sd-font-sm);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ab 1.170 px Reiterbreite: Tickets links, Person, Kundenwissen und Systeme rechts. Darunter (Laptop 1366 px)
   untereinander – sonst reicht die Ticketliste (mind. 812 px) nicht und SLA/Aktionen würden abgeschnitten. */
/* Untereinander mit genug Breite: die Karten rechts nebeneinander statt als lange Spalte */
@container sd (min-width: 760px) and (max-width: 1169.98px) {
    .sd-ka .sd-ku-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@container sd (min-width: 1170px) {
    .sd-ka .sd-ku-inner { grid-template-columns: minmax(0, 1fr) 340px; }
}

.sd-ka-person {
    width: auto;
    max-width: 260px;
    height: 28px;
    font-size: var(--sd-font-meta);
}

.sd-ka-manager { display: flex; align-items: center; gap: 8px; }

.sd-ka-person-head { cursor: default; }
.sd-ka-person-head:hover { background: var(--icp-surface); }

.sd-ka button.sd-card-link {
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.sd-ku-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    padding: 14px 16px;
}

.sd-ku-actions {
    display: flex;
    gap: 7px;
}

.sd-ku-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.sd-ku-tickets-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 46px;
    padding: 6px 14px;
    border-bottom: 1px solid var(--icp-surface-head);
}

.sd-ku-tickets-head h2 {
    margin: 0;
    font-size: var(--sd-font-sm);
    font-weight: 600;
}

.sd-ku-tabs {
    display: flex;
    gap: 4px;
    margin-left: 6px;
}

.sd-ku-tabs .sd-chip { padding: 0 10px; gap: 6px; }
.sd-ku-tab-count { font-weight: 600; opacity: .75; }

.sd-ku-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 14px;
    background: var(--icp-surface-alt);
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-ku-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sd-ku-prow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    color: var(--icp-text);
    text-decoration: none;
    cursor: pointer;
}

.sd-ku-prow:hover { background: var(--icp-bg-soft); text-decoration: none; color: var(--icp-text); }

.sd-ku-prow-name {
    font-size: var(--sd-font-base);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-ku-sub a { color: var(--icp-link); }

.sd-ku-know {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
}

.sd-ku-know .sd-know { font-size: var(--sd-font-base); }

.sd-ku-sys {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 14px;
}

.sd-ku-sys-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--sd-font-base);
    min-width: 0;
}

.sd-ku-sys-name {
    width: 64px;
    flex: 0 0 64px;
    font-weight: 600;
}

.sd-ku-sys-text {
    min-width: 0;
    color: var(--icp-text-meta);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-ku-facts {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 5px 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--icp-surface-head);
    font-size: var(--sd-font-base);
}

.sd-ku-facts > :nth-child(odd) { color: var(--icp-text-subtle); }
.sd-ku-facts > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sd-ku-rows { overflow-x: auto; }
.sd-ku-rows > .sd-row,
.sd-ku-rows > .sd-row-head { min-width: 812px; }

/* Verweise im Support-Design ohne Unterstrich (Design: a{text-decoration:none}), Unterstrich beim Überfahren */
.sd-nt a, .sd-ka a { text-decoration: none; }
.sd-nt a:hover, .sd-ka a:hover { text-decoration: underline; }
.sd-ka a.sd-ku-btn:hover, .sd-ka a.sd-btn:hover { text-decoration: none; }
.sd-ku-sub a, .sd-ku-facts a, .sd-nt-contact a { color: var(--icp-link); }
.sd-ku-sub a:hover, .sd-ku-facts a:hover, .sd-nt-contact a:hover { color: var(--icp-primary); }


/* Anruf-Fenster (SPEC 2.8, docs/TD-Anruf-Fenster.md): Anrufleiste, Raster [Tickets][Formular][Kontakt] nach
   Inhaltsbreite (≥ 1.700 px drei Spalten, ≥ 1.100 px "t f" / "c f", sonst untereinander), Rückruf-Popover. */

.sd-call {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sd-call a { text-decoration: none; }
.sd-call a:hover { text-decoration: underline; }
.sd-call a.sd-btn:hover { text-decoration: none; }

/* Ohne Gespräch */
.sd-call-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px;
    text-align: center;
}

.sd-call-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--icp-bg);
    color: var(--icp-text-weak);
}

.sd-call-empty-title { font-size: 15px; font-weight: 600; }

.sd-call-empty-text {
    max-width: 520px;
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
}

.sd-call-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

/* Anrufleiste */
.sd-call-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 14px;
    overflow: visible;
}

.sd-call-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    background: var(--icp-bg);
    color: var(--icp-text-weak);
}

.sd-call-ring--live {
    background: var(--icp-success-soft);
    color: var(--icp-success-dot);
}

.sd-call-who { min-width: 0; }

.sd-call-dir,
.sd-call-state-label {
    display: block;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
}

.sd-call-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 0;
}

.sd-call-name-main {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.sd-call-name-sub {
    font-size: var(--sd-font-base);
    color: var(--icp-text-meta);
}

.sd-call-divider {
    width: 1px;
    height: 32px;
    flex: 0 0 1px;
    background: var(--icp-border);
}

.sd-call-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--icp-text);
}

.sd-call-time--live { color: var(--icp-success); }

.sd-call-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.sd-call-end {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

/* „Rückruf-Ticket“ wie die Knöpfe der CallControlBar (36 hoch, Radius 8, 12.5 px) */
.sd-btn.sd-call-btn {
    height: 36px;
    padding: 0 11px;
    border-radius: var(--icp-radius-md);
    font-size: 12.5px;
}

.sd-btn.sd-call-btn--open {
    border-color: var(--icp-primary-border);
    color: var(--icp-primary);
}

.sd-btn.sd-call-done {
    background: var(--icp-success-dot);
    border-color: var(--icp-success-dot);
    color: #fff;
}

.sd-btn.sd-call-done:hover { background: var(--icp-success); border-color: var(--icp-success); color: #fff; }

.sd-call-actions .sd-popover {
    top: 42px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 0;
    box-shadow: var(--icp-shadow-popover);
    z-index: 41;
}

/* Schnellerfassung ohne Telefonie */
.sd-call-number {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.sd-call-number .sd-input {
    width: 220px;
    height: 34px;
    border-radius: var(--icp-radius-sm);
}

/* Raster */
.sd-call-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "t" "f" "c";
    gap: 14px;
    align-items: start;
}

.sd-call-area-t { grid-area: t; min-width: 0; }
.sd-call-area-f { grid-area: f; min-width: 0; }
.sd-call-area-c { grid-area: c; min-width: 0; }

@container sd (min-width: 1100px) {
    .sd-call-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
        /* Zeile 1 nur so hoch wie die Tickets – das lange Formular dehnt Zeile 2, nicht die Lücke darüber */
        grid-template-rows: auto 1fr;
        grid-template-areas: "t f" "c f";
    }
}

@container sd (min-width: 1700px) {
    .sd-call-grid {
        grid-template-columns: 340px minmax(0, 1fr) 380px;
        grid-template-rows: auto;
        grid-template-areas: "t f c";
    }
}

@container sd (min-width: 2200px) {
    .sd-call-grid { grid-template-columns: 400px minmax(0, 1fr) 420px; }
}

/* Gewähltes offenes Ticket: ganze Ticketansicht (v) neben Tickets und Anrufnotiz (n); schmal Ticket voll, Kontakt darunter */
.sd-call-area-v { grid-area: v; min-width: 0; }

.sd-call-grid--ticket { grid-template-areas: "t" "n" "v" "c"; }
.sd-call-grid--ticket .sd-call-form { grid-area: n; }

@container sd (min-width: 1100px) {
    .sd-call-grid.sd-call-grid--ticket {
        grid-template-columns: 340px minmax(0, 1fr);
        grid-template-rows: auto auto 1fr;
        grid-template-areas: "t v" "n v" "c v";
    }
}

@container sd (min-width: 1700px) {
    .sd-call-grid.sd-call-grid--ticket {
        grid-template-columns: 340px minmax(0, 1fr) 380px;
        grid-template-rows: auto 1fr;
        grid-template-areas: "t v c" "n v c";
    }
}

@container sd (min-width: 2200px) {
    .sd-call-grid.sd-call-grid--ticket { grid-template-columns: 400px minmax(0, 1fr) 420px; }
}

/* Anrufnotiz in der schmalen Spalte: Kopf und Fuß umbrechen sauber */
.sd-call-grid--ticket .sd-call-form .sd-card-head { flex-wrap: wrap; row-gap: 2px; padding-top: 8px; padding-bottom: 8px; }
.sd-call-grid--ticket .sd-call-saved { flex-basis: 100%; }
.sd-call-grid--ticket .sd-call-saved:empty { display: none; }
.sd-call-grid--ticket .sd-call-form-foot { justify-content: flex-end; }

/* Eingebettete Ticketansicht: Titel etwas kleiner (Seitentitel ist das Gespräch) */
.icp-sd.sd-tv--embedded h1.sd-tv-subject { font-size: 18px; }

@container sd (max-width: 640px) {
    .sd-call-divider { display: none; }
    .sd-call-bar > .sd-spacer { display: none; }
    .sd-call-actions { width: 100%; }
    .sd-call-number .sd-input { width: 100%; flex: 1 1 160px; }
}

/* Radio (16 px Kreis, Punkt 8) */
.sd-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1.5px solid var(--icp-icon-idle);
    border-radius: 50%;
    box-sizing: border-box;
}

.sd-radio::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
}

.sd-call-pick--on .sd-radio,
.sd-cb-person--on .sd-radio { border-color: var(--icp-primary); }

.sd-call-pick--on .sd-radio::after,
.sd-cb-person--on .sd-radio::after { background: var(--icp-primary); }

/* Offene Tickets */
.sd-call-pick {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid var(--icp-border-soft);
    background: var(--icp-surface);
    font-family: inherit;
    color: var(--icp-text);
    text-align: left;
    cursor: pointer;
}

.sd-call-pick:hover { background: var(--icp-bg-soft); }
.sd-call-pick--on,
.sd-call-pick--on:hover { background: var(--icp-primary-tint); }

.sd-call-pick--new {
    display: flex;
    padding: 10px 14px;
}

.sd-call-pick-new {
    font-size: var(--sd-font-base);
    font-weight: 600;
}

.sd-call-pick-text { display: block; min-width: 0; }

.sd-call-pick-line {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.sd-call-pick-num {
    flex: 0 0 auto;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-call-pick-subject {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--sd-font-base);
    font-weight: 500;
}

.sd-call-pick-sub {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
}

.sd-call-pick .sd-sla-sub { display: none; }

.sd-call-none {
    padding: 12px 14px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

/* Formular */
.sd-call-form .sd-card-head { gap: 8px; }

.sd-call-form .sd-card-note {
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
}

.sd-call-form-body { padding: 14px; }

.sd-ct {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.sd-ct .sd-nt-field { gap: 5px; }

.sd-ct-input,
.sd-call .sd-ct-input {
    height: 34px;
    padding: 0 10px;
    border-radius: var(--icp-radius-sm);
}

.sd-ct-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.sd-ct-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sd-ct-chips .sd-chip { padding: 0 10px; }

.sd-ct-prio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 500;
    color: var(--icp-text-body);
    cursor: pointer;
}

.sd-ct-prio:hover { border-color: var(--icp-primary-border); color: var(--icp-primary); }

.sd-ct-prio--on,
.sd-ct-prio--on:hover {
    background: var(--icp-primary);
    border-color: var(--icp-primary);
    color: #fff;
}

.sd-ct-prio--on .sd-dot { background: #fff; }

.sd-ct-ack .sd-toggle--off-locked { cursor: default; }

.sd-ct-more {
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    overflow: hidden;
}

.sd-ct-more .sd-nt-more-toggle { min-height: 38px; padding: 0 12px; }

.sd-call-note {
    min-height: 150px;
    height: auto;
    padding: 9px 10px;
    border-radius: var(--icp-radius-sm);
    line-height: 1.5;
    resize: vertical;
}

.sd-call-book {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 11px;
    border: none;
    border-radius: var(--icp-radius-md);
    background: var(--icp-info-soft);
    font-family: inherit;
    font-size: var(--sd-font-base);
    color: var(--icp-info);
    text-align: left;
    cursor: pointer;
}

.sd-call-book .sd-check { flex: 0 0 16px; pointer-events: none; }
.sd-call-book .sd-check:not(.sd-check--on) { border-color: var(--icp-icon-idle); }

.sd-call-form-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-call-saved {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

/* Kontakt */
.sd-cc-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
}

.sd-cc-who { flex: 1; min-width: 0; }

.sd-cc-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 600;
}

.sd-cc-role {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-cc-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: none;
    border-radius: var(--icp-radius-xs);
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}

.sd-cc-change:hover { background: var(--icp-primary-soft); color: var(--icp-primary); }

.sd-cc-reach {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 14px 12px;
    font-size: var(--sd-font-base);
}

.sd-cc-reach a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--icp-link);
}

.sd-cc-sec {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--icp-surface-head);
}

.sd-cc-label {
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-meta);
}

.sd-cc-facts {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 5px 10px;
    font-size: var(--sd-font-base);
}

.sd-cc-facts > div:nth-child(odd) { color: var(--icp-text-subtle); }

.sd-cc-sys {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: var(--sd-font-base);
}

.sd-cc-sys-name { width: 64px; flex: 0 0 64px; font-weight: 600; }

.sd-cc-sys-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--icp-text-meta);
}

.sd-cc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid var(--icp-surface-head);
    font-size: var(--sd-font-meta);
    font-weight: 600;
}

.sd-cc-links a { color: var(--icp-link); }

.sd-cc-unknown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
}

.sd-cc-unknown-title { font-size: 15px; font-weight: 600; }

.sd-cc-unknown-text {
    font-size: var(--sd-font-meta);
    color: var(--icp-text-meta);
}

.sd-cc-search { padding: 0 14px 10px; }

.sd-cc-search .sd-input {
    height: 34px;
    padding: 0 10px;
    border-radius: var(--icp-radius-sm);
}

.sd-cc-cand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sd-cc-cand--row {
    padding: 8px 14px;
    border-top: 1px solid var(--icp-border-soft);
}

.sd-cc-cand-text { flex: 1; min-width: 0; }

.sd-cc-cand-name {
    font-size: var(--sd-font-base);
    font-weight: 600;
}

.sd-cc-cand-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
}

.sd-btn.sd-cc-btn {
    height: 28px;
    padding: 0 10px;
    border-radius: var(--icp-radius-xs);
    font-size: var(--sd-font-meta);
}

.sd-btn.sd-cc-btn--on {
    border-color: var(--icp-primary-border);
    background: var(--icp-primary-tint);
    color: var(--icp-primary);
}

.sd-cc-none {
    padding: 8px 14px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-cc-foot {
    padding: 10px 14px;
    border-top: 1px solid var(--icp-surface-head);
}

.sd-cc-foot--inline { padding: 2px 0 0; border-top: none; }

.sd-cc-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-surface-alt);
}

.sd-cc-new-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.sd-cc-new-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sd-input.sd-input--error { border-color: var(--icp-danger-dot); }

.sd-cc-error { font-size: var(--sd-font-xs); color: var(--icp-danger); }

.sd-cc-new-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Rückruf-Popover (460) */
.sd-cb { display: flex; flex-direction: column; }

.sd-cb-head { padding: 11px 14px 4px; }
.sd-cb-title { font-size: var(--sd-font-base); font-weight: 600; }
.sd-cb-sub { font-size: var(--sd-font-xs); color: var(--icp-text-subtle); }

.sd-cb-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 14px 0;
}

.sd-cb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sd-cb-sugg {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sd-cb-sugg-chip {
    height: 24px;
    padding: 0 8px;
    border: 1px solid var(--icp-primary-border);
    border-radius: var(--icp-radius-chip);
    background: var(--icp-primary-tint);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 500;
    color: var(--icp-primary);
    cursor: pointer;
}

.sd-cb-label {
    padding: 8px 14px 2px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-meta);
}

.sd-cb-person {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 14px;
    border: none;
    background: var(--icp-surface);
    font-family: inherit;
    color: var(--icp-text);
    text-align: left;
    cursor: pointer;
}

.sd-cb-person:hover { background: var(--icp-bg-soft); }
.sd-cb-person--on,
.sd-cb-person--on:hover { background: var(--icp-primary-tint); }

.sd-cb-person-text { display: flex; flex-direction: column; min-width: 0; }
.sd-cb-person-name { font-size: var(--sd-font-base); font-weight: 600; }
.sd-cb-person-presence { font-size: var(--sd-font-xs); color: var(--sd-t-fg); }

.sd-cb-note { padding: 10px 14px 0; }

.sd-cb-textarea {
    min-height: 72px;
    height: auto;
    padding: 8px 10px;
    border-radius: var(--icp-radius-sm);
    line-height: 1.45;
    resize: vertical;
}

.sd-cb-when { padding: 12px 14px 0; }

.sd-cb-dues {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
    height: 32px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-sm);
    overflow: hidden;
}

.sd-cb-dues button {
    min-width: 0;
    padding: 0 6px;
    border: none;
    border-right: 1px solid var(--icp-surface-head);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-meta);
    font-weight: 500;
    color: var(--icp-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.sd-cb-dues button:last-child { border-right: none; }

.sd-cb-dues button.sd-cb-due--on {
    background: var(--icp-primary);
    color: #fff;
}

.sd-cb-cal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 0;
}

.sd-cb-cal-head { display: flex; align-items: center; gap: 8px; }

.sd-cb-days {
    display: flex;
    height: 26px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    overflow: hidden;
}

.sd-cb-days button {
    padding: 0 10px;
    border: none;
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text-body);
    cursor: pointer;
}

.sd-cb-days button.sd-cb-day--on { background: var(--icp-primary); color: #fff; }

.sd-cb-slots {
    border: 1px solid var(--icp-surface-head);
    border-radius: var(--icp-radius-md);
    overflow: hidden;
}

.sd-cb-slot {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid var(--icp-border-soft);
}

.sd-cb-slot:first-child { border-top: none; }

.sd-cb-slot--now {
    background: var(--icp-primary-tint);
    box-shadow: inset 3px 0 0 var(--icp-primary);
}

.sd-cb-slot-time { font-size: var(--sd-font-meta); font-weight: 600; color: var(--icp-text-body); }

.sd-cb-slot-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--sd-font-meta);
}

.sd-cb-slot-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--sd-t-fg);
    white-space: nowrap;
}

.sd-cb-slot-none {
    padding: 9px 10px;
    font-size: var(--sd-font-meta);
    color: var(--icp-text-faint);
}

.sd-cb-link {
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: var(--icp-link);
    cursor: pointer;
}

.sd-cb-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--icp-surface-head);
    background: var(--icp-surface-alt);
}

.sd-cb-hint {
    flex: 1;
    min-width: 0;
    font-size: var(--sd-font-xs);
    color: var(--icp-text-subtle);
}

/* =====================================================================
   T4 Regeln & Verteilung (Einstellungen → Tickets → Regeln, docs/T4-Regeln.md)
   ===================================================================== */

.icp-rules-master {
    display: inline-flex;
    align-items: center;
    gap: var(--icp-space-2);
    font-size: var(--icp-font-sm);
    color: var(--icp-text-body);
    cursor: pointer;
}

.icp-rules-table { table-layout: fixed; width: 100%; }
.icp-rules-table td { vertical-align: top; overflow: hidden; }
.icp-rules-table th.icp-sort-handle-cell { width: 36px; }
.icp-rules-table th.icp-col-num { width: 64px; }
.icp-rules-table th.icp-col-switch { width: 72px; }
.icp-rules-name { display: flex; align-items: baseline; gap: var(--icp-space-2); min-width: 0; }
.icp-rules-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icp-rules-summary {
    display: flex;
    flex-direction: column;
    margin-top: 2px;
    min-width: 0;
    font-size: var(--icp-font-xs);
    color: var(--icp-text-muted);
}
.icp-rules-when, .icp-rules-then { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icp-rules-then { color: var(--icp-text-body); }
.icp-rules-arrow { margin-right: 4px; vertical-align: -2px; color: var(--icp-text-faint); }
.icp-rules-table th.icp-rules-actions-col { width: 152px; }

/* Editor */
.icp-rule-editor { display: flex; flex-direction: column; gap: var(--icp-space-4); }
.icp-rule-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; }
.icp-rule-head .icp-span-3 { grid-column: 1 / -1; }
.icp-rule-block {
    display: flex;
    flex-direction: column;
    gap: var(--icp-space-2);
    padding: var(--icp-space-3);
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface-alt);
}
.icp-rule-block-head { display: flex; align-items: center; justify-content: space-between; gap: var(--icp-space-2); }
.icp-rule-block-title { font-size: var(--icp-font-sm); font-weight: 600; color: var(--icp-text-strong); }
.icp-rule-empty { font-size: var(--icp-font-sm); color: var(--icp-text-muted); }
.icp-rule-joiner {
    align-self: flex-start;
    padding: 0 var(--icp-space-2);
    border-radius: var(--icp-radius-chip);
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-size: var(--icp-font-xs);
    font-weight: 600;
}
.icp-rule-group {
    display: flex;
    flex-direction: column;
    gap: var(--icp-space-2);
    padding: var(--icp-space-2) var(--icp-space-3);
    border: 1px solid var(--icp-border-soft, var(--icp-border));
    border-radius: var(--icp-radius-sm);
    background: var(--icp-surface);
}
.icp-rule-group-head { display: flex; align-items: center; gap: var(--icp-space-2); }
.icp-rule-group-title { flex: 1; font-size: var(--icp-font-xs); font-weight: 600; color: var(--icp-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.icp-rule-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(130px, .9fr) minmax(0, 2fr) 32px;
    gap: var(--icp-space-2);
    align-items: start;
}
.icp-rule-row--action { grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr) auto; }
.icp-rule-cell { min-width: 0; }
.icp-rule-move { display: flex; gap: 2px; }
.icp-rule-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--icp-space-2); }
.icp-rule-pair--inline { grid-template-columns: 120px auto; align-items: center; justify-content: start; }
.icp-rule-stack { display: flex; flex-direction: column; gap: var(--icp-space-2); }
.icp-rule-flags { display: flex; flex-wrap: wrap; gap: var(--icp-space-2) var(--icp-space-4); }
.icp-rule-secret { display: flex; gap: var(--icp-space-1); align-items: center; }
.icp-rule-timeout { max-width: 260px; }
.icp-rule-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.icp-rule-error { padding: var(--icp-space-2) var(--icp-space-3); border-radius: var(--icp-radius-sm); background: var(--icp-danger-soft); }
.e-dialog.icp-rule-dialog .e-footer-content { display: flex; justify-content: flex-end; gap: var(--icp-space-2); }
.e-dialog.icp-rule-dialog .icp-rule-try { margin-right: auto; }

@media (max-width: 760px) {
    .icp-rule-row, .icp-rule-row--action, .icp-rule-pair, .icp-rule-head { grid-template-columns: minmax(0, 1fr); }
}

/* Probelauf */
.icp-rule-sim-head { display: flex; align-items: center; gap: var(--icp-space-2); margin-bottom: var(--icp-space-3); }
.icp-rule-sim-filter { margin-left: auto; }
.icp-rule-sim-scroll { max-height: 60vh; overflow: auto; }
.icp-rule-sim-table td { vertical-align: top; }
.icp-rule-sim-when { width: 96px; white-space: nowrap; color: var(--icp-text-muted); }
.icp-rule-sim-hit td { background: var(--icp-primary-soft); }
.icp-rule-sim-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.icp-rule-sim-planned { margin-top: 4px; font-size: var(--icp-font-xs); color: var(--icp-text-body); }
.icp-rule-sim-note { margin-top: 4px; font-size: var(--icp-font-xs); color: var(--icp-warning); }

/* Verteilung */
.icp-distribution-table td { vertical-align: top; }
.icp-distribution-mode-col { width: 340px; }
.icp-distribution-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.icp-distribution-member {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-chip);
    font-size: var(--icp-font-xs);
    color: var(--icp-text-muted);
}
.icp-distribution-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--icp-text-faint); }
.icp-distribution-member--on { color: var(--icp-text-body); }
.icp-distribution-member--on .icp-distribution-dot { background: var(--icp-success-dot, var(--icp-success)); }
.icp-distribution-member--next { border-color: var(--icp-primary-border, var(--icp-primary)); background: var(--icp-primary-soft); }
.icp-distribution-count { font-weight: 600; color: var(--icp-text-strong); }

/* Alarme, Protokoll */
.icp-alarm-key, .icp-alarm-subject { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icp-rule-log-filter { width: 240px; }
.icp-rule-log-table td { vertical-align: top; }
.icp-rule-log-when { width: 120px; white-space: nowrap; color: var(--icp-text-muted); }
.icp-rule-log-actions { margin-top: 4px; font-size: var(--icp-font-xs); color: var(--icp-text-body); }
.icp-rule-log-error { margin-top: 2px; font-size: var(--icp-font-xs); color: var(--icp-danger); }

/* =====================================================================
   RR Rückruf erfassen (Dialog, Rückruf-Leiste) – docs/RR-Rueckruf.md
   ===================================================================== */

.rr-form { display: flex; flex-direction: column; gap: 14px; }

.rr-ticket {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-bg-soft);
    font-size: var(--icp-font-sm);
}

.rr-ticket .icp-cell-ellipsis { flex: 1; min-width: 0; font-weight: 600; color: var(--icp-text); }
.rr-ticket-customer { flex: 0 0 auto; color: var(--icp-text-subtle); }

.rr-people { margin-top: -6px; }
.rr-note { box-sizing: border-box; width: 100%; min-height: 64px; padding: 8px 10px; line-height: 1.45; resize: vertical; }

.rr-for {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 236px;
    overflow-y: auto;
    border: 1px solid var(--icp-border);
    border-radius: var(--icp-radius-md);
}

.rr-for .sd-cb-person { padding: 7px 10px; }

@media (max-width: 600px) {
    .rr-for { grid-template-columns: minmax(0, 1fr); }
}

.rr-team-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: var(--icp-primary-tint);
    color: var(--icp-primary);
}

.rr-at { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

.rr-notify {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--icp-font-sm);
    color: var(--icp-text-body);
}

.rr-notify label { cursor: pointer; }
.rr-notify-to { color: var(--icp-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Rückruf-Leiste (Ticketansicht, Vorschau) */
.rr-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid var(--icp-success-border);
    border-radius: var(--icp-radius-md);
    background: var(--icp-success-soft);
}

.rr-bar--compact { margin: 0; border-width: 0 0 1px; border-radius: 0; padding: 8px 16px; }

.rr-bar-icon { display: inline-flex; color: var(--icp-success); }
.rr-bar-text { flex: 1; min-width: 0; }
.rr-bar-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; font-size: var(--sd-font-base); color: var(--icp-text); }
.rr-bar-number { font-weight: 600; color: var(--icp-link); text-decoration: none; }
.rr-bar-number:hover { text-decoration: underline; }
.rr-bar-caller { color: var(--icp-text-body); }
.rr-bar-label { margin-left: 4px; font-size: var(--sd-font-xs); color: var(--icp-text-subtle); }
.rr-bar-sub { display: flex; flex-wrap: wrap; gap: 5px; font-size: var(--sd-font-xs); color: var(--icp-text-subtle); }
.rr-bar-due--overdue { font-weight: 600; color: var(--icp-danger); }
.rr-bar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rr-bar-retry { position: relative; }

/* ---------- Personen (19.11.2026, docs/AG-Agenten.md): Bild + voller Name, Status, Agenten-Auswahl ---------- */

.sd-avatar--photo { background: var(--icp-surface-head); color: var(--icp-text-weak); }
.sd-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.sd-avatar .sd-presence { z-index: 1; }

.sd-person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    vertical-align: middle;
}
.sd-person-text {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}
.sd-person--stacked .sd-person-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}
.sd-person-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--icp-text);
    font-weight: 600;
}
.sd-person--muted .sd-person-name { color: var(--icp-text-weak); font-weight: 500; }
.sd-person--muted .sd-avatar { opacity: .6; }

.sd-agent-status {
    font-size: var(--sd-font-xs);
    font-weight: 500;
    white-space: nowrap;
    color: var(--sd-t-fg, var(--icp-text-subtle));
}
.sd-agent-status.sd-tone--default { color: var(--icp-text-subtle); }
/* Urlaub / Abwesenheitsnotiz: deutlich */
.sd-agent-status--oof {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--icp-warning-border);
    border-radius: 9px;
    background: var(--icp-warning-soft);
    color: var(--icp-warning);
    font-weight: 700;
    line-height: 16px;
}

.sd-person-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    max-width: 100%;
    padding: 0 3px;
    border: 1px solid var(--icp-border);
    border-radius: 12px;
    background: var(--icp-surface);
    font-size: var(--sd-font-xs);
    font-weight: 600;
    color: var(--icp-text);
    vertical-align: middle;
}
.sd-person-chip-name { padding-right: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-person-chip--muted { color: var(--icp-text-weak); }
.sd-person-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: -4px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--icp-text-weak);
    cursor: pointer;
}
.sd-person-chip-remove:hover,
.sd-person-chip-remove:focus-visible { background: var(--icp-danger-soft, var(--icp-surface-hover)); color: var(--icp-danger, var(--icp-text)); }

.sd-agent-picker { display: block; }
.sd-menu-item.sd-agent-choice { padding: 6px 8px; }
.sd-agent-choice .sd-agent-choice-person { flex: 1 1 auto; }
.sd-agent-choice--locked { cursor: default; }
.sd-agent-choice--locked:hover { background: transparent; }
.sd-agent-choice-none-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px dashed var(--icp-border-strong);
    border-radius: 50%;
    color: var(--icp-text-weak);
    flex: 0 0 auto;
}
.sd-agent-choice--none .sd-menu-label { font-weight: 500; color: var(--icp-text-subtle); }

/* Auswahlzeile (Zuständig): volle Breite, × daneben */
.sd-agent-select { display: block; width: 100%; }
.sd-agent-select-row { display: flex; align-items: stretch; gap: 4px; }
.sd-agent-select-field {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 36px;
    padding: 4px 8px 4px 6px;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    font-family: inherit;
    font-size: var(--sd-font-base);
    text-align: left;
    cursor: pointer;
}
.sd-agent-select-field:hover { border-color: var(--icp-primary-border); background: var(--icp-surface-hover); }
.sd-agent-select-field:focus-visible { outline: 2px solid var(--icp-primary); outline-offset: 1px; }
.sd-agent-select-field:disabled { cursor: default; background: var(--icp-surface-head); }
.sd-agent-select-person { flex: 1 1 auto; }
.sd-agent-select-placeholder { flex: 1 1 auto; color: var(--icp-text-weak); padding-left: 2px; }
.sd-agent-select-caret { flex: 0 0 auto; margin-left: auto; color: var(--icp-text-weak); }
.sd-agent-select-clear {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--icp-border-strong);
    border-radius: var(--icp-radius-xs);
    background: var(--icp-surface);
    color: var(--icp-text-subtle);
    cursor: pointer;
}
.sd-agent-select-clear:hover,
.sd-agent-select-clear:focus-visible { background: var(--icp-danger-soft, var(--icp-surface-hover)); color: var(--icp-danger, var(--icp-text)); }
/* Breite aus dem Baustein (Width, Standard 320 px); die Platzierung (icp-sd.js) setzt sie bei Bedarf fest */
.sd-agent-select .sd-popover { min-width: 280px; max-width: calc(100vw - 32px); box-sizing: border-box; }

/* Erwähnung im Verlauf: Chip mit Bild und vollem Namen */
.icp-html .icp-mention-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 7px 0 2px;
    border-radius: 11px;
    background: var(--icp-primary-soft);
    color: var(--icp-primary);
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}
.icp-html .icp-mention-chip-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--icp-surface);
    color: var(--icp-primary);
    font-size: 8px;
    font-weight: 700;
    overflow: hidden;
}
.icp-html .icp-mention-chip-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

/* Erwähnung beim Schreiben: Popup mit Bild, Name und Status */
.sd-mention-item { display: flex; align-items: center; min-width: 0; padding: 6px 0 6px 10px; line-height: 1.25; }
