/* Admin-Bereich: spl-data-Instanzen */

.admin-banner {
  background: rgba(0, 160, 200, 0.12);
  border: 1px solid var(--kpi-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

html[data-theme="dark"] .admin-banner {
  background: rgba(77, 196, 224, 0.12);
}

.admin-banner--warn {
  background: rgba(217, 119, 6, 0.14);
  border-color: rgba(217, 119, 6, 0.45);
}

html[data-theme="dark"] .admin-banner--warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
}

.admin-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.admin-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  text-decoration: underline;
}

.admin-page-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.admin-page-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  max-width: 48rem;
}

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.admin-subnav a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.admin-subnav a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.admin-subnav a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-section {
  margin-bottom: 1.5rem;
}

.admin-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-hub-block {
  margin-bottom: 1.75rem;
  max-width: 56rem;
}

.admin-hub-block:last-child {
  margin-bottom: 0;
}

.admin-hub-block h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.admin-hub-block .admin-hub-grid {
  margin-top: 0;
}

.admin-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  max-width: 56rem;
}

.admin-hub-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-hub-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-hub-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
}

.admin-hub-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--info-list-row-border);
}

.status-table th {
  color: var(--text-muted);
  font-weight: 500;
  width: 11rem;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge--planned {
  background: rgba(0, 160, 200, 0.2);
  color: var(--accent);
}

.status-badge--manual {
  background: rgba(140, 140, 140, 0.2);
  color: var(--text-muted);
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-actions {
  margin-top: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: not-allowed;
  background: var(--border);
  color: var(--text-muted);
}

.btn:disabled {
  opacity: 0.85;
}

.form-grid {
  display: grid;
  gap: 0.65rem;
  max-width: 22rem;
}

.form-row label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  background: var(--input-bg);
  color: var(--input-text);
}

.form-row input:disabled,
.form-row select:disabled,
.form-row textarea:disabled {
  opacity: 0.85;
}

.admin-links {
  font-size: 0.85rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.admin-links li {
  margin-bottom: 0.35rem;
}

/* Host-Metriken (System) */
.host-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.75rem;
  max-width: 56rem;
}

.host-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
}

.host-metric-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.host-metric-card__head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.host-metric-card__id {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.host-metric-card__meta-row {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.host-metric-card__meta {
  margin-right: 0.5rem;
}

.host-metric-card__err {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: #b45309;
}

html[data-theme="dark"] .host-metric-card__err {
  color: #fbbf24;
}

.host-metric-card__bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.host-metric-bar {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.75rem;
  align-items: center;
  gap: 0.35rem;
}

.host-metric-bar__label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.host-metric-bar__track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

html[data-theme="dark"] .host-metric-bar__track {
  background: rgba(255, 255, 255, 0.1);
}

.host-metric-bar__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.host-metric-bar__fill--ok {
  background: linear-gradient(90deg, #0d9488, #14b8a6);
}

.host-metric-bar__fill--warn {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.host-metric-bar__fill--crit {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.host-metric-bar__fill--na {
  background: rgba(120, 120, 120, 0.35);
  width: 0 !important;
}

.host-metric-bar__value {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-muted);
}

.host-metrics__hint,
.host-metrics__loading {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 40rem;
}

.host-metrics__hint--err {
  color: #b45309;
}

html[data-theme="dark"] .host-metrics__hint--err {
  color: #fbbf24;
}

/* Development · API-Tester */
.btn--primary {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--ghost {
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-left: 0.5rem;
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn--sm {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.dev-api-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 56rem;
}

.dev-api-card .dev-api-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  max-width: 48rem;
}

.dev-api-row-span {
  grid-column: 1 / -1;
}

.dev-api-check-row {
  grid-column: 1 / -1;
}

.dev-api-inline-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}

.dev-api-meta {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  max-width: 56rem;
}

.dev-api-meta__status {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--text);
}

.dev-api-meta__status--err {
  color: #b45309;
}

html[data-theme="dark"] .dev-api-meta__status--err {
  color: #fbbf24;
}

.dev-api-meta__sub {
  margin: 0.15rem 0;
  color: var(--text-muted);
  word-break: break-all;
}

.dev-api-meta__sub code {
  font-size: 0.72rem;
}

.dev-api-strategy {
  margin-top: 0.25rem;
}

.dev-api-warn-list {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.dev-api-meta__err {
  margin: 0;
  color: #b45309;
}

.dev-api-out-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: 56rem;
  margin-bottom: 0.35rem;
}

.dev-api-out-head h3 {
  margin: 0;
}

.dev-api-out-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.dev-api-out-actions .btn--ghost {
  margin-left: 0;
}

.dev-api-toggle-raw {
  margin: 0;
}

.dev-api-headers {
  max-width: 56rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dev-api-headers summary {
  cursor: pointer;
  color: var(--accent);
  user-select: none;
}

.dev-api-headers summary:hover {
  text-decoration: underline;
}

.dev-api-headers__pre {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  max-height: 12rem;
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.dev-api-table-root {
  max-width: 56rem;
  margin-bottom: 0.75rem;
}

.dev-api-result-toolbar {
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dev-api-result-count {
  font-weight: 700;
  color: var(--text);
}

.dev-api-table-scroll {
  overflow: auto;
  max-height: min(50vh, 28rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.dev-api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.dev-api-table th,
.dev-api-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.dev-api-table th {
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 var(--border);
  font-weight: 600;
  color: var(--text);
}

.dev-api-table tr:last-child td {
  border-bottom: none;
}

.dev-api-table__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
}

.dev-api-table-empty,
.dev-api-table-loading {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ISE OpenAPI v1 — Zeile klicken für JSON-Detail */
.nw-ise-openapi-table-root .dev-api-table tbody tr[data-row-index] {
  cursor: pointer;
}

.nw-ise-openapi-table-root .dev-api-table tbody tr[data-row-index]:hover td {
  background: rgba(0, 160, 200, 0.08);
}

html[data-theme="dark"] .nw-ise-openapi-table-root .dev-api-table tbody tr[data-row-index]:hover td {
  background: rgba(77, 196, 224, 0.1);
}

.nw-ise-openapi-detail {
  margin-top: 1rem;
}

.nw-ise-openapi-detail summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.35rem;
}

.nw-ise-openapi-detail-pre {
  margin: 0;
  padding: 0.75rem 1rem;
  max-height: min(42vh, 24rem);
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.35;
}

.dev-api-ise-trace-root {
  max-width: 56rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.dev-api-ise-trace-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.dev-api-ise-trace-note {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dev-api-ise-trace-step {
  margin-bottom: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .dev-api-ise-trace-step {
  background: rgba(255, 255, 255, 0.03);
}

.dev-api-ise-trace-step summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--accent);
}

.dev-api-ise-h5 {
  margin: 0.65rem 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Cortex XDR · Development-Snapshot */
.cortex-dev-summary {
  margin-top: 1rem;
  max-width: 56rem;
}

.cortex-dev-summary-inner .cortex-dev-bucket-title {
  margin: 1rem 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.cortex-dev-summary-inner .cortex-dev-bucket-table {
  margin-bottom: 0.25rem;
}

.cortex-dev-bucket-empty {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cortex-dev-query-details {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  background: var(--bg-card);
}

.cortex-dev-query-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--accent);
}

.cortex-dev-query-pre {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.65rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.cortex-dev-err-pre {
  margin-top: 0.65rem;
  padding: 0.65rem;
  max-height: 16rem;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

html[data-theme="dark"] .cortex-dev-err-pre {
  background: rgba(255, 255, 255, 0.06);
}

.dev-api-ise-pre {
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.65rem;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

html[data-theme="dark"] .dev-api-ise-pre {
  background: rgba(255, 255, 255, 0.06);
}

.dev-api-ise-pre.dev-api-ise-body {
  max-height: min(50vh, 24rem);
}

.dev-api-output {
  margin: 0;
  max-width: 56rem;
  max-height: min(70vh, 36rem);
  overflow: auto;
  padding: 1rem;
  font-size: 0.72rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 40rem) {
  .dev-api-card .dev-api-form-grid {
    grid-template-columns: 1fr;
  }
}

/* TAC: ISE / Cortex / Sessions panels */
.nw-tac-results {
  max-width: 56rem;
}

.nw-tac-errors ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
}

.nw-tac-summary-card {
  margin-bottom: 1rem;
}

.nw-tac-inset-title,
.nw-tac-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--text);
}

.nw-tac-panel-title {
  margin-bottom: 0.45rem;
  padding-left: 0.35rem;
  border-left: 3px solid var(--border);
}

.nw-tac-panel--ise .nw-tac-panel-title {
  border-left-color: #0a8fa8;
}

.nw-tac-panel--cortex .nw-tac-panel-title {
  border-left-color: #7c5cbf;
}

.nw-tac-panel--sessions .nw-tac-panel-title {
  border-left-color: #c77d0a;
}

.nw-tac-panel--ad .nw-tac-panel-title {
  border-left-color: #2e7d32;
}

.nw-tac-panels {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.nw-tac-panel-card {
  max-width: none;
}

.nw-tac-dl {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.82rem;
  margin: 0;
}

.nw-tac-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.nw-tac-dl dd {
  margin: 0;
  word-break: break-word;
}

.nw-tac-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.nw-tac-subhead {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0.85rem 0 0.35rem;
}

.nw-tac-subhead:first-child {
  margin-top: 0;
}

.nw-tac-pre {
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.65rem;
  max-height: min(42vh, 22rem);
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  color: var(--text);
}

html[data-theme="dark"] .nw-tac-pre {
  background: rgba(255, 255, 255, 0.06);
}

.nw-tac-lines {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: min(36vh, 18rem);
  overflow: auto;
}

.nw-tac-lines li {
  margin-bottom: 0.25rem;
}

.nw-tac-raw {
  margin-top: 1.25rem;
  max-width: 56rem;
}

.nw-tac-raw summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.nw-tac-raw-pre {
  margin-top: 0.35rem;
}

.nw-tac-inline-details {
  margin-top: 0.65rem;
}

.nw-tac-inline-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.nw-tac-inline-details .nw-tac-pre {
  max-height: min(30vh, 16rem);
}

/* TAC: sortierbare Tabellen */
.nw-tac-table-wrap {
  overflow-x: auto;
  margin: 0.35rem 0 0.65rem;
  -webkit-overflow-scrolling: touch;
}

.nw-tac-table-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.nw-tac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  line-height: 1.35;
}

.nw-tac-table th,
.nw-tac-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.nw-tac-table thead th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="dark"] .nw-tac-table thead th {
  background: rgba(255, 255, 255, 0.06);
}

.nw-tac-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.025);
}

html[data-theme="dark"] .nw-tac-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.nw-tac-sort-btn {
  font: inherit;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  margin: 0;
  text-align: left;
}

.nw-tac-sort-btn:hover {
  color: var(--accent);
}

.nw-tac-table td {
  max-width: 18rem;
  word-break: break-word;
}

.nw-tac-table--compact td {
  max-width: none;
}

/* Monitoring · Cortex ↔ ISE */
.monitor-c2i-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.monitor-c2i-h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.monitor-c2i-mac {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.monitor-c2i-mac-result {
  margin-top: 0.65rem;
  font-size: 0.85rem;
}

.monitor-c2i-mac-result h4 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.monitor-c2i-mac-result h4:first-child {
  margin-top: 0.25rem;
}

.monitor-c2i-mac-result .status-table {
  width: 100%;
  max-width: 52rem;
}

/* -------------------------------------------------------------------------- */
/* NW Data Table Template — Mockups + optisch an AG Grid / ag-theme-xsiam     */
/* (Cortex XDR: Raster, Header, Zebra, Pin-Schatten, kompakte Typo)           */
/* -------------------------------------------------------------------------- */

.nw-dt.nw-dt--ag {
  --nw-dt-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nw-dt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* hell — an alpine / xsiam hell angelehnt */
  --nw-dt-border: #d0d7de;
  --nw-dt-border-strong: #b8c0c8;
  --nw-dt-header-bg: #f2f5f7;
  --nw-dt-header-fg: #5c6b7a;
  --nw-dt-row-odd: #ffffff;
  --nw-dt-row-even: #fafbfc;
  --nw-dt-row-hover: rgba(33, 150, 243, 0.09);
  --nw-dt-row-selected: rgba(33, 150, 243, 0.2);
  --nw-dt-pin-shadow: rgba(0, 0, 0, 0.14);
  --nw-dt-scroll-shadow: rgba(15, 23, 42, 0.06);
  position: relative;
  max-width: 100%;
  font-family: var(--nw-dt-font);
}

.nw-dt__open-settings {
  flex-shrink: 0;
  margin-left: 0.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--nw-dt-border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

.nw-dt__open-settings:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--nw-dt-border));
}

.nw-dt__settings-layer[hidden] {
  display: none !important;
}

.nw-dt__settings-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 0.75rem;
  box-sizing: border-box;
}

.nw-dt__settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nw-dt__settings-panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: min(85vh, 32rem);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--nw-dt-border-strong);
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

html[data-theme="dark"] .nw-dt__settings-panel {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nw-dt__settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--nw-dt-border);
  background: var(--nw-dt-header-bg);
}

.nw-dt__settings-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.nw-dt__settings-x {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--nw-dt-header-fg);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.nw-dt__settings-x:hover {
  color: var(--accent);
  border-color: var(--nw-dt-border);
}

.nw-dt__settings-hint {
  margin: 0;
  padding: 0.45rem 0.75rem 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.nw-dt__settings-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.nw-dt__settings-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.25rem;
  margin-bottom: 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--nw-dt-border);
  background: var(--nw-dt-row-even);
  cursor: grab;
}

.nw-dt__settings-item:active {
  cursor: grabbing;
}

.nw-dt__settings-drag {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  user-select: none;
}

.nw-dt__settings-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nw-dt__settings-w {
  width: 4.25rem;
  flex-shrink: 0;
  padding: 0.22rem 0.35rem;
  font-size: 0.72rem;
}

.nw-dt__settings-w-suf {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.nw-dt__settings-fixed {
  padding: 0.35rem 0.75rem 0.5rem;
  border-top: 1px solid var(--nw-dt-border);
}

.nw-dt__settings-fixed-lbl {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nw-dt__settings-fixed-input {
  max-width: 6rem;
}

.nw-dt__settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem 0.75rem;
  border-top: 1px solid var(--nw-dt-border);
  background: var(--nw-dt-header-bg);
}

/* Overlay nur innerhalb Karte/Widget (nicht viewport-hoch) */
.nw-dt-drawer-scope {
  position: relative;
  z-index: 0;
}

html[data-theme="dark"] .nw-dt.nw-dt--ag {
  --nw-dt-border: #3a4249;
  --nw-dt-border-strong: #4d565f;
  --nw-dt-header-bg: #252b31;
  --nw-dt-header-fg: #9aa7b2;
  --nw-dt-row-odd: #1e2328;
  --nw-dt-row-even: #23292f;
  --nw-dt-row-hover: rgba(77, 196, 224, 0.1);
  --nw-dt-row-selected: rgba(77, 196, 224, 0.18);
  --nw-dt-pin-shadow: rgba(0, 0, 0, 0.55);
  --nw-dt-scroll-shadow: rgba(0, 0, 0, 0.35);
}

.nw-dt__head {
  margin-bottom: 0.55rem;
}

.nw-dt__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.3rem;
}

.nw-dt__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nw-dt__count {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nw-dt__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.85rem;
}

.nw-dt__filter-label {
  flex: 1 1 14rem;
  min-width: 10rem;
}

.nw-dt__filter-label-txt {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nw-dt-header-fg);
  margin-bottom: 0.2rem;
}

.nw-dt--ag .nw-dt__filter-global.input {
  border-radius: 8px;
  border: 1px solid var(--nw-dt-border);
  font-size: 0.8125rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-card);
  box-shadow: 0 1px 0 var(--nw-dt-scroll-shadow);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.nw-dt--ag .nw-dt__filter-global.input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--nw-dt-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.nw-dt__scroll {
  overflow: auto;
  max-height: min(62vh, 560px);
  border: 1px solid var(--nw-dt-border);
  border-radius: 10px;
  background: var(--nw-dt-row-odd);
  box-shadow:
    0 1px 2px var(--nw-dt-scroll-shadow),
    0 8px 24px -6px var(--nw-dt-scroll-shadow);
}

.nw-dt__scroll--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  padding: 1rem;
}

.nw-dt__empty-msg {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nw-dt__table {
  width: max(100%, 72rem);
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text);
}

.nw-dt__headrow th {
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--nw-dt-header-fg);
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: 0.65rem;
  border-bottom: 1px solid var(--nw-dt-border-strong);
  border-right: 1px solid var(--nw-dt-border);
  background: var(--nw-dt-header-bg);
  position: sticky;
  top: 0;
  z-index: 4;
  vertical-align: middle;
}

.nw-dt__filterrow th {
  padding: 0.28rem 0.35rem;
  text-align: left;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.68rem;
  color: var(--nw-dt-header-fg);
  border-bottom: 1px solid var(--nw-dt-border-strong);
  border-right: 1px solid var(--nw-dt-border);
  background: var(--nw-dt-header-bg);
  position: sticky;
  top: var(--nw-dt-head1-h, 2.35rem);
  z-index: 4;
  vertical-align: top;
}

.nw-dt__filterrow th.nw-dt__th--fixed {
  z-index: 7;
}

.nw-dt__filter-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.nw-dt__filt-chips {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-height: 9.5rem;
  overflow-y: auto;
}

.nw-dt__filt-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 1.38rem;
  padding: 0.12rem 0;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text);
  border-bottom: 1px dashed color-mix(in srgb, var(--nw-dt-border) 85%, transparent);
}

.nw-dt__filt-chip-row:last-child {
  border-bottom: none;
}

.nw-dt__filt-chip-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  font-family: var(--nw-dt-mono);
  color: var(--text);
}

.nw-dt__filt-chip-x {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.28rem;
  height: 1.28rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.nw-dt__filt-chip-x:hover {
  color: var(--danger);
  border-color: var(--nw-dt-border);
  background: var(--icon-btn-hover-bg);
}

.nw-dt--ag .nw-dt__col-filter-input.input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.3rem 0.42rem;
  font-size: 0.72rem;
  line-height: 1.25;
  border-radius: 6px;
  border: 1px solid var(--nw-dt-border);
  background: var(--bg-card);
  color: var(--text);
}

.nw-dt--ag .nw-dt__col-filter-input.input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--nw-dt-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.nw-dt__th-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-right: 0.35rem;
}

.nw-dt__col-resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  margin-right: -3px;
  cursor: col-resize;
  z-index: 9;
  border-radius: 2px;
  touch-action: none;
}

.nw-dt__col-resize:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

html[data-theme="dark"] .nw-dt__col-resize:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.nw-dt__th-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nw-dt__th-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.nw-dt__sort {
  font: inherit;
  font-size: 0.7rem;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--nw-dt-header-fg);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.nw-dt__sort:hover {
  color: var(--accent);
  border-color: var(--nw-dt-border);
  background: rgba(33, 150, 243, 0.08);
}

html[data-theme="dark"] .nw-dt__sort:hover {
  background: rgba(77, 196, 224, 0.12);
}

.nw-dt__sort.is-active {
  color: #1976d2;
  border-color: var(--nw-dt-border);
  background: rgba(33, 150, 243, 0.12);
}

html[data-theme="dark"] .nw-dt__sort.is-active {
  color: #7ecbff;
}

.nw-dt__th--fixed,
.nw-dt__td--fixed {
  position: sticky;
  z-index: 3;
}

.nw-dt__headrow th.nw-dt__th--fixed {
  z-index: 6;
}

/* Zebra + Pin: feste Zellen immer deckend (wie ag pinned) */
.nw-dt__table tbody tr:nth-child(odd) td {
  background: var(--nw-dt-row-odd);
}

.nw-dt__table tbody tr:nth-child(even) td {
  background: var(--nw-dt-row-even);
}

.nw-dt__headrow th.nw-dt__th--fixed {
  background: var(--nw-dt-header-bg);
}

.nw-dt__filterrow th.nw-dt__th--fixed {
  background: var(--nw-dt-header-bg);
}

.nw-dt__th--fixlast,
.nw-dt__td--fixlast {
  border-right: 1px solid var(--nw-dt-border-strong);
  box-shadow: 3px 0 10px var(--nw-dt-pin-shadow);
}

.nw-dt__table tbody td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--nw-dt-border);
  border-right: 1px solid var(--nw-dt-border);
  vertical-align: middle;
}

.nw-dt__table tbody td:last-child {
  border-right: none;
}

.nw-dt__cell-mono {
  font-family: var(--nw-dt-mono);
  font-size: 0.75rem;
  word-break: break-word;
}

.nw-dt__table tbody tr {
  cursor: pointer;
}

.nw-dt__table tbody tr:hover td {
  background: var(--nw-dt-row-hover) !important;
}

.nw-dt__table tbody tr.is-selected td {
  background: var(--nw-dt-row-selected) !important;
}

/*
 * Feste (sticky) Spalten: Hover/Selektion nutzen sonst halbtransparente RGBA —
 * horizontal scrollender Inhalt scheint dann durch. Hier undurchsichtige Mischfarbe.
 */
.nw-dt__table tbody tr:nth-child(odd):hover:not(.is-selected) td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-odd) 88%, var(--accent)) !important;
}

.nw-dt__table tbody tr:nth-child(even):hover:not(.is-selected) td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-even) 88%, var(--accent)) !important;
}

.nw-dt__table tbody tr:nth-child(odd).is-selected td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-odd) 70%, var(--accent)) !important;
}

.nw-dt__table tbody tr:nth-child(even).is-selected td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-even) 70%, var(--accent)) !important;
}

.nw-dt__table tbody tr:nth-child(odd).is-selected:hover td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-odd) 62%, var(--accent)) !important;
}

.nw-dt__table tbody tr:nth-child(even).is-selected:hover td.nw-dt__td--fixed {
  background-color: color-mix(in srgb, var(--nw-dt-row-even) 62%, var(--accent)) !important;
}

.nw-dt-drawer-scope > .nw-dt__drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 40;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.nw-dt__drawer-backdrop[hidden] {
  display: none !important;
  pointer-events: none;
}

.nw-dt-drawer-scope > .nw-dt__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  max-width: min(520px, 100%);
  background: var(--bg-card);
  border-left: 1px solid var(--nw-dt-border-strong);
  box-shadow: -6px 0 24px var(--nw-dt-pin-shadow);
  z-index: 41;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.nw-dt__drawer.is-open {
  transform: translateX(0);
}

.nw-dt__drawer-top {
  position: relative;
  padding: 0.9rem 2.35rem 0.65rem 0.85rem;
  border-bottom: 1px solid var(--nw-dt-border);
  flex-shrink: 0;
  background: var(--nw-dt-header-bg);
}

.nw-dt__drawer-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--nw-dt-header-fg);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.nw-dt__drawer-close:hover {
  color: var(--accent);
  border-color: var(--nw-dt-border);
  background: rgba(33, 150, 243, 0.08);
}

.nw-dt__drawer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding-right: 0.25rem;
}

.nw-dt__drawer-sub {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nw-dt__drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.55rem 0.85rem 1.1rem;
  background: var(--bg-card);
}

.nw-dt__acc {
  border: 1px solid var(--nw-dt-border);
  border-radius: 8px;
  margin-bottom: 0.45rem;
  background: var(--nw-dt-row-even);
  overflow: hidden;
}

.nw-dt__acc summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.5rem;
  color: var(--text);
  background: var(--nw-dt-header-bg);
}

.nw-dt__kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0 0 0.45rem;
}

.nw-dt__kv th,
.nw-dt__kv td {
  padding: 0.26rem 0.45rem;
  border-top: 1px solid var(--nw-dt-border);
  text-align: left;
  vertical-align: top;
}

.nw-dt__kv th {
  width: 38%;
  color: var(--nw-dt-header-fg);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
