/* ── Compliance split layout ─────────────────────────────────────────── */

#compliance-layout {
  display: flex;
  gap: 1rem;
  min-width: 0;
  align-items: flex-start;
}

#compliance-table-area {
  flex: 1;
  min-width: 0;
  overflow-x: clip;
}

/* ── Inline detail panel (sits beside the table) ─────────────────────── */

#comp-detail-panel {
  display: none;
  width: var(--comp-panel-w, 360px);
  min-width: 260px;
  max-width: calc(100% - 200px);
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: calc(100vh - var(--topbar-h) - 2.5rem);
}
#comp-detail-panel.open { display: flex; }

/* Drag handle on the left edge */
#comp-panel-resizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 5;
  transition: background 0.15s;
}
#comp-panel-resizer:hover,
#comp-panel-resizer.dragging { background: var(--accent); opacity: 0.5; }

/* Expanded: panel fills the layout, table hides */
#compliance-layout.expanded #comp-detail-panel { width: 100%; max-width: 100%; min-width: 0; }
#compliance-layout.expanded #compliance-table-area { display: none; }

/* While dragging, disable text selection and pointer events on the table */
body.comp-panel-resizing { cursor: ew-resize; user-select: none; }
body.comp-panel-resizing #compliance-table-area { pointer-events: none; }

/* ── Panel header ────────────────────────────────────────────────────── */

#comp-panel-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #1f2330;
}
#comp-panel-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
#comp-panel-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#comp-panel-meta { font-size: 0.78rem; }

#comp-panel-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
#comp-panel-expand {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#comp-panel-expand svg { width: 13px; height: 13px; }
#comp-panel-expand:hover { color: var(--text); border-color: var(--text); }
#comp-panel-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 7px;
  font-size: 0.85rem;
}
#comp-panel-close:hover { color: var(--text); border-color: var(--text); }

/* ── Tabs ────────────────────────────────────────────────────────────── */

#comp-panel-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 0.25rem;
  padding: 0 0.6rem;
  border-bottom: 1px solid var(--border);
  background: #1a1d28;
}
.comp-tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.comp-tab:hover { color: var(--text); }
.comp-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ── Persistent Connect block (drawer header) ────────────────────────── */

#comp-panel-connect {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: #15181f;
  padding: 0.55rem 0.7rem 0.4rem;
}
#comp-panel-connect[hidden] { display: none; }
#comp-panel-connect .panel-connect-row {
  background: transparent;
  border: none;
  padding: 0.3rem 0;
  gap: 0.55rem;
}
#comp-panel-connect .panel-connect-banner { margin-top: 0.4rem; }
#comp-panel-connect .panel-connect-banner:empty { margin-top: 0; }

/* ── Panel body ──────────────────────────────────────────────────────── */

#comp-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.comp-tab-pane { display: none; flex-direction: column; gap: 1rem; }
.comp-tab-pane.active { display: flex; }

.panel-config-pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: #14171f;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  color: var(--text);
}

.panel-backup-posture {
  background: #14171f;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
}
.panel-backup-posture h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong, var(--text));
}
.panel-backup-posture dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.9rem;
  row-gap: 0.25rem;
  margin: 0;
  font-size: 0.78rem;
}
.panel-backup-posture dt { color: var(--muted, #8b8d92); }
.panel-backup-posture dd { margin: 0; color: var(--text); }
.panel-bp-ok   { color: var(--text); }
.panel-bp-warn { color: #d4a017; font-weight: 600; }
.panel-bp-bad  { color: #c4423d; font-weight: 600; }

/* H.6 — SLA-breach badge for findings with kind=unvalidated_sla_breach.
   Distinct color from severity badges so operators can tell SLA-breach
   fails apart from organic fails at a glance. Amber rather than red:
   the underlying posture isn't necessarily wrong, the evidence has
   gone stale. */
.sla-breach-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(212, 160, 23, 0.18);
  color: #d4a017;
  border: 1px solid #6b5210;
  border-radius: 3px;
  vertical-align: middle;
  cursor: help;
}

/* H.5.b — per-finding remediation, expandable inside the Title cell. */
.finding-remediation { display: inline; }
.finding-remediation > summary {
  list-style: none;
  cursor: pointer;
  display: inline;
}
.finding-remediation > summary::-webkit-details-marker { display: none; }
.finding-remediation > summary::before {
  content: "▶ ";
  color: var(--muted, #8b8d92);
  font-size: 0.7rem;
  margin-right: 0.25rem;
}
.finding-remediation[open] > summary::before { content: "▼ "; }
.finding-remediation > .rem-section {
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-left: 2px solid var(--border, #2a2d3e);
  background: rgba(255,255,255,0.02);
  border-radius: 3px;
}
.finding-remediation > .rem-section + .rem-section { margin-top: 0.35rem; }
.finding-remediation .rem-heading {
  font-weight: 600;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
  color: var(--text-strong, var(--text));
}
.finding-remediation .rem-body p {
  margin: 0 0 0.4rem 0;
  font-size: 0.78rem;
  line-height: 1.45;
}
.finding-remediation .rem-body p:last-child { margin-bottom: 0; }
.finding-remediation .rem-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  background: #14171f;
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  border: 1px solid var(--border, #2a2d3e);
}

.panel-posture-row {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
}

.panel-posture-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.5rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1d28;
  flex: 0 0 auto;
}

.panel-posture-svg { width: 80px; height: 80px; }

.posture-pct-text { font-size: 18px; font-weight: 700; fill: var(--text); }
.posture-sub-text { font-size: 10px; fill: var(--muted); }

.posture-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.panel-sev-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sev-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.65rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  flex: 1;
}

.sev-stat-count {
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 2ch;
  text-align: right;
}

.sev-stat-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sev-bg-critical { border-color: #5a2525; background: #251515; }
.sev-bg-critical .sev-stat-count { color: #ff7a7a; }

.sev-bg-high { border-color: #5a3a1a; background: #251a0f; }
.sev-bg-high .sev-stat-count { color: #ffaa55; }

.sev-bg-medium { border-color: #4a3f1a; background: #221d0e; }
.sev-bg-medium .sev-stat-count { color: #f6c76a; }

.sev-bg-low { border-color: #1e3d25; background: #111d14; }
.sev-bg-low .sev-stat-count { color: #6ee7a8; }

.panel-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.detail-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.detail-table th, .detail-table td { padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.detail-table th { background: #222634; color: var(--muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Schema tab ──────────────────────────────────────────────────────── */

.panel-connect-meta { margin: 0; font-size: 0.78rem; }

.perm-db-wide {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #2d3a5a;
  color: #9ec3ff;
  border: 1px solid #3d4f78;
}

.schema-block { display: flex; flex-direction: column; gap: 0.35rem; }

.schema-table {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #1a1d28;
  padding: 0.35rem 0.6rem;
}
.schema-table > summary {
  cursor: pointer;
  font-size: 0.8rem;
  list-style: none;
  padding: 0.15rem 0;
}
.schema-table > summary::-webkit-details-marker { display: none; }
.schema-table > summary::before { content: "▸ "; color: var(--muted); }
.schema-table[open] > summary::before { content: "▾ "; }

.schema-cols {
  list-style: none;
  margin: 0.3rem 0 0.1rem;
  padding: 0 0 0 1rem;
  font-size: 0.78rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.75rem;
}
.schema-cols li { line-height: 1.5; }

/* ── Connect button (Config tab) ─────────────────────────────────────── */

.panel-connect-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #1a1d28;
  font-size: 0.8rem;
}
.panel-connect-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}
.panel-connect-btn:hover:not(:disabled) { filter: brightness(1.1); }
.panel-connect-btn:disabled { opacity: 0.55; cursor: progress; }
.panel-connect-btn.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.panel-connect-banner {
  margin-top: 0.5rem;
  min-height: 0;
}
.panel-connect-banner p { margin: 0; font-size: 0.78rem; }
.panel-connect-error { color: #e05c5c; }

.panel-connect-error-box {
  border: 1px solid #5a2525;
  background: #2a1515;
  border-radius: 5px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.panel-connect-error-title { color: #ff7a7a; font-weight: 600; font-size: 0.8rem; }
.panel-connect-error-msg   { color: #e8b0b0; font-size: 0.78rem; word-break: break-word; }
.panel-connect-error-hint  { color: #c6a3a3; font-size: 0.75rem; line-height: 1.45; }
.panel-connect-error-hint code {
  background: #3a1f1f;
  color: #ffd4d4;
  padding: 0 4px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.panel-connect-stub {
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: #14171f;
}
.panel-connect-stub p { margin: 0; font-size: 0.78rem; }

.panel-connect-inherited {
  padding: 0.6rem 0.75rem;
  border: 1px solid #2d3e5c;
  background: #161d2d;
  border-radius: 5px;
}
.panel-connect-inherited-title {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8ab0e8;
}
.panel-connect-inherited-body {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}
.panel-connect-inherited-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  background: #1f2a44;
  color: #cfe1ff;
  padding: 0 4px;
  border-radius: 3px;
}

/* ── Saved connection row ────────────────────────────────────────────── */

.panel-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.45rem;
  border: 1px solid #2b4a33;
  background: #13201a;
  border-radius: 5px;
}
.panel-saved-meta { min-width: 0; flex: 1; }
.panel-saved-title {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7fc28b;
}
.panel-saved-line {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
}
.panel-saved-sub {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
}
.panel-saved-status {
  display: inline-block;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
.panel-saved-status.ok     { background: #1a3a23; color: #8fe0a0; border: 1px solid #2f5c3c; }
.panel-saved-status.failed { background: #3a1a1a; color: #ff9b9b; border: 1px solid #5a2525; }

.panel-saved-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.panel-connect-btn.danger {
  background: transparent;
  color: #ff9b9b;
  border: 1px solid #5a2525;
}
.panel-connect-btn.danger:hover:not(:disabled) {
  background: #2a1515;
  color: #ffb0b0;
}

/* ── Save-connection checkbox in manual form ────────────────────────── */

.manual-form-save {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
}
.manual-form-save .dim { font-size: 0.72rem; }
.manual-form-save input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
}

/* ── Compliance re-score banner + spinner ───────────────────────────── */

.panel-rescore-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.panel-rescore-banner.refreshing {
  background: #1b2333;
  border: 1px solid #2d4364;
  color: #a6c2e5;
}
.panel-rescore-banner.still-processing {
  background: #2a2416;
  border: 1px solid #5a4a1f;
  color: #e5c88c;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #2d4364;
  border-top-color: #a6c2e5;
  border-radius: 50%;
  animation: dbc-spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes dbc-spin {
  to { transform: rotate(360deg); }
}

/* ── Manual credentials form ─────────────────────────────────────────── */

.panel-manual-form {
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #14171f;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.panel-manual-form[hidden] { display: none; }

.manual-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.manual-form-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  padding: 1px 7px;
  font-size: 0.8rem;
}
.manual-form-close:hover { color: var(--text); border-color: var(--text); }

.manual-form-intro {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
}

.panel-manual-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.panel-manual-form label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.panel-manual-form input[type="text"],
.panel-manual-form input[type="number"],
.panel-manual-form input[type="password"],
.panel-manual-form select {
  background: #1a1d28;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 0.32rem 0.5rem;
  font-family: inherit;
  font-size: 0.82rem;
}
.panel-manual-form input:focus,
.panel-manual-form select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.panel-manual-form .form-hint {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.manual-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.5rem 0.6rem;
}

.manual-form-footer {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.manual-form-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.panel-manual-form .form-error {
  background: #2a1515;
  color: #ffb0b0;
  border: 1px solid #5a2525;
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
  font-size: 0.76rem;
}

/* ── DSPM sensitivity badges ─────────────────────────────────────────── */

.dspm-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid;
  vertical-align: middle;
}
/* Spacing before/after when inline with flowing content. Tables add no margin. */
.panel-connect-meta .dspm-pill,
.panel-section-title .dspm-pill,
.schema-table > summary .dspm-pill {
  margin-left: 0.4rem;
}
.dspm-pill.small { font-size: 0.64rem; padding: 0 6px; }
.dspm-pill.dspm-critical { color: #ff7a7a; background: #2a1515; border-color: #5a2525; }
.dspm-pill.dspm-high     { color: #ffaa55; background: #251a0f; border-color: #5a3a1a; }
.dspm-pill.dspm-medium   { color: #f6c76a; background: #221d0e; border-color: #4a3f1a; }
.dspm-pill.dspm-low      { color: #6ee7a8; background: #111d14; border-color: #1e3d25; }
.dspm-pill.dspm-none     { color: var(--muted); background: transparent; border-color: var(--border); }

.dspm-classifier-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

.dspm-classifier-pill {
  display: inline-block;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 3px;
  border: 1px solid;
  background: #1e232f;
  color: #c6d0e0;
  line-height: 1.5;
}
.dspm-classifier-pill.conf-high {
  border-color: #5a3a5a;
  background: #281c28;
  color: #ffa8e0;
}
.dspm-classifier-pill.conf-medium {
  border-color: #3a4a6a;
  background: #1a2030;
  color: #9ec3ff;
}
.dspm-classifier-pill.conf-low {
  border-color: var(--border);
  background: #1a1d28;
  color: var(--muted);
}

.dspm-bump-hint {
  color: #ffaa55;
  font-weight: 700;
  margin-left: 0.25rem;
  cursor: help;
}

/* ── Status chips (fail / unvalidated / not_applicable / pass rollup) ── */

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0.1rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid;
  letter-spacing: 0.02em;
}
.status-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-chip.status-fail           { color: #ff7a7a; border-color: #5a2525; background: #2a1515; }
.status-chip.status-sla-breach     { color: #ffb84d; border-color: #6b5210; background: #2a1f0a; cursor: help; }
.status-chip.status-unvalidated    { color: #ffd27a; border-color: #5a4425; background: #2a2015; }
.status-chip.status-not-applicable { color: #9aa0ab; border-color: var(--border); background: #15181f; }
.status-chip.status-pass           { color: #6ee7a8; border-color: #1e3d25; background: #111d14; }

/* ── Framework chips (per-finding mapping list, H.1.5) ── */
.framework-chip {
  display: inline-block;
  margin: 0 0.2rem 0.15rem 0;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: #1c1f29;
  color: #cbd2dc;
  white-space: nowrap;
}

.status-block-subtitle {
  margin: 0.1rem 0 0.45rem !important;
  font-size: 0.75rem;
}

/* ── Classified Data section on the Compliance tab ───────────────────── */

.panel-section { margin-top: 0.2rem; }

.dspm-summary-block {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #1a1d28;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dspm-stat-row {
  display: flex;
  gap: 0.45rem;
}

.dspm-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #14171f;
}

.dspm-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.dspm-stat-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dspm-cat-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dspm-cat-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ec3ff;
}

.dspm-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.dspm-count {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
  color: var(--text);
  font-weight: 600;
}

.dspm-count-label {
  color: var(--muted);
}

/* ── Data Findings tab ───────────────────────────────────────────────── */

.findings-rollup {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #1a1d28;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.findings-rollup-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.findings-rollup-head .panel-section-title { margin-bottom: 0; }

.findings-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.4rem;
}

.findings-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #14171f;
}

.findings-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.findings-stat-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.findings-cat-block { margin: 0; }

.findings-skipped { font-size: 0.78rem; }
.findings-skipped summary { cursor: pointer; padding: 0.2rem 0; }
.findings-skipped-list { list-style: none; margin: 0.3rem 0 0 1rem; padding: 0; font-size: 0.75rem; }
.findings-skipped-list li { padding: 0.1rem 0; }

.findings-table-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }

.findings-table-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #1a1d28;
  padding: 0.4rem 0.65rem;
}
.findings-table-card[open] {
  background: #1c202c;
}

.findings-table-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
}
.findings-table-summary::-webkit-details-marker { display: none; }
.findings-table-summary::before { content: "▸"; color: var(--muted); margin-right: 0.1rem; }
.findings-table-card[open] > .findings-table-summary::before { content: "▾"; }

.findings-table-meta { margin-left: auto; font-size: 0.72rem; }
.findings-table-skipped {
  color: #ffaa55;
  font-size: 0.72rem;
  font-weight: 500;
}

.findings-col-list {
  list-style: none;
  margin: 0.4rem 0 0.1rem;
  padding: 0 0 0 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
}
.findings-col-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.findings-table-empty { margin: 0.4rem 0 0.2rem; font-size: 0.78rem; }

.findings-empty {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.findings-anon-note {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  font-style: italic;
}
