/* wp_bridge – Paket bridge/WP7 (Close-Brücke): Zustandspunkt im Hilfe-Menü und Statusseite unter Einstellungen › VERBINDEN.
   Von base.html eingebunden. Farben nur aus den Tokens (SPEC_UI_CLOSE_1ZU1 A.1); Layout/Tabellen: wp_settings.css. */
.bridge-dot { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border-default); background: var(--surface); color: var(--text-medium);
  font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bridge-dot:hover { text-decoration: none; background: var(--gray-5); color: var(--text-default); }
.bridge-dot__light, .bridge-state__light { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-40); flex-shrink: 0; }
.bridge-dot--green .bridge-dot__light, .bridge-state--green .bridge-state__light { background: var(--green-40); }
.bridge-dot--yellow .bridge-dot__light, .bridge-state--yellow .bridge-state__light { background: var(--gold-20); }
:root[data-theme="dark"] :is(.bridge-dot--yellow .bridge-dot__light, .bridge-state--yellow .bridge-state__light) { background: var(--gold-70); }   /* Ampel im Dunkeln gelb */
.bridge-dot--red .bridge-dot__light, .bridge-state--red .bridge-state__light { background: var(--red-50); animation: bridge-pulse 1.6s ease-in-out infinite; }
.bridge-dot--red { color: var(--text-danger); }
@keyframes bridge-pulse { 50% { box-shadow: 0 0 0 5px var(--red-5); } }
@media (prefers-reduced-motion: reduce) { .bridge-dot--red .bridge-dot__light, .bridge-state--red .bridge-state__light { animation: none; } }
@media (max-width: 640px) { .bridge-dot__text { display: none; } .bridge-dot { padding: 0 8px; } }

.bridge-panel { display: flex; flex-direction: column; gap: 24px; }
.bridge-panel > .settings-section { margin: 0; padding: 0; border: 0; }
.bridge-panel > .settings-alert, .bridge-panel > .settings-info { margin: 0; }
.bridge-state__body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bridge-state__light { width: 12px; height: 12px; }
.bridge-state__text { flex: 1 1 320px; min-width: 0; }
.bridge-state__text .settings-section__title { margin: 0; }
.bridge-state__text p { margin: 2px 0 0; }
.bridge-state__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bridge-state__actions form { margin: 0; }
/* Hinweiszeile mit Icon: Fließtext (kein Flex – sonst stünden Text und <code> als einzelne Flex-Kinder mit Lücke da:
   „Trockenmodus ( BRIDGE_DRY_RUN=1 )“); das Icon hängt links aus, Folgezeilen stehen bündig unter dem Text */
.bridge-note { position: relative; padding-left: 20px; color: var(--text-warn); font-size: 14px; line-height: 20px; }
.bridge-note > .icon:first-child { position: absolute; left: 0; top: 3px; }
.bridge-bad { color: var(--text-danger); font-weight: 600; }
/* Close-Spiegel und Löschbremse (crm/bridge/_mirror.html aus dem Daten-Build; Markup .card/.card-header/.card-body/
   .table-compact): im Muster der übrigen Einstellungsseiten – Abschnitt ohne Kasten, Überschrift 16/24 700, Text 14/20,
   Tabelle im Rahmen mit grauem Kopf (41 px) und 40-px-Zeilen, Knöpfe 32 px. Löschbremse: Einleitung als rotes Hinweisband. */
.bridge-panel > .card.bridge-section { border: 0; border-radius: 0; background: none; }
.bridge-panel > .bridge-section > .card-header { min-height: 0; margin: 0 0 12px; padding: 0; border: 0; }
.bridge-panel > .bridge-section .card-title { margin: 0; font: 700 16px/24px var(--font-sans); color: var(--text-default); }
.bridge-panel > .bridge-section > .card-body { padding: 0; }
.bridge-panel > .bridge-section > .card-body p { margin: 0 0 8px; max-width: 960px; font-size: 14px; line-height: 20px; }
.bridge-panel > .bridge-section > .card-body p:last-child { margin-bottom: 0; }
.bridge-panel > .bridge-section > .card-body p > .icon { vertical-align: -2px; }
.bridge-panel > .bridge-section > .card-body .text-muted { color: var(--text-light); }
.bridge-panel > .bridge-section > .table-wrap { margin: 12px 0; border: 1px solid var(--border-default); border-radius: 8px; overflow-x: auto; background: var(--surface); }
.bridge-panel > .bridge-section > .table-wrap:last-child { margin-bottom: 0; }
.bridge-panel > .bridge-section .table-compact { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--font-sans); }
.bridge-panel > .bridge-section .table-compact th { height: 41px; padding: 0 12px; background: var(--table-header); border-bottom: 1px solid var(--border-default); font-size: 14px; font-weight: 600; color: var(--text-default); text-align: left; white-space: nowrap; }
.bridge-panel > .bridge-section .table-compact th:first-child { border-top-left-radius: 7px; }
.bridge-panel > .bridge-section .table-compact th:last-child { border-top-right-radius: 7px; }
.bridge-panel > .bridge-section .table-compact td { height: 40px; padding: 6px 12px; border-bottom: 1px solid var(--border-default); font-size: 14px; color: var(--text-default); vertical-align: middle; white-space: nowrap; }
.bridge-panel > .bridge-section .table-compact td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 240px; }
.bridge-panel > .bridge-section .table-compact tbody tr:last-child > td { border-bottom: 0; }
.bridge-panel > .bridge-section .table-compact tbody tr:hover > td { background: var(--table-cell-hover); }
.bridge-panel > .bridge-section .table-compact a { color: var(--link); }
.bridge-panel > .bridge-brake > .card-header .card-title .icon { color: var(--icon-danger); }
.bridge-panel > .bridge-brake > .card-header + .card-body { padding: 10px 12px; border-radius: 8px; background: var(--red-5); color: var(--red-70); }
.bridge-panel > .bridge-brake > .card-header + .card-body .bridge-note { color: inherit; }
.bridge-panel > .bridge-brake .bridge-brake__footer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bridge-panel > .bridge-brake .bridge-brake__footer p { margin: 0; }
.bridge-panel > .bridge-brake .bridge-state__actions .btn-sm, .bridge-panel > .bridge-brake .bridge-brake__footer > form > .btn-sm { height: 32px; padding: 0 12px; font-size: 14px; line-height: 20px; gap: 8px; }
.bridge-panel > .bridge-brake .bridge-brake__hint { max-width: 960px; font-size: 13px; line-height: 18px; color: var(--text-light); }
.bridge-error { color: var(--text-light); font-size: 13px; line-height: 18px; max-width: 520px; overflow-wrap: anywhere; }
.bridge-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-default); border-radius: 8px; }
.bridge-stat { padding: 12px 16px; min-width: 0; border-right: 1px solid var(--border-default); }
.bridge-stat:last-child { border-right: 0; }
.bridge-stats .stat-value { font: 700 18px/24px var(--font-sans); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bridge-stats .stat-delta { overflow-wrap: anywhere; }
.bridge-help ul { margin: 8px 0 0; padding-left: 18px; }
.bridge-help li { margin-bottom: 6px; }
.bridge-help strong { color: var(--text-default); }
@media (max-width: 1100px) { .bridge-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bridge-stat:nth-child(2) { border-right: 0; } .bridge-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border-default); } }
