/* wp_telephony – gehört dem Paket telephony (siehe docs/SPEC.md §14). Von base.html und dem App-Rahmen (telephony/shell.html) eingebunden.
   Optik wie Close (SPEC_UI_CLOSE_1ZU1 B.3, C-14 bis C-17; Marvins Bild M09, close\18a, close-erkundung\E014–E018, E078, E177).
   Die Haken data-sp / data-ph / data-dialer-* gehören wp_telephony.js und bleiben unverändert; data-look gehört wp_telephony_look.js. */

/* Farben des Power Dialers und der grünen Annehmen-Flächen: Token --dialer-* und --bg-accept(-hover) im Fundament (app.css), dort
   auch ihre Werte im Dunkelmodus („Nächster Anruf“ satter blau, weiße Schrift auf Knopf und Füllung ≥ 4,5 : 1) */

/* ---------- Gemeinsam ---------- */
.phone-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-30); flex: none; }
[data-state="ready"] .phone-dot, [data-phone-state="ready"] .phone-dot,
[data-state="log"] .phone-dot, [data-phone-state="log"] .phone-dot,
[data-state="in-call"] .phone-dot, [data-phone-state="in-call"] .phone-dot { background: var(--green-40); }
[data-state="incoming"] .phone-dot, [data-phone-state="incoming"] .phone-dot,
[data-state="ringing"] .phone-dot, [data-phone-state="ringing"] .phone-dot,
[data-state="connecting"] .phone-dot, [data-phone-state="connecting"] .phone-dot { background: var(--gold-20); animation: tel-pulse .8s infinite; }
[data-state="starting"] .phone-dot, [data-phone-state="starting"] .phone-dot { background: var(--gold-20); }
/* Dunkelmodus: der gelbe Punkt (verbindet, startet, Klingelton) leuchtet – Stufe 20 wäre im Dunkeln oliv */
:root[data-theme="dark"] :is([data-state="connecting"], [data-phone-state="connecting"], [data-state="starting"], [data-phone-state="starting"]) .phone-dot,
:root[data-theme="dark"] .softphone-bar[data-hint="audio"] .phone-trigger__icon .phone-dot { background: var(--gold-70); }
[data-state="offline"] .phone-dot, [data-phone-state="offline"] .phone-dot { background: var(--red-50); }
@keyframes tel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .phone-dot { animation: none !important; } }

.tel-progress { display: inline-block; vertical-align: middle; width: 120px; height: 6px; background: var(--gray-5); border-radius: 99px; overflow: hidden; }
.tel-progress span { display: block; height: 100%; background: var(--blue-50); border-radius: 99px; }
.tel-ok { color: var(--text-success); }
.tel-missing { color: var(--text-danger); font-weight: 600; }
.tel-inactive > * { color: var(--text-light); }
.tel-grow { flex: 1 1 260px; }
.tel-audio { display: block; width: 100%; max-width: 420px; margin: 0 0 8px; }
.tel-yn { display: inline-flex; align-items: center; gap: 6px; }
.tel-yn .icon { flex: none; }
.tel-yn--ok .icon { color: var(--green-40); }
.tel-yn--missing { color: var(--text-danger); font-weight: 600; }
.tel-yn--missing .icon { color: var(--red-50); }
.tel-yn--off { color: var(--text-light); }
.tel-yn--off .icon { color: var(--gray-40); }

/* ---------- Telefon oben rechts in der Kopfleiste (B.3): Knopf mit Caret und Zustandspunkt, Hinweis-Knopf ---------- */
.softphone-bar { display: flex; align-items: center; gap: 4px; min-width: 0; }   /* nicht positioniert: die Gesprächsleiste hängt an header.topbar */
.phone-anchor { position: relative; flex: none; }
/* 46 px: Hörer-Mitte 52 px links von der Hilfe-Mitte, Caret-Mitte 18 px rechts vom Hörer [M M01, M02, M09; B 18].
   Hörer 14 px wie Kalender und Hilfe (12 × 12 px Tinte wie in Close M01, B 01 – vorher 16 px, 14 px Tinte) */
.phone-trigger { width: 46px; padding: 0 7px 0 6px; gap: 5px; justify-content: flex-start; }
.phone-trigger__icon > .icon { width: 14px; height: 14px; }
.phone-trigger .caret { width: 12px; height: 12px; color: var(--icon-default); }
.phone-trigger[aria-expanded="true"] { background: var(--bg-borderless-hover); }
.phone-trigger__icon { position: relative; display: inline-flex; }
.phone-trigger__icon .phone-dot { position: absolute; right: -4px; bottom: -3px; width: 7px; height: 7px; box-shadow: 0 0 0 1.5px var(--surface); }
.softphone-bar[data-state="incoming"] .phone-trigger { box-shadow: 0 0 0 4px var(--green-10); }   /* weicher Puls ohne Bewegung (C-16) */

/* Hauptknopf data-sp="main": in Ruhe unsichtbar; muss der Nutzer etwas tun, ist er der Hinweis-Knopf links vom Telefon */
.call-bar { display: contents; }
.call-bar > * { display: none; }
.softphone-bar[data-warn="1"] .call-bar__main, .softphone-bar.has-hint .call-bar__main {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; max-width: 220px; min-width: 0; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--gold-10); background: var(--gold-5); color: var(--gold-60); font: 600 13px/18px var(--font-sans); cursor: pointer;
}
.softphone-bar[data-warn="1"] .call-bar__main:hover, .softphone-bar.has-hint .call-bar__main:hover { background: var(--gold-10); }
.call-bar__main .phone-hint__icon { display: inline-flex; flex: none; color: var(--gold-60); }
.call-bar__main .call-bar__dot { display: none; }
.call-bar__text, .phone-hint__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-hint__label:not([hidden]) + .call-bar__text { display: none; }
/* „Klingelton aus“ ist kein Knopf: der erste Klick in die Seite schaltet den Ton frei. Bis dahin ist der Punkt am Telefon-Knopf gelb, dessen
   Tooltip nennt den Grund (wp_telephony_look.js: data-hint="audio") – rechts stehen wie in Close nur Kalender, Telefon, Hilfe [M00; Abnahme ET-03].
   Die Regel muss den Hinweis-Knopf über data-warn schlagen (0,3,0) und zählt 0,4,0. */
.softphone-bar[data-hint="audio"]:not(.is-call) .call-bar__main { display: none; }
.softphone-bar[data-hint="audio"] .phone-trigger__icon .phone-dot { background: var(--gold-20); animation: none; }
/* Mikrofon blockiert (Marvin 13.10.2026): kleiner roter Hinweis links neben dem Telefon-Knopf – in jedem Zustand (Ruhe, Klingeln, Gespräch,
   Power Dialer), bis das Mikrofon wieder geht. Steht in der Kopfleiste, nicht in der Gesprächsleiste (die hängt darunter). Ein Klick zeigt die
   Anleitung oben rechts (.phone-mic im Stapel .phone-wait des Rahmens). Sichtbarkeit: wp_telephony.js Remote.render (hidden). */
.mic-block {
  display: inline-flex; flex: none; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border: 1px solid var(--red-20); border-radius: 999px;
  background: var(--red-5); color: var(--red-60); font: 600 12px/16px var(--font-sans); white-space: nowrap; cursor: pointer;
}
.mic-block[hidden] { display: none; }
.mic-block .icon { flex: none; color: var(--red-50); }
.mic-block:hover, .mic-block[aria-expanded="true"] { background: var(--red-10); border-color: var(--red-30); }
.mic-block:focus-visible { outline: 2px solid var(--blue-40); outline-offset: 2px; }
.softphone-bar[data-mic="blocked"] .phone-trigger__icon .phone-dot { background: var(--red-50); animation: none; }

/* ---------- Gesprächsleiste (C-16; Aufbau wie Close, E177/E179, ABGLEICH LD-27/LD-28): eigener Streifen über die Inhaltsbreite unter der
   Kopfleiste, 63 px einschließlich der 2-px-Linie, schiebt Erinnerungsleiste und Inhalt nach unten (das Dokument wird nie höher).
   Sichtbar, solange „Auflegen“ sichtbar ist (wp_telephony.js: inCall) – per :has(), zusätzlich per Klasse aus wp_telephony_look.js ---------- */
.topbar:has(.softphone-bar [data-sp="hangup"]:not([hidden])), .topbar.has-call-bar { padding-bottom: 63px; }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar, .softphone-bar.is-call .call-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 63px; padding: 0 16px 0 0;
  background: var(--surface); border-bottom: 2px solid var(--green-40); font: 400 14px/20px var(--font-sans); color: var(--text-default);
}
/* beim Wählen und Klingeln ist die Linie blass, im Gespräch kräftig grün [E179, E177] – kein Blinken.
   Beide Fassungen müssen die Grundregel darüber schlagen (deren :has()-Zweig zählt 0,4,0): mit Klasse 0,4,0 und später, ohne Skript 0,5,0 */
.softphone-bar.is-call[data-state="connecting"] .call-bar, .softphone-bar.is-call[data-state="ringing"] .call-bar,
.softphone-bar.is-call[data-state="incoming"] .call-bar { border-bottom-color: rgb(76 178 77 / .5); }
.softphone-bar[data-state="connecting"]:has([data-sp="hangup"]:not([hidden])) .call-bar,
.softphone-bar[data-state="ringing"]:has([data-sp="hangup"]:not([hidden])) .call-bar,
.softphone-bar[data-state="incoming"]:has([data-sp="hangup"]:not([hidden])) .call-bar { border-bottom-color: rgb(76 178 77 / .5); }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar > *, .softphone-bar.is-call .call-bar > * { display: inline-flex; }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar__main, .softphone-bar.is-call .call-bar__main,
.softphone-bar[data-warn="1"]:has([data-sp="hangup"]:not([hidden])) .call-bar__main, .softphone-bar[data-warn="1"].is-call .call-bar__main {
  flex: 1 1 0; align-self: stretch; align-items: center; gap: 8px; height: auto; max-width: none; min-width: 0; padding: 0 8px; border: 0; border-radius: 0;
  background: none; color: var(--text-default); font: 700 15px/20px var(--font-sans); text-align: left; cursor: pointer;
}
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar__main:hover, .softphone-bar.is-call .call-bar__main:hover { background: none; }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .phone-hint__icon, .softphone-bar.is-call .phone-hint__icon,
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .phone-hint__label, .softphone-bar.is-call .phone-hint__label { display: none; }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar__dot, .softphone-bar.is-call .call-bar__dot { display: inline-block; margin-left: 8px; }
.softphone-bar:has([data-sp="hangup"]:not([hidden])) .call-bar__text, .softphone-bar.is-call .call-bar__text { display: block; }
/* Name/Lead aus wp_telephony_look.js vorhanden → der Rohtext der Leiste entfällt */
.call-bar__id:not([hidden]) + .call-bar__main .call-bar__text, .call-bar__id:not([hidden]) + .call-bar__main .call-bar__dot { display: none !important; }

.call-bar__dir {
  flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 2px; align-self: stretch; width: 58px; padding: 0;
  border-right: 1px solid var(--border-default); color: var(--green-60); font: 600 10px/12px var(--font-sans); letter-spacing: 0; text-transform: uppercase;
}
.call-bar__dir .icon { color: var(--green-60); }
.call-bar__arrow { display: none; }
.call-bar__dir[data-dir="outbound"] .call-bar__arrow--out, .call-bar__dir[data-dir="inbound"] .call-bar__arrow--in { display: inline-flex; }
.call-bar__dir:not([data-dir]) { display: none !important; }
.call-bar__id { flex: 0 1 auto; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; max-width: 60%; padding-left: 8px; }
.call-bar__who, .call-bar__lead { display: flex; align-items: center; gap: 6px; min-width: 0; }
.call-bar__who .icon, .call-bar__lead .icon { flex: none; color: var(--gray-70); }
.call-bar__who strong { font: 700 15px/20px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-bar__lead { font-size: 14px; line-height: 20px; color: var(--text-medium); }
.call-bar__id[data-has-lead="0"] .call-bar__lead > .icon { display: none; }
.call-bar__number:empty { display: none; }
.call-bar__lead-link { color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-bar__lead-link:hover { text-decoration: underline; }
.call-bar__number { white-space: nowrap; color: var(--text-medium); }
.call-bar__flag { flex: none; height: 16px; padding: 0 6px; border-radius: 4px; background: var(--gold-5); color: var(--gold-60); font: 600 12px/16px var(--font-sans); white-space: nowrap; }
.call-bar__state { flex: none; align-items: center; color: var(--text-light); white-space: nowrap; }
.call-bar__state:empty { display: none !important; }
.call-bar__btn {
  flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent;
  color: var(--gray-70); cursor: pointer;
}
.call-bar__btn:hover { background: var(--bg-hover); }
.call-bar__btn[aria-pressed="true"] { background: var(--gold-5); color: var(--gold-60); }
.call-bar__mute .icon-mic-off, .call-bar__mute[aria-pressed="true"] .icon-mic { display: none; }
.call-bar__mute[aria-pressed="true"] .icon-mic-off { display: inline-block; }
.call-bar__sep { flex: none; width: 1px; height: 24px; margin: 0 4px; background: var(--border-default); }
.call-bar__timer { flex: none; align-items: center; min-width: 36px; justify-content: flex-end; font: 600 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-default); }
.call-bar__accept {
  flex: none; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--green-50); background: var(--bg-accept);
  color: #fff; font: 600 14px/20px var(--font-sans); cursor: pointer;
}
.call-bar__accept:hover { background: var(--bg-accept-hover); }
.call-bar__accept .icon { color: #fff; }
/* Auflegen/Ablehnen: wp_telephony.js schreibt den Text in den Knopf – sichtbar ist der runde rote Knopf mit phone-off */
.call-bar__hangup {
  flex: none; position: relative; width: 28px; height: 28px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%; background: var(--bg-danger); color: transparent;
  font-size: 0; line-height: 0; overflow: hidden; cursor: pointer;
}
.call-bar__hangup:hover { background: #c50d1d; }
/* Anruf rückt direkt nach dem eigenen Gespräch nach: „Ablehnen“ gilt für einen Augenblick noch nicht (wp_telephony.js
   PhoneApp.hangupGuard) – sonst träfe ein Doppelklick auf „Auflegen“ den wartenden Rückruf */
.call-bar__hangup[aria-disabled="true"], .call-bar__hangup[aria-disabled="true"]:hover { background: var(--bg-danger); opacity: .45; cursor: default; }
/* Mindest-Klingelzeit des eigenen Anrufs (PhoneApp.ringLock): statt des Hörers die Sekunden, bis Auflegen geht */
.call-bar__hangup[data-lock]::before { content: attr(data-lock); background: none; color: #fff; font-size: 12px; font-weight: 600; line-height: 28px; text-align: center; }
.phone [data-ph-action="hangup"][aria-disabled="true"], .phone [data-ph-action="hangup"][aria-disabled="true"]:hover { opacity: .5; cursor: default; }
.call-bar__hangup::before {
  content: ""; position: absolute; inset: 0; background: center / 16px 16px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91'/%3E%3Cline x1='22' x2='2' y1='2' y2='22'/%3E%3C/svg%3E");
}
.softphone-bar[data-state="incoming"] .call-bar__keypad, .softphone-bar[data-state="incoming"] .call-bar__sep { display: none !important; }
/* wählt / klingelt beim Angerufenen: wie in Close nur „Wählt …“ · Tastenfeld · Linie · Auflegen – das Mikrofon kommt erst im Gespräch
   [E179, ABGLEICH LD-28]. Der Haken data-sp="mute" bleibt im Dokument (wp_telephony.js schaltet weiter nur sein hidden) */
.softphone-bar[data-state="connecting"] .call-bar__mute, .softphone-bar[data-state="ringing"] .call-bar__mute { display: none !important; }
/* ---------- Power Dialer in der Gesprächsleiste (wie Close: Hilfebild power_dialer_controls_087ff5 [B1], 2×-Bild nachgemessen;
   Marvin 12.10.2026: „oben rechts ein blauer Button neben dem Auflegen-Button – Next Call“) ----------
   Die Leiste steht, solange der Power Dialer im Rahmen dieses Tabs läuft – auch zwischen den Anrufen (dann links der aktuelle Lead,
   unten eine blaue Linie 4 px #2d99de statt der grünen). Rechts nach einer Linie (#d7d7d7): Pille [Blitz | eigener Avatar ▾]
   (#dddddd), Pause (zwei Balken #2e2e2e), blauer Knopf „Nächster Anruf →“ (#2d99de, Pille 28 px hoch), der sich nach dem Anruf von
   links nach rechts füllt (#3781b8, Dauer = Wartezeit aus den Optionen). Klassen setzt wp_telephony_look.js (.is-dialer). */
.softphone-bar.is-dialer .call-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 63px; padding: 0 16px 0 0;
  background: var(--surface); border-bottom: 2px solid var(--green-40); font: 400 14px/20px var(--font-sans); color: var(--text-default);
}
.softphone-bar.is-dialer .call-bar > * { display: inline-flex; }
.softphone-bar.is-dialer:not(.is-call) .call-bar { border-bottom: 4px solid #2d99de; }   /* Linie bleibt auch dunkel Close-Blau */
.softphone-bar.is-dialer .call-bar__main, .softphone-bar[data-warn="1"].is-dialer .call-bar__main {
  flex: 1 1 0; align-self: stretch; align-items: center; gap: 8px; height: auto; max-width: none; min-width: 0; padding: 0 8px; border: 0; border-radius: 0;
  background: none; color: var(--text-default); font: 700 15px/20px var(--font-sans); text-align: left; cursor: pointer;
}
.softphone-bar.is-dialer .call-bar__main:hover { background: none; }
.softphone-bar.is-dialer .phone-hint__icon, .softphone-bar.is-dialer .phone-hint__label { display: none; }
.softphone-bar.is-dialer .call-bar__text { display: block; }
.softphone-bar.is-dialer:not(.is-call) .call-bar__id { padding-left: 16px; }
/* zwischen den Anrufen: kein Tastenfeld, keine Linie vor der Dauer */
.softphone-bar.is-dialer:not(.is-call) .call-bar__keypad, .softphone-bar.is-dialer:not(.is-call) .call-bar__sep:not(.call-bar__sep--dialer) { display: none !important; }
.softphone-bar:not(.is-dialer) .dialer-group, .softphone-bar:not(.is-dialer):not(.has-live) .call-bar__sep--dialer { display: none !important; }
.call-bar__sep--dialer { margin: 0 4px 0 8px; background: var(--dialer-line); }
/* Souffleur an/aus direkt neben dem Power Dialer (Marvin 20.10.2026; wp_telephony_look.js setzt has-live, aria-pressed, data-live-state):
   Pille „✦ Souffleur“ – an = blau hinterlegt, aus = grau; der grüne Punkt zeigt, dass er im Gespräch gerade mithört */
.softphone-bar:not(.has-live) .call-bar__live { display: none !important; }
/* in Ruhe (kein Gespräch, kein Power Dialer): links neben dem Telefon-Knopf – vor dem Wählen anschalten (Marvin 21.10.2026) */
.softphone-bar.has-live:not(.is-call):not(.is-dialer) .call-bar__live { display: inline-flex; order: 0; margin-right: 4px; }   /* order: vor dem Telefon-Knopf (REC und Folgende haben order 2) */
.call-bar__live {
  flex: none; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border-default); border-radius: 999px;
  background: var(--surface); color: var(--text-light); font: 600 13px/18px var(--font-sans); white-space: nowrap; cursor: pointer;
}
.call-bar__live:hover { background: var(--bg-hover); }
.call-bar__live .icon { color: currentColor; }
.call-bar__live[aria-pressed="true"] { border-color: var(--blue-50); background: var(--blue-5); color: var(--blue-60); }
.call-bar__live[aria-busy="true"] { opacity: .6; cursor: progress; }
.call-bar__live-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green-50); }
.call-bar__live[aria-pressed="true"][data-live-state="listening"] .call-bar__live-dot,
.call-bar__live[aria-pressed="true"][data-live-state="transcribing"] .call-bar__live-dot,
.call-bar__live[aria-pressed="true"][data-live-state="thinking"] .call-bar__live-dot { display: inline-block; }
.dialer-group { flex: none; align-items: center; gap: 16px; }
.dialer-pill {
  display: inline-flex; align-items: stretch; height: 24px; padding: 0; border: 1px solid var(--dialer-pill-line); border-radius: 999px; background: var(--surface); color: var(--gray-70);
  overflow: hidden; cursor: pointer;
}
.dialer-pill:hover, .dialer-pill[aria-expanded="true"] { border-color: var(--dialer-pill-hover); }
.dialer-pill__mode { display: inline-flex; align-items: center; justify-content: center; width: 24px; background: var(--dialer-mode); color: #fff; }
.dialer-pill__mode .icon { color: #fff; }
.dialer-pill__me { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px 0 3px; }
.dialer-pill__me .avatar { width: 18px; height: 18px; font-size: 8px; line-height: 18px; }
.dialer-pill__me .caret { color: var(--gray-70); }
.dialer-menu { min-width: 240px; }
.dialer-menu__head { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 6px; border-bottom: 1px solid var(--gray-5); margin-bottom: 4px; }
.dialer-menu__head strong { font: 600 14px/20px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.dialer-menu__head span { font-size: 12px; line-height: 16px; color: var(--text-light); }
.dialer-menu__head span:empty { display: none; }
.dialer-pause {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent;
  color: var(--gray-80); cursor: pointer;
}
.dialer-pause .icon { color: var(--gray-80); }
.dialer-pause:hover { background: var(--bg-hover); }
.dialer-pause[aria-pressed="true"] { background: var(--gray-5); box-shadow: inset 0 0 0 1px var(--dialer-pill-line); }
.dialer-next {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 14px; border: 0; border-radius: 999px;
  background: #2d99de; color: #fff; font: 600 14px/20px var(--font-sans); white-space: nowrap; overflow: hidden; isolation: isolate; cursor: pointer;
}
.dialer-next:hover { background: #2a8fd0; }
:root[data-theme="dark"] .dialer-next { background: var(--dialer-next); }
:root[data-theme="dark"] .dialer-next:hover { background: var(--dialer-next-hover); }
.dialer-next:focus-visible { outline: 2px solid var(--blue-40); outline-offset: 2px; }
.dialer-next:disabled { cursor: default; opacity: .7; }
.dialer-next .icon { position: relative; color: #fff; }
.dialer-next__label { position: relative; }
.dialer-next__fill { position: absolute; top: 0; bottom: 0; left: 0; z-index: -1; width: 0; background: #3781b8; pointer-events: none; }
:root[data-theme="dark"] .dialer-next__fill { background: var(--dialer-next-fill); }
.dialer-next.is-counting .dialer-next__fill {
  animation: dialer-fill var(--dialer-ms, 5000ms) linear forwards; animation-delay: calc(var(--dialer-elapsed, 0ms) * -1);
}
@keyframes dialer-fill { from { width: 0; } to { width: 100%; } }

@media (max-width: 760px) {
  .call-bar__dir-label, .call-bar__lead, .call-bar__keypad, .call-bar__sep { display: none !important; }
  .softphone-bar[data-warn="1"] .call-bar__main, .softphone-bar.has-hint .call-bar__main { max-width: 44px; }
  .softphone-bar[data-warn="1"]:not(.is-call) .call-bar__text, .softphone-bar.has-hint:not(.is-call) .phone-hint__label { display: none; }
  .dialer-pill, .call-bar__sep--dialer { display: none !important; }
  .softphone-bar:not(.is-call):not(.is-dialer) .call-bar__live-label { display: none; }   /* in Ruhe schmal: nur ✦ (an = blau) */
  .dialer-group { gap: 4px; }
  .mic-block { width: 28px; padding: 0; justify-content: center; }
  .mic-block__label { display: none; }
}
@media print { .softphone-bar { display: none; } }

/* ---------- Popover TELEFON-EINSTELLUNGEN (C-17) – Maße an close\18a nachgemessen: 320 px breit, Radius 12, Kopf 52 px,
   Abschnitte 16 px eingerückt mit Linie #e2e2e2, Fuß #fcfcfc mit Linie #f1f1f1; Oberkante 44 px [B 18, E014] ---------- */
.phone-popover.softphone-settings {
  position: absolute; top: calc(100% + 1px); right: 0; z-index: var(--z-dropdown); display: flex; flex-direction: column; width: 320px;
  max-width: calc(100vw - 24px); max-height: 88vh; max-height: 88dvh; background: var(--surface); border: 1px solid var(--border-default);
  border-radius: 12px; box-shadow: var(--shadow-4); color: var(--text-default); font: 400 14px/20px var(--font-sans); text-align: left; overflow: hidden;
}
.phone-pop__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; margin: 0 11px; padding: 4px 4px 0; border-bottom: 1px solid var(--gray-5); }
.phone-pop__state { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--text-light); }
.phone-pop__state > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-pop__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.phone-pop__sec { margin: 0 15px; padding: 8px 0; border-bottom: 1px solid var(--border-default); }
.phone-pop__row { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.phone-pop__title { font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.phone-pop__info { display: inline-flex; color: var(--gray-60); cursor: default; border-radius: 50%; }
.phone-pop__info:focus-visible { outline: 2px solid var(--blue-40); outline-offset: 1px; }
.phone-pop__gear, .phone-pop__switch { margin-left: auto; }
.phone-pop__gear.btn-icon.btn-sm { width: 32px; height: 32px; margin-right: -8px; }
.phone-pop__switch { cursor: default; }
.phone-pop__switch input:disabled + .switch-track { opacity: 1; }
[data-look="callerid-sec"] { padding: 16px 0; }
.callerid { position: relative; display: flex; margin-top: 8px; }
.callerid__field {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; border: 1px solid var(--border-default);
  border-radius: 8px 0 0 8px; background: var(--surface); text-align: left; cursor: pointer;
}
.callerid__field:hover, .callerid__field[aria-expanded="true"] { background: var(--gray-1); }
.callerid__field:disabled, .callerid__field.is-single { cursor: default; background: var(--surface); opacity: 1; }
.callerid__field.is-single .caret { display: none; }
.callerid__field .caret { flex: none; color: var(--gray-70); }
.callerid__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.callerid__text strong { font: 600 14px/20px var(--font-sans); color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callerid__text span { font-size: 13px; line-height: 18px; color: var(--text-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callerid__text span:empty { display: none; }
.callerid__copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 41px; height: 52px; margin-left: -1px; padding: 0;
  border: 1px solid var(--border-default); border-radius: 0 8px 8px 0; background: var(--surface); color: var(--gray-70); cursor: pointer;
}
.callerid__copy:hover { background: var(--gray-5); }
.callerid__menu { position: fixed; min-width: 0; width: 288px; max-width: calc(100vw - 24px); max-height: min(420px, 60vh); }
.callerid__menu .menu-item { min-height: 54px; }
.callerid__menu .menu-item .check { width: 16px; }
.callerid__menu .menu-item strong { font-weight: 600; }
.callerid__menu .menu-item__label { padding: 6px 0; }
.phone-pop__audio { padding: 14px 0 16px; }
.phone-pop__audio > .phone-pop__title { margin-bottom: 14px; }
.audio-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
/* Beschriftung 83 px, Auswahlfeld 165 px wie Close [B 18]: der Vorgabewert „Systemstandard“ steht ungekürzt im Feld */
.audio-row { display: grid; grid-template-columns: 83px minmax(0, 1fr) 32px; align-items: center; column-gap: 4px; }
.audio-row__label { color: var(--text-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-row .select { min-width: 0; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5h7L6 8.5z' fill='%23474747'/%3E%3C/svg%3E"); background-position: right 12px center; }
:root[data-theme="dark"] .audio-row .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5h7L6 8.5z' fill='%23b8bbc0'/%3E%3C/svg%3E"); }
.audio-row__test { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--gray-70); cursor: pointer; }
.audio-row__test::before { content: ""; position: absolute; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; }
.audio-row__test { position: relative; }
.audio-row__test .icon { margin-left: 1px; fill: currentColor; }
.audio-row__test:hover { background: var(--bg-hover); }
.phone-pop__grant { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 8px 12px; border-radius: 6px; background: var(--cyan-5); color: var(--cyan-70); font-size: 13px; line-height: 18px; }
.phone-pop__grant p { margin: 0; flex: 1; }
.phone-pop__grant .btn { flex: none; }
.phone-pop__note { margin: 0 0 8px; font-size: 13px; line-height: 18px; color: var(--text-light); }
.phone-pop__msg { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-pop__msg:empty { display: none; }
/* Pegel: 10 Segmente je 15,5 × 4 px im Abstand 1 px unter der Auswahl [B 18a: x 99–263, y 395–398] */
.phone-meter { height: 6px; background: var(--gray-5); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.phone-meter span { display: block; height: 100%; width: 0; background: var(--green-40); transition: width 80ms linear; }
.phone-meter--seg { position: relative; height: 4px; margin: 8px 36px 0 87px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--gray-20) 0 calc(10% - 1px), transparent calc(10% - 1px) 10%); }
.phone-meter--seg span { background: repeating-linear-gradient(90deg, var(--green-40) 0 calc(10% - 1px), transparent calc(10% - 1px) 10%); background-size: 1000% 100%; }
.phone-pop__adv > summary { display: flex; align-items: center; justify-content: space-between; height: 48px; margin: 0 15px; cursor: pointer; list-style: none; color: var(--text-light); }
.phone-pop__adv > summary::-webkit-details-marker { display: none; }
.phone-pop__adv > summary .icon { color: var(--gray-70); transition: transform var(--dur-quick) var(--ease); }
.phone-pop__adv[open] > summary .icon { transform: rotate(180deg); }
.phone-pop__advbody { padding: 0 7px 12px; }
.phone-pop__help { margin: 4px 8px 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-pop__help summary { cursor: pointer; color: var(--link); padding: 6px 0; }
.phone-pop__help p { margin: 4px 0 8px; }
.phone-pop__help ul { margin: 4px 0; padding-left: 18px; }
.phone-pop__help li { margin: 4px 0; overflow-wrap: anywhere; }
.phone-pop__help code[data-copy] { cursor: copy; background: var(--gray-5); padding: 1px 4px; border-radius: 4px; }
.phone-pop__foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 16px 15px; background: var(--gray-1); border-top: 1px solid var(--gray-5); }
.phone-pop__foot .input { flex: 1 1 auto; min-width: 0; }
.phone-pop__foot .btn { flex: none; border-radius: 8px; }
@media (max-width: 640px) { .phone-popover.softphone-settings { position: fixed; top: 48px; right: 12px; left: 12px; width: auto; } }

/* ---------- App-Rahmen (/app/, shell.html): Seite im iframe, Telefon-Panel am Telefon-Knopf verankert ---------- */
.shell-html, .shell-body { height: 100%; margin: 0; overflow: hidden; background: var(--bg-body); }
.shell-frame { position: fixed; inset: 0; display: block; width: 100vw; height: 100vh; height: 100dvh; border: 0; background: var(--bg-body); }
/* Anker: wp_telephony.js (Shell.place) setzt --phone-panel-top = Unterkante der Kopfleiste der Seite + 6 px und --phone-panel-right =
   rechte Kante des Telefon-Knopfs. In Ruhe hängt das Panel wie das Popover 44 px unter dem Fensterrand (17 px höher), im Gespräch
   4 px unter der Gesprächsleiste (die Kopfleiste der Seite ist dann um die Leiste höher; mindestens 122 px = 55 + 63 + 4, falls der
   Anker noch vor dem Erscheinen der Leiste gemessen wurde). Breite 320 px wie das Popover (C-16, C-17). */
.phone.phone-panel {
  --phone-panel-y: calc(var(--phone-panel-top, 61px) - 17px);
  /* --phone-wait-offset: Höhe der Anklopf-Karte darüber (wp_telephony.js placeWaiting), sonst 0 */
  position: fixed; z-index: 1000; top: calc(var(--phone-panel-y) + var(--phone-wait-offset, 0px)); right: var(--phone-panel-right, var(--phone-anchor-right, 56px));
  display: flex; flex-direction: column; gap: 0; width: 320px; max-width: calc(100vw - 24px);
  max-height: calc(100% - var(--phone-panel-y) - var(--phone-wait-offset, 0px) - 12px);   /* fest positioniert: 100 % = Fensterhöhe */
  overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border-default);
  border-radius: 12px; box-shadow: var(--shadow-4); color: var(--text-default); font: 400 14px/20px var(--font-sans);
}
[data-phone-state="incoming"] .phone.phone-panel, [data-phone-state="connecting"] .phone.phone-panel,
[data-phone-state="ringing"] .phone.phone-panel, [data-phone-state="in-call"] .phone.phone-panel { --phone-panel-y: max(calc(var(--phone-panel-top, 61px) - 2px), 122px); }
.phone.phone-panel.no-call-bar { --phone-panel-y: calc(var(--phone-panel-top, 61px) - 17px); }   /* Seite ohne Gesprächsleiste (wp_telephony_look.js) */
.phone.phone-panel[hidden] { display: none; }
/* Anruf/Gespräch direkt unter dem Kopf – vor Hinweisen (Klingelton stumm, anderer Tab), damit Annehmen nie wegscrollt */
.phone-panel > .phone-head { order: -3; }
.phone-panel > .phone-flash { order: -2; }
.phone-panel > .phone-incoming, .phone-panel > .phone-active { order: -1; }
.phone-head { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--gray-5); }
.phone-state { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-state strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-head-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.phone-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--gray-70); cursor: pointer; }
.phone-close:hover, .phone-close:focus-visible { background: var(--bg-hover); }
/* Klingel-Panel (C-16): der Kopf ist die Zeile „Eingehender Anruf“ der Karte mit „Klingelton aus“ rechts – solange es klingelt,
   bleibt das Panel stehen (kein Schließen-Kreuz: Annehmen, Ablehnen oder Klingelton aus, 13.10.2026); Geräte-Auswahl (außer vom
   Telefon-Knopf aufgeklappt) und Fußzeile entfallen */
[data-phone-state="incoming"] .phone-panel > .phone-head { display: none; }
[data-phone-state="incoming"] .phone-panel > .phone-audio:not([open]), [data-phone-state="incoming"] .phone-panel > .phone-foot { display: none; }
[data-phone-state="incoming"] .phone-incoming { border-bottom: 0; }
[data-phone-state="incoming"] .phone-incoming .phone-label { min-height: 32px; }
.phone-incoming .phone-label .phone-wait__mute { margin-left: auto; }
@media (max-width: 640px) { .phone.phone-panel { left: 12px; right: 12px; width: auto; max-width: none; } }

/* ---------- Anklopfen (Marvin 13.10.2026, wie Close „Ringing while on another call“): Karte oben rechts über allem – im Rahmen
   über der Seite und über dem Telefon-Panel (z-index darüber, das Panel rutscht darunter), direkt unter der Gesprächsleiste der
   Seite, damit Auflegen und „Nächster Anruf“ frei bleiben. Auf jeder Seite, im Gespräch, beim Wählen und im Power Dialer;
   in jedem Abschluss-Tab (Spiegel). Aufbau: wp_telephony.js renderWaiting/waitCard. ---------- */
.phone-wait {
  position: fixed; z-index: 1001; top: max(calc(var(--phone-panel-top, 61px) - 2px), 8px); right: var(--phone-panel-right, var(--phone-anchor-right, 56px));
  display: flex; flex-direction: column; gap: 8px; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100% - 16px); overflow-y: auto;
  overscroll-behavior: contain;
}
.phone-wait[hidden] { display: none; }
.phone-wait__card {
  flex: none; padding: 16px; background: var(--surface); border: 1px solid var(--green-40); border-radius: 12px; box-shadow: var(--shadow-4);
  color: var(--text-default); font: 400 14px/20px var(--font-sans);
}
.phone-wait__card > p { margin: 0; }
.phone-wait__card > .phone-wait__head { display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 0 0 8px; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-wait__title { font-weight: 600; color: var(--green-70); white-space: nowrap; }
.phone-wait__since { font-variant-numeric: tabular-nums; color: var(--text-light); }
.phone-wait__since:empty { display: none; }
/* „Klingelton aus“ – auch im Klingel-Panel (data-ph-action="silence"): klein, rechts in der Kopfzeile der Karte */
.phone-wait__mute {
  display: inline-flex; flex: none; align-items: center; gap: 4px; height: 28px; margin-left: auto; padding: 0 8px; border: 1px solid var(--border-default);
  border-radius: 6px; background: var(--surface); color: var(--gray-70); font: 600 12px/16px var(--font-sans); white-space: nowrap; cursor: pointer;
}
.phone-wait__mute .icon { width: 14px; height: 14px; }
.phone-wait__mute:hover { background: var(--gray-5); }
.phone-wait__mute[aria-pressed="true"], .phone-wait__mute:disabled { background: var(--gold-5); border-color: var(--gold-10); color: var(--gold-60); cursor: default; opacity: 1; }
.phone-wait__card > .phone-wait__hint { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-wait__card > .phone-meta { margin-top: 6px; }
/* im eigenen Gespräch: „Auflegen & annehmen“ über die ganze Breite, „Ablehnen“ darunter */
.phone-wait__card[data-busy] .phone-buttons { flex-wrap: wrap; }
.phone-wait__card[data-busy] .phone-buttons .phone-accept { flex: 1 1 100%; }
.phone-wait__card .phone-buttons .btn { white-space: nowrap; }
.phone-wait__card .btn-link { margin-top: 8px; padding-left: 0; padding-right: 0; }
.phone-wait__card > .phone-wait__more { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--text-light); }
/* Karte „Mikrofon blockiert“ im selben Stapel (wp_telephony.js micCard): rot statt grün, Anleitung für Chrome und Edge, „Erneut prüfen“ */
.phone-wait__card.phone-mic { border-color: var(--red-30); }
.phone-mic .phone-mic__chip { background: var(--red-5); color: var(--red-50); }
.phone-mic__title { font-weight: 600; color: var(--red-60); white-space: nowrap; }
.phone-mic__close {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: auto; padding: 0; border: 0;
  border-radius: 6px; background: transparent; color: var(--gray-70); cursor: pointer;
}
.phone-mic__close:hover, .phone-mic__close:focus-visible { background: var(--bg-hover); }
.phone-wait__card > .phone-mic__text { margin: 0 0 8px; }
.phone-mic__steps { margin: 0 0 8px; padding-left: 20px; }
.phone-mic__steps li { margin: 4px 0; }
.phone-wait__card > .phone-mic__more { margin: 0 0 12px; font-size: 12px; line-height: 16px; color: var(--text-light); }
.phone-mic__foot { display: flex; align-items: center; gap: 10px; }
.phone-mic__foot .btn { flex: none; }
.phone-mic__note { min-width: 0; font-size: 12px; line-height: 16px; color: var(--red-60); }
.phone-mic__note:empty { display: none; }
/* Karte „Verpasster Anruf“ im selben Stapel (wp_telephony.js missedCard): bleibt über jeden Seitenwechsel stehen, bis
   zurückgerufen bzw. geschlossen wird */
.phone-wait__card.phone-missed { border-color: var(--gold-30); }
.phone-missed .phone-missed__chip { background: var(--gold-5); color: var(--gold-60); }
.phone-missed__title { font-weight: 600; color: var(--gold-70); white-space: nowrap; }
.phone-missed__foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.phone-missed__foot .btn { flex: none; white-space: nowrap; }
.phone-missed__foot .btn-link { margin-top: 0; }
/* Karte „Telefonproblem“ im selben Stapel (wp_telephony.js netCard, Marvin 15.10.2026): rot, solange die Verbindung zu Twilio
   fehlt („verbindet neu …“, nach 30 s „Telefon neu verbinden“); grün „Telefon wieder verbunden“, dann geht sie von selbst zu */
.phone-wait__card.phone-net { border-color: var(--red-30); }
.phone-net .phone-net__chip { background: var(--red-5); color: var(--red-50); }
.phone-net__title { font-weight: 600; color: var(--red-60); white-space: nowrap; }
.phone-net__count { white-space: nowrap; }
.phone-wait__card.phone-net.is-ok { border-color: var(--green-40); }
.phone-net.is-ok .phone-net__chip { background: var(--green-5); color: var(--green-60); }
.phone-net.is-ok .phone-net__title { color: var(--green-70); }
.phone-wait__card > .phone-net__text { margin: 0 0 4px; }
.phone-wait__card > .phone-net__status { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--red-60); }
.phone-wait__card.phone-net.is-ok > .phone-net__status { color: var(--green-60); }
.phone-net__foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.phone-net__foot .btn { flex: none; white-space: nowrap; }
.phone-wait__card > .phone-net__more { margin: 10px 0 2px; font-size: 12px; line-height: 16px; color: var(--text-medium); }
.phone-net__tips { margin: 0; padding-left: 18px; font-size: 12px; line-height: 16px; color: var(--text-medium); }
.phone-net__tips li { margin: 2px 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .phone-wait { left: 12px; right: 12px; width: auto; max-width: none; } }
@media print { .phone-wait { display: none !important; } }
/* Gesprächsleiste der Seite: „Anruf wartet: …“ im Zustand rechts hervorheben */
.softphone-bar[data-waiting] .call-bar__state { color: var(--green-60); font-weight: 600; }
/* lange Namen kürzen statt den eigenen Gesprächspartner links zu verdrängen (schmale Fenster, Power Dialer mit seinen Knöpfen) */
.softphone-bar.is-call[data-waiting] .call-bar__state:not(:empty) { display: block; flex: 0 1 auto; min-width: 96px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; }
/* Drucken über das Browser-Menü: Kopie der Seite (Shell.beforePrint) statt des iframes; Strg+P druckt direkt die Seite */
.shell-print { display: none; }
@media print {
  .phone-panel, .shell-frame { display: none !important; }
  .shell-html, .shell-body { height: auto !important; overflow: visible !important; }
  .shell-print { display: block; }
}

/* ---------- Telefon-Panel: Karten (Klingeln, Gespräch aufgeklappt, Protokoll, Wählfeld, Audio) ---------- */
.phone-card { flex: none; margin: 0; padding: 16px; background: var(--surface); border: 0; border-bottom: 1px solid var(--gray-5); border-radius: 0; box-shadow: none; }
.phone-card[hidden] { display: none; }
.phone-card > p { margin: 0 0 8px; }
.phone-card > p:last-child { margin-bottom: 0; }
.phone-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 400 13px/18px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--text-medium); }
.phone-label__chip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-10); color: var(--green-70); flex: none; }
.phone-log .phone-label { display: none; }   /* steht schon im Kopf des Panels („Anruf protokollieren“) */
.phone-who { margin: 0; font: 600 16px/24px var(--font-sans); color: var(--text-default); overflow-wrap: anywhere; }
.phone-who a { color: var(--link); }
.phone-number { margin: 0; font: 400 14px/20px var(--font-sans); color: var(--text-medium); }
.phone-number.mono { font-family: var(--font-sans); font-size: 14px; }   /* Nummern in der normalen Schrift (A.7) */
.phone-number:empty, .phone-meta:empty { display: none; }
.phone-meta { margin: 6px 0 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-meta-rich { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-meta-rich:empty { display: none; }
.phone-meta-rich:not(:empty) + .phone-meta, .phone-meta-rich:not(:empty) ~ .phone-meta { display: none; }
.phone-multi { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--gold-5); color: var(--gold-60); font: 600 13px/18px var(--font-sans); }
.phone-timer { margin: 4px 0 0; font: 600 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-default); }
.phone-timer.mono { font-family: var(--font-sans); font-size: 14px; }
.phone-hint { display: inline-block; margin: 8px 0 0; padding: 2px 8px; border-radius: 4px; background: var(--gold-5); color: var(--gold-60); font: 600 13px/18px var(--font-sans); }
.phone-flash { flex: none; margin: 0; padding: 8px 16px; background: var(--cyan-5); color: var(--cyan-70); font-size: 13px; line-height: 18px; border-bottom: 1px solid var(--cyan-10); }
.phone-flash[hidden] { display: none; }
.phone-buttons { display: flex; gap: 8px; margin: 12px 0 0; }
.phone-buttons .btn { flex: 1; justify-content: center; }
.phone-buttons .btn-lg { height: 40px; }
.phone-accept.btn { background: var(--bg-accept); border-color: var(--green-50); color: #fff; font-weight: 600; }
.phone-accept.btn:hover { background: var(--bg-accept-hover); color: #fff; }
.phone-accept.btn .icon, .phone-buttons .btn-danger .icon { color: #fff; }
.phone-card .btn-link { margin-top: 8px; }
.phone-controls { display: flex; gap: 8px; margin: 12px 0 0; }
.phone-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-default); border-radius: 6px;
  background: var(--surface); color: var(--gray-70); font: inherit; cursor: pointer;
}
.phone-btn:hover { background: var(--gray-5); }
.phone-btn[aria-pressed="true"] { background: var(--gold-5); border-color: var(--gold-10); color: var(--gold-60); }
.phone-btn[hidden] { display: none; }
.phone-btn .icon-mic-off, .phone-btn[aria-pressed="true"] .icon-mic { display: none; }
.phone-btn[aria-pressed="true"] .icon-mic-off { display: inline-block; }
.phone-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.phone-keypad[hidden] { display: none; }
.phone-key { height: 48px; padding: 0; border: 1px solid var(--border-default); border-radius: 6px; background: var(--gray-2); font: 400 18px/24px var(--font-sans); color: var(--text-default); cursor: pointer; }
.phone-key:hover { background: var(--gray-5); }
.phone-key:active { background: var(--gray-10); }
.phone-dial { display: flex; gap: 8px; }
.phone-input { flex: 1; min-width: 0; }
.phone-input.mono { font-family: var(--font-sans); font-size: 14px; }
.phone-callerid { margin-top: 12px; }
.phone-idle .phone-absender { margin: 12px 0 0; font-size: 13px; line-height: 18px; color: var(--text-light); }
.phone-idle .phone-absender .mono { font-family: var(--font-sans); font-size: 13px; color: var(--text-medium); }
.phone-panel .field { margin: 0 0 8px; }
.phone-panel .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.phone-panel textarea.input { min-height: 72px; }
/* Ergebnis-Pills (auch im Power Dialer) */
.phone-dispositions { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 12px 0; min-width: 0; }
.phone-chip { position: relative; }
.phone-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.phone-chip span { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--border-default); border-radius: 6px; font: 400 13px/18px var(--font-sans); color: var(--text-medium); background: var(--surface); white-space: nowrap; }
.phone-chip:hover span { background: var(--gray-2); }
.phone-chip input:checked + span { background: var(--blue-5); border-color: var(--blue-40); color: var(--blue-60); font-weight: 600; }
.phone-chip input:focus-visible + span { outline: 2px solid var(--blue-40); outline-offset: 1px; }
/* Zuordnen zu (V-29): die Auswahl des Telefons (select, Haken log-assign) als Zeilen mit Radio – wp_telephony_look.js */
.phone-assign { margin: 12px 0 0; }
.phone-assign__title { margin: 0 0 4px; font: 600 13px/18px var(--font-sans); color: var(--text-default); }
.phone-assign__rows { display: flex; flex-direction: column; border: 1px solid var(--border-default); border-radius: 6px; overflow: hidden; }
.phone-assign__rows:empty { display: none; }
.phone-assign__row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-bottom: 1px solid var(--gray-5); cursor: pointer; font-weight: 400; }
.phone-assign__row:last-child { border-bottom: 0; }
.phone-assign__row:hover { background: var(--gray-1); }
.phone-assign__row input { flex: none; margin: 0; accent-color: var(--blue-50); }
.phone-assign__row strong { font: 600 14px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-assign__row span { color: var(--text-light); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-assign.has-rows > .field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.phone-followup { margin: 8px 0; }
.phone-followup summary { cursor: pointer; color: var(--link); font-size: 13px; line-height: 18px; padding: 4px 0; }
.phone-followup[open] summary { margin-bottom: 8px; }
.phone-audio { border-bottom: 0; }
.phone-audio summary { cursor: pointer; font: 600 14px/20px var(--font-sans); }
.phone-audio[open] summary { margin-bottom: 12px; }
.phone-audio .phone-buttons { margin-top: 8px; }
.phone-audio input[type="range"] { width: 100%; accent-color: var(--blue-50); }
.phone-foot { flex: none; margin: 0; padding: 12px 16px; background: var(--gray-1); border-top: 1px solid var(--gray-5); font-size: 12px; line-height: 16px; color: var(--text-light); text-align: left; }
.phone-problem, .phone-unlock, .phone-takeover { background: var(--gray-1); }
.phone-problem { color: var(--red-70); background: var(--red-5); }
.phone-unlock p, .phone-takeover p { margin: 0 0 8px; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.phone-unlock p strong { font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.phone-incoming { border-bottom: 1px solid var(--gray-5); }

/* ---------- Power Dialer (C-15; Seite je Smart View wie Close, E078) ---------- */
.dialer-page { display: flex; flex-direction: column; min-height: 100%; padding: 0; }
.dialer-hero { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 380px; padding: 48px 24px; text-align: center; }
.dialer-hero__title { margin: 0; font: 700 20px/28px var(--font-sans); color: var(--text-default); }
.dialer-hero__count { display: inline-flex; gap: 4px; }
.dialer-hero__count span { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 44px; padding: 0 4px; border-radius: 4px; background: var(--gray-5); font: 700 32px/44px var(--font-sans); color: var(--text-default); font-variant-numeric: tabular-nums; }
.dialer-hero__sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.dialer-hero__view { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-default); }
.dialer-hero__view a { color: var(--link); }
.dialer-hero form { margin: 12px 0 0; }
/* Pille „Optionen“ unter dem Startknopf [E078: 100 × 24 px, Radius 12] – führt zu Einstellungen › Telefon & Mailbox › Optionen */
.dialer-hero__options { display: inline-flex; align-items: center; gap: 6px; height: 24px; margin: 20px 0 4px; padding: 0 12px 0 8px; border: 1px solid var(--border-default); border-radius: 12px; background: var(--surface); font: 600 13px/18px var(--font-sans); color: var(--text-default); }
.dialer-hero__options:hover { background: var(--bg-hover); text-decoration: none; }
.dialer-hero__options .icon { color: var(--gray-70); }
.dialer-hero__hint { max-width: 520px; margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--text-light); }
.dialer-sessions { flex: none; border-top: 1px solid var(--border-default); padding: 24px; }
.dialer-sessions--plain { border-top: 0; }
.dialer-sessions--note { border-top: 0; padding-bottom: 0; }
.dialer-sessions--note .alert { margin: 0; }
.dialer-sessions__title { margin: 0 0 16px; font: 400 16px/24px var(--font-sans); color: var(--text-default); }
.dialer-sessions .table td, .dialer-sessions .table tbody th { height: 41px; }   /* Tabellenzeile 40 px + Linie (Kap. 1 Regel 6, E2) */
.dialer-sessions .table .tel-progress { margin-right: 8px; }
.dialer-sessions .table tbody th a { color: var(--link); }
.dialer-empty { margin: 0; padding: 24px; text-align: center; color: var(--text-medium); }
/* Übersicht einer Sitzung (/telephony/dialer/<id>/): angerufen wird auf der Lead-Seite, hier nur Stand, Statistik, Fortsetzen */
.dialer-body { padding: 24px; }
.dialer-summary { display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 0 16px; }
.dialer-summary__title { margin: 0; font: 700 20px/28px var(--font-sans); color: var(--text-default); }
.dialer-summary__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.dialer-summary__next { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-default); }
.dialer-summary__next a { color: var(--link); }
.dialer-summary__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dialer-summary__actions form { margin: 0; }
.dialer-summary .alert { margin: 0; }
.dialer-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; max-width: 760px; margin: 16px 0 0; border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden; background: var(--surface); }
.dialer-stats div { padding: 8px 12px; border-right: 1px solid var(--gray-5); border-bottom: 1px solid var(--gray-5); margin: 0 -1px -1px 0; text-align: left; background: var(--surface); }
.dialer-stats dt { font-size: 12px; line-height: 16px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialer-stats dd { margin: 2px 0 0; font: 600 16px/24px var(--font-sans); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .dialer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Einstellungen › Telefon & Mailbox (C-14; Marvins Bild M09): Reiter, Werkzeugzeile, Tabellen im Rahmen ----------
   Die Seiten erben von settings/base.html. Im neuen Einstellungs-Rahmen (.settings-body) dockt die Reiterzeile an die Titelzone an;
   im bisherigen Rahmen steht sie über dem Inhalt. */
.tel-page { min-width: 0; }
.tel-tabs { margin: 0 0 24px; }
.settings-body > .tel-page > .tel-tabs { height: 39px; margin: -24px -24px 24px; padding: 0 24px; }
.settings-main:has(.tel-page > .tel-tabs) .settings-head { min-height: 46px; padding: 13px 24px 1px; border-bottom: 0; justify-content: flex-start; }
.settings-body > .tel-page > .tel-tabs .page-tab { font-size: 13px; line-height: 18px; }
.tel-tabs .tab-count--warn { background: var(--red-5); color: var(--red-60); }
.tel-settings.is-tabbed > [data-tel-panel]:not(.is-active) { display: none; }
.tel-panel { min-width: 0; }
.tel-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; margin: 0 0 24px; }
.tel-toolbar form { display: contents; }
.tel-toolbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.tel-search { position: relative; width: 350px; max-width: 100%; flex: 0 1 auto; }
.tel-search > .icon { position: absolute; left: 12px; top: 8px; color: var(--gray-60); pointer-events: none; }
.tel-search > .input { padding-left: 36px; }
.tel-search > .input::-webkit-search-cancel-button { cursor: pointer; }
.tel-filter-menu { width: 260px; }
.tel-table { table-layout: auto; }
.tel-table thead th { position: static; }
.tel-table td, .tel-table tbody th { height: 53px; padding: 6px 12px; white-space: normal; }
.tel-numbers { table-layout: fixed; }
.tel-numbers th:nth-child(1) { width: 400px; } .tel-numbers th:nth-child(3) { width: 140px; } .tel-numbers th:nth-child(4) { width: 140px; } .tel-numbers th:nth-child(5) { width: 56px; }
/* Unter 1700 px Fensterbreite ist der Inhaltsbereich schmaler, als die feste Aufteilung braucht (bei 1280 px blieben der Spalte „Zugeordnet“
   11 px): „Nummer“ behält dann ihren Anteil aus Close (400 von 1276 px), die beiden Zahlenspalten sind so breit wie ihr Kopf. Die Tabelle wird
   nie schmaler als 720 px (darunter rollt ihr Rahmen) – so haben acht Mitglieder einer Gruppe immer Platz und jede Zeile bleibt 53 px hoch
   [M M09; Abnahme ET-01] */
@media (max-width: 1700px) {
  .tel-numbers { min-width: 720px; }
  .tel-numbers th:nth-child(1) { width: 30%; } .tel-numbers th:nth-child(3) { width: 120px; } .tel-numbers th:nth-child(4) { width: 108px; }
}
.tel-table tbody tr:last-child > * { border-bottom: 0; }
.tel-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tel-table .nowrap { white-space: nowrap; }
.tel-table .col-menu { width: 48px; padding-left: 0; text-align: right; }
.tel-table .cell-muted { color: var(--text-light); }
.tel-table tr[hidden] { display: none; }
.tel-num { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.tel-num__badge { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--surface); font: 600 12px/16px var(--font-sans); color: var(--text-default); white-space: nowrap; }
.tel-num__badge--warn { border-color: var(--gold-10); background: var(--gold-5); color: var(--gold-60); }
.tel-num__badge--fill { border-color: transparent; background: var(--gray-5); }   /* „Primär“: grau gefüllt, ohne Rand [M M09] */
/* Zeile öffnet die Nummer; die Nummer ist ein Link ohne Linkfarbe; ⋯ erst beim Überfahren, mit Fokus oder offenem Menü [E432, KV-08] */
.tel-num__link, .tel-num__link:hover { color: inherit; text-decoration: none; }
.tel-num__link:focus-visible { outline: 2px solid var(--blue-40); outline-offset: 2px; border-radius: 2px; }
.tel-numbers tbody tr[data-tel-row] { cursor: pointer; }
.tel-numbers .tel-row-menu { opacity: 0; }
.tel-numbers tr:hover .tel-row-menu, .tel-numbers .tel-row-menu:focus-visible, .tel-numbers .tel-row-menu[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .tel-numbers .tel-row-menu { opacity: 1; } }
.tel-sub { display: block; font: 400 13px/18px var(--font-sans); color: var(--text-medium); }
/* Rufnummern: Unterzeile und Mitglieder machen die Zeile nie höher als 53 px (Close, M09). Die Mitglieder sind genau eine Avatar-Zeile hoch:
   der Name der Gruppe steht dahinter, solange er ganz passt – sonst rutscht er in die zweite, abgeschnittene Zeile und es bleiben wie in Close
   nur die Avatare; mehr Avatare, als die Spalte fasst, enden an ihrer Kante. Der Hinweis „deaktiviert“ kürzt mit „…“ [Abnahme ET-01] */
.tel-numbers .tel-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-members { display: flex; align-items: center; column-gap: 4px; flex-wrap: wrap; height: 20px; min-width: 0; overflow: hidden; }
.tel-members__stack { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; }
.tel-member { display: inline-flex; flex: none; }
.tel-member.is-off .avatar { opacity: var(--faded-opacity); }
:root[data-theme="dark"] .tel-member.is-off .avatar { filter: grayscale(1); }
.tel-members__name { flex: none; margin-left: 4px; font-size: 13px; line-height: 18px; color: var(--text-medium); white-space: nowrap; }
.tel-members .tel-missing { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-table-empty td { height: 72px; text-align: center; color: var(--text-medium); }
.tel-hint { margin: 16px 0 0; font-size: 13px; line-height: 18px; color: var(--text-light); max-width: 880px; }
.tel-hint + .tel-hint { margin-top: 8px; }
.tel-hint--flush { margin: 0 0 16px; }
.tel-gap { height: 16px; }
.tel-actions--top { margin-top: 16px; }
.tel-actions--bottom { margin: 0 0 16px; }
.tel-switch-help--inline { margin: -4px 0 12px; }
.menu-item .check.is-off { visibility: hidden; }
.tel-presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; }
.tel-presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-30); flex: none; }
.tel-presence-ok { color: var(--text-default); }
.tel-presence-ok::before { background: var(--green-40); }
.tel-presence-warn { color: var(--red-60); font-weight: 600; }
.tel-presence-warn::before { background: var(--red-50); }
.tel-presence-muted { color: var(--text-light); }
.tel-user { display: flex; align-items: center; gap: 8px; font-weight: 600; }
/* Team › Eingehende Anrufe im Browser (13.10.2026): Ablauf je Anruf als kurze Liste */
.tel-gap-top { margin-top: 32px; }
.tel-incoming td, .tel-incoming tbody th { vertical-align: top; }
.tel-incoming .tel-steps { margin: 0; }
.tel-absence-cell > .tel-absence-state { display: inline-flex; vertical-align: middle; margin-right: 12px; }
.tel-absence { display: inline-block; vertical-align: middle; }
.tel-absence[open] { display: block; margin-top: 8px; }
.tel-absence > summary { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--btn-border); border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 18px; color: var(--text-default); cursor: pointer; list-style: none; }
.tel-absence > summary::-webkit-details-marker { display: none; }
.tel-absence > summary:hover { background: var(--btn-bg-hover); }
.tel-absence-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; max-width: 520px; }
.tel-absence-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Formulare wie M06: höchstens 592 px, Abschnitte durch Linien getrennt, Titel 16/24 700, Hauptknopf links unter den Feldern */
.tel-form { max-width: var(--settings-form-w, 592px); }
.tel-form--wide { max-width: 880px; }
/* Optionen: fünf Abschnitte in zwei Spalten, sobald zwei Spalten von 400 px Platz haben – sonst wäre der Reiter über zwei Fensterhöhen lang (C-14) */
.tel-options.tel-form { max-width: 1232px; }
.tel-columns { columns: 2 400px; column-gap: 48px; margin: 0 0 24px; }
.tel-columns > .tel-section { break-inside: avoid; }
.tel-columns > .tel-section:last-of-type { border-bottom: 1px solid var(--border-default); margin-bottom: 24px; }
.tel-actions--bar { padding-top: 0; }
.tel-section { padding: 0 0 24px; margin: 0 0 24px; border: 0; border-bottom: 1px solid var(--border-default); min-width: 0; }
.tel-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.tel-section__title { display: block; width: 100%; margin: 0 0 12px; padding: 0; font: 700 16px/24px var(--font-sans); color: var(--text-default); text-transform: none; letter-spacing: 0; }
.tel-section__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.tel-section__head .tel-section__title { width: auto; margin: 0; }
.tel-section__head .status-pill { height: 18px; }
.tel-section > p, .tel-section > .tel-text { margin: 0 0 12px; color: var(--text-medium); }
.tel-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.tel-fields--one { grid-template-columns: minmax(0, 288px); }
.tel-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; font-weight: 400; }
.tel-field--full { grid-column: 1 / -1; }
.tel-field > .label, .tel-field > span.label { font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.tel-field input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .tel-field select, .tel-field textarea {
  width: 100%; min-width: 0; height: 32px; padding: 0 12px; border: 1px solid var(--form-border); border-radius: 8px; background: var(--form-bg);
  font: 400 14px/20px var(--font-sans); color: var(--text-default); outline: 0;
}
.tel-field textarea { height: auto; min-height: 72px; padding: 6px 12px; resize: vertical; }
.tel-field select:not([multiple]) {
  appearance: none; -webkit-appearance: none; padding-right: 30px; background-repeat: no-repeat; background-position: right 8px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.tel-field input:focus, .tel-field select:focus, .tel-field textarea:focus { border-color: var(--form-border-focus); }
/* Auswahl als Knopf mit Menü (Tabellenzeilen: kein <select>, Regel 8): sieht aus wie das Auswahlfeld daneben */
.tel-field .tel-pick { justify-content: space-between; gap: 8px; width: 100%; min-width: 0; height: 32px; padding: 0 8px 0 12px; border-color: var(--form-border); border-radius: 8px; background: var(--form-bg); font-weight: 400; }
.tel-pick__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-pick__caret { flex: none; color: var(--text-light); }
.tel-pick-menu { min-width: 240px; max-height: 320px; overflow-y: auto; }
.tel-field.has-error input, .tel-field.has-error select, .tel-field.has-error textarea { border-color: var(--border-danger); }
.tel-field .field-help, .tel-switch-help { font-size: 13px; line-height: 18px; color: var(--text-light); margin: 0; }
.tel-field .field-error, .tel-section .field-error { font-size: 13px; line-height: 18px; color: var(--text-danger); margin: 0; }
.tel-switch { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font: 400 14px/20px var(--font-sans); color: var(--text-default); cursor: pointer; }
.tel-switch .switch-track { flex: none; margin-top: 2px; }
.tel-switch-help { display: block; margin: -8px 0 12px 38px; }
.tel-switch + .field-error { display: block; margin: -8px 0 12px 38px; }
.tel-days { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tel-days .checkbox { font-weight: 400; }
.tel-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tel-actions .text-muted { font-size: 13px; }
.tel-inline { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tel-inline .tel-field { flex: 0 1 288px; }
/* lange Bezeichnung („Eigene Handynummer (für „Über mein Handy verbinden“)“) bleibt einzeilig über Feld und Knopf, statt im 288-px-Feld
   umzubrechen; in schmalen Fenstern (Inhalt unter rund 490 px) bricht sie wie bisher um, damit nichts seitlich übersteht */
@media (min-width: 1024px) { .tel-inline .tel-field > .label { white-space: nowrap; } }
.tel-info { padding: 16px; border: 1px solid var(--gray-5); border-radius: 8px; background: var(--gray-1); }
.tel-info__title { margin: 0 0 4px; font: 600 14px/20px var(--font-sans); color: var(--text-default); }
.tel-info p { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--text-medium); }
.tel-info p:last-child { margin-bottom: 0; }
.tel-info ul, .tel-info ol { margin: 0; padding-left: 20px; color: var(--text-medium); }
.tel-info li { margin: 4px 0; }
.tel-info a { color: var(--link); }
.tel-drop-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
@media (max-width: 720px) { .tel-drop-options, .tel-fields { grid-template-columns: 1fr; } }
.tel-drop-options > * { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); min-width: 0; }
.tel-drop-options h3 { margin: 0; font: 600 14px/20px var(--font-sans); }
.tel-drop-options p { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.tel-drop-options input[type=file] { max-width: 100%; font-size: 13px; }
/* Meine Mailbox-Ansage (13.10.2026, profile.html #tel-greeting): Aufnahme im Browser (wp_telephony_greeting.js) und Hochladen als
   zwei Karten untereinander – die Aufnahme braucht die volle Breite für Zeit, Pegel, Vorhören und drei Knöpfe */
.tel-greeting-default { margin: 0 0 12px; }
.tel-greeting-default .tel-greeting-quote { color: var(--text-default); }
.tel-greeting-options { grid-template-columns: minmax(0, 1fr); }
.tel-greeting-view { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; }
.tel-greeting-view .tel-audio { margin: 0; }
.tel-drop-options .tel-greeting-live { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text-default); }
.tel-greeting-live strong { font-variant-numeric: tabular-nums; }
.tel-greeting-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red-50); animation: tel-pulse 1.2s ease-in-out infinite; }
.tel-greeting-meter { display: block; width: 100%; max-width: 420px; height: 6px; border-radius: 3px; background: var(--gray-5); overflow: hidden; }
.tel-greeting-meter > span { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--green-40); transition: width .1s linear; }
.tel-drop-options .tel-greeting-msg { color: var(--text-default); }
.tel-drop-options .tel-greeting-msg.is-error { color: var(--text-danger); }
.tel-drop-options .tel-greeting-msg.is-warn { color: var(--text-warn); }
.tel-greeting-script { width: 100%; padding-top: 8px; border-top: 1px solid var(--border-light); }
.tel-section > .tel-greeting-scope { margin: 12px 0 0; font-size: 13px; line-height: 18px; color: var(--text-light); }
.tel-team .tel-greeting-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tel-checks { margin: 0 0 16px; }
.tel-checks .alert { margin: 0 0 8px; }
.tel-checks .alert p { margin: 0; }
.tel-facts { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 18px; color: var(--text-medium); }
.tel-facts li { margin: 2px 0; }
.tel-facts code, .tel-table code { font-size: 12px; overflow-wrap: anywhere; }
.tel-env code { font-family: var(--font-mono); font-size: 12px; color: var(--text-default); }
.tel-env td, .tel-env tbody th { height: 41px; }   /* 40 px + Linie wie die Einstellungstabellen (border-box, ES-05) */
.tel-guide { margin: 0; padding-left: 20px; color: var(--text-default); }
.tel-guide li { margin: 6px 0; }
.tel-guide a, .tel-hooks a { color: var(--link); }
.tel-hooks { margin: 0; }
.tel-hooks dt { margin: 12px 0 4px; font: 600 14px/20px var(--font-sans); }
.tel-hooks dt:first-child { margin-top: 0; }
.tel-hooks dd { margin: 0; overflow-wrap: anywhere; color: var(--text-medium); }
.tel-hooks code[data-copy] { cursor: copy; background: var(--gray-5); padding: 2px 6px; border-radius: 4px; color: var(--text-default); }
.tel-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; color: var(--text-medium); font-size: 13px; line-height: 18px; }
.tel-back:hover { color: var(--text-default); text-decoration: none; }
.tel-subtitle { margin: 0 0 16px; font: 700 16px/24px var(--font-sans); color: var(--text-default); }
.tel-number-form .tel-switch { margin-bottom: 0; }
/* Rufnummer als Detailseite wie Close [E437, E438; KV-09]: einspaltig 640 px, Abschnitte durch Linien getrennt, „Speichern · Abbrechen · ⋯“
   in der Titelzone des Einstellungs-Rahmens. Rückweg, Titel und Knöpfe im Inhalt gelten nur, solange die Titelzone sie nicht zeigt. */
.tel-number-form.tel-form { max-width: 640px; }
.tel-number-head .tel-back { margin-bottom: 4px; }
.tel-number-title { margin: 0 0 24px; font: 700 24px/32px var(--font-sans); color: var(--text-default); overflow-wrap: anywhere; }
.tel-title__label { margin-left: 8px; color: var(--text-light); }
.tel-title .tel-num__badge, .tel-number-title .tel-num__badge { margin-left: 8px; vertical-align: middle; }
.tel-tools__sep { flex: none; width: 1px; height: 20px; margin: 0 4px; background: var(--border-default); }
.tel-section__title + .tel-section__sub { margin: -8px 0 12px; color: var(--text-medium); }
.tel-number-form .tel-fields { margin-bottom: 12px; }
.tel-number-form .tel-fields:last-child, .tel-number-form .tel-section > .tel-field:last-child { margin-bottom: 0; }
.tel-number-form .tel-section > .field-error { display: block; margin: 0 0 8px; }
.tel-card { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.tel-card:last-child { margin-bottom: 0; }
.tel-card .tel-switch-help { margin: 4px 0 0 38px; }
/* sipgate einrichten (sipgate/settings.html): Unterseite aus denselben Bausteinen – Texte höchstens so breit wie die Formulare,
   Tabellen mit einzeiligen Zeilen von 41 px (40 px + Linie wie die Einstellungstabellen, ES-05), Zuordnung „Abschluss-Nutzer“
   als Knopf mit Menü neben „Speichern“ (kein natives Auswahlfeld in der Zeile, Regel 8) */
.sipgate-settings .tel-section > p, .sipgate-settings .tel-section > .alert { max-width: 880px; }
.sipgate-subtitle { margin: 8px 0 4px; font-size: 14px; line-height: 20px; }
.sipgate-table td, .sipgate-table tbody th { height: 41px; }
.sipgate-map { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.sipgate-map .tel-field { flex: 1 1 280px; min-width: 180px; max-width: 320px; }
.sipgate-map > .btn { flex: none; }
.tel-number-form .tel-hint--flush { margin: 12px 0 0; }
.tel-number-foot { padding-top: 8px; }
.settings-main:has(.settings-head .tel-title) .tel-number-head,
.settings-main:has(.settings-head [form="tel-number-form"]) .tel-number-foot { display: none; }

/* ---------- Unterwegs: Auswahl beim Tippen auf eine Nummer (Handy, Tablet) ---------- */
.phone-sheet { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1100; display: flex; flex-direction: column; gap: 8px;
  padding: 16px; background: var(--surface); border: 1px solid var(--border-default); border-radius: 12px;
  box-shadow: var(--shadow-4); max-width: 480px; margin: 0 auto; }
.phone-sheet-title { margin: 0 0 4px; font: 600 16px/24px var(--font-sans); }
.phone-sheet .btn { width: 100%; justify-content: center; min-height: 44px; }
.phone-sheet p { margin: -4px 0 4px; }
@media print { .phone-sheet { display: none; } }

/* ---------- Aufnahme wie Close: Pille „● REC ⏸“ in der Gesprächsleiste zwischen Stumm und Tastenfeld [E177, 20_inbox.md N6] und im Panel.
   data-rec="on" läuft (rot getönt, Pause-Zeichen) · "paused" angehalten (grau, Weiter-Zeichen) · "off" keine Aufnahme (grau, nur „● REC“).
   Im Dokument steht der Knopf vor „Stumm“; die Reihenfolge der Leiste: Stumm (0) → REC (1) → Tastenfeld … Auflegen (2). ---------- */
.call-bar__rec { order: 1; }
.call-bar__rec ~ :not(.call-bar__mute) { order: 2; }
.call-bar__rec, .phone-btn--rec {
  flex: none; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--border-default); border-radius: 999px;
  background: var(--surface); color: var(--text-medium); font: 600 12px/16px var(--font-sans); letter-spacing: .02em; cursor: pointer;
}
.phone-btn--rec { width: auto; height: 36px; display: inline-flex; }
.call-bar__rec:hover, .phone-btn--rec:hover { background: var(--gray-5); }
.call-bar__rec-dot, .phone-btn__rec-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-40); }
.call-bar__rec-icon { display: none; }
.call-bar__rec-icon .icon { width: 12px; height: 12px; }
.call-bar__rec[data-rec="on"], .phone-btn--rec[data-rec="on"], .phone-btn--rec[data-rec="on"][aria-pressed="true"] {
  border-color: var(--red-10); background: var(--red-5); color: var(--red-50);
}
.call-bar__rec[data-rec="on"]:hover, .phone-btn--rec[data-rec="on"]:hover { background: var(--red-10); }
.call-bar__rec[data-rec="on"] .call-bar__rec-dot, .phone-btn--rec[data-rec="on"] .phone-btn__rec-dot { background: var(--red-50); }
.call-bar__rec[data-rec="on"] .call-bar__rec-icon--pause, .call-bar__rec[data-rec="paused"] .call-bar__rec-icon--play { display: inline-flex; }
.call-bar__rec[disabled], .phone-btn--rec[disabled] { opacity: .6; cursor: progress; }
.rec-terms__check { margin-top: 12px; align-items: flex-start; }
.rec-terms__check input { margin-top: 2px; }
.tel-recording-terms .checkbox { margin-top: 8px; }
.tel-recording-users { margin: 8px 0 12px; }
