* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.18);
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a {
  color: #67e8f9;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(15, 23, 42, 0.45);
  padding: 20px 14px;
  background: #020617;
  border-right: 1px solid var(--border);
}

.sidebar::-webkit-scrollbar {
  width: 9px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.45);
}

.sidebar::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid rgba(15, 23, 42, 0.45);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.55);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.78);
}

.sidebar-nav {
  padding-bottom: 24px;
}

.sidebar-brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 2px 8px 22px;
}

.sidebar-subtitle {
  color: var(--muted);
  font-size: 11px;
  margin: -16px 8px 20px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section {
  margin: 18px 8px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  background: linear-gradient(90deg, #1a4edc 0%, #13d2f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.sidebar-link,
.sidebar-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-button:hover {
  background: #0b1220;
  border-color: var(--border);
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--cyan-soft);
  border-color: rgba(103, 232, 249, .32);
  color: #ffffff;
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-button {
  font-family: inherit;
}

.main {
  min-width: 0;
  padding: 24px 28px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-note {
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.metric-card {
  min-height: 105px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.ok {
  color: var(--green);
}

.bad {
  color: var(--red);
}

.warn {
  color: var(--orange);
}

.unknown {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.tenants-scroll {
  max-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tenants-scroll table {
  margin: 0;
}

.tenants-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--border);
}

.tenants-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.tenants-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

.tenants-scroll::-webkit-scrollbar-track {
  background: #020617;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td,
th {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.tenants-table {
  font-size: 12px;
}

.tenants-table {
  table-layout: fixed;
  width: 100%;
}

.tenants-table th,
.tenants-table td {
  overflow: hidden;
}

.tenants-table th:nth-child(1),
.tenants-table td:nth-child(1) { width: 6%; }

.tenants-table th:nth-child(2),
.tenants-table td:nth-child(2) { width: 5%; }

.tenants-table th:nth-child(3),
.tenants-table td:nth-child(3) { width: 12%; }

.tenants-table th:nth-child(4),
.tenants-table td:nth-child(4) { width: 16%; }

.tenants-table th:nth-child(5),
.tenants-table td:nth-child(5) { width: 13%; }

.tenants-table th:nth-child(6),
.tenants-table td:nth-child(6) { width: 8%; }

.tenants-table th:nth-child(7),
.tenants-table td:nth-child(7) { width: 9%; }

.tenants-table th:nth-child(8),
.tenants-table td:nth-child(8) { width: 10%; }

.tenants-table th:nth-child(9),
.tenants-table td:nth-child(9) { width: 7%; }

.tenants-table th:nth-child(10),
.tenants-table td:nth-child(10) { width: 8%; }

.tenants-table th:nth-child(11),
.tenants-table td:nth-child(11) { width: 6%; }

.tenant-name-cell,
.tenant-url-cell,
.dns-ip-cell,
.compact-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tenant-url-cell a,
.tenant-url-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dns-ip-cell {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  font-size: 12px;
  line-height: 1.25;
}

.firmware-cell {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.monitoring-cell .pill,
.monitoring-cell .depth-badge,
.location-cell .pill {
  margin: 0 4px 4px 0;
}

.compact-service .service-badge {
  max-width: 100%;
}


.tenants-table th,
.tenants-table td {
  padding: 7px 8px;
}

input,
select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #020617;
  color: var(--text);
}

input[type="file"] {
  padding: 12px;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--cyan);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}

.btn-danger {
  background: #b91c1c;
}

.btn-secondary {
  background: #374151;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.login {
  max-width: 420px;
  margin: 80px auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 800;
  font-size: 11px;
}

.pill.ok {
  background: #052e16;
  color: #22c55e;
}

.pill.bad {
  background: #450a0a;
  color: #ef4444;
}

.pill.warn {
  background: #451a03;
  color: #f59e0b;
}

.pill.unknown {
  background: #1f2937;
  color: #cbd5e1;
}

pre {
  white-space: pre-wrap;
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: #cbd5e1;
  margin: 0;
  font-size: 12px;
}

.actions {
  white-space: nowrap;
}

.actions form {
  display: inline-block;
  margin-left: 6px;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  line-height: 1.15;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-edit {
  background: rgba(15, 23, 42, 0.85);
  border-color: #334155;
  color: #cbd5e1;
}

.btn-edit:hover {
  background: #1e293b;
  border-color: #475569;
  color: #ffffff;
}

.btn-delete {
  background: rgba(185, 28, 28, 0.14);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fca5a5;
}

.btn-delete:hover {
  background: rgba(185, 28, 28, 0.24);
  border-color: rgba(248, 113, 113, 0.52);
  color: #fecaca;
}

.notice {
  border: 1px solid var(--border);
  background: #020617;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.notice.ok-border {
  border-color: rgba(34, 197, 94, .45);
}

.notice.warn-border {
  border-color: rgba(245, 158, 11, .45);
}

.notice.bad-border {
  border-color: rgba(239, 68, 68, .45);
}

.small-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #cbd5e1;
}

.is-hidden {
  display: none !important;
}

.footer {
  margin-top: 28px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-section,
  .sidebar-subtitle {
    display: none;
  }

  .grid,
  .row {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 18px;
  }
}

.compact-header {
  align-items: flex-start;
}

.bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bulk-counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-sm:disabled,
.btn-sm:disabled:hover {
  opacity: .45;
  cursor: not-allowed;
  background: rgba(51, 65, 85, 0.35);
  border-color: rgba(100, 116, 139, 0.35);
  color: #94a3b8;
}

.select-col {
  width: 34px;
  min-width: 34px;
  text-align: center;
  vertical-align: middle;
}

.tenant-checkbox {
  width: 14px;
  height: 14px;
  padding: 0;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.cloud-health-card {
  border-width: 1px;
}

.cloud-health-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cloud-health-title {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.cloud-health-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 240px;
}

@media (max-width: 800px) {
  .cloud-health-main {
    flex-direction: column;
  }

  .cloud-health-badges {
    justify-content: flex-start;
    min-width: 0;
  }
}

.region-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.region-health-item {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
}

.region-health-values {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 800px) {
  .region-health-grid {
    grid-template-columns: 1fr;
  }
}

.simulation-card {
  border-style: dashed;
}

.simulation-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.simulation-actions form {
  margin: 0;
}

.ycm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.ycm-actions form {
  margin: 0;
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.admin-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.vertical-actions {
  flex-direction: column;
  align-items: flex-start;
}

.vertical-actions .btn,
.vertical-actions form {
  width: 100%;
}

@media (max-width: 900px) {
  .admin-test-grid {
    grid-template-columns: 1fr;
  }
}


.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #0891B2;
  background: #0891B2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: #0ea5c6;
  border-color: #0ea5c6;
}

.small-metric {
  font-size: 16px;
  line-height: 1.25;
}

.trunk-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}


.trunk-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-export {
  background: #0891B2;
  border-color: #0891B2;
  color: #ffffff;
  text-decoration: none;
}

.btn-export:hover {
  background: #0ea5c6;
  border-color: #0ea5c6;
  color: #ffffff;
}

.trunk-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.trunk-provider-card {
  min-height: 98px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
  padding: 16px;
}

.trunk-provider-name {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
}

.trunk-provider-count {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
}

.trunk-provider-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}


.trunk-provider-card {
  text-align: left;
  color: inherit;
  font-family: inherit;
}

.trunk-provider-filter {
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.trunk-provider-filter:hover,
.trunk-provider-filter.is-active {
  border-color: rgba(8, 145, 178, 0.85);
  background: rgba(8, 145, 178, 0.14);
  transform: translateY(-1px);
}

.trunk-provider-filter:focus-visible {
  outline: 2px solid #0891B2;
  outline-offset: 2px;
}


.trunk-assignment-scroll {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.trunk-assignment-scroll table {
  margin: 0;
}

.trunk-assignment-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--border);
}

.trunk-assignment-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.trunk-assignment-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

.trunk-assignment-scroll::-webkit-scrollbar-track {
  background: #020617;
}


.canton-impact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.canton-impact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(2, 6, 23, .28);
}

.location-form {
  min-width: 520px;
}

.location-form-grid {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.location-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-form-grid label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.location-form-grid .wide {
  grid-column: span 2;
}

.location-form input,
.location-form select {
  width: 100%;
  background: #020617;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.small-btn {
  padding: 8px 10px;
  min-height: 34px;
  font-size: 12px;
}

.btn.danger {
  border-color: rgba(239, 68, 68, .42);
  color: #fecaca;
}

@media (max-width: 1000px) {
  .canton-impact-list {
    grid-template-columns: 1fr;
  }

  .location-form {
    min-width: 360px;
  }

  .location-form-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}


/* Swiss Standortkarte */
.swiss-location-card {
  overflow: hidden;
}

.swiss-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.swiss-map-wrap {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 45% 45%, rgba(14, 165, 233, 0.10), transparent 42%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(3, 7, 18, 0.96));
  overflow: hidden;
}

.swiss-map.realistic {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
}

.swiss-map-base-image {
  opacity: 0.88;
  filter: url(#swissMapDim) saturate(0.8) contrast(1.08);
}

.swiss-map-dark-overlay {
  fill: rgba(2, 6, 23, 0.38);
  pointer-events: none;
}

.swiss-map-canton-label {
  font-size: 20px;
  font-weight: 800;
  fill: rgba(226, 232, 240, 0.94);
  stroke: rgba(2, 6, 23, 0.90);
  stroke-width: 5px;
  paint-order: stroke;
  text-anchor: middle;
  letter-spacing: 0.03em;
  pointer-events: none;
}

.swiss-map-canton-label.active {
  fill: #67e8f9;
}

.swiss-map-canton-label.problem {
  fill: #fca5a5;
}

.swiss-map-impact-canton circle {
  fill: rgba(239, 68, 68, 0.10);
  stroke: rgba(239, 68, 68, 0.95);
  stroke-width: 4px;
  stroke-dasharray: 9 7;
  pointer-events: none;
}

.swiss-map-impact-canton text {
  fill: #fecaca;
  font-size: 20px;
  font-weight: 800;
  text-anchor: middle;
  stroke: rgba(2, 6, 23, 0.90);
  stroke-width: 4px;
  paint-order: stroke;
  pointer-events: none;
}

.swiss-map-point-link {
  cursor: pointer;
}

.swiss-map-point {
  stroke: rgba(2, 6, 23, 0.98);
  stroke-width: 5px;
  paint-order: stroke;
  transition: transform 140ms ease, filter 140ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.swiss-map-point-link:hover .swiss-map-point {
  transform: scale(1.35);
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.65));
}

.swiss-map-point.ok {
  fill: #22c55e;
}

.swiss-map-point.problem {
  fill: #ef4444;
}

.swiss-map-side {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.swiss-map-kpis {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.swiss-map-kpis div {
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.swiss-map-kpis strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.swiss-map-kpis span {
  display: block;
  margin-top: 4px;
  color: #bfdbfe;
  font-size: 12px;
}

.swiss-map-legend {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: #cbd5e1;
  font-size: 13px;
}

.legend-dot,
.legend-ring {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: -1px;
}

.legend-dot.ok {
  background: #22c55e;
}

.legend-dot.bad {
  background: #ef4444;
}

.legend-ring.bad {
  border: 2px solid #ef4444;
}

@media (max-width: 1100px) {
  .swiss-map-layout {
    grid-template-columns: 1fr;
  }

  .swiss-map-side {
    display: none;
  }

  .swiss-map-canton-label {
    font-size: 24px;
  }
}

.page-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.canton-filter-form {
  margin: 0;
}

.canton-filter-select {
  min-width: 210px;
  height: 39px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: var(--panel-2);
  color: #e5f7ff;
  padding: 0 38px 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  color-scheme: dark;
}

.canton-filter-select option {
  background: #0f172a;
  color: #e5f7ff;
  font-weight: 800;
}

.canton-filter-select option:checked {
  background: #0891b2;
  color: #ffffff;
}

.canton-filter-select option:hover {
  background: #164e63;
  color: #ffffff;
}

.canton-filter-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .16);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .canton-filter-form,
  .canton-filter-select {
    width: 100%;
  }
}


.plz-autofill-status {
  display: block;
  margin-top: 4px;
  min-height: 16px;
  font-size: 11px;
  line-height: 1.3;
}

.plz-autofill-status.ok {
  color: var(--ok);
}

.plz-autofill-status.warn {
  color: var(--warn);
}

.plz-autofill-status.bad {
  color: var(--bad);
}

.provider-outage-list {
  display: grid;
  gap: 10px;
}

.provider-outage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, .34);
}

.provider-outage-row.ok {
  border-color: rgba(34, 197, 94, .22);
}

.provider-outage-row.warn {
  border-color: rgba(245, 158, 11, .38);
  background: rgba(245, 158, 11, .06);
}

.provider-outage-row.bad {
  border-color: rgba(239, 68, 68, .42);
  background: rgba(239, 68, 68, .07);
}

.provider-outage-meta {
  text-align: right;
  min-width: 170px;
}

.swiss-map-provider-impact circle {
  fill: transparent;
  stroke-width: 4;
  stroke-dasharray: 9 7;
  opacity: .95;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, .35));
}

.swiss-map-provider-impact.warning circle {
  stroke: var(--orange);
}

.swiss-map-provider-impact.critical circle {
  stroke: var(--red);
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, .42));
}

.legend-ring.warn {
  border-color: var(--orange);
  box-shadow: 0 0 12px rgba(245, 158, 11, .34);
}

@media (max-width: 780px) {
  .provider-outage-row {
    grid-template-columns: 1fr;
  }
  .provider-outage-meta {
    text-align: left;
  }
}

/* Provider watch sidebar */
.sidebar-provider-watch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 12px;
}

.sidebar-provider-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  font-size: 12px;
  line-height: 1.15;
}

.sidebar-provider-row.ok {
  border-color: rgba(34, 197, 94, 0.22);
}

.sidebar-provider-row.warn {
  border-color: rgba(245, 158, 11, 0.42);
}

.sidebar-provider-row.bad {
  border-color: rgba(239, 68, 68, 0.45);
}

.sidebar-provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #64748b;
}

.sidebar-provider-dot.ok { background: #22c55e; }
.sidebar-provider-dot.warn { background: #f59e0b; }
.sidebar-provider-dot.bad { background: #ef4444; }
.sidebar-provider-dot.unknown { background: #64748b; }

.sidebar-provider-name {
  color: #dbeafe;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-provider-status {
  color: #93c5fd;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.sidebar-provider-empty {
  color: #93a4bd;
  font-size: 12px;
  padding: 8px;
}

/* Provider page */
.provider-metric-grid {
  margin-bottom: 16px;
}

.provider-watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.provider-watch-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 23, .34);
}

.provider-watch-card.ok {
  border-color: rgba(34, 197, 94, .22);
}

.provider-watch-card.warn {
  border-color: rgba(245, 158, 11, .40);
  background: rgba(245, 158, 11, .06);
}

.provider-watch-card.bad {
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .07);
}

.provider-watch-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.provider-watch-meta {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #bfdbfe;
}

.provider-logic-list {
  display: grid;
  gap: 10px;
  color: #bfdbfe;
}

.provider-card-badges {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 150px;
}

.provider-source-badge {
  border: 1px solid rgba(148, 163, 184, .20);
}

.provider-source-badge.official {
  background: rgba(14, 165, 233, .14);
  color: #7dd3fc;
}

.provider-source-badge.internal {
  background: rgba(34, 197, 94, .10);
  color: #86efac;
}

.provider-source-badge.external {
  background: rgba(245, 158, 11, .12);
  color: #fcd34d;
}

.provider-source-badge.unknown {
  background: rgba(100, 116, 139, .18);
  color: #cbd5e1;
}

@media (max-width: 720px) {
  .provider-watch-card-head {
    flex-direction: column;
  }

  .provider-card-badges {
    justify-content: flex-start;
    min-width: 0;
  }
}

/* Provider page v7 polished header and KPI cards */
.provider-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(103, 232, 249, .12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(8, 145, 178, .18), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(2, 6, 23, .92));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

.provider-eyebrow {
  margin-bottom: 8px;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.provider-title {
  font-size: 30px;
  line-height: 1.05;
}

.provider-subtitle {
  max-width: 740px;
  margin-top: 8px;
  color: #b7c7dd;
  font-size: 13px;
  line-height: 1.55;
}

.provider-hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.provider-primary-btn,
.provider-secondary-btn {
  min-height: 42px;
  padding-inline: 18px;
  border: 1px solid rgba(103, 232, 249, .18);
  box-shadow: 0 12px 24px rgba(8, 145, 178, .18);
}

.provider-secondary-btn {
  background: rgba(15, 23, 42, .82);
  color: #dbeafe;
  box-shadow: none;
}

.provider-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.provider-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(2, 6, 23, .72));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.provider-summary-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .35), transparent);
  opacity: .55;
}

.provider-summary-alert {
  border-color: rgba(239, 68, 68, .30);
  background:
    radial-gradient(circle at 100% 0%, rgba(239, 68, 68, .14), transparent 34%),
    linear-gradient(180deg, rgba(30, 18, 28, .96), rgba(2, 6, 23, .76));
}

.provider-summary-ok {
  border-color: rgba(34, 197, 94, .26);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, .13), transparent 36%),
    linear-gradient(180deg, rgba(10, 28, 24, .96), rgba(2, 6, 23, .76));
}

.provider-summary-unknown {
  border-color: rgba(148, 163, 184, .20);
}

.provider-summary-total {
  border-color: rgba(14, 165, 233, .22);
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, .12), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(2, 6, 23, .76));
}

.provider-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.provider-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 12px;
  color: #93c5fd;
  background: rgba(15, 23, 42, .72);
  font-size: 16px;
}

.provider-summary-value {
  margin-top: 20px;
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.provider-summary-note {
  margin-top: 10px;
  color: #b6c5d8;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .provider-summary-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .provider-hero {
    flex-direction: column;
    padding: 18px;
  }
  .provider-hero-actions,
  .provider-hero-actions .btn {
    width: 100%;
  }
  .provider-summary-grid {
    grid-template-columns: 1fr;
  }
}


.metric-small {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.call-flow {
  display: grid;
  gap: 10px;
}

.call-flow-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
}

.call-flow-step.ok {
  border-color: rgba(34, 197, 94, .38);
}

.call-flow-step.warn {
  border-color: rgba(245, 158, 11, .42);
}

.call-flow-step.bad {
  border-color: rgba(239, 68, 68, .42);
}

.call-flow-step.unknown {
  border-color: rgba(148, 163, 184, .28);
}

.call-flow-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #0b1220;
  border: 1px solid var(--border);
  font-weight: 900;
}

.log-snippet {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 360px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #020617;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.action-list {
  margin: 0;
  padding-left: 20px;
}

.action-list li {
  margin: 8px 0;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.health-tile {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, .72);
}

.health-tile.ok {
  border-color: rgba(34, 197, 94, .38);
}

.health-tile.warn {
  border-color: rgba(245, 158, 11, .42);
}

.health-tile.bad {
  border-color: rgba(239, 68, 68, .42);
}

.health-tile.unknown {
  border-color: rgba(148, 163, 184, .28);
}

.health-area {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.health-status {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 950;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .health-grid {
    grid-template-columns: 1fr;
  }
}


/* Troubleshooting: human-first UI */
.troubleshooting-upload-card {
  margin-bottom: 18px;
}

.diagnosis-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(2, 6, 23, .76));
  box-shadow: 0 20px 46px rgba(0, 0, 0, .24);
}

.diagnosis-hero.problem {
  border-color: rgba(245, 158, 11, .42);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, .16), transparent 36%),
    linear-gradient(180deg, rgba(25, 22, 14, .98), rgba(2, 6, 23, .78));
}

.diagnosis-hero.ok {
  border-color: rgba(34, 197, 94, .34);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, .13), transparent 36%),
    linear-gradient(180deg, rgba(10, 28, 24, .98), rgba(2, 6, 23, .78));
}

.diagnosis-kicker {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.diagnosis-hero h2 {
  margin: 8px 0 10px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.diagnosis-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.55;
}

.diagnosis-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.diagnosis-meta span {
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, .64);
  font-size: 12px;
}

.diagnosis-badge {
  min-width: 132px;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: center;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.diagnosis-badge.bad {
  color: #fed7aa;
  border: 1px solid rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .12);
}

.diagnosis-badge.ok {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, .34);
  background: rgba(34, 197, 94, .10);
}

.simple-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.simple-status-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, .74);
}

.simple-status-card.ok {
  border-color: rgba(34, 197, 94, .34);
}

.simple-status-card.bad {
  border-color: rgba(239, 68, 68, .45);
  background:
    radial-gradient(circle at 100% 0%, rgba(239, 68, 68, .12), transparent 36%),
    rgba(15, 23, 42, .74);
}

.simple-status-card.unknown {
  border-color: rgba(148, 163, 184, .24);
}

.simple-status-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.simple-status-value {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.simple-status-card p {
  margin: 8px 0 0;
  color: #b7c7dd;
  font-size: 13px;
  line-height: 1.45;
}

.plain-summary {
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.6;
}

.plain-summary p {
  margin: 0 0 10px;
}

.action-card {
  border-color: rgba(59, 130, 246, .30);
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, .12), transparent 36%),
    rgba(15, 23, 42, .74);
}

.next-steps {
  margin: 0;
  padding-left: 22px;
}

.next-steps li {
  margin: 10px 0;
  padding-left: 4px;
  color: #e2e8f0;
  line-height: 1.5;
}

.why-list {
  display: grid;
  gap: 10px;
}

.why-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, .66);
}

.why-item.ok {
  border-color: rgba(34, 197, 94, .32);
}

.why-item.warn {
  border-color: rgba(245, 158, 11, .38);
}

.why-item.bad {
  border-color: rgba(239, 68, 68, .42);
}

.why-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: #0b1220;
  font-weight: 950;
}

.human-flow .call-flow-step {
  min-height: 62px;
}

.technical-details {
  padding: 0;
  overflow: hidden;
}

.technical-details summary {
  padding: 18px;
  cursor: pointer;
  color: #dbeafe;
  font-size: 18px;
  font-weight: 900;
}

.technical-details summary:hover {
  background: rgba(148, 163, 184, .06);
}

.technical-details[open] summary {
  border-bottom: 1px solid var(--border);
}


.technical-stack {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.technical-stack strong {
  color: var(--text);
}

.technical-section {
  padding: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.technical-section:last-child {
  border-bottom: 0;
}

@media (max-width: 1080px) {
  .simple-status-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .diagnosis-hero {
    flex-direction: column;
  }

  .diagnosis-badge {
    width: 100%;
  }

  .simple-status-grid {
    grid-template-columns: 1fr;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}


.call-selector-card {
  border: 1px solid rgba(59, 130, 246, .35);
}

.full-width-label {
  display: block;
  margin: 14px 0 18px;
}

.full-width-label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.wide-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .92);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.selected-call-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .55);
  margin-top: 14px;
}

.selected-call-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.selected-call-header h3 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.selected-call-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.call-ab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.call-ab-grid > div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .42);
  border: 1px solid rgba(148, 163, 184, .16);
}

.call-ab-grid strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  word-break: break-word;
}

.inline-technical-details {
  margin-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .16);
  padding-top: 12px;
}

.inline-technical-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.call-case-summary-grid {
  margin-top: 16px;
}

@media (max-width: 1080px) {
  .call-ab-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 720px) {
  .selected-call-header {
    flex-direction: column;
  }

  .call-ab-grid {
    grid-template-columns: 1fr;
  }
}


.analysis-overview-card {
  border-color: rgba(59, 130, 246, .32);
}

.analysis-overview {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.analysis-overview h2 {
  margin: 6px 0 8px;
}

.analysis-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.analysis-overview-meta span {
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, .64);
  font-size: 12px;
}

.primary-call-selector {
  margin-bottom: 18px;
  border-color: rgba(96, 165, 250, .48);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.call-case-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  margin-top: 14px;
}

.call-case-table {
  margin: 0;
  min-width: 780px;
}

.call-case-table tbody tr {
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.call-case-table tbody tr:hover {
  background: rgba(59, 130, 246, .10);
}

.call-case-table tbody tr.active {
  background: rgba(37, 99, 235, .18);
  outline: 1px solid rgba(96, 165, 250, .55);
  outline-offset: -1px;
}

.diagnosis-hero.problem {
  border-color: rgba(245, 158, 11, .42);
}

.call-flow-step.warn {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .08);
}

.simple-status-card.warn {
  border-color: rgba(245, 158, 11, .42);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, .10), transparent 36%),
    rgba(15, 23, 42, .74);
}

@media (max-width: 820px) {
  .analysis-overview {
    flex-direction: column;
  }

  .analysis-overview-meta {
    justify-content: flex-start;
  }
}


.signaling-card {
  margin-top: 14px;
}

.signaling-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.signaling-card-header h2 {
  margin: 0 0 6px;
}

.signaling-card-header p {
  margin: 0;
}

.sip-flow-diagram {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, .10), transparent 38%),
    rgba(2, 6, 23, .28);
  padding: 18px;
  margin: 10px 0 14px;
}

.sip-flow-participants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.sip-flow-participants > div {
  min-width: 0;
  text-align: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .14);
}

.sip-flow-participants strong,
.sip-flow-participants span {
  display: block;
}

.sip-flow-participants strong {
  margin-top: 6px;
  color: #f8fafc;
}

.sip-flow-participants span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.sip-party-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(96, 165, 250, .28);
  color: #93c5fd;
  font-weight: 900;
}

.sip-flow-lanes {
  position: relative;
  height: 320px;
}

.sip-lifeline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed rgba(148, 163, 184, .45);
}

.lifeline-caller { left: 16.666%; }
.lifeline-pbx { left: 50%; }
.lifeline-target { left: 83.333%; }

.sip-message {
  position: absolute;
  height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.sip-message strong {
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.1;
}

.sip-message span {
  color: var(--muted);
  line-height: 1.1;
}

.sip-message::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  border-top: 2px solid #38bdf8;
}

.sip-message-right::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 18px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #38bdf8;
}

.sip-message-left {
  text-align: right;
}

.sip-message-left::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 18px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #38bdf8;
}

.caller-to-pbx { left: 16.666%; width: 33.333%; padding-left: 18px; }
.pbx-to-caller { left: 16.666%; width: 33.333%; padding-right: 18px; }
.pbx-to-target { left: 50%; width: 33.333%; padding-left: 18px; }
.target-to-pbx { left: 50%; width: 33.333%; padding-right: 18px; }

.row-1 { top: 8px; }
.row-2 { top: 58px; }
.row-3 { top: 108px; }
.row-4 { top: 158px; }
.row-5 { top: 208px; }
.row-6 { top: 258px; }

.final-bad::before { border-top-color: #ef4444; }
.final-bad::after { border-right-color: #ef4444; }
.final-warn::before { border-top-color: #f59e0b; }
.final-warn::after { border-right-color: #f59e0b; }
.final-ok::before { border-top-color: #22c55e; }
.final-ok::after { border-right-color: #22c55e; }
.final-unknown::before { border-top-color: #94a3b8; }
.final-unknown::after { border-right-color: #94a3b8; }

.muted-message {
  opacity: .72;
}

.signal-bad .sip-party-icon {
  border-color: rgba(239, 68, 68, .30);
}

.signal-warn .sip-party-icon {
  border-color: rgba(245, 158, 11, .32);
}

.signal-ok .sip-party-icon {
  border-color: rgba(34, 197, 94, .30);
}

@media (max-width: 880px) {
  .signaling-card-header {
    flex-direction: column;
  }

  .sip-flow-diagram {
    padding: 12px;
  }

  .sip-flow-lanes {
    height: 300px;
  }

  .sip-message {
    font-size: 11px;
  }

  .sip-message strong {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .sip-flow-participants {
    grid-template-columns: 1fr;
  }

  .sip-flow-lanes {
    display: none;
  }
}


.customer-report-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, 0.30);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 32%),
    rgba(15, 23, 42, 0.72);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.5fr);
  gap: 18px;
  align-items: center;
}

.customer-report-copy strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.customer-report-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.customer-report-actions {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  gap: 12px;
  align-items: end;
  justify-content: end;
}

.report-download-btn,
.report-send-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.20);
}

.report-download-btn {
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 1), rgba(14, 165, 233, 0.88));
  border: 1px solid rgba(103, 232, 249, 0.28);
}

.report-send-btn {
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(14, 165, 233, 0.88));
  border: 1px solid rgba(147, 197, 253, 0.30);
}

.inline-report-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inline-report-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted);
}

.inline-report-form input[type="email"] {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(2, 6, 23, 0.82);
  color: var(--text);
  outline: none;
}

.inline-report-form input[type="email"]:focus {
  border-color: rgba(34, 211, 238, 0.80);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.20);
}

@media (max-width: 1040px) {
  .customer-report-panel,
  .customer-report-actions,
  .inline-report-form {
    grid-template-columns: 1fr;
  }

  .report-download-btn,
  .report-send-btn {
    width: 100%;
    justify-content: center;
  }
}


.optional-call-filters,
.call-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
}

.optional-call-filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.optional-call-filters label,
.call-filter-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.optional-call-filters input,
.call-filter-panel input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #020617;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.optional-call-filters input:focus,
.call-filter-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.call-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.btn.small {
  padding: 9px 12px;
  font-size: 12px;
}

.small-note {
  font-size: 12px;
}

.call-filter-status {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 14px;
}

@media (max-width: 900px) {
  .optional-call-filters,
  .call-filter-panel {
    grid-template-columns: 1fr;
  }

  .call-filter-actions {
    justify-content: flex-start;
  }
}


/* Troubleshooting v2: two-column call workbench */
.troubleshooting-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.call-results-sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, .30);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, .12), transparent 35%),
    rgba(15, 23, 42, .78);
  box-shadow: 0 18px 44px rgba(2, 6, 23, .24);
}

.call-results-sticky {
  flex: 0 0 auto;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  background: linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .84));
  backdrop-filter: blur(10px);
  z-index: 2;
}

.sidebar-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.sidebar-title-row h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.sidebar-total {
  min-width: 42px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #dff6ff;
  font-weight: 900;
  border: 1px solid rgba(34, 211, 238, .32);
  background: rgba(8, 145, 178, .18);
}

.sidebar-help {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-filter-panel {
  grid-template-columns: 1fr;
  padding: 12px;
  margin: 14px 0 8px;
  gap: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .34);
}

.sidebar-filter-panel .call-filter-actions {
  justify-content: stretch;
}

.sidebar-filter-panel .call-filter-actions .btn {
  width: 100%;
  justify-content: center;
}

.call-results-list {
  flex: 1 1 auto;
  min-height: 220px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, .55) rgba(15, 23, 42, .40);
}

.call-results-list::-webkit-scrollbar {
  width: 10px;
}

.call-results-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, .40);
  border-radius: 999px;
}

.call-results-list::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, .55);
  border-radius: 999px;
}

.call-result-item {
  width: 100%;
  display: block;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 10px;
  color: var(--text);
  background: rgba(2, 6, 23, .28);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.call-result-item:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, .46);
  background: rgba(30, 41, 59, .48);
}

.call-result-item.active {
  border-color: rgba(34, 211, 238, .82);
  background:
    linear-gradient(135deg, rgba(8, 145, 178, .20), rgba(37, 99, 235, .12)),
    rgba(15, 23, 42, .72);
  box-shadow: 0 10px 26px rgba(8, 145, 178, .14);
}

.call-result-top,
.call-result-route,
.call-result-note {
  display: flex;
  gap: 8px;
  align-items: center;
}

.call-result-top {
  justify-content: space-between;
}

.call-result-top strong {
  font-size: 13px;
  color: #e2e8f0;
}

.call-result-route {
  margin-top: 9px;
  font-size: 16px;
  font-weight: 900;
  color: #f8fafc;
}

.call-result-route span:not(.route-arrow) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-arrow {
  color: #38bdf8;
  font-weight: 900;
}

.call-result-note {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.sidebar-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  background: rgba(148, 163, 184, .10);
}

.sidebar-summary span {
  padding: 10px 8px;
  background: rgba(15, 23, 42, .86);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.sidebar-summary strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.call-analysis-panel {
  min-width: 0;
}

.call-analysis-panel > .diagnosis-hero:first-child {
  margin-top: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1120px) {
  .troubleshooting-workbench {
    grid-template-columns: 1fr;
  }

  .call-results-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .call-results-list {
    max-height: 420px;
  }
}

@media (max-width: 720px) {
  .call-results-sticky {
    padding: 14px;
  }

  .call-result-route {
    font-size: 14px;
  }

  .sidebar-summary {
    grid-template-columns: 1fr;
  }
}


.edition-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 10px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .03em;
}

.edition-badge.pae {
  background: #24c875;
}

.edition-badge.pse {
  background: #ff7a3d;
}

.edition-badge.pce {
  background: #12aeea;
}



.depth-cell {
  min-width: 180px;
}

.depth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .02em;
  border: 1px solid rgba(255, 255, 255, .14);
}

.depth-badge.depth-ycm {
  background: linear-gradient(135deg, #0284c7, #22d3ee);
}

.depth-badge.depth-api {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.depth-badge.depth-basic {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.depth-badge.depth-manual {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.depth-badge.depth-warn {
  background: linear-gradient(135deg, #b45309, #f97316);
}

.depth-note {
  display: block;
  margin-top: 5px;
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-grid label.full,
.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #020617;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}


.input-invalid {
  border-color: rgba(248, 113, 113, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.wizard-validation-message {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

.wizard-validation-message.is-hidden,
.field-status.is-hidden {
  display: none;
}

.wizard-info {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  padding: 12px;
  color: #cbd5e1;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}


/* Guided PAE/PSE onboarding wizard */
.wizard-shell {
  display: grid;
  gap: 16px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #93a4bd;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wizard-step span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 900;
}

.wizard-step.completed {
  border-color: rgba(34, 197, 94, 0.36);
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.18);
}

.wizard-step.completed span {
  background: rgba(34, 197, 94, 0.92);
  color: #052e16;
}

.wizard-step.active {
  border-color: rgba(59, 130, 246, 0.95);
  color: #eff6ff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(14, 165, 233, 0.10));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.22), 0 14px 34px rgba(37, 99, 235, 0.16);
}

.wizard-step.active span {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.edition-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.edition-choice {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px;
  min-height: 150px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
  color: #e5e7eb;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.edition-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.24);
}



.edition-choice.pae:hover {
  border-color: rgba(34, 197, 94, 0.92);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.38), rgba(15, 23, 42, 0.76));
}

.edition-choice.pse:hover {
  border-color: rgba(249, 115, 22, 0.92);
  background: linear-gradient(180deg, rgba(124, 45, 18, 0.38), rgba(15, 23, 42, 0.76));
}

.edition-choice-grid + .form-actions {
  margin-top: 16px;
}

.edition-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.edition-choice .edition-badge {
  width: fit-content;
  min-width: 68px;
  justify-content: center;
}

.edition-choice strong {
  display:block;
  margin-top:12px;
  margin-bottom:10px;
  font-size:26px;
  line-height:1.15;
  color:#f8fafc;
}

.edition-choice small {
  display:block;
  color:#b6c4d8;
  line-height:1.55;
  max-width:95%;
}

.edition-choice:has(input:checked) {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16), 0 22px 48px rgba(2, 6, 23, 0.32);
}

.edition-choice:has(input[value="PAE"]:checked) {
  border-color: rgba(34, 197, 94, 0.92);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.38), rgba(15, 23, 42, 0.76));
}

.edition-choice:has(input[value="PSE"]:checked) {
  border-color: rgba(249, 115, 22, 0.92);
  background: linear-gradient(180deg, rgba(124, 45, 18, 0.38), rgba(15, 23, 42, 0.76));
}

.edition-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.edition-summary-card strong {
  display: block;
  color: #f8fafc;
}

.edition-summary-card small {
  display: block;
  margin-top: 4px;
  color: #93a4bd;
  line-height: 1.45;
}

.field-status {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
}

.field-status.ok {
  color: #86efac;
}

.field-status.bad {
  color: #fca5a5;
}

.field-status.checking {
  color: #93c5fd;
}

.wizard-check-card {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
}

.check-row strong {
  display: block;
  color: #f8fafc;
}

.check-row small {
  display: block;
  margin-top: 3px;
  color: #93a4bd;
  font-size: 12px;
}

.preflight-details {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
  color: #e0f2fe;
  white-space: pre-wrap;
  overflow: auto;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.review-item {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
}

.review-item span {
  display: block;
  color: #93a4bd;
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 800;
}

.review-item strong {
  color: #f8fafc;
  word-break: break-word;
}

@media (max-width: 760px) {
  .wizard-steps,
  .edition-choice-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
}



.deployment-summary {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
}

.deployment-summary span {
  display: block;
  color: #93a4bd;
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 800;
}

.deployment-summary strong {
  display: block;
  color: #f8fafc;
  font-size: 15px;
}

.deployment-summary small {
  display: block;
  margin-top: 5px;
  color: #93a4bd;
  line-height: 1.45;
}

.technical-details {
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  overflow: hidden;
}

.technical-details summary {
  padding: 12px 14px;
  cursor: pointer;
  color: #bfdbfe;
  font-weight: 800;
}

.technical-details[open] summary {
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.technical-details .preflight-details {
  border: 0;
  border-radius: 0;
}


.api-config-card {
  margin-top: 1rem;
}

.form-grid.compact {
  margin-top: 1rem;
}

.compact-actions {
  margin-top: .75rem;
}

.actions-cell {
  min-width: 170px;
}

.btn.mini {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.actions-cell form {
  margin: 0;
}


.service-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 14px;
}

.service-health-tile {
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #020617;
}

.service-health-tile.healthy {
  border-color: rgba(34, 197, 94, .28);
}

.service-health-tile.degraded {
  border-color: rgba(245, 158, 11, .32);
}

.service-health-tile.critical {
  border-color: rgba(239, 68, 68, .35);
}

.service-health-tile.unknown {
  border-color: rgba(148, 163, 184, .25);
}

.service-cell {
  min-width: 170px;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .02em;
  border: 1px solid rgba(255, 255, 255, .14);
}

.service-badge.service-healthy {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.service-badge.service-degraded {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.service-badge.service-critical {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.service-badge.service-unknown {
  background: linear-gradient(135deg, #475569, #94a3b8);
}

@media (max-width: 1000px) {
  .service-health-grid {
    grid-template-columns: 1fr;
  }
}


/* v2.27 Incident Center */
.incident-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.incident-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
}

.incident-card.critical {
  border-color: rgba(239, 68, 68, .42);
}

.incident-card.degraded {
  border-color: rgba(245, 158, 11, .42);
}

.incident-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.incident-card h3 {
  margin: 0 0 6px 0;
  color: #f8fafc;
  font-size: 18px;
}

.incident-target {
  color: #93a4bd;
  word-break: break-word;
  margin-bottom: 14px;
}

.incident-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-meta div,
.incident-cause {
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  padding: 10px;
  background: rgba(2, 6, 23, .38);
}

.incident-meta span,
.incident-cause span {
  display: block;
  color: #93a4bd;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.incident-meta strong,
.incident-cause strong {
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.35;
}

.incident-cause {
  margin-top: 10px;
}

.incident-details {
  margin-top: 12px;
}

.table-details {
  min-width: 180px;
}

.incident-type-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.incident-type-tile {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #020617;
}

.incident-type-tile span {
  display: block;
  color: #93a4bd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.incident-type-tile strong {
  display: block;
  color: #f8fafc;
  font-size: 26px;
  margin-top: 6px;
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, .32);
  border-radius: 16px;
  padding: 22px;
  background: rgba(2, 6, 23, .35);
}

.empty-state strong {
  display: block;
  color: #f8fafc;
  font-size: 16px;
}

.empty-state span {
  display: block;
  color: #93a4bd;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .incident-grid,
  .incident-type-grid,
  .incident-meta {
    grid-template-columns: 1fr;
  }
}


.filters-card {
  margin-bottom: 16px;
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.form-field label {
  margin-top: 0;
}

.filters-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
}

.filters-actions .btn {
  height: 41px;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

.tenants-table .depth-cell,
.tenants-table .service-cell {
  min-width: 0;
}


.global-health-card {
  border-width: 1px;
}

.edition-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr)) minmax(180px, 0.72fr);
  gap: 12px;
  margin-top: 18px;
}

.edition-health-card {
  --edition-rgb: 148, 163, 184;
  --edition-color: #94a3b8;
  border: 1px solid rgba(var(--edition-rgb), 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.42));
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.edition-health-card.edition-pce {
  --edition-rgb: 18, 174, 234;
  --edition-color: #12aeea;
}

.edition-health-card.edition-pae {
  --edition-rgb: 36, 200, 117;
  --edition-color: #24c875;
}

.edition-health-card.edition-pse {
  --edition-rgb: 255, 122, 61;
  --edition-color: #ff7a3d;
}

.edition-health-card:hover,
.edition-health-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--edition-rgb), 0.92);
  background: linear-gradient(180deg, rgba(var(--edition-rgb), 0.16), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.28), 0 0 0 3px rgba(var(--edition-rgb), 0.08);
  outline: none;
}

.edition-health-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.edition-health-card .edition-badge {
  min-width: 58px;
  min-height: 24px;
}

.edition-health-label {
  margin-top: 8px;
}

.edition-code {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.edition-health-values {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.edition-health-online {
  min-width: 0;
}

.edition-health-status {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}

.edition-health-status .status-dot {
  width: 28px;
  height: 28px;
  min-width: 28px;
  box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.12);
}

.edition-health-status .status-dot.healthy {
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.16);
}

.edition-health-status .status-dot.warning {
  box-shadow: 0 0 0 6px rgba(234, 179, 8, 0.16);
}

.edition-health-status .status-dot.major {
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.16);
}

.edition-health-status .status-dot.critical {
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.16);
}

.edition-health-status .status-dot.unknown {
  box-shadow: 0 0 0 6px rgba(100, 116, 139, 0.16);
}

.edition-clock-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.48));
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 112px;
}

.dashboard-clock-date {
  color: #c7d2fe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dashboard-clock-time {
  color: #ffffff;
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.dashboard-clock-time sup {
  color: #93c5fd;
  font-size: 0.42em;
  line-height: 0;
  margin-left: 3px;
  position: relative;
  top: -0.72em;
  letter-spacing: 0;
}

.dashboard-clock-zone {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
}


.dashboard-clock-update {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.dashboard-clock-update span {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  display: inline-flex;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.10);
  background: #64748b;
}

.status-dot.healthy {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.status-dot.warning {
  background: #eab308;
  box-shadow: 0 0 0 5px rgba(234, 179, 8, 0.14);
}

.status-dot.major {
  background: #f97316;
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.14);
}

.status-dot.critical {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14);
}

.status-dot.unknown {
  background: #64748b;
  box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.14);
}

.cloud-region-grid {
  margin-top: 12px;
}

@media (max-width: 1200px) {
  .edition-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .edition-health-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-clock-time {
    font-size: 36px;
  }
}



.command-center-card {
  margin-bottom: 18px;
}

.incident-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 150px 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
}

.timeline-time {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.timeline-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.timeline-dot.warn {
  background: #eab308;
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.12);
}

.timeline-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.timeline-dot.unknown {
  background: #64748b;
}

.timeline-content {
  min-width: 0;
}

.timeline-title {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-meta {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline-dot {
    display: none;
  }
}


.status-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.status-legend-title {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.status-legend span:not(.status-legend-title) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-legend .status-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  box-shadow: none;
}

/* Trunk Inventory operational health view */
.metric-danger {
  border-color: rgba(239, 68, 68, 0.70);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.30), rgba(15, 23, 42, 0.92));
}

.trunk-alert-card {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.24), rgba(15, 23, 42, 0.92));
}

.trunk-alert-header,
.trunk-provider-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trunk-alert-kicker {
  color: #fecaca;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.trunk-problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.trunk-problem-card {
  border: 1px solid rgba(239, 68, 68, 0.42);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.18);
  color: inherit;
  font-family: inherit;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.trunk-problem-card:hover {
  border-color: rgba(239, 68, 68, 0.9);
  background: rgba(127, 29, 29, 0.28);
  transform: translateY(-1px);
}

.trunk-problem-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.trunk-problem-status .status-dot {
  width: 11px;
  height: 11px;
  min-width: 11px;
  box-shadow: none;
}

.trunk-problem-pbx {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 6px;
}

.trunk-problem-meta {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.btn-danger-soft {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(127, 29, 29, 0.24);
  color: #fecaca;
}

.btn-danger-soft:hover,
.btn-danger-soft.is-active {
  border-color: rgba(239, 68, 68, 0.9);
  background: rgba(239, 68, 68, 0.20);
  color: #ffffff;
}

.trunk-provider-bad {
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(127, 29, 29, 0.20);
}

.trunk-provider-warn {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(120, 53, 15, 0.18);
}

.trunk-provider-ok {
  border-color: rgba(34, 197, 94, 0.26);
}

.trunk-provider-filter.trunk-provider-bad:hover,
.trunk-provider-filter.trunk-provider-bad.is-active {
  border-color: rgba(239, 68, 68, 0.95);
  background: rgba(127, 29, 29, 0.32);
}

.trunk-provider-filter.trunk-provider-warn:hover,
.trunk-provider-filter.trunk-provider-warn.is-active {
  border-color: rgba(245, 158, 11, 0.85);
  background: rgba(120, 53, 15, 0.28);
}

.trunk-assignment-table {
  min-width: 1180px;
}

.trunk-status-pill {
  min-width: 92px;
  justify-content: center;
  text-align: center;
  text-transform: none;
}

.trunk-status-pill.disabled {
  background: rgba(100, 116, 139, .12);
  border-color: rgba(100, 116, 139, .35);
  color: #cbd5e1;
}

.trunk-status-raw {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  margin-top: 6px;
}

.trunk-row-bad {
  background: rgba(127, 29, 29, 0.18);
}

.trunk-row-warn {
  background: rgba(120, 53, 15, 0.14);
}

.trunk-row-bad td:first-child {
  box-shadow: inset 4px 0 0 #ef4444;
}

.trunk-row-warn td:first-child {
  box-shadow: inset 4px 0 0 #f59e0b;
}

.trunk-row-highlight {
  animation: trunkRowPulse 1.1s ease-in-out 2;
}

.trunk-detail-problem {
  background: rgba(127, 29, 29, 0.12);
}

@keyframes trunkRowPulse {
  0%, 100% { outline: 0 solid rgba(103, 232, 249, 0); }
  50% { outline: 2px solid rgba(103, 232, 249, 0.85); }
}

@media (max-width: 900px) {
  .trunk-alert-header {
    flex-direction: column;
  }

  .trunk-problem-grid {
    grid-template-columns: 1fr;
  }
}


.trunk-edition-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.trunk-edition-badge {
  min-width: 38px;
  min-height: 20px;
  padding: 3px 8px;
  margin-left: 0;
  margin-right: 0;
  vertical-align: middle;
  font-size: 10px;
}

.trunk-pbx-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.compact-select {
  min-height: 32px;
  max-width: 150px;
  padding: 6px 10px;
  font-size: 12px;
}


/* PBX Management */
.pbx-management-commandbar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, .10), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(2, 6, 23, .72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
}

.pbx-commandbar-main {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.pbx-commandbar-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 260px;
}

.pbx-commandbar-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pbx-commandbar-title strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.pbx-commandbar-title span:last-child {
  color: #b6c4d8;
  font-size: 12px;
}

.pbx-commandbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.pbx-filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #dbeafe;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.pbx-filter-chip strong {
  color: #fff;
  font-size: 15px;
  line-height: 1;
}

.pbx-filter-chip:hover,
.pbx-filter-chip.is-active {
  border-color: rgba(34, 211, 238, .52);
  background: rgba(14, 116, 144, .20);
  transform: translateY(-1px);
}

.pbx-filter-chip.has-problem {
  border-color: rgba(239, 68, 68, .42);
}

.pbx-filter-chip.has-problem strong {
  color: var(--red);
}

.pbx-filter-chip .edition-badge {
  min-width: 40px;
  min-height: 20px;
  padding: 3px 9px;
}

.pbx-management-toolbar {
  margin-bottom: 12px;
}

.pbx-management-filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.pbx-management-filters label {
  margin-top: 0;
}

.pbx-management-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbx-management-row {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(520px, 1.8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.pbx-management-row.is-clickable {
  cursor: pointer;
}

.pbx-management-row.is-clickable:hover {
  border-color: rgba(34, 211, 238, .42);
  background: rgba(14, 116, 144, .14);
  transform: translateY(-1px);
}

.pbx-management-row.has-problem {
  border-left: 4px solid var(--red);
  background: rgba(127, 29, 29, .18);
}

.pbx-row-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.pbx-row-edition {
  padding-top: 2px;
}

.pbx-row-identity {
  min-width: 0;
}

.pbx-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}

.pbx-row-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.dot-separator {
  margin: 0 6px;
  color: #64748b;
}

.pbx-row-meta {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
  font-size: 12px;
}

.meta-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
}

.pbx-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

@media (max-width: 1300px) {
  .pbx-management-row {
    grid-template-columns: 1fr;
  }

  .pbx-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .pbx-commandbar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .pbx-commandbar-filters {
    justify-content: flex-start;
  }

  .pbx-management-filters {
    grid-template-columns: 1fr;
  }

  .pbx-row-meta {
    grid-template-columns: 1fr 1fr;
  }
}


/* In-app confirmation modal for destructive PBX actions */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.app-modal-backdrop[hidden] {
  display: none;
}

.app-modal {
  width: min(560px, 100%);
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color: #e5e7eb;
  overflow: hidden;
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.app-modal-kicker {
  margin-bottom: 6px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-modal-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
}

.app-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.app-modal-close:hover {
  border-color: rgba(148, 163, 184, 0.65);
  color: #ffffff;
}

.app-modal-body {
  padding: 18px 22px;
}

.app-modal-body p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.55;
}

.app-modal-body strong {
  color: #ffffff;
}

.modal-warning {
  margin: 0;
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}


/* YCM Integration - premium operational view */
.ycm-page-header .page-actions form {
  margin: 0;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.ycm-commandbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(420px, 1.6fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.ycm-commandbar-status,
.ycm-chip {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .82)),
    radial-gradient(circle at top left, rgba(34, 197, 94, .10), transparent 36%);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

.ycm-commandbar-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: 92px;
}

.ycm-status-indicator {
  width: 14px;
  height: 52px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 22px rgba(148, 163, 184, .22);
  flex: 0 0 auto;
}

.ycm-status-indicator.is-healthy {
  background: var(--green);
  box-shadow: 0 0 26px rgba(34, 197, 94, .32);
}

.ycm-status-indicator.is-warning {
  background: var(--orange);
  box-shadow: 0 0 26px rgba(245, 158, 11, .30);
}

.ycm-status-indicator.is-bad {
  background: var(--red);
  box-shadow: 0 0 26px rgba(239, 68, 68, .32);
}

.ycm-commandbar-kicker {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ycm-commandbar-status strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ycm-commandbar-status span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.ycm-commandbar-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.ycm-chip {
  padding: 14px 16px;
  min-height: 92px;
}

.ycm-chip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.ycm-chip strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ycm-chip.has-problem {
  border-color: rgba(239, 68, 68, .42);
  background:
    linear-gradient(135deg, rgba(49, 18, 33, .94), rgba(15, 23, 42, .86)),
    radial-gradient(circle at top left, rgba(239, 68, 68, .16), transparent 38%);
}

.ycm-chip.has-problem strong {
  color: var(--red);
}

.ycm-chip-time {
  font-size: 14px !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.ycm-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.4fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}

.ycm-activity-card {
  min-height: 320px;
}

.ycm-activity-list {
  display: grid;
  gap: 10px;
}

.ycm-activity-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 12px;
  background: rgba(2, 6, 23, .28);
}

.ycm-activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--muted);
}

.ycm-activity-item.ok .ycm-activity-dot {
  background: var(--green);
  box-shadow: 0 0 16px rgba(34, 197, 94, .36);
}

.ycm-activity-item.warn .ycm-activity-dot {
  background: var(--orange);
  box-shadow: 0 0 16px rgba(245, 158, 11, .32);
}

.ycm-activity-item strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
}

.ycm-activity-item span:not(.ycm-activity-dot) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.ycm-sync-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.ycm-sync-footer strong {
  color: #e5e7eb;
}

.ycm-advanced-card details {
  margin: 0;
}

.ycm-advanced-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ycm-advanced-card summary::-webkit-details-marker {
  display: none;
}

.ycm-advanced-card summary span {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ycm-advanced-card summary strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.ycm-advanced-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ycm-advanced-grid div {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 12px;
  background: rgba(2, 6, 23, .28);
}

.ycm-advanced-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
}

.ycm-advanced-grid strong {
  display: block;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ycm-success-notice {
  margin-bottom: 0;
}

.ycm-empty-state {
  margin: 0;
}

.ycm-missing-table .btn-sm {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .ycm-commandbar,
  .ycm-grid {
    grid-template-columns: 1fr;
  }

  .ycm-commandbar-chips {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 720px) {
  .ycm-commandbar-chips {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    flex-direction: column;
  }
}


/* Trunk Integration - multi-source operational view */
.trunk-commandbar {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .78)),
    radial-gradient(circle at top left, rgba(8, 145, 178, .12), transparent 34%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .20);
}

.trunk-commandbar-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.trunk-commandbar-title {
  min-width: 260px;
}

.trunk-commandbar-title strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.trunk-commandbar-title span:not(.pbx-commandbar-kicker) {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trunk-commandbar-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trunk-source-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.trunk-source-card {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 14px;
  background: rgba(2, 6, 23, .30);
}

.trunk-source-card span {
  display: block;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.trunk-source-card strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.trunk-source-card em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-style: normal;
}

.trunk-source-card.has-problem {
  border-color: rgba(239, 68, 68, .42);
  background:
    linear-gradient(135deg, rgba(49, 18, 33, .86), rgba(2, 6, 23, .28)),
    radial-gradient(circle at top left, rgba(239, 68, 68, .14), transparent 38%);
}

.source-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.source-badge.source-ycm {
  background: rgba(59, 130, 246, .16);
  color: #93c5fd;
}

.source-badge.source-api {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
}

.source-badge.source-manual {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
}

.trunk-assignment-table td {
  vertical-align: middle;
}

.trunk-row[hidden] {
  display: none;
}

.pill.neutral {
  background: #1f2937;
  color: #cbd5e1;
}

@media (max-width: 1180px) {
  .trunk-commandbar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .trunk-commandbar-chips {
    justify-content: flex-start;
  }

  .trunk-source-strip {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 720px) {
  .trunk-source-strip {
    grid-template-columns: 1fr;
  }
}

/* Trunk Integration - in-app sync progress */
.trunk-sync-form .btn {
  min-width: 108px;
}

.trunk-sync-form .btn:disabled {
  cursor: wait;
  opacity: .86;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: trunk-spin .75s linear infinite;
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

.trunk-sync-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(8, 145, 178, .42);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, .62), rgba(15, 23, 42, .88)),
    radial-gradient(circle at top left, rgba(34, 211, 238, .12), transparent 42%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.trunk-sync-progress[hidden] {
  display: none;
}

.trunk-sync-progress-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(14, 165, 233, .13);
  border: 1px solid rgba(34, 211, 238, .26);
}

.trunk-sync-progress-icon span {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(125, 211, 252, .28);
  border-top-color: #22d3ee;
  border-radius: 999px;
  animation: trunk-spin .75s linear infinite;
}

.trunk-sync-progress strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
}

.trunk-sync-progress p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@keyframes trunk-spin {
  to { transform: rotate(360deg); }
}


/* Trunk Inventory - premium operational overview */
.trunk-command-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(2, 6, 23, .70)),
    radial-gradient(circle at top left, rgba(8, 145, 178, .16), transparent 42%);
  padding: 16px 18px;
  margin: 16px 0 20px;
}

.trunk-command-left {
  min-width: 260px;
}

.trunk-command-kicker {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.trunk-command-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trunk-command-title strong {
  font-size: 24px;
  line-height: 1.1;
  color: #fff;
}

.trunk-command-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.trunk-command-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 999px;
  background: rgba(2, 6, 23, .38);
  color: #cbd5e1;
  padding: 7px 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.trunk-command-chip:hover,
.trunk-command-chip.is-active {
  border-color: rgba(8, 145, 178, .85);
  background: rgba(8, 145, 178, .14);
  transform: translateY(-1px);
}

.trunk-command-chip.danger {
  border-color: rgba(239, 68, 68, .52);
  color: #fecaca;
}

.trunk-command-chip.danger.is-active,
.trunk-command-chip.danger:hover {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .82);
}

.trunk-command-chip.ok {
  border-color: rgba(34, 197, 94, .38);
}

.trunk-provider-card {
  position: relative;
}

.trunk-provider-card.trunk-provider-bad,
.trunk-provider-card.trunk-provider-warn {
  background:
    linear-gradient(135deg, rgba(49, 18, 33, .80), rgba(15, 23, 42, .80)),
    radial-gradient(circle at top right, rgba(239, 68, 68, .16), transparent 35%);
}

.trunk-provider-card.trunk-provider-ok {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(2, 6, 23, .45)),
    radial-gradient(circle at top right, rgba(34, 197, 94, .10), transparent 36%);
}

.trunk-provider-meta strong {
  color: #fff;
}

.trunk-pbx-link {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.trunk-provider-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.trunk-provider-inline .status-dot {
  width: 9px;
  height: 9px;
}

.trunk-provider-inline.has-problem {
  color: #fecaca;
}

.source-badge.ycm,
.source-badge.source-ycm {
  background: rgba(59, 130, 246, .16);
  color: #93c5fd;
}

.source-badge.pbx-api,
.source-badge.source-api,
.source-badge.source-pbx-api {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
}

.source-badge.manual,
.source-badge.source-manual {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
}

.source-badge.unknown {
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
}

.trunk-problem-action {
  margin-top: 10px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .trunk-command-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .trunk-command-chips {
    justify-content: flex-start;
  }
}


.monitoring-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.monitoring-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.monitoring-compact {
  display: flex;
}

.monitoring-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
}

.monitoring-chip.ok,
.monitoring-chip.depth-api {
  color: #22c55e;
  background: rgba(34, 197, 94, .16);
}

.monitoring-chip.unknown {
  color: #bfdbfe;
  background: rgba(148, 163, 184, .18);
}

.monitoring-chip.bad,
.monitoring-chip.depth-warn {
  color: #fecaca;
  background: rgba(239, 68, 68, .18);
}

.monitoring-chip.warn {
  color: #fbbf24;
  background: rgba(245, 158, 11, .16);
}

.monitoring-chip.depth-ycm {
  color: #e0f2fe;
  background: rgba(14, 165, 233, .26);
}


/* PBX Tenants: keep monitoring badges readable on two rows.
   Row 1: YCM / YCM Full
   Row 2: API Aktiv / API Inaktiv */
.tenants-table .monitoring-cell-stacked {
  min-width: 96px;
  max-width: 130px;
}

.tenants-table .monitoring-cell-stacked .monitoring-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  width: max-content;
  max-width: 100%;
}

.tenants-table .monitoring-cell-stacked .monitoring-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  width: 100%;
}

.tenants-table .monitoring-cell-stacked .monitoring-row-api {
  display: block !important;
  width: 100% !important;
  clear: both !important;
}

.tenants-table .monitoring-cell-stacked .monitoring-row-api .monitoring-chip {
  display: inline-flex !important;
}

.tenants-table .monitoring-chip {
  white-space: nowrap !important;
}


/* Provider page v8 compact operational cards */
.provider-watch-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.provider-watch-card-compact {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 16px;
}

.provider-watch-card-head-compact {
  margin-bottom: 10px;
  align-items: flex-start;
}

.provider-provider-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.provider-provider-title strong {
  color: #dbeafe;
  font-size: 15px;
  line-height: 1.15;
}

.provider-provider-context {
  color: #93a4bd;
  font-size: 12px;
  line-height: 1.25;
}

.provider-compact-message {
  margin: 4px 0 10px;
  color: #bfdbfe;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.provider-operational-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.provider-operational-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  border: 1px solid rgba(148, 163, 184, .12);
}

.provider-operational-meta strong {
  color: #e0f2fe;
  font-weight: 900;
}

.provider-impact-line,
.provider-canton-line {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.25;
}

.provider-canton-line {
  color: #93c5fd;
}

.provider-confidence {
  margin-top: auto;
  padding-top: 14px;
}

.provider-confidence-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.provider-confidence-top strong {
  color: #ffffff;
}

.provider-confidence-track {
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.35);
}

.provider-confidence-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.35);
}

.provider-watch-card-compact.ok .provider-confidence-fill {
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.28);
}

.provider-watch-card-compact.warn .provider-confidence-fill {
  background: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.28);
}

.provider-watch-card-compact.bad .provider-confidence-fill {
  background: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.provider-watch-card-compact.unknown .provider-confidence-fill {
  background: #94a3b8;
  box-shadow: none;
}

.provider-compact-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  color: #94a3b8;
  font-size: 12px;
}

.provider-source-mini {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.provider-source-mini.internal {
  background: rgba(34, 197, 94, .10);
  color: #86efac;
}

.provider-source-mini.official {
  background: rgba(14, 165, 233, .14);
  color: #7dd3fc;
}

.provider-source-mini.external {
  background: rgba(245, 158, 11, .12);
  color: #fcd34d;
}

.provider-source-mini.unknown {
  background: rgba(100, 116, 139, .18);
  color: #cbd5e1;
}

.provider-logic-list-compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 14px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .provider-watch-card-compact {
    min-height: 0;
  }

  .provider-confidence {
    margin-top: 10px;
  }
}


/* PBX Management: detailed table layout restored from PBX Tenants */
.pbx-tenants-detail-table {
  min-width: 1480px;
}

.pbx-tenants-detail-table th:nth-child(1),
.pbx-tenants-detail-table td:nth-child(1) { width: 7%; }

.pbx-tenants-detail-table th:nth-child(2),
.pbx-tenants-detail-table td:nth-child(2) { width: 5%; }

.pbx-tenants-detail-table th:nth-child(3),
.pbx-tenants-detail-table td:nth-child(3) { width: 13%; }

.pbx-tenants-detail-table th:nth-child(4),
.pbx-tenants-detail-table td:nth-child(4) { width: 15%; }

.pbx-tenants-detail-table th:nth-child(5),
.pbx-tenants-detail-table td:nth-child(5) { width: 13%; }

.pbx-tenants-detail-table th:nth-child(6),
.pbx-tenants-detail-table td:nth-child(6) { width: 7%; }

.pbx-tenants-detail-table th:nth-child(7),
.pbx-tenants-detail-table td:nth-child(7) { width: 8%; }

.pbx-tenants-detail-table th:nth-child(8),
.pbx-tenants-detail-table td:nth-child(8) { width: 10%; }

.pbx-tenants-detail-table th:nth-child(9),
.pbx-tenants-detail-table td:nth-child(9) { width: 8%; }

.pbx-tenants-detail-table th:nth-child(10),
.pbx-tenants-detail-table td:nth-child(10) { width: 7%; }

.pbx-tenants-detail-table th:nth-child(11),
.pbx-tenants-detail-table td:nth-child(11) { width: 7%; }

.pbx-tenants-detail-table th:nth-child(12),
.pbx-tenants-detail-table td:nth-child(12) { width: 9%; }

.pbx-tenants-detail-table tr.row-problem td {
  background: rgba(239, 68, 68, 0.08);
}

.tenant-actions-cell {
  white-space: nowrap;
}

.tenant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tenant-actions form {
  margin: 0;
}


/* Standortverwaltung - operational page */
.locations-page-header {
  align-items: flex-start;
}

.locations-overview-card {
  margin-bottom: 18px;
  border-color: rgba(59, 130, 246, .25);
  background:
    radial-gradient(circle at 0% 0%, rgba(8, 145, 178, .13), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .88));
}

.locations-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.locations-overview h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.locations-quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #e5f7ff;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.filter-pill strong {
  min-width: 22px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, .18);
  color: #ffffff;
  padding: 1px 6px;
}

.filter-pill:hover,
.filter-pill.is-active {
  border-color: rgba(34, 211, 238, .75);
  background: rgba(8, 145, 178, .18);
  transform: translateY(-1px);
}

.filter-pill.warn strong {
  background: rgba(245, 158, 11, .20);
}

.filter-pill.bad strong {
  background: rgba(239, 68, 68, .22);
}

.locations-title-row {
  margin-bottom: 16px;
}

.locations-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.locations-result-count strong {
  color: #ffffff;
}

.locations-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(170px, .6fr) minmax(170px, .6fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.locations-filters label {
  margin-top: 0;
}

.locations-table-wrap {
  max-height: 650px;
  overflow: auto;
}

.locations-table {
  min-width: 980px;
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.locations-table th:nth-child(1),
.locations-table td:nth-child(1) {
  width: 30%;
}

.locations-table th:nth-child(2),
.locations-table td:nth-child(2) {
  width: 34%;
}

.locations-table th:nth-child(3),
.locations-table td:nth-child(3) {
  width: 12%;
}

.locations-table th:nth-child(4),
.locations-table td:nth-child(4) {
  width: 12%;
}

.locations-table th:nth-child(5),
.locations-table td:nth-child(5) {
  width: 12%;
  text-align: right;
}

.locations-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111827;
}

.locations-table tbody tr {
  transition: background .15s ease;
}

.locations-table tbody tr:hover {
  background: rgba(8, 145, 178, .08);
}

.locations-pbx-title,
.locations-active-location {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.locations-pbx-subtitle,
.locations-address-muted {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.locations-modal {
  width: min(760px, 100%);
}

.locations-modal-current {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.locations-modal-current > div {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  background: rgba(2, 6, 23, .28);
}

.locations-modal-current strong,
.locations-modal-current span {
  display: block;
}

.locations-modal-current strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}

.locations-modal-current span {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.locations-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.locations-clear-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.locations-clear-row strong,
.locations-clear-row span {
  display: block;
}

.locations-clear-row strong {
  color: #ffffff;
  font-size: 13px;
}

.locations-clear-row span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

.locations-clear-row button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 14px;
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .locations-overview {
    flex-direction: column;
  }

  .locations-quick-filters {
    justify-content: flex-start;
  }

  .locations-filters,
  .locations-modal-current {
    grid-template-columns: 1fr;
  }

  .locations-clear-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Incident Center MSP lifecycle */
.incident-confidence {
  margin-left: auto;
  color: #93a4bd;
  font-size: 12px;
}

.incident-confidence strong {
  color: #e5e7eb;
}

.incident-impact-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.incident-impact-strip div {
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  padding: 10px;
  background: rgba(2, 6, 23, .46);
}

.incident-impact-strip span {
  display: block;
  color: #93a4bd;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.incident-impact-strip strong {
  display: block;
  margin-top: 3px;
  color: #f8fafc;
  font-size: 22px;
}

.monitoring-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 12px;
  background: rgba(14, 116, 144, .10);
  color: #bae6fd;
  font-size: 12px;
}

.incident-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.incident-list-compact {
  display: grid;
  gap: 8px;
}

.incident-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 13px;
  background: rgba(2, 6, 23, .38);
}

.incident-list-row strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
}

.incident-list-row span {
  display: block;
  margin-top: 4px;
  color: #93a4bd;
  font-size: 11px;
}

.incident-list-count {
  min-width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f2037;
  color: #e5e7eb;
  font-weight: 900;
}

.compact-empty {
  padding: 16px;
}

@media (max-width: 900px) {
  .incident-analysis-grid,
  .incident-impact-strip {
    grid-template-columns: 1fr;
  }

  .incident-confidence {
    margin-left: 0;
    width: 100%;
  }
}

.incident-ownership {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, .20);
  border-radius: 12px;
  background: rgba(22, 101, 52, .08);
  color: #a7f3d0;
  font-size: 12px;
}

.incident-action-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.incident-action-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.incident-action-form input {
  min-width: 0;
}

@media (max-width: 760px) {
  .incident-action-form {
    grid-template-columns: 1fr;
  }
}


/* Incident Center – corrected MSP layout */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.kpi-card {
  min-height: 118px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, .10), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(2, 6, 23, .80));
  box-shadow: 0 12px 28px rgba(2, 6, 23, .18);
}

.kpi-label {
  color: #9fb5d1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 8px;
  color: #f8fafc;
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
}

.kpi-sub {
  margin-top: 8px;
  color: #93a4bd;
  font-size: 12px;
  line-height: 1.35;
}

.incident-section-card {
  margin-bottom: 16px;
}

.incident-grid {
  grid-template-columns: 1fr;
}

.incident-card.monitoring {
  border-color: rgba(56, 189, 248, .36);
}

.incident-notes {
  margin: 6px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  background: rgba(2, 6, 23, .44);
  color: #dbeafe;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.incident-audit-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.incident-audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  background: rgba(2, 6, 23, .36);
}

.incident-audit-row strong {
  color: #e5e7eb;
  font-size: 12px;
  text-transform: capitalize;
}

.incident-audit-row span {
  color: #93a4bd;
  font-size: 11px;
}

.empty-state span {
  display: block;
  margin-top: 5px;
  font-weight: 500;
}

@media (max-width: 1050px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .incident-audit-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Incident Timeline and Reporting */
.timeline-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}
.timeline-kpi,
.report-kpi {
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(2,6,23,.82));
}
.timeline-kpi span,
.report-kpi span {
  display: block;
  color: #9fb5d1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.timeline-kpi strong,
.report-kpi strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  font-size: 30px;
  line-height: 1;
}
.timeline-kpi small {
  display: block;
  margin-top: 8px;
  color: #93a4bd;
  font-size: 12px;
}
.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.incident-active-section { margin-bottom: 16px; }
.incident-active-list { display: grid; gap: 12px; }
.incident-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(239,68,68,.35);
  border-radius: 15px;
  background: rgba(2,6,23,.42);
  color: inherit;
  text-decoration: none;
}
.incident-summary-card.degraded { border-color: rgba(245,158,11,.35); }
.incident-summary-card.monitoring { border-color: rgba(56,189,248,.35); }
.incident-summary-main h3 { margin: 10px 0 4px; }
.incident-summary-main p { margin: 0; color: #9fb5d1; }
.incident-summary-impact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.incident-summary-impact div,
.incident-summary-cause {
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 11px;
  background: rgba(15,23,42,.48);
}
.incident-summary-impact span,
.incident-summary-cause span {
  display: block;
  color: #8fa5c1;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.incident-summary-impact strong,
.incident-summary-cause strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
}
.incident-summary-cause { grid-column: 1 / -1; }
.incident-open-link {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
}
.timeline-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline-filter {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(15,23,42,.65);
  color: #cbd5e1;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.timeline-filter.active {
  border-color: rgba(34,211,238,.55);
  background: rgba(8,145,178,.18);
  color: #e0f2fe;
}
.incident-timeline { display: grid; }
.timeline-entry {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  gap: 10px;
  min-height: 94px;
}
.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline-rail::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -2px;
  width: 1px;
  background: rgba(148,163,184,.2);
}
.timeline-entry:last-child .timeline-rail::after { display: none; }
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100,116,139,.15);
}
.timeline-dot.bad { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.14); }
.timeline-dot.warn { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.14); }
.timeline-dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.14); }
.timeline-entry-body {
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.timeline-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.timeline-entry-top time { color: #9fb5d1; font-size: 12px; }
.timeline-entry-body h3 { margin: 7px 0 3px; font-size: 15px; }
.timeline-entry-body p { margin: 0; color: #9fb5d1; font-size: 13px; }
.timeline-entry-body code {
  display: inline-block;
  margin-top: 6px;
  color: #7dd3fc;
  font-size: 11px;
}
.timeline-detail-link {
  display: inline-block;
  margin-top: 8px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.incident-detail-summary {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 16px;
  background: rgba(15,23,42,.86);
}
.incident-detail-status { display: flex; gap: 8px; flex-wrap: wrap; }
.incident-detail-kpis,
.incident-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.incident-detail-kpis div,
.incident-detail-grid div,
.incident-detail-cause {
  padding: 11px 12px;
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 11px;
  background: rgba(2,6,23,.35);
}
.incident-detail-kpis span,
.incident-detail-grid span,
.incident-detail-cause span {
  display: block;
  color: #8fa5c1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.incident-detail-kpis strong,
.incident-detail-grid strong,
.incident-detail-cause strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
}
.incident-evolution-chart {
  position: relative;
  height: 260px;
  margin: 10px 0 20px;
  padding: 14px 46px 24px 14px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 14px;
  background: rgba(2,6,23,.34);
}
.incident-evolution-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.chart-grid-line { stroke: rgba(148,163,184,.16); stroke-width: .5; }
.incident-chart-line {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}
.incident-chart-point { fill: #e0f2fe; stroke: #0284c7; stroke-width: .8; vector-effect: non-scaling-stroke; }
.chart-axis-labels {
  position: absolute;
  right: 12px;
  top: 16px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #8fa5c1;
  font-size: 10px;
}
.incident-lifecycle { display: grid; gap: 0; }
.lifecycle-row {
  display: grid;
  grid-template-columns: 155px 16px minmax(0,1fr);
  gap: 12px;
  min-height: 72px;
}
.lifecycle-time { color: #9fb5d1; font-size: 12px; padding-top: 2px; }
.lifecycle-marker {
  position: relative;
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: #64748b;
}
.lifecycle-marker::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 4px;
  bottom: -56px;
  width: 1px;
  background: rgba(148,163,184,.2);
}
.lifecycle-row:last-child .lifecycle-marker::after { display: none; }
.lifecycle-marker.open,
.lifecycle-marker.critical { background:#ef4444; }
.lifecycle-marker.degraded { background:#f59e0b; }
.lifecycle-marker.monitoring { background:#38bdf8; }
.lifecycle-marker.resolved,
.lifecycle-marker.recovered { background:#22c55e; }
.lifecycle-content strong { color:#f8fafc; }
.lifecycle-content p { margin:4px 0 0; color:#9fb5d1; font-size:13px; white-space:pre-wrap; }
.report-period-filter {
  display:flex;
  align-items:center;
  gap:10px;
  margin:14px 0;
}
.report-period-filter label { color:#9fb5d1; font-size:12px; font-weight:800; }
.report-period-filter select { min-width:150px; }
.report-kpi-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.report-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.report-wide { grid-column:1/-1; }
.daily-bar-chart {
  display:flex;
  align-items:flex-end;
  gap:3px;
  min-height:209px;
  max-height:209px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:8px 8px 10px;
  scrollbar-gutter:auto;
}
.daily-bar-item {
  flex:1 0 17px;
  min-width:17px;
  display:grid;
  grid-template-rows:14px 145px 40px;
  align-items:end;
  text-align:center;
}
.daily-bar-value { color:#cbd5e1; font-size:9px; line-height:1; }
.daily-bar-track {
  position:relative;
  height:145px;
  border-bottom:1px solid rgba(148,163,184,.2);
}
.daily-bar-fill {
  position:absolute;
  left:20%;
  right:20%;
  bottom:0;
  min-height:1px;
  border-radius:4px 4px 0 0;
  background:linear-gradient(180deg,#38bdf8,#0e7490);
}
.daily-bar-label {
  display:block;
  align-self:start;
  margin-top:10px;
  color:#8fa5c1;
  font-size:8px;
  line-height:1;
  white-space:nowrap;
  transform:rotate(-45deg);
  transform-origin:top center;
}
.horizontal-bars { display:grid; gap:12px; }
.horizontal-bar-label {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:5px;
  color:#cbd5e1;
  font-size:12px;
}
.horizontal-bar-track {
  height:8px;
  border-radius:999px;
  background:rgba(148,163,184,.13);
  overflow:hidden;
}
.horizontal-bar-track div {
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#0891b2,#38bdf8);
}
.report-ranking,
.report-split-ranking > div {
  display:grid;
  gap:8px;
}
.report-ranking > div,
.report-split-ranking > div > div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:9px 10px;
  border:1px solid rgba(148,163,184,.13);
  border-radius:10px;
  background:rgba(2,6,23,.3);
}
.report-split-ranking {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.report-split-ranking h3 { margin:0 0 8px; font-size:13px; color:#cbd5e1; }

@media (max-width: 1100px) {
  .report-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .incident-summary-card { grid-template-columns:1fr; }
}
@media (max-width: 800px) {
  .timeline-kpi-grid,
  .report-kpi-grid,
  .report-grid,
  .incident-detail-kpis,
  .incident-detail-grid,
  .report-split-ranking { grid-template-columns:1fr; }
  .report-wide { grid-column:auto; }
  .section-heading-row,
  .timeline-entry-top { flex-direction:column; align-items:flex-start; }
  .incident-summary-impact { grid-template-columns:1fr; }
  .lifecycle-row { grid-template-columns:1fr 12px minmax(0,1fr); }
  .lifecycle-time { grid-column:1/-1; }
}


/* Incident Timeline: keep the operational history compact and scrollable. */
.incident-timeline {
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(15, 23, 42, 0.55);
}
.incident-timeline::-webkit-scrollbar {
  width: 10px;
}
.incident-timeline::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 999px;
}
.incident-timeline::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.55);
  border: 2px solid rgba(15, 23, 42, 0.55);
  border-radius: 999px;
}
.incident-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.75);
}

/* Incident Timeline filters and PBX references */
.timeline-entry.is-filtered-out {
  display: none !important;
}

.timeline-pbx-reference {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 0;
}

.timeline-pbx-reference strong {
  color: #f8fafc;
}

.timeline-pbx-reference a {
  color: #38bdf8;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.timeline-pbx-reference a:hover,
.timeline-pbx-reference a:focus-visible {
  text-decoration: underline;
}



/* Benutzerverwaltung */
.page-eyebrow,
.section-kicker {
  margin-bottom: 6px;
  color: #22d3ee;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill.neutral {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.users-create-card,
.users-overview-card {
  padding: 20px;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-heading h2 {
  margin-bottom: 6px;
}

.card-heading p {
  margin: 0;
  max-width: 760px;
}

.users-create-form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, .34);
}

.form-section h3 {
  margin: 0 0 14px;
  font-size: 14px;
}

.field-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.permission-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.permission-heading h3 {
  margin-bottom: 4px;
}

.permission-heading p {
  margin: 0;
}

.permission-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #67e8f9;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn-link:hover {
  color: #ffffff;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #07101f;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.permission-option:hover {
  border-color: rgba(103, 232, 249, .42);
  background: #0a1526;
}

.permission-option:has(input:checked) {
  border-color: rgba(34, 211, 238, .48);
  background: rgba(8, 145, 178, .12);
}

.permission-option input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #0891b2;
  flex: 0 0 auto;
}

.permission-option span {
  min-width: 0;
}

.permission-option strong {
  display: block;
  color: #e5e7eb;
  font-size: 12px;
}

.permission-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.permission-section.is-disabled {
  opacity: .55;
}

.permission-section.is-disabled .permission-option,
.permission-section.is-disabled .btn-link {
  cursor: not-allowed;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-access-card {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(2, 6, 23, .34);
  overflow: hidden;
}

.user-access-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 232, 249, .3);
  border-radius: 10px;
  background: var(--cyan-soft);
  color: #cffafe;
  font-weight: 900;
}

.user-identity {
  min-width: 0;
}

.user-identity > strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.user-name-toggle {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.user-name-toggle > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name-toggle:hover,
.user-name-toggle:focus-visible {
  color: #67e8f9;
}

.user-name-toggle:focus-visible {
  outline: 2px solid rgba(34, 211, 238, .65);
  outline-offset: 4px;
  border-radius: 4px;
}

.user-toggle-icon {
  flex: 0 0 auto;
  color: #67e8f9;
  font-size: 16px;
  line-height: 1;
  transition: transform .15s ease;
}

.user-name-toggle[aria-expanded="true"] .user-toggle-icon {
  transform: rotate(180deg);
}

.user-permission-panel[hidden] {
  display: none;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(59, 130, 246, .16);
  color: #93c5fd;
}

.role-badge.viewer {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
}

.user-card-actions {
  display: flex;
  align-items: center;
}

.permission-edit-form,
.admin-access-note {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, .38);
}

.permission-grid.compact .permission-option {
  min-height: 46px;
  align-items: center;
  padding: 10px;
}

.permission-edit-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.admin-access-note {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-access-note strong {
  color: #93c5fd;
}

@media (max-width: 1100px) {
  .permission-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .users-page-header,
  .permission-heading,
  .permission-edit-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-grid,
  .permission-grid.compact {
    grid-template-columns: 1fr;
  }

  .user-access-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .user-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}


/* Branded 403 / access denied page */
.access-denied-page {
  min-height: calc(100vh - 135px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.access-denied-card {
  position: relative;
  width: min(620px, 100%);
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(8, 145, 178, .14), transparent 38%),
    rgba(15, 23, 42, .92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  text-align: center;
}

.access-denied-status {
  position: absolute;
  top: -22px;
  right: 18px;
  color: rgba(148, 163, 184, .055);
  font-size: 112px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.08em;
  pointer-events: none;
  user-select: none;
}

.access-denied-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border: 1px solid rgba(34, 211, 238, .32);
  border-radius: 20px;
  background: rgba(8, 145, 178, .12);
  color: #67e8f9;
}

.access-denied-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-denied-card .eyebrow {
  margin-bottom: 9px;
  color: #22d3ee;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.access-denied-card h1 {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: clamp(27px, 5vw, 38px);
  line-height: 1.08;
}

.access-denied-card > p {
  max-width: 490px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.access-denied-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.access-denied-actions form {
  margin: 0;
}

.access-denied-actions .btn {
  min-width: 150px;
  justify-content: center;
  text-decoration: none;
}

.access-denied-help {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 620px) {
  .access-denied-page {
    padding: 18px 8px;
  }

  .access-denied-card {
    padding: 34px 20px;
  }

  .access-denied-actions {
    flex-direction: column;
  }

  .access-denied-actions .btn,
  .access-denied-actions form {
    width: 100%;
  }
}


/* Multi-tenant onboarding */
.onboarding-body{margin:0;min-height:100vh;background:#020817;color:#eef6ff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.onboarding-shell{max-width:1380px;margin:0 auto;padding:40px 28px 64px}
.onboarding-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:24px}
.onboarding-hero h1{font-size:34px;margin:6px 0 8px}
.onboarding-hero p{max-width:760px;color:#9bb6d4;margin:0}
.onboarding-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.onboarding-card{position:relative;padding:24px;border:1px solid #1d2b45;background:#0d1729;border-radius:16px}
.onboarding-card h2,.onboarding-complete h2{margin:6px 0 10px}
.step-number{position:absolute;right:20px;top:18px;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#07304a;border:1px solid #0ba9d4;color:#7be4ff;font-weight:800}
.form-grid{display:grid;gap:14px;margin-top:18px}
.form-grid label{display:grid;gap:7px;font-weight:700;color:#dcecff}
.form-grid input,.form-grid select,.form-grid textarea{width:100%;box-sizing:border-box;background:#040b19;border:1px solid #2b3b56;border-radius:10px;color:#eef6ff;padding:12px 13px}
.form-grid textarea{resize:vertical}
.onboarding-complete{margin-top:18px;padding:24px;display:flex;align-items:center;justify-content:space-between;gap:24px;border:1px solid #1d2b45;background:#0d1729;border-radius:16px}
.metric-large{font-size:44px;font-weight:800;color:#6fe7ff;margin-top:16px}
.status-line{display:flex;align-items:center;gap:8px;margin-top:16px;color:#9bb6d4}
.status-line span{width:9px;height:9px;border-radius:50%;background:#64748b}
.status-line.ok span{background:#28d17c}
.notice{margin-bottom:18px;padding:13px 15px;border-radius:10px;border:1px solid}
.notice.ok{border-color:#0f7b50;background:#062a1f;color:#5ef0a8}
.notice.bad{border-color:#94374c;background:#2d1118;color:#ff9dad}
@media(max-width:900px){.onboarding-grid{grid-template-columns:1fr}.onboarding-hero,.onboarding-complete{flex-direction:column}.onboarding-shell{padding:24px 16px 48px}}


/* Sequential onboarding wizard */
.onboarding-wizard-shell{max-width:980px}
.wizard-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 24px}
.wizard-progress-item{position:relative;display:grid;justify-items:center;gap:8px;color:#6f86a2;text-align:center}
.wizard-progress-item:not(:last-child)::after{content:"";position:absolute;top:17px;left:calc(50% + 24px);right:calc(-50% + 24px);height:1px;background:#23334d}
.wizard-progress-item span{position:relative;z-index:1;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:1px solid #2b3b56;background:#07101f;color:#8fa6c0;font-weight:800}
.wizard-progress-item small{font-size:12px;font-weight:700}
.wizard-progress-item.active span{border-color:#16b8df;background:#07304a;color:#7be4ff;box-shadow:0 0 0 4px rgba(22,184,223,.08)}
.wizard-progress-item.active small{color:#dff7ff}
.wizard-progress-item.done span{border-color:#1fbb78;background:#092a20;color:#6ff0ac}
.wizard-progress-item.done:not(:last-child)::after{background:#1f8f63}
.wizard-card{position:relative;padding:34px;border:1px solid #1d2b45;background:#0d1729;border-radius:18px;box-shadow:0 22px 60px rgba(0,0,0,.18)}
.wizard-card h2{margin:7px 0 10px;font-size:28px}
.wizard-card>.muted{max-width:720px}
.wizard-form{margin-top:26px}
.wizard-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:26px;padding-top:22px;border-top:1px solid #1d2b45}
.wizard-actions-end{justify-content:flex-end}
.wizard-actions .btn{min-width:130px;text-align:center;text-decoration:none}
.wizard-checklist{display:grid;gap:10px;margin:26px 0}
.wizard-checklist>div{padding:13px 15px;border:1px solid #2b3b56;border-radius:10px;background:#07101f;color:#9bb6d4}
.wizard-checklist>div.ok{border-color:#176b4c;background:#08251d;color:#6ff0ac}
.wizard-checklist>div.ok::before{content:"✓";margin-right:9px;font-weight:900}
.wizard-checklist>div.pending::before{content:"○";margin-right:9px}
.wizard-complete-card p{color:#9bb6d4}
@media(max-width:720px){
  .wizard-progress{grid-template-columns:repeat(5,1fr);gap:4px}
  .wizard-progress-item small{display:none}
  .wizard-progress-item:not(:last-child)::after{left:calc(50% + 20px);right:calc(-50% + 20px)}
  .wizard-card{padding:26px 20px}
  .wizard-actions{align-items:stretch;flex-direction:column-reverse}
  .wizard-actions .btn{width:100%;box-sizing:border-box}
}

.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.settings-card-wide{grid-column:1/-1}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.form-grid label{display:flex;flex-direction:column;gap:7px}
.form-grid .full-width,.form-actions{grid-column:1/-1}
.integration-status-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
@media(max-width:900px){.settings-grid,.form-grid{grid-template-columns:1fr}.settings-card-wide,.form-grid .full-width,.form-actions{grid-column:auto}}


/* Central synchronization status */
.sync-status-card {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid #24344d;
  border-radius: 14px;
  background: #101a2d;
}
.sync-status-card.is-active {
  border-color: #1486a8;
  box-shadow: 0 0 0 1px rgba(20, 134, 168, 0.12);
}
.sync-status-head,
.sync-status-body,
.sync-status-meta,
.sync-status-details {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sync-status-head {
  justify-content: space-between;
}
.sync-status-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.sync-status-body {
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 14px;
}
.sync-status-main {
  flex: 1;
  min-width: 0;
}
.sync-status-main p {
  margin: 0 0 10px;
  color: #b7c9e4;
}
.sync-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #071124;
}
.sync-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a6cc;
  transition: width .3s ease;
}
.sync-status-meta {
  justify-content: space-between;
  margin-top: 7px;
  color: #8ea7cb;
  font-size: 12px;
}
.sync-status-details {
  min-width: 180px;
  flex-direction: column;
  align-items: flex-end;
  color: #8ea7cb;
  font-size: 12px;
}
@media (max-width: 760px) {
  .sync-status-body {
    align-items: stretch;
    flex-direction: column;
  }
  .sync-status-details {
    min-width: 0;
    align-items: flex-start;
  }
}

.public-shell{width:min(1180px,calc(100% - 32px));margin:48px auto}.public-hero{max-width:760px;margin-bottom:28px}
.pricing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.pricing-card{display:flex;flex-direction:column;gap:14px}
.auth-card{width:min(520px,calc(100% - 32px));margin:10vh auto;padding:28px;background:var(--panel,#111a2d);border:1px solid var(--border,#24324a);border-radius:16px}
.auth-card form,.pricing-card{display:flex;flex-direction:column;gap:14px}.auth-card label,.pricing-card label{display:flex;flex-direction:column;gap:6px}
.eyebrow{font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;color:#22d3ee;font-weight:700}


/* Billing v8.1 public signup flow */
.billing-public-shell{padding-bottom:40px}
.billing-public-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:56px}
.billing-brand{display:inline-flex;align-items:center;gap:11px;color:inherit;text-decoration:none}
.billing-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#22d3ee,#3b82f6);color:#07111f;font-weight:900}
.billing-brand span:last-child{display:flex;flex-direction:column;line-height:1.05}
.billing-brand small{margin-top:4px;color:var(--muted,#94a3b8);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.billing-login-link{white-space:nowrap}
.billing-hero{text-align:center;margin:0 auto 38px}
.billing-hero h1{font-size:clamp(2rem,5vw,3.7rem);line-height:1.04;max-width:920px;margin:10px auto 18px}
.billing-hero>p:last-child{max-width:790px;margin-inline:auto;color:var(--muted,#94a3b8);font-size:1.04rem;line-height:1.7}
.billing-pricing-grid{align-items:stretch}
.billing-pricing-card{position:relative;min-height:100%;padding:26px;overflow:hidden}
.billing-pricing-card.is-popular{border-color:#22d3ee;box-shadow:0 18px 50px rgba(34,211,238,.12)}
.pricing-badge{position:absolute;top:17px;right:17px;padding:6px 10px;border-radius:999px;background:rgba(34,211,238,.12);border:1px solid rgba(34,211,238,.35);color:#67e8f9;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.pricing-plan-kicker{margin:0 0 7px;color:#67e8f9;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.billing-pricing-card h2{font-size:1.65rem;margin:0 0 10px}
.pricing-description{color:var(--muted,#94a3b8);line-height:1.55;min-height:74px}
.pricing-price{padding:16px 0;border-top:1px solid var(--border,#24324a);border-bottom:1px solid var(--border,#24324a)}
.pricing-price strong{font-size:1.1rem}
.pricing-features{display:flex;flex-direction:column;gap:10px;padding:0;margin:0;list-style:none}
.pricing-features li{display:flex;gap:9px;align-items:flex-start;color:#dbe7f5}
.pricing-features li span{color:#22d3ee;font-weight:900}
.pricing-cta{margin-top:auto;text-align:center;text-decoration:none}
.billing-notice{display:flex;flex-direction:column;gap:5px;margin:24px auto 0;max-width:760px;padding:15px 18px;border-radius:12px;background:rgba(245,158,11,.08);border:1px solid rgba(245,158,11,.28);text-align:center}
.billing-notice span{color:var(--muted,#94a3b8)}
.billing-public-footer{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 24px;margin-top:34px;color:var(--muted,#94a3b8);font-size:.86rem}
.signup-shell{max-width:1060px}
.signup-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:22px;align-items:start}
.signup-summary,.signup-form-card{padding:28px}
.signup-summary h1{font-size:2.2rem;margin:8px 0 12px}
.signup-summary>p:not(.eyebrow){color:var(--muted,#94a3b8);line-height:1.6}
.signup-plan-limit{margin:22px 0;padding:14px 16px;border-radius:11px;background:rgba(34,211,238,.08);border:1px solid rgba(34,211,238,.22)}
.signup-change-plan{display:inline-block;margin-top:24px;color:#67e8f9}
.signup-form-card h2{font-size:1.65rem;margin:8px 0 8px}
.signup-form{display:flex;flex-direction:column;gap:16px;margin-top:24px}
.signup-form label{display:flex;flex-direction:column;gap:7px;font-weight:700}
.signup-form input{width:100%}
.signup-submit{margin-top:4px;min-height:46px}
.signup-security-note{display:flex;flex-direction:column;gap:4px;margin-top:18px;padding:13px 15px;border-radius:10px;background:rgba(15,23,42,.45);border:1px solid var(--border,#24324a)}
.signup-security-note span{color:var(--muted,#94a3b8);font-size:.9rem;line-height:1.45}
@media (max-width:760px){
  .public-shell{margin-top:24px}
  .billing-public-header{margin-bottom:34px}
  .signup-layout{grid-template-columns:1fr}
  .signup-summary,.signup-form-card{padding:22px}
  .pricing-description{min-height:0}
}


/* Billing v8.4 private subscription management */
.billing-overview-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:16px;margin-bottom:16px}
.billing-plan-head,.billing-section-head,.billing-management-card,.billing-usage-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.billing-plan-head{align-items:flex-start;margin-top:4px}
.billing-plan-head h2,.billing-management-card h2,.billing-invoices-card h2{margin:5px 0 5px}
.billing-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px}
.billing-facts>div{padding:14px 15px;border:1px solid #24344d;border-radius:12px;background:#091427}
.billing-facts span{display:block;color:#8ea7cb;font-size:.82rem;margin-bottom:5px}
.billing-facts strong{display:block}
.billing-price-line{display:flex;align-items:baseline;gap:6px;margin-top:18px}
.billing-price-line strong{font-size:1.55rem}
.billing-price-line span{color:#8ea7cb}
.billing-inline-notice{margin-top:18px}
.billing-usage-block{margin-top:21px}
.billing-usage-head span{color:#b7c9e4}
.billing-usage-track{height:9px;overflow:hidden;border-radius:999px;background:#071124;margin-top:9px}
.billing-usage-track span{display:block;height:100%;border-radius:inherit;background:#16a6cc}
.billing-usage-note{margin-top:22px}
.billing-management-card{margin-bottom:16px}
.billing-management-copy{max-width:720px}
.billing-management-card form{margin:0}
.billing-management-card .btn[disabled]{opacity:.45;cursor:not-allowed}
.billing-invoice-table-wrap{overflow-x:auto;margin-top:18px}
.billing-invoice-table{width:100%;border-collapse:collapse;min-width:720px}
.billing-invoice-table th,.billing-invoice-table td{padding:13px 12px;border-bottom:1px solid #223149;text-align:left;vertical-align:middle}
.billing-invoice-table th{color:#8ea7cb;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em}
.billing-invoice-actions{display:flex;justify-content:flex-end;gap:8px}
.billing-invoice-actions .btn.small{padding:7px 10px;min-height:auto}
.billing-empty{margin-top:16px}
@media(max-width:900px){
  .billing-overview-grid{grid-template-columns:1fr}
  .billing-management-card{align-items:flex-start;flex-direction:column}
}
@media(max-width:600px){
  .billing-facts{grid-template-columns:1fr}
}


/* Sympel Agent Foundation */
.agent-secret-card{
  border-color:rgba(34,211,238,.38);
  background:linear-gradient(135deg,rgba(8,47,73,.34),rgba(15,23,42,.94));
}
.agent-secret-row{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:14px;
}
.agent-secret-row code{
  flex:1;
  min-width:0;
  overflow-wrap:anywhere;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:rgba(2,6,23,.65);
  color:#d9f7ff;
}
.agent-overview-grid{margin-bottom:18px}
.agent-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}
.agent-stat-grid>div{
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:rgba(2,6,23,.24);
}
.agent-stat-grid span{display:block;color:var(--muted);font-size:.84rem}
.agent-stat-grid strong{display:block;margin-top:4px;font-size:1.35rem}
.agent-actions{display:flex;gap:8px;flex-wrap:wrap}
.agent-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.72rem;margin-top:4px}
.agent-api-list{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.agent-api-list code{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(2,6,23,.5);
}
.btn.secondary{
  background:rgba(30,41,59,.95);
  border-color:var(--border);
  color:var(--text);
}
.btn.secondary:hover{filter:brightness(1.12)}
.btn.compact{padding:7px 10px;font-size:.78rem}
@media(max-width:760px){
  .agent-secret-row{align-items:stretch;flex-direction:column}
  .agent-stat-grid{grid-template-columns:1fr 1fr}
}

/* Agent enrollment token confirmation */
.agent-confirm-modal{max-width:560px}
.agent-confirm-modal .app-modal-body p{margin:0;line-height:1.6;color:var(--text)}
.agent-confirm-token{display:flex;justify-content:space-between;gap:18px;margin-top:18px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:rgba(2,6,23,.38)}
.agent-confirm-token span{color:var(--muted)}
.agent-confirm-token strong{text-align:right;overflow-wrap:anywhere}


/* Agent monitoring access */
.agent-name-link{color:var(--text);text-decoration:none}
.agent-name-link:hover{color:#67e8f9}
.agent-monitor-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.agent-monitor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.agent-monitor-card{
  display:block;
  color:var(--text);
  text-decoration:none;
  border:1px solid var(--border);
  border-radius:14px;
  padding:17px;
  background:rgba(2,6,23,.28);
  transition:border-color .16s ease,transform .16s ease,background .16s ease;
}
.agent-monitor-card:hover{border-color:rgba(34,211,238,.55);background:rgba(8,47,73,.18);transform:translateY(-1px)}
.agent-monitor-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.agent-monitor-name{display:block;font-size:1.05rem;margin-bottom:4px}
.agent-monitor-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.agent-monitor-meta>div{padding-top:10px;border-top:1px solid rgba(148,163,184,.14)}
.agent-monitor-meta span,.agent-identity-grid span{display:block;color:var(--muted);font-size:.78rem;margin-bottom:4px}
.agent-monitor-meta strong{display:block;font-size:.9rem}
.agent-monitor-footnote{margin-top:16px}
.agent-detail-actions{display:flex;align-items:center;gap:10px}
.agent-detail-grid{margin-bottom:18px}
.detail-list{display:flex;flex-direction:column;margin-top:14px}
.detail-list>div{display:flex;justify-content:space-between;gap:22px;padding:11px 0;border-bottom:1px solid rgba(148,163,184,.14)}
.detail-list>div:last-child{border-bottom:0}
.detail-list span{color:var(--muted)}
.detail-list strong{text-align:right;overflow-wrap:anywhere}
.agent-identity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px}
.agent-identity-grid>div{padding:14px;border:1px solid var(--border);border-radius:10px;background:rgba(2,6,23,.28)}
.agent-identity-grid code{display:block;overflow-wrap:anywhere;color:#d9f7ff}
.compact-empty-state{margin-top:14px}
@media(max-width:900px){
  .agent-monitor-grid{grid-template-columns:1fr}
  .agent-monitor-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .agent-monitor-meta,.agent-identity-grid{grid-template-columns:1fr}
  .agent-detail-actions{align-items:flex-start;flex-direction:column}
  .detail-list>div{flex-direction:column;gap:4px}
  .detail-list strong{text-align:left}
}

.agent-rename-form{display:flex;align-items:flex-end;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid rgba(148,163,184,.14)}
.agent-rename-form label{flex:1;display:flex;flex-direction:column;gap:6px}.agent-rename-form label>span{color:var(--muted);font-size:.8rem}.agent-rename-form input{width:100%}
@media(max-width:600px){.agent-rename-form{align-items:stretch;flex-direction:column}}


/* Agent Network Diagnostics v0.4 */
.agent-network-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0;
}
.agent-network-summary>div{
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
  background:rgba(4,12,28,.35);
  min-width:0;
}
.agent-network-summary span,
.agent-network-summary small{
  display:block;
  color:var(--muted);
}
.agent-network-summary strong{
  display:block;
  margin:5px 0;
  overflow-wrap:anywhere;
}
.agent-network-details{margin-top:8px}
.agent-network-note{margin-top:14px}
.agent-diagnostic-errors{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
}
.agent-diagnostic-errors summary{cursor:pointer;font-weight:700}
.agent-diagnostic-errors div{margin-top:8px;color:var(--muted)}
.agent-network-footnote{margin-top:14px}
@media (max-width:900px){
  .agent-network-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .agent-network-summary{grid-template-columns:1fr}
}


/* Agent ↔ PBX 1:1 assignment */
.agent-pbx-picker{position:relative}
.agent-pbx-results{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% - 18px);
  z-index:40;
  max-height:320px;
  overflow-y:auto;
  border:1px solid var(--border);
  border-radius:10px;
  background:#0b1526;
  box-shadow:0 18px 45px rgba(0,0,0,.38);
}
.agent-pbx-result{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid rgba(148,163,184,.12);
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.agent-pbx-result:last-child{border-bottom:0}
button.agent-pbx-result:hover{background:rgba(34,211,238,.08)}
.agent-pbx-result span{font-size:.76rem;color:var(--muted);overflow-wrap:anywhere}
.agent-pbx-selection,
.agent-assignment-summary{
  margin-top:8px;
  padding:10px 12px;
  border:1px solid rgba(34,211,238,.28);
  border-radius:10px;
  background:rgba(8,47,73,.2);
}
.agent-assignment-summary{display:flex;flex-direction:column;gap:4px}
.agent-assignment-summary span{color:var(--muted);font-size:.78rem}
.agent-assignment-summary small{color:var(--muted);overflow-wrap:anywhere}
.agent-assignment-form{max-width:760px;margin-top:16px}

.delegated-permission-heading {
  margin-top: 18px;
}

.delegated-permission-grid {
  margin-top: 10px;
}

.permission-option-management {
  border-style: dashed;
}

.permission-option-management:has(input:checked) {
  border-style: solid;
}

.agent-network-timeline {
  margin-top: 18px;
}
.agent-network-timeline h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.agent-network-event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border, rgba(148,163,184,.18));
}
.agent-network-event small {
  color: var(--muted, #64748b);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .agent-network-event {
    grid-template-columns: 1fr;
  }
  .agent-network-event small {
    white-space: normal;
  }
}


/* Agent Operational Detail v2.60 */
.agent-health-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 18px;
}
.agent-health-card{
  position:relative;
  min-width:0;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--card);
  overflow:hidden;
}
.agent-health-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:rgba(148,163,184,.42);
}
.agent-health-card.ok::before{background:#16a34a}
.agent-health-card.warn::before{background:#f59e0b}
.agent-health-card.bad::before{background:#dc2626}
.agent-health-card .eyebrow{margin-bottom:8px}
.agent-health-card strong{
  display:block;
  font-size:1.08rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.agent-health-card>span{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.agent-health-card.ok strong{color:#4ade80}
.agent-health-card.warn strong{color:#fbbf24}
.agent-health-card.bad strong{color:#fb7185}

.agent-context-card{margin-bottom:18px}
.agent-context-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  margin-top:14px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:12px;
  overflow:hidden;
}
.agent-context-grid>div{
  min-width:0;
  padding:14px 16px;
  background:rgba(2,6,23,.2);
  border-right:1px solid rgba(148,163,184,.14);
}
.agent-context-grid>div:last-child{border-right:0}
.agent-context-grid span,
.agent-context-grid small{
  display:block;
  color:var(--muted);
}
.agent-context-grid span{
  margin-bottom:6px;
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.agent-context-grid strong,
.agent-context-grid small{
  overflow-wrap:anywhere;
}
.agent-context-grid small{margin-top:5px;line-height:1.35}

.agent-section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin:24px 0 12px;
}
.agent-section-heading h2{margin:3px 0 0}

.agent-diagnostic-panel,
.agent-admin-panel{
  padding:0;
  overflow:hidden;
  margin-bottom:12px;
}
.agent-diagnostic-panel>summary,
.agent-admin-panel>summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:17px 18px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.agent-diagnostic-panel>summary::-webkit-details-marker,
.agent-admin-panel>summary::-webkit-details-marker{display:none}
.agent-diagnostic-panel>summary::before,
.agent-admin-panel>summary::before{
  content:"›";
  flex:0 0 auto;
  font-size:1.3rem;
  font-weight:900;
  line-height:1;
  transform:rotate(0deg);
  transition:transform .15s ease;
}
.agent-diagnostic-panel[open]>summary::before,
.agent-admin-panel[open]>summary::before{transform:rotate(90deg)}
.agent-diagnostic-panel>summary span,
.agent-admin-panel>summary span{
  font-weight:900;
  font-size:1.02rem;
}
.agent-diagnostic-panel>summary small,
.agent-admin-panel>summary small{
  margin-left:auto;
  color:var(--muted);
  text-align:right;
  font-size:.82rem;
}
.agent-diagnostic-panel[open]>summary,
.agent-admin-panel[open]>summary{
  border-bottom:1px solid rgba(148,163,184,.14);
}
.agent-diagnostic-body{
  padding:18px;
}
.agent-diagnostic-body>.card-heading:first-child{margin-top:0}
.agent-diagnostic-body>.eyebrow:first-child{margin-top:0}
.agent-diagnostic-body.card{border:0;background:transparent;padding:0}

.agent-admin-panel{margin-top:22px}
.agent-admin-body{padding:18px}
.agent-admin-body>.agent-diagnostic-body{
  padding:18px 0;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.agent-admin-body>.agent-diagnostic-body:last-child{border-bottom:0}
.agent-admin-section{
  padding:0 0 18px;
  margin-bottom:4px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.agent-admin-section h3{margin:4px 0 0}

@media(max-width:1100px){
  .agent-health-grid,
  .agent-context-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .agent-context-grid>div:nth-child(2){border-right:0}
  .agent-context-grid>div:nth-child(-n+2){border-bottom:1px solid rgba(148,163,184,.14)}
}
@media(max-width:650px){
  .agent-health-grid,
  .agent-context-grid{grid-template-columns:1fr}
  .agent-context-grid>div{
    border-right:0;
    border-bottom:1px solid rgba(148,163,184,.14);
  }
  .agent-context-grid>div:last-child{border-bottom:0}
  .agent-diagnostic-panel>summary,
  .agent-admin-panel>summary{
    align-items:flex-start;
    flex-wrap:wrap;
    gap:8px 12px;
  }
  .agent-diagnostic-panel>summary small,
  .agent-admin-panel>summary small{
    width:100%;
    margin-left:30px;
    text-align:left;
  }
}


/* Agent UX & Auto Refresh v2.61 */
.agent-context-card .card-heading{
  margin-bottom:0;
}
.agent-context-card{
  padding-top:14px;
  padding-bottom:14px;
}
.agent-context-grid{
  margin-top:10px;
}
.agent-context-grid>div{
  padding:12px 14px;
}
.agent-context-grid span{
  margin-bottom:4px;
}
.agent-context-grid small{
  margin-top:4px;
}
#agent-auto-refresh-status,
#agents-auto-refresh-status{
  white-space:nowrap;
}
@media(max-width:760px){
  #agent-auto-refresh-status,
  #agents-auto-refresh-status{
    display:none;
  }
}


/* Agents operational list */
.agents-list-heading {
  align-items: flex-start;
}

.agents-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 8px;
  flex-wrap: wrap;
}

.agents-search {
  flex: 1 1 320px;
  max-width: 560px;
}

.agents-search input {
  width: 100%;
  min-height: 40px;
}

.agents-filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agents-filter-btn {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .72);
  color: #cbd5e1;
  border-radius: 10px;
  min-height: 38px;
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}

.agents-filter-btn span {
  margin-left: 5px;
  color: var(--muted);
}

.agents-filter-btn:hover,
.agents-filter-btn.is-active {
  border-color: rgba(34, 211, 238, .55);
  background: rgba(8, 47, 73, .58);
  color: #fff;
}

.agents-filter-summary {
  min-height: 18px;
  margin-bottom: 8px;
  font-size: 12px;
}

.agent-monitor-grid-operational {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-operational-card {
  position: relative;
  overflow: hidden;
}

.agent-operational-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #334155;
}

.agent-operational-card.agent-state-healthy::before {
  background: #22c55e;
}

.agent-operational-card.agent-state-problem::before {
  background: #f59e0b;
}

.agent-operational-card.agent-state-offline::before {
  background: #ef4444;
}

.agent-card-pbx {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(2, 6, 23, .32);
  border-radius: 10px;
}

.agent-card-pbx span,
.agent-operational-signals span {
  color: #93c5fd;
  font-size: 11px;
}

.agent-card-pbx small,
.agent-operational-signals small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.agent-operational-signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.agent-operational-signals > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 10px 2px 0;
}

.agent-operational-signals > div + div {
  padding-left: 10px;
  border-left: 1px solid rgba(148, 163, 184, .12);
}

.agent-operational-signals strong {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .agent-monitor-grid-operational {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .agents-filterbar {
    align-items: stretch;
  }

  .agents-search {
    max-width: none;
  }

  .agents-filter-buttons {
    width: 100%;
  }

  .agents-filter-btn {
    flex: 1 1 45%;
  }

  .agent-operational-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-operational-signals > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
}


/* Agent operational awareness */
.sidebar-link-with-badge {
  justify-content: space-between;
  gap: 10px;
}

.sidebar-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.sidebar-alert-badge.warning {
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.18);
}
.sidebar-alert-badge.critical {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.dashboard-awareness-slot:empty {
  display: none;
}

.agent-awareness-card {
  margin-bottom: 18px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.18), rgba(15, 23, 42, 0.96) 45%),
    var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.agent-awareness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.16);
}

.agent-awareness-head h2 {
  margin: 3px 0 5px;
}

.agent-awareness-head p {
  margin: 0;
  color: #cbd5e1;
}

.agent-awareness-list {
  display: flex;
  flex-direction: column;
}

.agent-awareness-item {
  display: grid;
  grid-template-columns: 14px minmax(180px, 1fr) minmax(220px, 1.2fr);
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.agent-awareness-item:hover {
  background: rgba(15, 23, 42, 0.72);
}

.agent-awareness-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.agent-awareness-item-main strong,
.agent-awareness-item-main span,
.agent-awareness-reason {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-awareness-item-main span {
  color: var(--muted);
  font-size: 12px;
}

.agent-awareness-reason {
  justify-self: end;
  font-size: 12px;
  font-weight: 800;
}

.agent-awareness-more {
  display: block;
  padding: 11px 18px 13px;
  font-weight: 800;
  font-size: 12px;
}

@media (max-width: 800px) {
  .agent-awareness-head {
    flex-direction: column;
  }

  .agent-awareness-item {
    grid-template-columns: 14px 1fr;
  }

  .agent-awareness-reason {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }
}


/* Agent operational list — scalable 2.64.0 */
.agents-filterbar-server {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
}

.agents-page-size {
  margin: 0;
}

.agents-page-size span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.agents-search-submit {
  min-height: 40px;
}

.agents-filter-buttons-server {
  margin-top: 14px;
}

.agents-filter-buttons-server .agents-filter-btn {
  text-decoration: none;
}

.agents-result-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.agents-clear-search {
  font-weight: 800;
}

.agents-scroll-panel {
  max-height: min(62vh, 760px);
  min-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(15, 23, 42, 0.45);
}

.agents-scroll-panel::-webkit-scrollbar {
  width: 10px;
}

.agents-scroll-panel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.45);
  border-radius: 999px;
}

.agents-scroll-panel::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid rgba(15, 23, 42, 0.45);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.55);
}

.agents-scroll-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.78);
}

.agents-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.agents-pagination .is-disabled {
  pointer-events: none;
  opacity: .45;
}

@media (max-width: 900px) {
  .agents-filterbar-server {
    grid-template-columns: 1fr;
  }

  .agents-scroll-panel {
    max-height: 68vh;
  }

  .agents-result-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* 2.66.0 onboarding UX */
.form-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted, #8fa6c4);
  font-size: 0.82rem;
  line-height: 1.35;
}

.wizard-option-row {
  grid-column: 1 / -1;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(108, 146, 190, 0.28);
  border-radius: 12px;
  background: rgba(5, 16, 34, 0.38);
  cursor: pointer;
}

.wizard-option-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: 0 0 auto;
}

.wizard-option-row span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.wizard-option-row strong {
  color: #f5f8ff;
}

.wizard-option-row small {
  color: #9ab2d1;
  line-height: 1.4;
}

.wizard-submit-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.25rem;
  color: #9fdfff;
  font-size: 0.9rem;
}

.wizard-submit-status[hidden] {
  display: none;
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: sympel-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.btn.is-loading {
  cursor: wait;
  opacity: 0.9;
}

.notice.info {
  background: rgba(0, 173, 239, 0.08);
  border-color: rgba(0, 173, 239, 0.36);
  color: #b9dcf5;
}

@keyframes sympel-spin {
  to { transform: rotate(360deg); }
}


/* 2.70.0 manual PBX edit UX */
.manual-pbx-edit {
  display: grid;
  gap: 18px;
}

.manual-pbx-section {
  margin-bottom: 0;
}

.manual-pbx-scope-card {
  border-color: rgba(245, 158, 11, 0.30);
}

.edit-pbx-title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.manual-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.manual-section-header h2 {
  margin-bottom: 4px;
}

.manual-pbx-form-grid {
  align-items: start;
}

.inline-checkbox-row {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px;
  width: auto !important;
  cursor: pointer;
}

.inline-checkbox-row input[type="checkbox"] {
  width: 18px !important;
  height: 18px;
  margin: 2px 0 0 !important;
  flex: 0 0 auto;
}

.inline-checkbox-row > span {
  display: grid;
  gap: 2px;
}

.inline-checkbox-row strong {
  color: var(--text);
}

.inline-checkbox-row small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.compact-checkbox {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: rgba(2, 6, 23, .35);
}

.api-route-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr);
  gap: 18px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(34, 211, 238, .24);
  border-radius: 16px;
  background: rgba(2, 6, 23, .42);
}

.api-route-main {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.api-route-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(14, 165, 233, .15);
  border: 1px solid rgba(14, 165, 233, .35);
  color: #67e8f9;
  font-weight: 900;
}

.api-route-label,
.api-route-meta span,
.credential-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.api-route-main strong,
.api-route-meta strong,
.credential-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.api-route-main small,
.api-route-meta small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.api-route-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.api-route-meta > div {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 12px;
  background: rgba(15, 23, 42, .55);
  min-width: 0;
}

.api-route-meta strong {
  overflow-wrap: anywhere;
}

.api-credential-summary,
.api-credential-editor {
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: rgba(15, 23, 42, .55);
}

.credential-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.credential-summary-grid > div {
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, .38);
  border: 1px solid rgba(148, 163, 184, .12);
}

.api-editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.api-clear-row {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .18);
  border-radius: 12px;
  background: rgba(127, 29, 29, .08);
}

.manual-pbx-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px 14px 0 0;
  background: rgba(2, 6, 23, .94);
  backdrop-filter: blur(12px);
}

#pbx-api-section.is-p520 .api-route-card,
#pbx-api-section.is-p520 #pbx-api-header-pill {
  display: none;
}

@media (max-width: 900px) {
  .manual-section-header {
    flex-direction: column;
  }

  .api-route-card,
  .api-route-meta,
  .credential-summary-grid {
    grid-template-columns: 1fr;
  }

  .compact-checkbox {
    width: 100% !important;
  }
}


/* Agent diagnostic attention badges */
.agent-diagnostic-panel > summary .agent-summary-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.agent-diagnostic-panel > summary .agent-summary-meta small {
  margin-left: 0;
}
.agent-diagnostic-panel > summary .agent-summary-badge {
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 650px) {
  .agent-diagnostic-panel > summary .agent-summary-meta {
    width: 100%;
    margin-left: 30px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .agent-diagnostic-panel > summary .agent-summary-meta small {
    width: auto;
    margin-left: 0;
    text-align: left;
  }
}


/* Isolated sales / event demo */
.demo-environment-banner{position:sticky;top:0;z-index:9999;text-align:center;padding:7px 12px;font-size:12px;font-weight:700;letter-spacing:.08em;background:#f5e7a6;color:#3d3210;border-bottom:1px solid rgba(61,50,16,.18)}
