/*
 * ALPACA Figma refit
 *
 * This stylesheet intentionally sits after app.css.  It changes visual density
 * and surface geometry without replacing the existing application contracts.
 */

:root {
  --figma-canvas: #fbfdff;
  --figma-surface: #ffffff;
  --figma-subtle: #f7fbff;
  --figma-header: #f5faff;
  --figma-line: #d7e3ee;
  --figma-line-strong: #b8cad9;
  --figma-ink: #183247;
  --figma-text-2: #365267;
  --figma-text-3: #627b8e;
  --figma-blue: #008ed6;
  --figma-blue-strong: #006fb7;
  --figma-blue-soft: #eaf6ff;
  --figma-selected: #e9f5ff;
  --figma-radius-sm: 4px;
  --figma-radius-md: 5px;
  --figma-radius-lg: 7px;

  --canvas: var(--figma-canvas);
  --surface: var(--figma-surface);
  --ink: var(--figma-ink);
  --muted: var(--figma-text-2);
  --faint: var(--figma-text-3);
  --line: var(--figma-line);
  --line-strong: var(--figma-line-strong);
  --blue: var(--figma-blue);
  --page-accent: var(--figma-blue);
  --radius-sm: var(--figma-radius-sm);
  --radius-md: var(--figma-radius-md);
  --radius-lg: var(--figma-radius-lg);
  --surface-shadow: none;
  --control-shadow: none;
}

html,
body,
body[data-page],
body[data-page] .shell,
body[data-page] main,
body.overview-page,
body.overview-page .shell,
body.overview-page main {
  color: var(--figma-ink);
  background: var(--figma-canvas);
}

html,
body { max-width: 100%; overflow-x: clip; }
.shell,
.control-deck,
.topbar,
main { min-width: 0; }

body {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

button,
.button,
input,
select,
textarea {
  min-height: 28px;
  padding: 5px 9px;
  border-color: var(--figma-line-strong);
  border-radius: var(--figma-radius-md);
  background: #fff;
  font-size: 11.5px;
  font-weight: 400;
}

button:hover,
.button:hover {
  color: #223f59;
  border-color: #9fadb9;
  background: #f8fafc;
}

button.primary,
body.overview-page button.primary {
  color: #fff;
  border-color: var(--figma-blue-strong);
  background: var(--figma-blue-strong);
  font-weight: 500;
}

button.primary:hover,
body.overview-page button.primary:hover {
  border-color: #005b98;
  background: #005b98;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--figma-blue);
  box-shadow: 0 0 0 2px rgba(0, 142, 214, .13);
}

/* Compact Figma-like app rail. Expansion remains available and persistent. */
body[data-page] .rail,
body.overview-page .rail {
  inset: 0 auto 0 0;
  width: 184px;
  color: var(--figma-text-2);
  border: 0;
  border-right: 1px solid var(--figma-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.rail::after { display: none; }

.brand {
  height: 56px;
  gap: 8px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--figma-line);
}

.brand-mark,
body.overview-page .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 1px solid #b8c5d4;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.brand strong { color: var(--figma-ink); font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.brand small { margin-top: 1px; color: var(--figma-text-3); font-size: 7.5px; letter-spacing: .08em; }
.rail-collapse { width: 25px; min-width: 25px; min-height: 25px; }

#navigation { padding: 10px 7px; }
.nav-group { gap: 2px; margin-bottom: 9px; }
.nav-group > p { height: 13px; margin: 0 7px 4px; color: #5b6976; font: 8px var(--font-mono); letter-spacing: .05em; }
.nav-group button {
  min-height: 34px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 5px;
  padding: 4px 6px;
  color: #344454;
  border-radius: 6px;
}
.nav-group button::before { inset-block: 7px; width: 2px; box-shadow: none; }
.nav-group button .nav-icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  color: #536b7c;
  border: 1px solid #d1d9e2;
  border-radius: 5px;
  background: #fff;
}
.nav-group button b { color: inherit; font-size: 11px; font-weight: 400; }
.nav-group button:hover { transform: none; background: #f0f3f7; }
.nav-group button.active {
  color: #1f3e66;
  border-color: #c6d2e2;
  background: #e7edf6;
  box-shadow: inset 2px 0 var(--figma-blue);
}
.nav-group button.active::before { display: none; }
.nav-group button.active .nav-icon { color: var(--figma-blue); border-color: #9fb7d4; background: #f7faff; filter: none; }
.nav-badge { min-width: 16px; padding: 1px 4px; color: #344454; border-color: #b9c5cf; border-radius: 4px; background: #eef2f5; font-size: 8.5px; }

.rail-status {
  min-height: 92px;
  gap: 2px;
  padding: 6px;
  border-top: 1px solid var(--figma-line);
  background: #f7f9fb;
}
.rail-status > p { margin: 0 4px 2px; font-size: 7.5px; }
.rail-status > button { min-height: 34px; grid-template-columns: 25px minmax(0, 1fr) 11px; gap: 5px; padding: 3px 5px; }
.rail-health-icon { width: 24px; height: 24px; border-color: var(--figma-line); border-radius: 5px; background: #fff; }
.rail-health-icon > .lucide { width: 12px; height: 12px; }
.rail-status button b { font-size: 9.5px; font-weight: 500; }
.rail-status button small { margin-top: 1px; font-size: 7.5px; }

body[data-page] .shell,
body.overview-page .shell {
  min-height: 100vh;
  margin-left: 184px;
  padding-top: 0;
  background: var(--figma-canvas);
}

body[data-page] .control-deck,
body.overview-page .control-deck {
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.control-deck::before { display: none; }

body[data-page] .topbar,
body.overview-page .topbar {
  height: 44px;
  padding: 0 14px;
  color: var(--figma-ink);
  border-bottom: 1px solid var(--figma-line);
  background: #fff;
}

body[data-page] .page-identity,
body.overview-page .page-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  grid-template-rows: 10px 16px;
  column-gap: 7px;
  row-gap: 0;
  align-items: center;
}
body[data-page] .page-identity p,
body.overview-page .page-identity p {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--figma-blue-strong);
  font: 500 7.5px/1 var(--font-mono);
  letter-spacing: .06em;
  white-space: nowrap;
}
.page-identity p .lucide { display: none; }
body[data-page] .page-identity p #page-breadcrumb,
body.overview-page .page-identity p #page-breadcrumb { display: none; }
.page-identity p::before { display: none; }
.page-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: var(--figma-blue-strong);
  border: 1px solid #c9e1f2;
  border-radius: 5px;
  background: var(--figma-subtle);
}
.page-icon .lucide,
.page-icon .ui-icon { width: 13px; height: 13px; stroke-width: 1.7; }
body[data-page] .page-identity h1,
body.overview-page .page-identity h1 {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--figma-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.01em;
}
.top-actions { height: 100%; gap: 6px; align-items: center; }
body[data-page] .health-chip,
body.overview-page .health-chip,
body[data-page] .top-actions .icon-button,
body.overview-page .top-actions .icon-button,
body[data-page] .top-actions .toggle-button,
body.overview-page .top-actions .toggle-button {
  min-height: 26px;
  border-color: var(--figma-line);
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}
body[data-page] .health-chip { padding: 3px 7px; font-size: 9.5px; }
body[data-page] .top-actions time { color: var(--figma-text-3); font: 9.5px var(--font-mono); }
body[data-page] .top-actions .icon-button { width: 26px; min-width: 26px; padding: 4px; }
body[data-page] .top-actions .toggle-button { padding: 3px 7px; font-size: 9.5px; }

/* Keep the complete Time Lens, but compress its chrome to the Figma rhythm. */
body[data-page] .time-console,
body.overview-page .time-console {
  min-height: 164px;
  padding: 5px 14px 6px;
  color: var(--figma-text-2);
  border-bottom: 1px solid var(--figma-line);
  background: #fff;
}
.time-head { min-height: 28px; }
.time-head > div:first-child { gap: 8px; }
.time-head b,
body.overview-page .time-head b { color: var(--figma-blue); font-size: 9px; font-weight: 500; }
.time-controls { gap: 8px; }
.time-presets { gap: 2px; }
.time-presets button,
body.overview-page .time-presets button { min-height: 26px; padding: 3px 7px; font-size: 10px; }
.time-presets button.active,
body.overview-page .time-presets button.active { color: var(--figma-blue); border-color: #aebfd6; background: #fff; box-shadow: none; }
.time-head .time-inputs input { width: 148px; min-height: 26px; padding: 3px 6px; font-size: 9.5px; }
.time-head .time-inputs button { min-height: 26px; padding: 3px 7px; font-size: 9.5px; }
.timeline,
body.overview-page .timeline { height: 70px; margin-top: 5px; padding-top: 4px; background-color: #fff; }
.time-bucket,
body.overview-page .time-bucket { height: 62px; min-height: 62px; }
.timeline-line { inset-block: 4px; height: 62px; }
.timeline-labels { min-height: 14px; font-size: 8.5px; }
.time-brush { height: 17px; margin: 0 0 2px; }
.time-brush-track { top: 6px; height: 7px; border-radius: 2px; }
.time-brush-selection { top: 4px; height: 11px; color: #55708d; border-color: #9eb3cc; border-radius: 2px; background: rgba(45, 90, 158, .04); }
.time-brush-selection span { font-size: 8.5px; }
.time-brush-handle { top: -3px; height: 15px; }
.time-legend { gap: 9px; margin: 0; font-size: 9px; }
.time-legend small { font-size: 9px; }
body[data-page] .time-console.collapsed,
body.overview-page .time-console.collapsed { min-height: 38px; padding: 4px 16px; }
.time-console.collapsed .time-head { min-height: 29px; }
.time-console.collapsed .time-title { min-width: 0; }
.time-console.collapsed .time-window-readable {
  position: static;
  width: auto;
  max-width: min(520px, 42vw);
  height: auto;
  overflow: hidden;
  clip: auto;
  clip-path: none;
  color: var(--figma-text-3);
  font: 9px var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.time-console.collapsed .time-controls { flex: 0 0 auto; }

main,
body.overview-page main {
  min-height: calc(100vh - 56px);
  padding: 10px 12px 40px;
}

/* One quiet outer surface; straight internal tables and bands. */
.surface,
.grid-surface,
.case-list,
.case-detail,
.file-layout,
.command-panel,
.command-kpi,
.source-inventory-matrix,
.risk-policy-card,
.risk-policy-preview {
  border-color: var(--figma-line);
  border-radius: var(--figma-radius-lg);
  background: #fff;
  box-shadow: none;
}
.grid-surface { box-shadow: none; }
.workspace-head { min-height: 38px; margin: 0 0 8px; padding: 0 0 7px; }
.workspace-head::before { display: none; }
.workspace-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.workspace-head > div:first-child > span { display: none; }
.workspace-actions { gap: 5px; }
.workspace-actions button,
.workspace-actions .button,
.explorer-actions button,
.explorer-actions .button { min-height: 28px; padding: 4px 8px; font-size: 10.5px; }
.page-actions-only { min-height: 30px; margin-bottom: 6px; }

.source-tabs { height: 36px; gap: 4px; margin-bottom: 6px; padding: 2px 0; }
.source-tabs button {
  min-width: 104px;
  min-height: 28px;
  grid-template-columns: 6px 1fr auto;
  padding: 4px 8px;
  border-color: var(--figma-line);
  border-radius: 6px;
  background: #fff;
}
.source-tabs button span { font-size: 10px; }
.source-tabs button b { font-size: 9px; }
.source-tabs button.active { color: var(--figma-blue); border-color: #8ea8c9; background: #fff; box-shadow: inset 0 -2px var(--figma-blue); }

.lens-toolbar {
  min-height: 44px;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(110px, 1fr)) auto auto auto;
  gap: 5px;
  margin-bottom: 0;
  padding: 6px 8px;
  border-color: var(--figma-line);
  border-radius: 7px 7px 0 0;
  background: #fff;
  box-shadow: none;
}
.lens-toolbar label { gap: 2px; font-size: 8.5px; }
.lens-toolbar input { min-height: 28px; font-size: 10.5px; }
.filter-builder > summary { min-height: 28px; padding: 4px 7px; font-size: 10px; }
.filter-builder > div,
.column-picker > div { border-color: #b9c6d4; border-radius: 7px; box-shadow: 0 10px 28px rgba(30, 42, 54, .14); }

.grid-head {
  height: 38px;
  min-height: 38px;
  padding: 5px 9px;
  border-bottom-color: var(--figma-line);
  background: #fff;
}
.grid-head b { font-size: 11.5px; font-weight: 500; }
.grid-head span { margin-top: 1px; font-size: 8.5px; }
.column-picker summary { min-height: 27px; padding: 4px 7px; font-size: 9.5px; }
.single-workspace .grid-surface,
.investigation-pane .grid-surface { border-color: var(--figma-line); border-radius: 0 0 7px 7px; }
.single-workspace .grid-head,
.investigation-pane .grid-head { background: #fff; }

.table-scroll { max-height: calc(100vh - 300px); }
.data-table { min-width: 920px; }
.data-table th {
  height: 30px;
  padding: 5px 8px;
  color: #2f3b46;
  border-right-color: var(--figma-line);
  border-bottom-color: var(--figma-line);
  background: var(--figma-header);
  box-shadow: none;
  font-size: 10px;
  font-weight: 500;
}
.data-table td {
  height: 36px;
  padding: 5px 8px;
  color: var(--figma-ink);
  border-right-color: #e6eaee;
  border-bottom-color: #e8ecf0;
  font-size: 11px;
}
.data-table tbody tr:nth-child(even) { background: #fff; }
.data-table tbody tr:hover { background: var(--figma-blue-soft); box-shadow: none; }
.data-table tbody tr.report-selected,
.data-table tbody tr.bulk-selected { background: var(--figma-selected) !important; box-shadow: none !important; }
.data-table td b { font-weight: 500; }
.data-table button { min-height: 22px; padding: 2px 5px; font-size: 9.5px; }
.table-primary-link { color: #244b62; font-weight: 500; }
.pagination { min-height: 30px; padding-block: 5px; font-size: 9.5px; }
.pagination button { min-height: 25px; }

/* Incidents follows the Figma toolbar → table → floating bulk action pattern. */
body[data-page="incidents"] main { position: relative; }
.incident-toolbar {
  min-height: 38px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding: 4px;
  border-color: var(--figma-line);
  border-radius: 7px;
}
.incident-toolbar .alert-status-tabs button { min-width: 70px; min-height: 28px; padding: 3px 8px; font-size: 10.5px; font-weight: 400; }
.incident-toolbar .alert-status-tabs {
  height: 28px;
  display: flex;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--figma-line-strong);
  border-radius: 6px;
  background: var(--figma-subtle);
}
.incident-toolbar .alert-status-tabs button {
  height: 27px;
  min-height: 27px;
  padding: 0 11px;
  color: var(--figma-text-2);
  border: 0;
  border-right: 1px solid var(--figma-line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 10.5px;
  line-height: 27px;
}
.incident-toolbar .alert-status-tabs button:last-child { border-right: 0; }
.incident-toolbar .alert-status-tabs button:hover { color: #284f80; background: #f8fafc; }
.incident-toolbar .alert-status-tabs button.active { color: var(--figma-blue); background: #fff; font-weight: 500; }
.incident-toolbar .alert-status-tabs b { margin-left: 4px; font-size: 9.5px; font-weight: 400; }
.incident-filters { grid-template-columns: minmax(240px, 1fr) 145px auto auto; gap: 5px; }
.incident-filters > label { gap: 2px; font-size: 8.5px; }
.incident-filters input,
.incident-filters select,
.incident-filters button { min-height: 28px; font-size: 10.5px; }
.incident-filters .search > span {
  top: 50%;
  left: 8px;
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  pointer-events: none;
}
.incident-filters .search .lucide { width: 12px; height: 12px; stroke-width: 1.7; }
.incident-filters .search input { padding-left: 25px; }
.incident-queue { position: relative; min-height: 460px; overflow: hidden; }
.incident-queue .table-scroll { max-height: calc(100vh - 306px); overflow-x: hidden; padding-bottom: 58px; scroll-padding-bottom: 70px; }
.incident-queue .data-table { width: 100%; min-width: 0; table-layout: fixed; }
.incident-queue .incident-col-actions { width: 2.5%; }
.incident-queue .incident-col-time { width: 11%; }
.incident-queue .incident-col-title { width: 19.5%; }
.incident-queue .incident-col-attack { width: 23%; }
.incident-queue .incident-col-entity { width: 11%; }
.incident-queue .incident-col-finding { width: 5%; }
.incident-queue .incident-col-source { width: 16.5%; }
.incident-queue .incident-col-risk { width: 3.5%; }
.incident-queue .incident-col-status { width: 5%; }
.incident-queue .incident-col-verdict { width: 3%; }
.incident-queue .data-table th { height: 28px; padding: 4px 6px; font-size: 9.5px; }
.incident-queue .data-table td { min-width: 0 !important; height: 34px; padding: 4px 6px; font-size: 10.5px; }
.incident-queue .incident-link {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
}
.incident-queue .incident-link b { font-weight: 400; }
.incident-queue .data-table td { vertical-align: middle; }
.incident-queue th:first-child,
.incident-queue td:first-child,
.incident-queue th:nth-child(2),
.incident-queue td:nth-child(2) { text-align: center; }
.incident-queue th:first-child,
.incident-queue td:first-child { padding-inline: 0; }
.incident-queue .data-table tr.needs-review { box-shadow: none !important; }
.incident-source-cell { font-size: 0 !important; }
.incident-source-cell .badge {
  min-height: 17px;
  margin-right: 3px;
  padding: 2px 4px;
  font-size: 8.5px;
  font-weight: 600;
}
.incident-source-cell .badge:last-child { margin-right: 0; }
.incident-queue .count-badge { width: 27px; padding: 2px; font-size: 10px; }
.incident-queue td:nth-child(8),
.incident-queue td:nth-child(9),
.incident-queue td:nth-child(10) { font-size: 9.5px; }
.incident-queue th:nth-child(6),
.incident-queue th:nth-child(8),
.incident-queue th:nth-child(9),
.incident-queue th:nth-child(10),
.incident-queue td:nth-child(6),
.incident-queue td:nth-child(8),
.incident-queue td:nth-child(9),
.incident-queue td:nth-child(10) { text-align: center; }
.incident-cell-center { width: 100%; display: flex; align-items: center; justify-content: center; }
.incident-risk {
  min-width: 28px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 5px;
  font: 500 10px var(--font-mono);
}
.incident-risk.critical { color: #b42336; background: #fdebed; }
.incident-risk.high { color: #b75b1e; background: #fff0e5; }
.incident-risk.medium { color: #8b650f; background: #fff5d9; }
.incident-risk.low { color: #2d5a9e; background: #edf3fb; }
.incident-risk.unrated { color: #697784; background: #eef1f4; }
.incident-queue td:nth-child(9) .badge,
.incident-queue td:nth-child(10) .badge { min-height: 17px; padding: 2px 4px; font-size: 8.5px; font-weight: 600; }
.incident-queue .data-table tbody tr.disposition-undetermined,
.incident-queue .data-table tbody tr.disposition-true_positive,
.incident-queue .data-table tbody tr.disposition-false_positive,
.incident-queue .data-table tbody tr.disposition-benign { background: #fff; }
.incident-queue .data-table tbody tr:nth-child(even) { background: #fff; }
.incident-queue .data-table tbody tr:hover { background: var(--figma-blue-soft); }
.incident-queue .data-table tbody tr.bulk-selected { background: var(--figma-selected) !important; box-shadow: none !important; }
.incident-queue input[type="checkbox"],
#select-all-incidents {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  display: block;
  margin: 0 auto;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--figma-blue);
}
.incident-queue .row-actions { width: auto; min-width: 0; text-align: center; white-space: nowrap; }
.incident-queue .row-actions button { width: 23px; min-width: 23px; height: 23px; min-height: 23px; margin: 0 0 0 4px; padding: 0; }
.incident-bulk-bar {
  position: fixed;
  z-index: 24;
  right: 12px;
  bottom: 12px;
  left: 196px;
  min-height: 48px;
  grid-template-columns: 118px minmax(320px, 1fr) auto;
  gap: 9px;
  margin: 0;
  padding: 7px 10px;
  border-color: #b7c7db;
  border-radius: 7px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(30, 42, 54, .12);
}
.incident-bulk-bar > b { min-width: 0; color: #315c70; font-size: 11px; font-weight: 500; }
.incident-bulk-bar label { grid-template-columns: auto minmax(180px, 1fr); gap: 8px; font-size: 9.5px; }
.incident-bulk-bar textarea { min-height: 30px; height: 30px; padding: 5px 8px; border-radius: 4px; background: var(--figma-subtle); font-size: 10.5px; }
.incident-bulk-actions { display: flex; align-items: center; gap: 7px; }
.decision-segment {
  height: 29px;
  display: flex;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--figma-line-strong);
  border-radius: 5px;
  background: #fff;
}
.incident-bulk-bar .decision-segment button {
  min-width: 47px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--figma-line-strong);
  border-radius: 0;
  background: #fff;
  font-size: 10px;
  line-height: 28px;
}
.incident-bulk-bar .decision-segment button:last-child { border-right: 0; }
.incident-bulk-bar .decision-segment button.primary { color: #fff; background: #1f3e66; }
.incident-bulk-bar #clear-incident-selection { min-height: 29px; padding: 4px 9px; font-size: 10px; }
.incident-queue + .pagination { margin-top: 4px; }
body[data-page="incidents"] main { padding-bottom: 76px; }
body.rail-collapsed .incident-bulk-bar { left: 72px; }

/* Detail drawer keeps every evidence function, but uses the same compact syntax. */
.drawer.alert-investigation {
  top: 8px;
  right: calc(-1 * min(1120px, calc(100vw - 24px)) - 24px);
  bottom: 8px;
  left: auto;
  width: min(1120px, calc(100vw - 24px));
  height: auto;
  border-color: var(--figma-line-strong);
  border-radius: 8px;
  background: #f5f7f9;
  box-shadow: -16px 0 38px rgba(30, 42, 54, .18);
  opacity: 1;
  transform: none;
  pointer-events: auto;
  backdrop-filter: none;
}
.drawer.alert-investigation.open { right: 8px; transform: none; }
.drawer.alert-investigation > header {
  height: 56px;
  color: var(--figma-ink);
  border-bottom-color: var(--figma-line);
  border-radius: 7px 7px 0 0;
  background: #fff;
  box-shadow: none;
}
.drawer.alert-investigation > header span { color: var(--figma-text-3); font-size: 8px; }
.drawer.alert-investigation > header h2 { color: var(--figma-ink); font-size: 15px; font-weight: 500; }
.drawer.alert-investigation #drawer-body { max-width: none; padding: 10px 12px 16px; }
.drawer-summary { border-color: var(--figma-line); border-left: 2px solid var(--figma-blue); border-radius: 7px; box-shadow: none; }
.incident-detail-note { border-radius: 7px; }
.compact-basis,
.incident-verdict-guide.compact,
.incident-analysis-facts,
.evidence-detail { border-color: var(--figma-line); border-radius: 7px; background: #fff; }
.compact-basis > header,
.incident-verdict-guide.compact > header { min-height: 36px; padding: 6px 9px; }
.compact-basis > header h3,
.incident-verdict-guide.compact > header h3 { font-size: 11.5px; font-weight: 500; }
.incident-basis-row > summary { min-height: 36px; grid-template-columns: 92px minmax(160px, .8fr) minmax(240px, 1.4fr) auto 14px; }
.incident-basis-row > summary b { font-weight: 400; }
.incident-verdict-guide.compact ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Command Center retains its bento and semantic colors; only the substrate changes. */
body.overview-page .command-kpi,
body.overview-page .command-panel { border-color: var(--figma-line); background: #fff; box-shadow: none; }
body.overview-page .command-kpi.red { background: #fdf4f5; }
body.overview-page .command-kpi.amber { background: #fdf8ef; }
body.overview-page .command-kpi.green { background: #f3faf7; }
.command-panel-head { min-height: 38px; padding: 6px 10px; border-bottom-color: var(--figma-line); background: #fff; }
.command-panel-head h2 { color: var(--figma-ink); font-size: 13px; font-weight: 500; }
.command-panel-head span { font-size: 8px; }
.command-kpi header span { font-size: 10.5px; font-weight: 500; }
body.overview-page .command-kpi > strong { font-size: 24px; }
.command-grid { gap: 7px; }
.killchain-panel .command-panel-head { min-height: 34px; box-shadow: inset 2px 0 #596f9d; }
.killchain { padding: 0; }
.killchain button { min-height: 58px; padding: 11px 10px 8px; }
.killchain button > strong { font-size: 17px; }

/* Other operational screens inherit the same table family. */
.detection-source-tabs { min-height: 36px; margin-bottom: 7px; padding: 3px; border-color: var(--figma-line); border-radius: 7px; }
.detection-source-tabs button { min-height: 28px; font-size: 10.5px; }
.section-head { min-height: 32px; margin-bottom: 8px; }
.section-head h3 { font-size: 13px; font-weight: 500; }
.section-head span { font-size: 9px; }
.case-layout { gap: 8px; }
.case-list > button { min-height: 42px; }
.source-inventory-matrix { border-color: var(--figma-line); background: var(--figma-line); }
.source-inventory-card { min-height: 126px; }

@media (max-width: 1200px) and (min-width: 821px) {
  body[data-page] .rail,
  body.overview-page .rail { width: 60px; }
  body[data-page] .shell,
  body.overview-page .shell { margin-left: 60px; }
  .incident-bulk-bar { left: 72px; }
}

body.rail-collapsed .rail { width: 60px; }
body.rail-collapsed .shell { margin-left: 60px; }
body.rail-collapsed .brand { height: 72px; padding: 6px 0 32px; }
body.rail-collapsed .rail-collapse { right: 16px; bottom: 4px; }
body.rail-collapsed .rail::after { display: none; }
body.rail-collapsed .nav-badge {
  top: 3px;
  right: 4px;
  width: 6px;
  min-width: 6px;
  height: 6px;
  overflow: hidden;
  padding: 0;
  color: transparent;
  border: 0;
  border-radius: 50%;
  background: var(--figma-blue);
}

@media (max-width: 820px) {
  body[data-page] .rail,
  body.overview-page .rail,
  body.rail-collapsed .rail {
    inset: auto 8px 8px;
    width: auto;
    height: 58px;
    border: 1px solid var(--figma-line-strong);
    border-radius: 7px;
  }
  body[data-page] .shell,
  body.overview-page .shell,
  body.rail-collapsed .shell { margin-left: 0; }
  #navigation { padding: 4px; }
  main, body.overview-page main { padding: 8px 8px 72px; }
  body[data-page] .topbar,
  body.overview-page .topbar { padding-inline: 12px; }
  .incident-toolbar,
  .incident-filters,
  .incident-bulk-bar { grid-template-columns: 1fr; }
  .incident-bulk-bar {
    right: 8px;
    bottom: 74px;
    left: 8px;
    max-height: 154px;
    overflow: auto;
    box-shadow: 0 5px 18px rgba(30, 42, 54, .12);
  }
  .incident-bulk-bar label { grid-template-columns: 1fr; }
  .incident-bulk-actions { justify-content: space-between; }
  .incident-queue .table-scroll { padding-bottom: 0; }
  .drawer.alert-investigation { width: calc(100vw - 16px); }
  .incident-basis-row > summary { grid-template-columns: 72px minmax(0, 1fr) auto 14px; }
  .incident-basis-row > summary em { display: none; }
}

@media (max-width: 560px) {
  .top-actions .health-chip,
  .top-actions time { display: none; }
  .time-head { align-items: flex-start; }
  .time-controls { width: 100%; display: grid; }
  .time-presets { overflow-x: auto; justify-content: flex-start; }
  .source-tabs { height: auto; }
  .lens-toolbar { grid-template-columns: 1fr; border-radius: 7px; }
  .incident-verdict-guide.compact ol { grid-template-columns: 1fr; }
}

/* 2026-08-17 full renewal: pure work surfaces, crisp Pocari blue, dense evidence. */
body[data-page] main { background: #fbfdff; }
body[data-page] #content { color: #183247; }
.surface,
.grid-surface,
.workspace-head,
.notice,
.case-shelf,
.case-workspace,
.source-inline-detail,
.registry-inline-detail,
.risk-version-shelf,
.risk-score-list,
.risk-policy-editor-compact,
.file-analysis-shell,
.file-preview {
  border-color: #d7e3ee !important;
  background: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body[data-page] .empty {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  color: #526f83;
  text-align: center;
}
body[data-page] .empty > .lucide { width: 14px; height: 14px; color: #4a9fd3; }
body[data-page] .empty > span { max-width: 620px; color: #365267; font-size: 9.5px; line-height: 1.25; }

.data-table { color: #1c374b; background: #fff; }
.data-table th {
  height: 29px;
  padding: 4px 8px;
  color: #243f53 !important;
  border-color: #d7e3ee !important;
  background: #f5faff !important;
  font-size: 9.5px;
  font-weight: 500;
  vertical-align: middle;
}
.data-table td {
  height: 33px;
  max-height: 33px;
  padding: 4px 8px;
  color: #183247;
  border-color: #dce6ef !important;
  background: #fff;
  font-size: 10px;
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tbody tr:nth-child(odd) td,
.data-table tbody tr:nth-child(even) td { background: #fff; }
.data-table tbody tr:hover td { background: #f7fbff; }
.data-table tbody tr.report-selected td,
.data-table tbody tr.inspect-selected td,
.data-table tbody tr.bulk-selected td { background: #eaf6ff !important; box-shadow: none !important; }
.data-table td small {
  display: inline;
  margin: 0;
  color: #5c7487;
  font-size: 8.5px;
  line-height: inherit;
}
.data-table td b + small:not(:empty)::before { content: " · "; }
.data-table .numeric,
.data-table td:has(.count-badge),
.data-table td:has(.incident-risk) { text-align: center; }
.data-table code { color: #163d5b; }
.section-title { margin: 10px 2px 5px; color: #183247; font-size: 12px; font-weight: 500; }
.section-head { min-height: 34px; padding: 6px 10px; background: #fff; }
.section-head h3 { color: #183247; font-size: 12px; font-weight: 500; }
.section-head span { color: #60788b; font-size: 8.5px; }
.page-actions-only { min-height: 33px; padding: 3px 0; }

/* Context-aware cell pivot menu. */
.cell-action-menu { width: 322px; max-height: min(520px, calc(100vh - 16px)); overflow: auto; border-color: #a9c1d4; box-shadow: 0 8px 24px rgba(28, 62, 89, .12); }
.cell-action-menu > section { padding: 5px 6px; border-bottom: 1px solid #e2eaf1; }
.cell-action-menu > section:last-child { border-bottom: 0; }
.cell-action-menu > section > small { display: block; margin: 0 2px 4px; color: #526e82; font: 8px var(--font-mono); text-transform: uppercase; }
.cell-action-menu > section > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.cell-action-menu > section button { min-height: 27px; justify-content: flex-start; color: #244256; border: 0; background: #fff; font-size: 9.5px; }
.cell-action-menu > section button:hover { color: #006fb7; background: #eaf6ff; }
.cell-action-menu > section button .lucide { width: 12px; height: 12px; }
.active-explorer-filters { min-height: 28px; display: flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid #d7e3ee; border-top: 0; background: #fff; }
.active-explorer-filters button { min-height: 21px; height: 21px; padding: 1px 6px; color: #24465d; border-color: #bcd4e5; background: #f5faff; font-size: 8.5px; }
.active-explorer-filters .lucide { width: 9px; height: 9px; }
.investigation-pane.fluid-pane { flex: 1 1 0 !important; width: auto !important; min-width: 360px; }

/* Cases: collapsible top shelf and stateful investigation workspace. */
.case-shelf { margin-bottom: 8px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }
.case-shelf > header { height: 38px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 7px; border-bottom: 1px solid #d7e3ee; }
.case-shelf.collapsed > header { border-bottom: 0; }
.case-shelf-toggle { min-width: 26px; width: 26px; padding: 0; }
.case-shelf > header > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.case-shelf > header b { overflow: hidden; color: #183247; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.case-shelf > header span { display: inline-flex; align-items: center; gap: 4px; color: #557084; font-size: 8.5px; }
.case-shelf.collapsed .case-shelf-body { display: none; }
.case-shelf-filters { height: 35px; display: grid; grid-template-columns: minmax(240px, 1fr) 140px auto; gap: 5px; padding: 3px 6px; border-bottom: 1px solid #d7e3ee; background: #f8fbff; }
.case-shelf-filters .search { position: relative; min-width: 0; display: block; }
.case-shelf-filters .search > span { position: absolute; z-index: 1; top: 7px; left: 8px; width: 13px; height: 13px; display: grid; place-items: center; color: #60798b; pointer-events: none; }
.case-shelf-filters .search .lucide { width: 12px; height: 12px; stroke-width: 1.7; }
.case-shelf-filters .search input { width: 100%; height: 27px; min-height: 27px; padding: 3px 7px 3px 26px; color: #183247; }
.case-shelf-list { max-height: 176px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: auto; }
.case-shelf-list > button { height: 35px; min-height: 35px; display: grid; grid-template-columns: 4px minmax(150px, 1fr) 90px 128px 34px 64px; align-items: center; gap: 7px; padding: 3px 8px; border: 0; border-right: 1px solid #e1e9f0; border-bottom: 1px solid #e1e9f0; border-radius: 0; color: #244256; text-align: left; }
.case-shelf-list > button.active { background: #eaf6ff; box-shadow: inset 2px 0 #008ed6; }
.case-shelf-list > button b { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.case-shelf-list > button em,
.case-shelf-list > button small { overflow: hidden; color: #60798b; font: 8.5px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.case-shelf-list > button strong { font: 10px var(--font-mono); text-align: center; }
.case-priority { width: 3px; height: 18px; border-radius: 2px; background: #6f93b1; }
.case-priority.low { background: #5a9df8; }.case-priority.medium { background: #f3a545; }.case-priority.high { background: #ef7c3c; }.case-priority.critical { background: #ef5362; }
.case-workspace { min-height: 430px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }
.case-workspace-head { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 9px; border-bottom: 1px solid #d7e3ee; }
.case-workspace-head > div { display: flex; align-items: center; gap: 7px; }
.case-workspace-head h2 { margin: 0; color: #183247; font-size: 13px; font-weight: 500; }
.case-actions { display: flex; gap: 3px; }
.case-actions button { min-height: 25px; height: 25px; padding: 2px 7px; font-size: 9px; }
.case-facts { display: grid; grid-template-columns: minmax(280px, 2fr) 1.3fr .8fr .8fr 1fr; border-bottom: 1px solid #d7e3ee; }
.case-facts > div { min-width: 0; height: 37px; display: flex; align-items: center; gap: 7px; padding: 4px 8px; border-right: 1px solid #e0e8ef; }
.case-facts > div:last-child { border-right: 0; }
.case-facts span { flex: 0 0 auto; color: #61798b; font-size: 8.5px; }
.case-facts b { overflow: hidden; color: #19384f; font-size: 9.5px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.case-facts b i { margin-right: 3px; padding: 1px 4px; border: 1px solid #bdd6e7; border-radius: 3px; color: #006fb7; font-style: normal; }
.case-tabs { height: 32px; display: flex; align-items: end; gap: 0; padding: 0 7px; border-bottom: 1px solid #d7e3ee; }
.case-tabs button { height: 31px; min-height: 31px; border: 0; border-radius: 0; color: #4a6679; background: #fff; }
.case-tabs button.active { color: #006fb7; border-bottom: 2px solid #008ed6; }
.case-tabs button b { font-weight: 500; }
.case-tab-body { min-height: 300px; }
.case-evidence-link { min-height: 22px; padding: 0; border: 0; color: #174263; background: transparent; }
.case-timeline article { min-height: 34px; display: grid; grid-template-columns: 150px 8px minmax(0, 1fr) 90px; align-items: center; gap: 8px; padding: 3px 9px; border-bottom: 1px solid #e0e8ef; }
.case-timeline time { color: #49677c; font: 9px var(--font-mono); }.case-timeline b { font-size: 10px; font-weight: 400; }.case-timeline span { color: #006fb7; font: 8.5px var(--font-mono); }
.case-entity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-entity-grid button { min-height: 44px; display: grid; grid-template-columns: 90px minmax(0, 1fr) 30px; align-items: center; gap: 6px; border: 0; border-right: 1px solid #e0e8ef; border-bottom: 1px solid #e0e8ef; border-radius: 0; text-align: left; }
.case-entity-grid span { color: #60798b; font-size: 8.5px; }.case-entity-grid b { overflow: hidden; font: 10px var(--font-mono); text-overflow: ellipsis; }.case-entity-grid em { text-align: center; }

/* Risk policy. */
.risk-dashboard,
.quality-summary,
.ip-control-summary,
.geo-summary,
.database-health,
.registry-summary { display: grid; gap: 6px; margin-bottom: 7px; }
.risk-dashboard { grid-template-columns: repeat(5, 1fr); }
.risk-dashboard article,
.quality-summary article,
.ip-control-summary article,
.geo-summary article,
.database-health article,
.registry-summary article { min-height: 56px; position: relative; overflow: hidden; padding: 8px 10px; border: 1px solid #d7e3ee; border-radius: 7px; background: #fff; }
.risk-dashboard span,
.quality-summary span,
.ip-control-summary span,
.geo-summary span,
.database-health span,
.registry-summary span { color: #4f6c80; font-size: 9px; }
.risk-dashboard b,
.quality-summary b,
.ip-control-summary b,
.geo-summary b,
.database-health b,
.registry-summary b { display: block; margin-top: 4px; color: #17364d; font: 20px var(--font-mono); font-weight: 400; }
.risk-dashboard article::after { content: ""; position: absolute; inset: auto 9px 0; height: 2px; background: #62a9ee; }
.risk-dashboard .medium::after { background: #f2b34d; }.risk-dashboard .high::after { background: #f0803f; }.risk-dashboard .critical::after { background: #ee5362; }
.risk-version-shelf { margin-bottom: 7px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }
.risk-version-shelf > header,
.risk-score-list > header,
.risk-policy-editor-compact > header { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 5px 9px; border-bottom: 1px solid #d7e3ee; }
.risk-version-shelf h2,
.risk-score-list h2,
.risk-policy-editor-compact h2 { margin: 0; font-size: 12px; font-weight: 500; }
.risk-version-shelf nav { display: flex; overflow-x: auto; }
.risk-version-shelf nav button { flex: 0 0 220px; height: 39px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 105px auto; align-items: center; gap: 5px; border: 0; border-right: 1px solid #dce6ef; border-radius: 0; }
.risk-version-shelf nav button.active { color: #006fb7; background: #eaf6ff; box-shadow: none; }
.risk-version-shelf nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.risk-version-shelf nav time { color: #62798b; font: 8px var(--font-mono); }.risk-version-shelf nav em { color: #00834f; font: 8px var(--font-mono); }
.risk-version-detail { overflow: hidden; border-top: 1px solid #d7e3ee; background: #fff; animation: risk-version-drop .16s ease-out; }
.risk-version-meta { min-height: 34px; display: grid; grid-template-columns: 2fr 1fr 1fr; border-bottom: 1px solid #dce6ef; }
.risk-version-meta > span { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 4px 8px; overflow: hidden; color: #243b4d; border-right: 1px solid #dce6ef; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.risk-version-detail small { color: #61798b; font-size: 8px; font-weight: 400; }
.risk-version-values { display: grid; grid-template-columns: repeat(14, minmax(72px, 1fr)); overflow-x: auto; }
.risk-version-values > span { min-height: 39px; display: grid; align-content: center; gap: 2px; padding: 4px 7px; border-right: 1px solid #dce6ef; }
.risk-version-values b { color: #075f9d; font: 11px var(--font-mono); font-weight: 400; }
@keyframes risk-version-drop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.risk-config-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: start; gap: 7px; }
.risk-score-list,
.risk-policy-editor-compact { overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }
.risk-score-list > div { height: 32px; display: grid; grid-template-columns: 1fr 1.4fr 38px; align-items: center; gap: 5px; padding: 3px 8px; border-bottom: 1px solid #e1e9f0; }
.risk-score-list > div b { font-size: 9.5px; font-weight: 400; }.risk-score-list code { color: #60798b; font-size: 8px; }.risk-score-list strong { color: #006fb7; font: 12px var(--font-mono); text-align: right; }
.risk-policy-name { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; padding: 6px 8px 0; }
.risk-policy-editor-compact .risk-field-grid { grid-template-columns: repeat(7, minmax(72px, 1fr)); gap: 5px; padding: 6px 8px; }
.risk-policy-editor-compact .field { font-size: 8.5px; }.risk-policy-editor-compact .field input { min-height: 27px; }
.risk-preview-inline { min-height: 48px; display: grid; grid-template-columns: 60px 58px 110px 70px 70px minmax(0, 1fr); align-items: center; gap: 5px; padding: 5px 8px; border-top: 1px solid #d7e3ee; background: #f8fbff; }
.risk-preview-inline > b { font: 24px var(--font-mono); font-weight: 400; }.risk-preview-inline > em { font-size: 9px; }.risk-preview-inline input,.risk-preview-inline select { min-width: 0; }
.risk-preview-inline ol { display: flex; gap: 9px; margin: 0; padding: 0; overflow: hidden; list-style: none; }.risk-preview-inline li { white-space: nowrap; font-size: 8.5px; }.risk-preview-inline li b { margin-left: 3px; }

/* Detection quality with explicit TP/FP semantics. */
.quality-summary { grid-template-columns: repeat(5, 1fr); }
.quality-summary article { min-height: 63px; }
.quality-summary article > i { position: absolute; right: 8px; bottom: 7px; left: 8px; height: 3px; background: #e7eef4; }
.quality-summary article > i::after { content: ""; display: block; width: var(--value); height: 100%; background: #008ed6; }
.quality-summary article.true-positive { background: #fbfffd; }.quality-summary article.true-positive > i::after { background: #23a66f; }
.quality-summary article.false-positive { background: #fffafa; }.quality-summary article.false-positive > i::after { background: #ee5362; }
.quality-summary article.false-positive b { color: #c93b4b; }.quality-summary article.true-positive b { color: #14825a; }
.quality-summary em { position: absolute; right: 10px; top: 28px; color: #4e687b; font: 10px var(--font-mono); }
.quality-table .rate-bar { min-width: 120px; }
.quality-table .rate-bar i { background: #e6ebef; }
.quality-table .rate-bar i b,
.rule-fp-review .rate-bar i b { display: block !important; height: 100%; }
.quality-table .rate-bar i b.coverage { background: #1684df !important; }
.quality-table .rate-bar i b.true-positive { background: #25a66f !important; }
.quality-table .rate-bar i b.false-positive { background: #ee5362 !important; }
.quality-table .tp { color: #14825a; font-weight: 500; }.quality-table .fp { color: #cf3f4f; font-weight: 500; }
.detection-source-tabs button.active {
  color: #086da9;
  border-color: #b8d9ef;
  background: #eaf6ff;
  box-shadow: none;
}
.detection-source-tabs button.active b { color: #086da9; background: #d8ecfa; }

/* Rules and IP control. */
.rule-target-matrix { margin-bottom: 7px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; background: #fff; }
.rule-target-matrix > header { height: 33px; display: flex; align-items: center; justify-content: space-between; padding: 4px 9px; border-bottom: 1px solid #d7e3ee; }.rule-target-matrix h2 { margin: 0; font-size: 12px; font-weight: 500; }.rule-target-matrix header span { color: #60798b; font-size: 8.5px; }
.rule-target-matrix > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }.rule-target-matrix article { min-height: 42px; display: grid; grid-template-columns: 8px minmax(80px, 1fr) 70px 34px 90px; align-items: center; gap: 5px; padding: 4px 8px; border-right: 1px solid #dce6ef; border-bottom: 1px solid #dce6ef; }.rule-target-matrix b { font-size: 9.5px; font-weight: 500; }.rule-target-matrix span,.rule-target-matrix em { overflow: hidden; color: #60798b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.rule-target-matrix strong { font: 11px var(--font-mono); text-align: center; }
.ip-control-summary { grid-template-columns: repeat(5, 1fr); }.ip-control-summary .warning b { color: #bd7316; }.ip-control-summary .danger b { color: #cf3f4f; }.ip-control-summary .drift b { color: #7560c7; }
.ip-deployments { margin-top: 7px; }
.ip-control-table .badge {
  min-height: 17px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 8.5px;
  font-weight: 400;
}
.ip-control-table th:nth-last-child(-n + 2),
.ip-control-table td:nth-last-child(-n + 2) { width: 60px; text-align: center; }
.ip-control-table .decision-buttons { white-space: nowrap; }
.ip-control-table .decision-buttons button,
.ip-exclude-cell button { min-height: 22px; padding: 1px 5px; font-size: 9px; font-weight: 400; }
.ip-exclude-cell .lucide { width: 11px; height: 11px; }

/* Source inventory keeps the matrix, detail opens below it. */
.source-inventory-card { background: #fff !important; box-shadow: none !important; }
.source-inventory-card.active { z-index: 1; background: #f7fbff !important; box-shadow: inset 0 0 0 1px #008ed6 !important; }
.source-inline-detail { margin-top: 8px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }
.source-inline-detail > header { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border-bottom: 1px solid #d7e3ee; }
.source-inline-detail > header > div { display: flex; align-items: center; gap: 7px; }.source-inline-detail h2 { margin: 0; font-size: 12px; font-weight: 500; }.source-inline-detail code { color: #4f6c80; font-size: 8.5px; }
.source-inline-facts { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid #d7e3ee; }.source-inline-facts article { min-height: 47px; padding: 6px 8px; border-right: 1px solid #dce6ef; }.source-inline-facts span { display: block; color: #60798b; font-size: 8px; }.source-inline-facts b { display: block; margin-top: 5px; overflow: hidden; color: #193b53; font: 11px var(--font-mono); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.source-instance-table { padding: 7px 8px; }.source-instance-table h3 { margin: 0 0 5px; font-size: 10.5px; font-weight: 500; }.source-instance-table td span { margin-left: 6px; color: #62798b; font-size: 8px; }
.source-field-detail { border-top: 1px solid #d7e3ee; }.source-field-detail summary { padding: 6px 8px; font-size: 9.5px; }.source-field-detail > div { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 8px 8px; }.source-field-detail code { padding: 2px 4px; border: 1px solid #d7e3ee; border-radius: 3px; background: #f8fbff; }

/* Files: manual ingest first; inventory stays folded until it is needed. */
.file-toolbar { height: 35px; display: grid; grid-template-columns: minmax(250px, 1fr) auto auto; align-items: center; gap: 5px; margin: 0; padding: 3px 5px; border-bottom: 1px solid #d7e3ee; background: #fff; }.file-toolbar > span { padding: 0 6px; color: #60798b; font: 8.5px var(--font-mono); }
.file-toolbar .search,
.case-shelf-toolbar .search,
.registry-toolbar .search { position: relative; min-width: 0; display: block; }
.file-toolbar .search > span,
.case-shelf-toolbar .search > span,
.registry-toolbar .search > span { position: absolute; z-index: 1; top: 7px; left: 8px; width: 13px; height: 13px; display: grid; place-items: center; color: #60798b; pointer-events: none; }
.file-toolbar .search .lucide,
.case-shelf-toolbar .search .lucide,
.registry-toolbar .search .lucide { width: 12px; height: 12px; stroke-width: 1.7; }
.file-toolbar .search input,
.case-shelf-toolbar .search input,
.registry-toolbar .search input { width: 100%; height: 27px; min-height: 27px; padding: 3px 7px 3px 26px; color: #183247; }
.file-inventory-shell { margin-bottom: 7px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; background: #fff; }
.file-inventory-shell > summary { height: 34px; display: flex; align-items: center; gap: 7px; padding: 4px 9px; color: #183247; font-size: 10px; }
.file-inventory-shell > summary > span { display: flex; align-items: center; gap: 6px; }.file-inventory-shell > summary > span .lucide { width: 12px; height: 12px; color: #087fc1; }
.file-inventory-shell > summary > b { min-width: 25px; padding: 1px 5px; color: #087fc1; border: 1px solid #b9d9ee; border-radius: 8px; background: #f2f9ff; font: 9px var(--font-mono); font-weight: 400; text-align: center; }
.file-inventory-shell > summary > .lucide { width: 12px; height: 12px; margin-left: auto; transition: transform 140ms ease; }.file-inventory-shell[open] > summary > .lucide { transform: rotate(180deg); }
.file-inventory-body { border-top: 1px solid #d7e3ee; }
.file-inventory { margin: 0; overflow: hidden; border: 0; border-radius: 0; }
.file-inventory-head { height: 28px; display: grid; grid-template-columns: 45px minmax(320px, 1fr) 90px 150px 58px; align-items: center; gap: 7px; padding: 3px 8px; color: #29475c; border-bottom: 1px solid #d7e3ee; background: #f5faff; font-size: 9px; }
.file-inventory > article { height: 35px; display: grid; grid-template-columns: minmax(0, 1fr) 58px; border-bottom: 1px solid #dce6ef; }.file-inventory > article.active { background: #eaf6ff; }.file-inventory > article > button { min-width: 0; display: grid; grid-template-columns: 38px minmax(180px, .8fr) minmax(260px, 1.2fr) 90px 150px; align-items: center; gap: 7px; padding: 3px 8px; border: 0; border-radius: 0; background: transparent; text-align: left; }.file-inventory > article b,.file-inventory > article code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.file-inventory > article b { font-size: 9.5px; font-weight: 500; }.file-inventory > article code,.file-inventory > article em,.file-inventory > article time { color: #526f83; font-size: 8.5px; }.file-inventory > article > div { display: flex; align-items: center; gap: 2px; padding-right: 5px; }.file-inventory > article > div button,.file-inventory > article > div .button { width: 25px; min-width: 25px; min-height: 25px; padding: 4px; }
.inline-viewer { margin-bottom: 7px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }.inline-viewer > header { height: 38px; }.inline-viewer > header span { margin-left: 7px; color: #60798b; font-size: 8.5px; }.inline-viewer pre { max-height: 340px; margin: 0; border: 0; border-radius: 0; font-size: 9px; }.preview-limit { display: block; padding: 3px 8px; color: #a76d12; font: 8px var(--font-mono); }
.file-analysis-shell { margin-bottom: 7px; overflow: hidden; border: 1px solid #b9d9ee; border-radius: 7px; background: #fff; }
.file-analysis-shell > summary { height: 35px; display: flex; align-items: center; gap: 6px; padding: 4px 9px; color: #24465d; font-size: 10px; }
.file-analysis-shell > summary .lucide { width: 12px; height: 12px; }
.file-analysis-shell > summary .file-analysis-state { margin-left: auto; color: #cf3f4f; font: 8px var(--font-mono); }
.file-analysis-shell > .file-analysis { margin: 0; border: 0 !important; border-top: 1px solid #d7e3ee !important; border-radius: 0; }
.file-analysis > header { height: 31px; min-height: 31px; align-items: center; padding: 3px 8px; border-bottom: 1px solid #d7e3ee; }
.file-analysis > header h3 { margin: 0; color: #183247; font-size: 10.5px; font-weight: 500; }
.file-analysis > header .source-state { font-size: 7.5px; }
#file-analysis-form { gap: 5px; padding: 6px 8px; border-bottom: 0; }
.file-analysis-upload { min-height: 35px; gap: 4px 7px; padding: 4px 6px; border-color: #9fc9e5; border-radius: 5px; background: #f5faff; }
.file-analysis-upload label { display: flex; align-items: center; gap: 8px; }.file-analysis-upload label b { margin: 0; color: #183247; font-size: 9.5px; font-weight: 500; }.file-analysis-upload label small { color: #62798b; font: 8px var(--font-mono); }
.file-analysis-upload > button { min-height: 26px; height: 26px; padding: 3px 7px; font-size: 9px; }
.file-upload-progress { height: 2px; background: #dfeaf2; }.file-upload-progress i { background: #008ed6; }
.file-analysis-upload > small { min-height: 0; color: #087fc1; font-size: 8px; }
.file-analysis-selection { gap: 5px; }.file-analysis-selection article { min-height: 35px; gap: 1px; padding: 4px 6px; border-color: #d7e3ee; border-radius: 5px; background: #fff; }
.file-analysis-selection span { color: #526f83; font-size: 8px; }.file-analysis-selection b { padding-right: 45px; color: #183247; font-size: 9.5px; font-weight: 400; }.file-analysis-selection small { font-size: 8px; }
.file-analysis-selection button { top: 5px; right: 5px; min-height: 22px; padding: 2px 5px; font-size: 8px; }
.file-analysis-fields { gap: 5px; }.file-analysis-fields label { gap: 2px; color: #365267; font-size: 8.5px; }.file-analysis-fields input { min-height: 27px; height: 27px; font-size: 9px; }
.file-analysis-fields > button { min-height: 27px; height: 27px; font-size: 9px; }
.file-analysis-rule { color: #60798b; font-size: 8px; }
.file-job-history { border-top: 1px solid #d7e3ee; }.file-job-history > summary { height: 29px; display: flex; align-items: center; gap: 6px; padding: 3px 8px; color: #29475c; font-size: 9px; }.file-job-history > summary b { color: #087fc1; font: 9px var(--font-mono); font-weight: 400; }.file-job-history > summary em { margin-left: auto; color: #cf3f4f; font: 8px var(--font-mono); font-style: normal; }
.file-analysis-jobs { max-height: 220px; border-top: 1px solid #d7e3ee; }.file-analysis-job { min-height: 38px; gap: 6px; padding: 4px 8px; }.file-analysis-job b { font-size: 9.5px; font-weight: 400; }.file-analysis-job small,.file-analysis-job > span { font-size: 8px; }
.file-ext { width: 34px; height: 22px; color: #096da5; border: 1px solid #b9d9ee; border-radius: 3px; background: #f2f9ff; font-size: 8px; }

.attack-classifier.compact { min-height: 35px; margin-bottom: 6px; padding: 3px 6px; border: 1px solid #d7e3ee; border-radius: 7px; background: #fff; }
.attack-classifier.compact .attack-type-control { height: 27px; display: grid; grid-template-columns: 76px minmax(220px, 360px); align-items: center; gap: 6px; }
.attack-classifier.compact label { color: #29475c; font-size: 9px; }
.attack-classifier.compact select { height: 27px; min-height: 27px; color: #183247; font-size: 9.5px; }

/* Geo, Registry, Databases, System. */
.geo-summary { grid-template-columns: repeat(6, 1fr); }.geo-summary .warning b { color: #bd7316; font-size: 12px; }
.geo-analysis-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr); gap: 7px; margin-bottom: 7px; }.geo-analysis-layout .geo-map-panel { margin: 0; }.geo-rank { overflow: hidden; }.geo-rank .command-bars button { grid-template-columns: 24px 1fr 1fr 55px; }
.registry-toolbar { height: 36px; display: grid; grid-template-columns: minmax(260px, 1fr) 150px 140px auto auto; gap: 5px; align-items: center; margin-bottom: 6px; padding: 3px 5px; border: 1px solid #d7e3ee; border-radius: 7px; background: #fff; }
.registry-summary { grid-template-columns: repeat(4, 1fr); }.database-health { grid-template-columns: repeat(5, 1fr); }
.registry-inline-detail { margin-top: 7px; overflow: hidden; border: 1px solid #d7e3ee; border-radius: 7px; }.registry-inline-detail > header { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border-bottom: 1px solid #d7e3ee; }.registry-inline-detail h2 { display: inline; margin: 0 7px 0 0; font-size: 12px; font-weight: 500; }.registry-inline-detail header code { color: #587286; font-size: 8.5px; }.registry-facts { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; border-bottom: 1px solid #d7e3ee; }.registry-facts article { min-height: 42px; padding: 5px 8px; border-right: 1px solid #dce6ef; }.registry-facts span { display: block; color: #60798b; font-size: 8px; }.registry-facts b { display: block; margin-top: 4px; overflow: hidden; font-size: 9.5px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.engine-capture-panel { min-height: 34px !important; height: 34px !important; margin-bottom: 7px !important; padding: 4px 9px !important; border: 1px solid #d7e3ee !important; border-left: 2px solid #008ed6 !important; background: #fff !important; box-shadow: none !important; }
.engine-capture-panel > div { width: 100%; display: flex !important; align-items: center !important; gap: 8px !important; }
.engine-capture-panel > div > i { grid-row: auto !important; }.engine-capture-panel span { color: #365267 !important; font-size: 8px !important; letter-spacing: .03em !important; }.engine-capture-panel b { color: #183247 !important; font-size: 10px !important; font-weight: 500 !important; }.engine-capture-panel small { margin-left: auto; color: #60798b !important; font: 8px var(--font-mono) !important; }
.health-grid article,.engine-summary-strip > div { background: #fff !important; box-shadow: none !important; }
.engine-stage-row { min-height: 34px !important; height: 34px !important; grid-template-columns: minmax(190px, 1.25fr) minmax(100px, 1fr) 70px repeat(5, minmax(68px, .72fr)) !important; padding: 3px 9px !important; }
.engine-stage-row header { display: flex !important; align-items: center !important; gap: 7px !important; }.engine-stage-row header i { grid-row: auto !important; }.engine-stage-row header b { font-size: 10px !important; font-weight: 400 !important; }.engine-stage-row header span { margin-left: auto; font-size: 8px !important; }.engine-stage-row small { font-size: 8px !important; }
.engine-rate i,.engine-history i { background: #1684df !important; opacity: .9 !important; }

/* Remote capture keeps its operational contract but uses the dense workbench scale. */
.capture-layout { grid-template-columns: minmax(330px, .72fr) minmax(0, 1.55fr) !important; gap: 7px !important; }
.capture-form,.capture-console-panel { min-height: 485px !important; border-radius: 7px !important; box-shadow: none !important; }
.capture-form { padding: 0 8px 8px !important; border-color: #d7e3ee !important; }
.capture-form .section-head { margin: 0 -8px 7px !important; }
.capture-fields { gap: 6px !important; padding: 0 !important; }
.capture-fields label,.capture-option-field { gap: 3px !important; }
.capture-fields label > span,.capture-option-field > span { color: #365267 !important; font-size: 9px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important; }
.capture-fields input,.capture-fields select,.capture-option-select summary { min-height: 29px !important; height: 29px !important; padding: 3px 7px !important; font-size: 9.5px !important; }
.capture-actions { min-height: 34px !important; gap: 5px !important; padding: 5px 0 0 !important; }
.capture-actions button { min-height: 28px !important; height: 28px !important; padding: 3px 8px !important; font-size: 9px !important; }
.capture-actions .operational-chip { margin-left: auto; }
.capture-console-panel { grid-template-rows: 38px 1fr !important; padding: 8px !important; }
.capture-console-panel > header { min-height: 38px !important; padding: 5px 8px !important; }
.capture-console-panel > header span { font-size: 8px !important; }.capture-console-panel > header b { font-size: 11px !important; }
.capture-output { padding: 10px !important; font-size: 9.5px !important; line-height: 1.48 !important; }

@media (max-width: 1180px) {
  .case-shelf-list { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: 2fr 1fr 1fr; }.case-facts > div:nth-child(n+4) { display: none; }
  .risk-config-layout { grid-template-columns: 1fr; }.risk-policy-editor-compact .risk-field-grid { grid-template-columns: repeat(4, 1fr); }
  .rule-target-matrix > div { grid-template-columns: repeat(2, 1fr); }
  .source-inline-facts { grid-template-columns: repeat(3, 1fr); }
  .geo-analysis-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .risk-dashboard,.quality-summary,.ip-control-summary,.geo-summary,.database-health,.registry-summary { grid-template-columns: repeat(2, 1fr); }
  .case-shelf-list > button { grid-template-columns: 4px minmax(120px, 1fr) 70px 34px 60px; }.case-shelf-list > button small { display: none; }
  .case-facts { grid-template-columns: 1fr; }.case-facts > div:nth-child(n+2) { display: none; }
  .case-entity-grid { grid-template-columns: 1fr; }
  .registry-toolbar { height: auto; grid-template-columns: 1fr 1fr; }
  .registry-toolbar .search { grid-column: 1 / -1; }
  .file-inventory-head { display: none; }.file-inventory > article > button { grid-template-columns: 35px minmax(120px, 1fr) 75px; }.file-inventory > article code,.file-inventory > article time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Investigate: one dense reading surface with progressive disclosure. */
body[data-page="investigate"],
body[data-page="investigate"] .shell,
body[data-page="investigate"] main { background: #fff; }
body[data-page="investigate"] main { padding: 7px 10px 38px; }

.investigate-search-workbench {
  margin-bottom: 5px;
  overflow: hidden;
  border: 1px solid #b9d9ee;
  border-radius: 7px;
  background: #fff;
}
.investigate-search-body {
  max-height: 560px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 180ms ease, opacity 120ms ease;
}
.investigate-search-workbench.collapsed .investigate-search-body { max-height: 0; opacity: 0; }
.investigate-search-sections {
  height: 31px;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  border-bottom: 1px solid #b9d9ee;
  background: #eef8ff;
}
.investigate-search-sections button {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 10px;
  border: 0;
  border-right: 1px solid #dbe4ed;
  border-radius: 0;
  color: #174b70;
  background: transparent;
  font-size: 12px;
}
.investigate-search-sections button:last-child { border-right: 0; }
.investigate-search-sections button b { color: #416b88; font: 10.5px var(--font-mono); font-weight: 400; }
.investigate-search-sections button .lucide { width: 11px; height: 11px; margin-left: 2px; }
.investigate-search-sections button.active {
  color: #fff;
  background: #0b84c6;
}
.investigate-search-sections button.active b { color: #dff2ff; }
.investigate-search-panels { min-height: 61px; background: #fff; }
.investigate-search-panel { display: none; }
.investigate-search-panel.active { display: grid; }
.source-search-panel.active { display: block; }
.source-group-tabs {
  height: 31px;
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  border-bottom: 1px solid #cbddeb;
  background: var(--figma-header);
}
.source-group-tabs button {
  min-height: 30px;
  padding: 3px 10px;
  border: 0;
  border-right: 1px solid #dbe4ed;
  border-radius: 0;
  color: #365267;
  background: var(--figma-subtle);
  font-size: 12px;
  font-weight: 400;
}
.source-group-tabs button:last-child { border-right: 0; }
.source-group-tabs button.active {
  color: #006fb7;
  background: var(--figma-blue-soft);
}
.integrated-source-grid {
  display: grid;
  grid-template-columns: repeat(var(--source-count), minmax(130px, 1fr));
  border-bottom: 1px solid #dbe4ed;
  border-right: 1px solid #dbe4ed;
}
.integrated-source-grid article {
  min-width: 0;
  height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  border-left: 1px solid #dbe4ed;
  border-top: 1px solid #dbe4ed;
  background: #fff;
}
.integrated-source-grid article { border-top: 0; }
.integrated-source-grid article > button {
  min-width: 0;
  min-height: 29px;
  display: grid;
  grid-template-columns: 7px minmax(40px, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 0;
  border-radius: 0;
  color: #31485b;
  background: transparent;
  font-size: 11px;
  text-align: left;
}
.integrated-source-grid article > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integrated-source-grid article > button b { color: #405e76; font: 10px var(--font-mono); font-weight: 400; }
.integrated-source-grid article > button:last-child { display: grid; grid-template-columns: 1fr; place-items: center; padding: 0; border-left: 1px solid #e2e9f0; }
.integrated-source-grid article > button:last-child .lucide { width: 11px; height: 11px; }
.integrated-source-grid article.primary { background: #eaf6ff; box-shadow: inset 2px 0 #1684df; }
.integrated-source-grid article.primary > button { color: #0f5e9d; }
.integrated-source-grid article.compared { background: #f6f2ff; box-shadow: inset 2px 0 #8d68d8; }
.integrated-source-grid article.compared > button:last-child { color: #7552a8; }
.basic-search-panel {
  grid-template-columns: minmax(250px, 1.7fr) repeat(3, minmax(140px, 1fr));
  gap: 6px;
  padding: 8px;
}
.basic-search-panel .search { position: relative; min-width: 0; display: block; }
.basic-search-panel .search input,
.basic-search-panel > input { width: 100%; height: 29px; min-height: 29px; font-size: 12px; }
.basic-search-panel .search input { padding-left: 26px; }
.basic-search-panel .search > span { position: absolute; z-index: 1; top: 50%; left: 8px; width: 13px; height: 13px; display: grid; place-items: center; color: #60798b; transform: translateY(-50%); pointer-events: none; }
.basic-search-panel .search .lucide { width: 12px; height: 12px; stroke-width: 1.7; }
.detail-search-panel { padding: 0; }
.detail-search-panel.active { display: flex; flex-direction: column; }
.detail-quick-filters {
  min-height: 35px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-bottom: 1px solid #cfe2f0;
  background: #f4faff;
}
.detail-quick-filters > strong {
  color: #075f9f;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.detail-quick-filters > div { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.detail-quick-filters button {
  min-height: 25px;
  padding: 2px 8px;
  color: #24445d;
  border: 1px solid #c8dbea;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
.detail-quick-filters button:hover { border-color: #78b9e1; background: #eef8ff; }
.detail-quick-filters button.active { color: #075f9f; border-color: #50a9dd; background: #e4f4ff; box-shadow: inset 0 -2px #0b84c6; }
.detail-quick-filters button.active[data-tone="red"] { color: #a62836; border-color: #e99aa4; background: #fff0f2; box-shadow: inset 0 -2px #e84c5b; }
.detail-quick-filters button.active[data-tone="orange"] { color: #9b4c11; border-color: #efb078; background: #fff5eb; box-shadow: inset 0 -2px #ed7d2d; }
.detail-quick-filters button.active[data-tone="amber"] { color: #805615; border-color: #e7c16e; background: #fff9e9; box-shadow: inset 0 -2px #d79a1e; }
.detail-quick-filters button.active[data-tone="green"] { color: #14704f; border-color: #7fc8ad; background: #ecfaf4; box-shadow: inset 0 -2px #2ca776; }
.detail-quick-filters button.active[data-tone="violet"] { color: #6a41a3; border-color: #bba0df; background: #f7f1ff; box-shadow: inset 0 -2px #8d68d8; }
.detail-quick-filters > button:last-child { color: #4d6578; background: #fff; }
.detail-quick-filters > button:last-child:disabled { opacity: .45; }
.detail-condition-catalog {
  display: grid;
  grid-template-columns: repeat(var(--condition-group-count), minmax(126px, 1fr));
  max-height: 196px;
  overflow: auto;
  border-bottom: 1px solid #d7e1eb;
  background: #fff;
}
.detail-condition-catalog article {
  min-width: 0;
  border-right: 1px solid #dbe4ed;
  background: #fff;
}
.detail-condition-catalog article:last-child { border-right: 0; }
.detail-condition-catalog h3 {
  height: 27px;
  margin: 0;
  display: flex;
  align-items: center;
  padding: 3px 9px;
  color: #075f9f;
  border-bottom: 1px solid #dbe4ed;
  background: #edf7ff;
  font-size: 11.5px;
  font-weight: 500;
}
.detail-condition-catalog article > div { padding: 4px 5px; }
.detail-condition-catalog button {
  width: 100%;
  min-height: 23px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px 6px;
  overflow: hidden;
  color: #344b5e;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-condition-catalog button:hover { color: #075f9f; background: #f0f8ff; }
.detail-condition-catalog button.active { color: #075f9f; background: #e7f4ff; }
.detail-condition-catalog button.active::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #1684df;
  content: "";
}
.detail-condition-editor { padding: 6px 8px; background: #f8fbff; }
.detail-search-panel .detail-condition-editor.empty { min-height: 0; display: none; padding: 0; }
.detail-search-panel .filter-condition-list { display: grid; gap: 5px; }
.filter-builder > div {
  top: 32px;
  width: min(620px, calc(100vw - 32px));
  border-color: #bac7d6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 49, 69, .13);
}
.filter-builder header {
  min-height: 32px;
  padding: 4px 7px 4px 9px;
  border-bottom-color: #dde3ea;
}
.filter-builder header b { color: #263746; font-size: 10.5px; font-weight: 500; }
.filter-builder header button { width: 24px; min-width: 24px; min-height: 24px; padding: 0; }
.filter-builder .filter-condition-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 7px;
}
.filter-condition-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 108px minmax(170px, 1.5fr) 25px;
  align-items: center;
  gap: 5px;
}
.filter-condition-row select,
.filter-condition-row input,
.filter-condition-row button {
  width: 100%;
  min-width: 0;
  height: 27px;
  min-height: 27px;
  padding: 3px 6px;
  font-size: 12px;
}
.filter-condition-row button { padding: 0; }
.filter-builder footer {
  display: flex;
  justify-content: flex-start;
  padding: 5px 7px;
  border-top: 1px solid #e1e6ec;
}
.filter-builder footer button { min-height: 25px; padding: 2px 7px; font-size: 9.5px; }

.multi-workspace-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  border: 0;
  scrollbar-color: #a9b5c3 transparent;
  scrollbar-width: thin;
}
.multi-workspace { min-width: 100%; align-items: stretch; }
.investigation-pane { min-width: 410px; }
.investigation-pane .grid-surface,
.investigation-pane.only-pane .grid-surface {
  height: auto;
  overflow: visible;
  border: 1px solid #d7dee7;
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #fff;
  box-shadow: none;
}
.grid-head {
  position: relative;
  z-index: 20;
  height: 32px;
  min-height: 32px;
  padding: 3px 6px 3px 9px;
  border-bottom: 1px solid #d7dee7;
  background: #fff;
}
.grid-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.grid-title .status-dot { width: 7px; height: 7px; flex: 0 0 7px; }
.grid-title b {
  overflow: hidden;
  color: #20303f;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid-title span {
  min-width: 0;
  margin: 0;
  color: #586878;
  font: 10px var(--font-mono);
  white-space: nowrap;
}
.grid-head-actions { min-width: 0; gap: 4px; }
.pane-local-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pane-local-controls select,
.pane-local-controls input,
.pane-local-controls button,
.pane-local-controls .button,
.pane-local-controls .filter-builder > summary {
  height: 25px;
  min-height: 25px;
  padding: 2px 6px;
  font-size: 10px;
}
.pane-local-controls .button { display: inline-flex; align-items: center; gap: 4px; }
.pane-local-controls select { width: 112px; }
.pane-local-controls input { width: 138px; }
.pane-local-controls > button { width: 25px; min-width: 25px; padding: 0; }
.primary-pane-controls > button,
.primary-pane-controls > .button { width: auto; min-width: 25px; padding: 2px 6px; }
.primary-pane-controls > button,
.primary-pane-controls > .button { font-size: 11px; }
.primary-pane-controls > .primary span { color: #fff; }
.pane-local-controls .filter-builder > div { top: 29px; }

.column-picker { position: relative; }
.column-picker[open] { z-index: 30; }
.column-picker > summary {
  min-width: 43px;
  height: 25px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  color: #344454;
  border-color: #c7d1dd;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  list-style: none;
}
.column-picker > summary::-webkit-details-marker { display: none; }
.column-picker > summary .lucide { width: 11px; height: 11px; }
.column-picker[open] > summary { color: #155fb8; border-color: #77a7df; background: #f7fbff; }
.column-picker[data-dirty="true"] > summary::after { content: ""; }
.column-picker > .column-picker-menu {
  position: absolute;
  z-index: 40;
  top: 29px;
  right: 0;
  width: 250px;
  max-height: 390px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #bac7d6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 49, 69, .13);
}
.column-picker-menu > header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 9px;
  border-bottom: 1px solid #dde3ea;
}
.column-picker-menu > header b { color: #263746; font-size: 10.5px; font-weight: 500; }
.column-picker-menu > header span { display: flex; align-items: center; gap: 2px; }
.column-picker-menu > header button { min-height: 23px; padding: 1px 6px; border: 0; font-size: 10px; }
.column-picker-menu > header button:last-child { width: 23px; min-width: 23px; padding: 0; }
.column-picker-menu > section {
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 4px;
}
.column-picker-menu label {
  min-height: 27px;
  display: grid;
  grid-template-columns: 13px 14px 1fr;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  color: #344454;
  border-radius: 4px;
  font-size: 10.5px;
  cursor: grab;
}
.column-picker-menu label:hover { background: #f4f7fb; }
.column-picker-menu label.dragging { opacity: .45; }
.column-picker-menu label > .lucide { width: 11px; height: 11px; color: #8a98a7; }
.column-picker-menu input { width: 13px; min-width: 13px; height: 13px; min-height: 13px; margin: 0; accent-color: #1684df; }

.source-grid-scroll {
  max-height: calc(100vh - 283px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9eabb8 transparent;
  scrollbar-width: thin;
}
.control-deck:has(.time-console.collapsed) + main .source-grid-scroll { max-height: calc(100vh - 180px); }
.source-data-table {
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.source-data-table th,
.source-data-table td {
  overflow: hidden;
  border-right: 1px solid #e2e7ed;
  border-bottom: 1px solid #e4e9ef;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-data-table th:last-child,
.source-data-table td:last-child { border-right: 0; }
.source-data-table th {
  position: sticky;
  z-index: 4;
  top: 0;
  height: 28px;
  padding: 0;
  color: #263746;
  background: #f5f7fa;
  font-size: 10.5px;
  font-weight: 500;
}
.source-data-table th[data-header-column] { cursor: grab; }
.source-data-table th[data-header-column]:active { cursor: grabbing; }
.source-data-table th.column-dragging { opacity: .55; }
.source-data-table th.column-drop-before { box-shadow: inset 2px 0 #0b84c6; }
.source-data-table th.column-drop-after { box-shadow: inset -2px 0 #0b84c6; }
.source-data-table td {
  height: 32px;
  padding: 4px 7px;
  color: #1e2a36;
  background: #fff;
  font-size: 11.5px;
  vertical-align: middle;
}
.source-data-table tbody tr,
.source-data-table tbody tr:nth-child(even),
.source-data-table tbody tr.disposition-true_positive,
.source-data-table tbody tr.disposition-false_positive,
.source-data-table tbody tr.disposition-benign,
.source-data-table tbody tr.disposition-undetermined { background: #fff; }
.source-data-table tbody tr:hover td { background: #f5f9fe; }
.source-data-table tbody tr.inspect-selected td { background: #eaf3ff; }
.source-data-table tbody tr:focus-visible { outline: 2px solid #1684df; outline-offset: -2px; }
.source-data-table th:first-child,
.source-data-table td:first-child {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 #d7dee7;
}
.source-data-table th:first-child { z-index: 7; background: #f5f7fa; }
.source-data-table td:first-child,
.source-data-table tbody tr:nth-child(even) td:first-child { z-index: 3; background: #fff; }
.source-data-table tbody tr:hover td:first-child { background: #f5f9fe; }
.source-data-table tbody tr.inspect-selected td:first-child { background: #eaf3ff; }
.grid-sort-button {
  position: relative;
  width: 100%;
  height: 27px;
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 0 7px;
  color: #263746;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid-sort-button:hover { color: #155fb8; background: #edf4fc; }
.grid-sort-button span { margin: 0; color: #155fb8; font-size: 10px; }
.source-data-table th[data-column="sid"] .grid-sort-button,
.source-data-table th[data-column="status"] .grid-sort-button,
.source-data-table th[data-column="priority"] .grid-sort-button,
.source-data-table th[data-column="source_severity"] .grid-sort-button,
.source-data-table th[data-column="src_port"] .grid-sort-button,
.source-data-table th[data-column="dst_port"] .grid-sort-button,
.source-data-table th[data-column="status_code"] .grid-sort-button { justify-content: center; }
.source-data-table td[data-column="sid"],
.source-data-table td[data-column="status"],
.source-data-table td[data-column="priority"],
.source-data-table td[data-column="source_severity"],
.source-data-table td[data-column="src_port"],
.source-data-table td[data-column="dst_port"],
.source-data-table td[data-column="status_code"] { text-align: center; font-variant-numeric: tabular-nums; }
.source-data-table td[data-column="status"] .badge { justify-content: center; font-weight: 400; }
.source-data-table td[data-column="source_severity"] .badge {
  justify-content: center;
  font-weight: 400;
}
.source-data-table td[data-column="source_severity"] .badge.danger { color: #bd2838; background: #fff0f2; }
.source-data-table td[data-column="source_severity"] .badge.risk-high { color: #b95818; background: #fff1e7; }
.source-data-table td[data-column="source_severity"] .badge.risk-medium { color: #8f640b; background: #fff6d9; }
.source-data-table td[data-column="source_severity"] .badge.risk-low { color: #275f9e; background: #edf5ff; }
.source-data-table td[data-column="event_time"],
.source-data-table td[data-column="received_time"],
.source-data-table td[data-column="src_ip"],
.source-data-table td[data-column="dst_ip"],
.source-data-table td[data-column="src_host"],
.source-data-table td[data-column="flow_id"] { font-family: var(--font-mono); font-size: 10.5px; }
.column-resize-handle {
  position: absolute;
  z-index: 9;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: col-resize;
  touch-action: none;
}
.column-resize-handle::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 0;
  width: 1px;
  background: transparent;
  content: "";
}
.column-resize-handle:hover::after,
.column-resize-handle:active::after { background: #0b84c6; }
body.resizing-column, body.resizing-column * { cursor: col-resize !important; user-select: none !important; }
.row-primary-cell { position: relative; min-width: 0; height: 24px; gap: 4px; padding-right: 20px; }
.row-inspect-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-evidence-button {
  position: absolute;
  right: 0;
  width: 19px;
  min-width: 19px;
  height: 19px;
  min-height: 19px !important;
  margin: 0;
  padding: 0 !important;
  color: #64778a;
  border-color: #bdc9d6;
  border-radius: 4px;
  background: #fff;
  opacity: 0;
}
.row-evidence-button .lucide { width: 10px; height: 10px; }
.source-data-table tr:hover .row-evidence-button,
.source-data-table tr:focus-within .row-evidence-button,
.row-evidence-button.selected { opacity: 1; }
.row-evidence-button.selected { color: #fff; border-color: #1684df; background: #1684df; }
.pivot-value {
  max-width: 100%;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden;
  padding: 0 !important;
  color: inherit;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.pivot-value:hover { color: #155fb8; background: #e9f3ff; text-decoration: underline; text-underline-offset: 2px; }

.pane-divider {
  width: 8px;
  min-width: 8px;
  background: #fff;
}
.pane-divider i { width: 2px; height: 42px; border-radius: 2px; background: #c1ccd8; }
.pane-divider:hover i,
.pane-divider:active i { height: 64px; background: #1684df; }
.explorer-pagination {
  min-height: 29px;
  margin: 3px 0 0;
  padding: 3px 2px;
  color: #596878;
  background: #fff;
}
.explorer-pagination button { width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; font-size: 10px; }
.explorer-pagination .page-number.active { color: #fff; border-color: #1684df; background: #1684df; }

.evidence-tray {
  position: fixed;
  z-index: 24;
  right: 12px;
  bottom: 12px;
  left: 196px;
  min-height: 44px;
  height: 44px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 6px 5px 9px;
  border: 1px solid #b8c7d8;
  border-left: 1px solid #b8c7d8;
  border-radius: 7px;
  background: rgba(255, 255, 255, .99);
  box-shadow: none;
}
.evidence-tray.is-empty { display: none; }
.evidence-tray > .evidence-tray-label > #evidence-count {
  margin: 0;
  color: #20303f;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}
.evidence-chips { min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.evidence-chips > button {
  min-width: 0;
  max-width: 220px;
  height: 27px;
  min-height: 27px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 11px;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  border-color: #d2dbe5;
  border-radius: 5px;
  background: #f8fafc;
  font-size: 9px;
}
.evidence-chips > button b { color: #155fb8; font-size: 8px; font-weight: 500; }
.evidence-chips > button span { overflow: hidden; color: #344454; text-overflow: ellipsis; white-space: nowrap; }
.evidence-chips > button .lucide { width: 10px; height: 10px; }
.evidence-tray #save-evidence { height: 28px; min-height: 28px; padding: 3px 8px; font-size: 9.5px; }
body.rail-collapsed .evidence-tray { left: 72px; }
body[data-page="investigate"]:has(.evidence-tray:not(.is-empty)) main { padding-bottom: 64px; }

.cell-action-menu {
  position: fixed;
  z-index: 45;
  width: 228px;
  overflow: hidden;
  border: 1px solid #bac7d6;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.cell-action-menu[hidden] { display: none; }
.cell-action-menu header { padding: 7px 8px; border-bottom: 1px solid #dde3ea; }
.cell-action-menu header span,
.cell-action-menu header b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-action-menu header span { color: #738191; font-size: 8.5px; }
.cell-action-menu header b { margin-top: 2px; color: #20303f; font: 10px var(--font-mono); font-weight: 500; }
.cell-action-menu > div { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; }
.cell-action-menu button { min-height: 28px; justify-content: flex-start; padding: 3px 6px; border: 0; font-size: 9.5px; }
.cell-action-menu button .lucide { width: 11px; height: 11px; }

/* The row inspector uses the same density; raw data remains opt-in. */
.drawer.evidence-workspace {
  top: 7px;
  right: auto;
  bottom: 7px;
  left: 50%;
  width: min(1480px, calc(100vw - 28px));
  border-color: #b8c5d4;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  transform: translate(-50%, 8px);
}
.drawer.evidence-workspace.open { right: auto; transform: translate(-50%, 0); }
.drawer.evidence-workspace > header {
  height: 42px;
  padding: 6px 9px;
  color: #20303f;
  border-bottom: 1px solid #d7dee7;
  border-radius: 7px 7px 0 0;
  background: #fff;
  box-shadow: none;
}
.drawer.evidence-workspace > header span { color: #155fb8; font-size: 8px; }
.drawer.evidence-workspace > header > div > span { display: none; }
.drawer.evidence-workspace > header h2 { color: #20303f; font-size: 12px; font-weight: 500; }
.drawer.evidence-workspace > header button { color: #344454; border-color: #c7d1dd; background: #fff; }
.drawer.evidence-workspace #drawer-body { padding: 7px; }
.analysis-evidence-workspace { gap: 6px; }
.compact-analysis-inspector { color: #172c3d; }
.evidence-workspace-head {
  min-height: 48px;
  padding: 7px 9px;
  border-color: #d7dee7;
  border-radius: 7px;
}
.evidence-workspace-head h3 { margin: 0 0 2px; color: #20303f; font-size: 13px; font-weight: 500; }
.evidence-workspace-head p { color: #536272; font: 9.5px var(--font-mono); }
.compact-analysis-inspector .evidence-workspace-head { min-height: 38px; padding: 5px 8px; }
.compact-analysis-inspector .evidence-workspace-head p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.compact-analysis-inspector .evidence-workspace-head p b { color: #096caf; font-weight: 500; }
.compact-analysis-inspector .evidence-workspace-head p span { overflow: hidden; color: #273b4d; text-overflow: ellipsis; white-space: nowrap; }
.evidence-head-actions { gap: 5px; }
.evidence-disposition { gap: 3px; padding-left: 6px; }
.evidence-disposition > span { font-size: 9px; font-weight: 400; }
.evidence-disposition button { min-height: 25px; padding: 2px 7px; font-size: 9px; font-weight: 500; }
.analysis-conditions,
.analysis-related {
  overflow: hidden;
  border: 1px solid #d7dee7;
  border-radius: 7px;
  background: #fff;
}
.analysis-conditions > header {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid #d7dee7;
}
.analysis-conditions > header h3,
.analysis-related > summary strong { margin: 0; color: #20303f; font-size: 10.5px; font-weight: 500; }
.analysis-conditions > header span { color: #096caf; font: 9px var(--font-mono); }
.analysis-conditions > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analysis-conditions > div > div,
.analysis-conditions > div > button {
  min-width: 0;
  height: 31px;
  display: grid;
  grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr);
  align-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #e1e7ed;
  border-bottom: 1px solid #e1e7ed;
  border-radius: 0;
  color: #172c3d;
  background: #fff;
  text-align: left;
}
.analysis-conditions > div > :nth-child(3n) { border-right: 0; }
.analysis-conditions > div > :nth-last-child(-n + 3) { border-bottom: 0; }
.analysis-conditions code {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 7px;
  overflow: hidden;
  color: #42586a;
  border-right: 1px solid #e5ebf0;
  background: #f8fbfe;
  font: 9px var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analysis-conditions > div > * > span {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  font: 9.5px var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analysis-conditions > div > button:hover,
.analysis-conditions > div > button.active { background: #eaf5ff; }
.analysis-conditions > div > button:hover code,
.analysis-conditions > div > button.active code { color: #075d9c; background: #dceeff; }
.condition-empty { padding: 8px; color: #607080; }
.analysis-related > summary {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  cursor: pointer;
  list-style: none;
}
.analysis-related > summary::-webkit-details-marker { display: none; }
.analysis-related > summary > span { display: flex; align-items: center; gap: 4px; }
.analysis-related > summary > span span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 1px 6px;
  color: #506578;
  border: 1px solid #d5e0ea;
  border-radius: 4px;
  font-size: 9px;
}
.analysis-related > summary > span b { color: #096caf; font: 9px var(--font-mono); font-weight: 500; }
.analysis-related > summary > .lucide { width: 11px; height: 11px; margin-left: auto; color: #60788d; transition: transform .15s ease; }
.analysis-related[open] > summary { border-bottom: 1px solid #d7dee7; }
.analysis-related[open] > summary > .lucide { transform: rotate(180deg); }
.analysis-related > .evidence-context-explorer { border: 0; border-radius: 0; }
.compact-analysis-inspector .evidence-record-table { min-width: 1040px; }
.compact-analysis-inspector .evidence-record-table td,
.compact-analysis-inspector .evidence-record-table th { white-space: nowrap; }
.compact-analysis-inspector .evidence-record-table td:last-child { width: 48px; text-align: center; }
.compact-analysis-inspector .evidence-record-table td:last-child button { min-height: 21px; padding: 1px 5px; font-size: 8.5px; }
.compact-analysis-inspector .evidence-basis-cell {
  max-width: 190px;
  overflow: hidden;
  color: #1f4f73;
  font-family: var(--font-mono);
  text-overflow: ellipsis;
}
.compact-analysis-inspector .evidence-code-cell,
.compact-analysis-inspector .analysis-alert-evidence td:nth-child(9) { max-width: 330px; overflow: hidden; text-overflow: ellipsis; }
.compact-analysis-inspector .evidence-detail-content pre,
.compact-analysis-inspector .evidence-mechanism pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.compact-analysis-inspector tr.condition-muted { opacity: .26; }
.compact-analysis-inspector tr.condition-match { background: #eaf5ff; }
.evidence-detail-row[aria-hidden="true"] { display: none; }
.evidence-detail-row[aria-hidden="false"] { display: table-row; }

/* Rules: one compact operating console from catalog to deployment. */
body[data-page="rule-management"] main { background: #fff; }
.rule-console { display: grid; gap: 7px; color: #172c3d; }
.rule-console-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #c8d7e4;
  border-radius: 7px;
  background: #fff;
}
.rule-console-bar nav { align-self: stretch; display: flex; }
.rule-console-bar nav button {
  min-width: 112px;
  height: 100%;
  padding: 3px 12px;
  border: 0;
  border-right: 1px solid #d9e3eb;
  border-radius: 0;
  color: #31485a;
  background: #fff;
  font-size: 11px;
  font-weight: 400;
}
.rule-console-bar nav button.active { color: #fff; background: #0b84c6; }
.rule-console-bar > div { display: flex; align-items: center; gap: 14px; padding: 0 10px; color: #52687a; font-size: 10px; }
.rule-console-bar > div b { color: #0a6fae; font: 10.5px var(--font-mono); font-weight: 500; }
.rule-fp-review {
  overflow: hidden;
  border: 1px solid #e2cfd0;
  border-radius: 7px;
  background: #fff;
}
.rule-fp-review > summary {
  height: 31px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  cursor: pointer;
  list-style: none;
  color: #273b4d;
  font-size: 10.5px;
}
.rule-fp-review > summary::-webkit-details-marker { display: none; }
.rule-fp-review > summary i { width: 6px; height: 6px; border-radius: 50%; background: #e44f59; }
.rule-fp-review > summary b { color: #bd313b; font: 10px var(--font-mono); font-weight: 500; }
.rule-fp-review > summary .lucide { width: 11px; height: 11px; margin-left: auto; transition: transform .15s ease; }
.rule-fp-review[open] > summary { border-bottom: 1px solid #e2cfd0; }
.rule-fp-review[open] > summary .lucide { transform: rotate(180deg); }
.rule-fp-review .high-fp-toolbar { min-height: 33px; padding: 4px 8px; background: #fffafb; }
.rule-fp-review .high-fp-toolbar > span { font-size: 10px; }
.rule-fp-review .high-fp-toolbar span b { font-size: 11px; }
.rule-fp-review .high-fp-toolbar button { min-height: 24px; padding: 2px 7px; font-size: 9.5px; font-weight: 400; }
.rule-fp-review .data-table th,
.rule-fp-review .data-table td { height: 29px; padding: 3px 7px; font-size: 9.5px; white-space: nowrap; }
.rule-fp-review[open] .table-scroll { border-color: #efc9ce; background: #fffafb; }
.rule-fp-review[open] .data-table th { color: #7b343a; border-color: #efc9ce; background: #fff2f4; }
.rule-fp-review[open] .data-table td { border-color: #f1d8db; background: #fffdfd; }
.rule-choice-toolbar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px;
  border: 1px solid #d7e3ee;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f7fbff;
}
.rule-choice-toolbar label { display: flex; align-items: center; gap: 6px; color: #27445a; font-size: 10px; }
.rule-choice-toolbar input,
.rule-choice input { width: 14px; height: 14px; }
.rule-choice-toolbar b { color: #0874ba; font: 10px var(--font-mono); font-weight: 400; }
body[data-page="rule-management"] .rule-choice-list {
  gap: 0;
  max-height: 310px;
  padding: 0;
  border-color: #d7e3ee;
  border-radius: 0 0 6px 6px;
  background: #fff;
}
body[data-page="rule-management"] .rule-choice {
  min-height: 31px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  padding: 3px 7px;
  border-bottom: 1px solid #e3eaf0;
  border-radius: 0;
  background: #fff;
}
body[data-page="rule-management"] .rule-choice > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 7px;
}
body[data-page="rule-management"] .rule-choice code,
body[data-page="rule-management"] .rule-choice em,
body[data-page="rule-management"] .rule-choice small {
  overflow: hidden;
  color: #263d50;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-page="rule-management"] .rule-choice small { color: #657b8c; font: 8.5px var(--font-mono); }
body[data-page="rule-management"] .modal form > header { min-height: 48px; padding: 7px 12px; background: #fff; }
body[data-page="rule-management"] .modal h2 { margin: 0; color: #172c3d; font-size: 16px; font-weight: 500; }
body[data-page="rule-management"] #modal-body { gap: 7px; padding: 10px 12px; }
body[data-page="rule-management"] .field-hint { margin: -3px 0 0; color: #4f6c80; font-size: 9px; }
.rule-catalog-workbench,
.rule-pack-workbench,
.rule-target-workbench { display: grid; gap: 7px; }
.rule-catalog-tools,
.rule-workbench-actions {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid #c8d7e4;
  border-radius: 7px;
  background: #fff;
}
.rule-catalog-tools .search { position: relative; flex: 1; min-width: 240px; display: block; }
.rule-catalog-tools .search > span { position: absolute; z-index: 1; top: 50%; left: 8px; width: 13px; height: 13px; display: grid; place-items: center; color: #60798b; transform: translateY(-50%); pointer-events: none; }
.rule-catalog-tools .search .lucide { width: 12px; height: 12px; stroke-width: 1.7; }
.rule-catalog-tools .search input { width: 100%; padding-left: 26px; }
.rule-catalog-tools input,
.rule-catalog-tools button,
.rule-workbench-actions button { min-height: 27px; padding: 3px 8px; font-size: 10px; }
.sid-taxonomy-panel {
  overflow: hidden;
  border: 1px solid #b7d4e8;
  border-radius: 7px;
  background: #fff;
}
.sid-group-tabs { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); border-bottom: 1px solid #cbddeb; }
.sid-group-tabs button {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 3px 9px;
  border: 0;
  border-right: 1px solid #dbe5ed;
  border-radius: 0;
  color: #2b4255;
  background: #fff;
  font-size: 10.5px;
  font-weight: 400;
}
.sid-group-tabs button:last-child { border-right: 0; }
.sid-group-tabs button::before { content: ""; width: 12px; height: 2px; flex: 0 0 auto; background: var(--sid-color, #1684df); }
.sid-group-tabs button:first-child::before { background: #1684df; }
.sid-group-tabs button span { margin-right: auto; }
.sid-group-tabs button b { color: #546a7c; font: 9.5px var(--font-mono); font-weight: 400; }
.sid-group-tabs button.active { color: #fff; background: #0b84c6; }
.sid-group-tabs button.active::before { background: #fff; }
.sid-group-tabs button.active b { color: #e5f5ff; }
.sid-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  max-height: 154px;
  overflow-y: auto;
}
.sid-category-grid button {
  height: 38px;
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid #e0e8ef;
  border-bottom: 1px solid #e0e8ef;
  border-radius: 0;
  color: #263c4e;
  background: #fff;
  text-align: left;
}
.sid-category-grid button::before { content: ""; position: absolute; }
.sid-category-grid button code { color: var(--sid-color); font: 9.5px var(--font-mono); }
.sid-category-grid button span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sid-category-grid button b { color: #607587; font: 9.5px var(--font-mono); font-weight: 400; }
.sid-category-grid button:hover { background: #f4faff; }
.sid-category-grid button.active { color: #075d9c; background: #e5f4ff; box-shadow: inset 3px 0 var(--sid-color); }
.sid-category-empty { min-height: 38px; display: flex; align-items: center; padding: 0 9px; color: #6b7e8e; font: 10px var(--font-mono); }
.rule-selection-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 7px;
  border: 1px solid #c8d7e4;
  border-radius: 7px;
  background: #f8fbfe;
  color: #42586a;
  font-size: 10px;
}
.rule-selection-bar label { display: inline-flex; align-items: center; gap: 6px; }
.rule-selection-bar > span b { color: #096caf; font: 10px var(--font-mono); font-weight: 500; }
.rule-selection-bar > button { min-height: 25px; margin-left: auto; padding: 2px 8px; font-size: 9.5px; }
.rule-console input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  flex: 0 0 14px;
  border-radius: 3px;
  accent-color: #1684df;
}
.rule-catalog-panel { min-height: 0; overflow: hidden; border-radius: 7px; }
.rule-catalog-table { min-width: 1080px; }
.rule-catalog-table th,
.rule-catalog-table td,
.rule-pack-table th,
.rule-pack-table td,
.rule-target-workbench .data-table th,
.rule-target-workbench .data-table td { height: 32px; padding: 3px 7px; font-size: 10px; vertical-align: middle; white-space: nowrap; }
.rule-catalog-table th:first-child,
.rule-catalog-table td:first-child { width: 30px; min-width: 30px; padding-right: 6px; padding-left: 6px; text-align: center; }
.rule-catalog-table th:nth-child(2),
.rule-catalog-table td:nth-child(2) { width: 92px; }
.rule-catalog-table th:nth-child(5),
.rule-catalog-table td:nth-child(5) { width: 108px; }
.rule-catalog-table th:nth-child(6),
.rule-catalog-table td:nth-child(6) { width: 58px; text-align: center; }
.rule-catalog-table th:nth-child(7),
.rule-catalog-table td:nth-child(7) { width: 86px; text-align: center; }
.rule-catalog-table th:nth-child(8),
.rule-catalog-table td:nth-child(8) { width: 82px; text-align: center; }
.rule-catalog-table .table-primary-link { max-width: 100%; overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.rule-taxonomy-tag { display: inline-flex; align-items: center; gap: 5px; color: #30495d; }
.rule-taxonomy-tag::before { content: ""; width: 10px; height: 2px; background: var(--sid-color); }
.rule-state-button { min-height: 21px; min-width: 34px; padding: 1px 5px; border-radius: 4px; font-size: 8.5px; font-weight: 400; }
.rule-pack-workbench .grid-surface,
.rule-target-workbench .grid-surface { overflow: hidden; border-radius: 7px; }
.rule-target-workbench { grid-template-columns: 1fr; }
.drawer.rule-pack-inspector {
  top: 16px;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: min(1040px, calc(100vw - 32px));
  border: 1px solid #b9ccdc;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}
.drawer.rule-pack-inspector #drawer-body { display: grid; align-content: start; gap: 7px; padding: 7px; background: #fff; }
.rule-pack-summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid #cbd9e5;
  border-radius: 7px;
  background: #fff;
}
.rule-pack-summary > div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.rule-pack-summary b { overflow: hidden; color: #172c3d; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rule-pack-summary code { overflow: hidden; color: #587084; font: 9px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.rule-pack-summary strong { color: #0874ba; font: 10px var(--font-mono); font-weight: 500; }
.rule-pack-section { overflow: hidden; border: 1px solid #cbd9e5; border-radius: 7px; background: #fff; }
.rule-pack-section > header { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; border-bottom: 1px solid #d8e2ea; }
.rule-pack-section > header b { color: #203648; font-size: 10.5px; font-weight: 500; }
.rule-pack-section > header span { color: #0874ba; font: 9px var(--font-mono); }
.rule-pack-section .data-table th,
.rule-pack-section .data-table td { height: 29px; padding: 3px 7px; font-size: 9.5px; vertical-align: middle; white-space: nowrap; }
.rule-pack-section:first-of-type .table-scroll { max-height: 360px; }
.analysis-evidence-workspace > .finding-decision-basis {
  margin: 0;
  padding: 0;
  border: 1px solid #d7dee7;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.analysis-evidence-workspace > .finding-decision-basis header {
  min-height: 31px;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #d7dee7;
}
.analysis-evidence-workspace > .finding-decision-basis header h3 {
  margin: 0;
  color: #20303f;
  font-size: 10.5px;
  font-weight: 500;
}
.analysis-evidence-workspace > .finding-decision-basis header em {
  color: #155fb8;
  font: 8.5px var(--font-mono);
  font-style: normal;
}
.decision-basis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.decision-basis-grid > div {
  min-width: 0;
  height: 31px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  border-right: 1px solid #d7dee7;
}
.decision-basis-grid > div:nth-child(3n) { border-right: 0; }
.decision-basis-grid > div:nth-child(n + 4) { border-top: 1px solid #d7dee7; }
.decision-basis-grid dt,
.decision-basis-grid dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 400;
}
.decision-basis-grid dt {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 7px;
  color: #465b6d;
  border-right: 1px solid #e3e9ef;
  background: #f8fbfe;
}
.decision-basis-grid dd { padding: 0 8px; color: #172c3d; }
.evidence-records,
.evidence-context-explorer,
.evidence-mechanism { border-color: #d7dee7; border-radius: 7px; overflow: hidden; }
.evidence-records > header,
.evidence-context-explorer > header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-bottom-color: #d7dee7;
  background: #fff;
}
.evidence-records > header h3,
.evidence-context-explorer > header h3 { margin: 0; color: #20303f; font-size: 11px; font-weight: 500; }
.evidence-records > header span,
.evidence-context-explorer > header h3 b { color: #155fb8; font: 9px var(--font-mono); font-weight: 500; }
.evidence-records > header small,
.evidence-context-explorer > header small { color: #536272; font: 8.5px var(--font-mono); }
.primary-evidence { border-top: 1px solid #d7dee7; box-shadow: none; }
.primary-evidence > header { background: #fff; }
.evidence-record-table { min-width: 1180px; }
.evidence-record-table th,
.evidence-context-table th { height: 27px; padding: 3px 6px; font-size: 9px; }
.evidence-record-table td,
.evidence-context-table td { height: 31px; padding: 3px 6px; font-size: 9.5px; vertical-align: middle; }
.evidence-role { padding: 2px 5px; border-radius: 4px; font-size: 8px; font-weight: 500; }
.evidence-identity-cell b,
.evidence-identity-cell small { display: inline; font-size: 9px; font-weight: 500; }
.evidence-identity-cell small:not(:empty)::before { content: " · "; }
.evidence-identity-cell button,
.context-record-id button {
  display: inline-flex;
  min-height: 20px;
  margin: 0 0 0 5px;
  padding: 1px 5px;
  font-size: 8.5px;
}
.evidence-context-controls {
  grid-template-columns: 150px 165px minmax(250px, 1fr) auto auto;
  gap: 5px;
  padding: 5px 7px;
  border-bottom-color: #d7dee7;
  background: #f7f9fc;
}
.evidence-context-controls label { gap: 2px; color: #536272; font-size: 8.5px; font-weight: 400; }
.evidence-context-controls input,
.evidence-context-controls select,
.evidence-context-controls button { min-height: 27px; padding: 3px 6px; font-size: 9.5px; }
.evidence-source-counts { gap: 3px; padding: 4px 7px; border-bottom-color: #d7dee7; }
.evidence-source-counts span { padding: 2px 5px; border-radius: 4px; font-size: 8.5px; }
.evidence-relation-legend { min-height: 27px; gap: 10px; padding: 4px 8px; font-size: 8.5px; }
.evidence-relation-legend span::before { width: 6px; height: 6px; }
.evidence-context-scroll { max-height: 420px; }
.evidence-context-table { min-width: 1120px; }
.evidence-context-table tr.relation-selected,
.evidence-record-table tr.relation-selected { background: #eaf3ff !important; box-shadow: none; }
.evidence-context-table tr.relation-flow { background: #f1f7ff; box-shadow: inset 2px 0 #1684df; }
.evidence-context-table tr.relation-pair { background: #f6f2ff; box-shadow: inset 2px 0 #8d68d8; }
.evidence-context-table tr.relation-ip { background: #fff8e9; box-shadow: inset 2px 0 #e2a231; }
.evidence-context-table tr.relation-time { background: #f5f7fa; box-shadow: inset 2px 0 #8a98a7; }
.evidence-mechanism > summary { padding: 7px 9px; font-size: 10px; font-weight: 500; }
.evidence-mechanism > div { padding: 0 7px 7px; }
.evidence-mechanism > div > pre { margin: 0; padding: 7px; font-size: 9px; }

@media (max-width: 1180px) {
  .integrated-source-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .integrated-source-grid article:nth-child(n + 5) { border-top: 1px solid #dbe4ed; }
  .basic-search-panel { grid-template-columns: 1fr 1fr; }
  .detail-condition-catalog { grid-template-columns: repeat(var(--condition-group-count), minmax(126px, 1fr)); }
  .pane-local-controls input { display: none; }
  .evidence-context-controls { grid-template-columns: 1fr 1fr; }
  .evidence-context-controls .evidence-condition-search { grid-column: 1 / -1; }
  .analysis-conditions > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-conditions > div > :nth-child(3n) { border-right: 1px solid #e1e7ed; }
  .analysis-conditions > div > :nth-child(2n) { border-right: 0; }
  .analysis-conditions > div > :nth-last-child(-n + 3) { border-bottom: 1px solid #e1e7ed; }
  .analysis-conditions > div > :nth-last-child(-n + 2) { border-bottom: 0; }
  .sid-group-tabs { grid-template-columns: repeat(7, minmax(104px, 1fr)); overflow-x: auto; }
  .sid-category-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 820px) {
  body[data-page="investigate"] main { padding: 7px 7px 72px; }
  .integrated-source-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .integrated-source-grid article:nth-child(n + 3) { border-top: 1px solid #dbe4ed; }
  .detail-condition-catalog { grid-template-columns: repeat(2, minmax(126px, 1fr)); }
  .detail-condition-catalog article:nth-child(2n) { border-right: 0; }
  .detail-condition-catalog article:nth-child(n + 3) { border-top: 1px solid #dbe4ed; }
  .primary-pane-controls span { display: none; }
  .primary-pane-controls > button,
  .primary-pane-controls > .button { width: 25px; min-width: 25px; justify-content: center; padding: 0; }
  .source-grid-scroll { max-height: calc(100vh - 380px); }
  .evidence-tray { right: 8px; bottom: 74px; left: 8px; }
  body.rail-collapsed .evidence-tray { left: 8px; }
  .evidence-workspace-head { align-items: flex-start; flex-direction: column; }
  .drawer.evidence-workspace { left: 7px; width: calc(100vw - 14px); transform: translateY(8px); }
  .drawer.evidence-workspace.open { transform: none; }
  .analysis-conditions > div { grid-template-columns: 1fr; }
  .analysis-conditions > div > * { border-right: 0 !important; border-bottom: 1px solid #e1e7ed !important; }
  .analysis-conditions > div > :last-child { border-bottom: 0 !important; }
  .rule-console-bar { align-items: stretch; flex-direction: column; }
  .rule-console-bar nav button { min-height: 34px; }
  .rule-console-bar > div { min-height: 30px; }
  .rule-catalog-tools { align-items: stretch; flex-wrap: wrap; }
  .rule-catalog-tools .search { flex-basis: 100%; }
  .sid-category-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .evidence-context-controls { grid-template-columns: 1fr; }
  .evidence-context-controls .evidence-condition-search { grid-column: auto; }
  .decision-basis-grid { grid-template-columns: 1fr; }
  .decision-basis-grid > div,
  .decision-basis-grid > div:nth-child(3n) { border-right: 0; border-bottom: 0; }
  .decision-basis-grid > div:nth-child(n + 2) { border-top: 1px solid #d7dee7; }
}

@media (max-width: 560px) {
  .investigate-search-sections { grid-template-columns: repeat(3, minmax(92px, 1fr)); overflow-x: auto; }
  .basic-search-panel { grid-template-columns: 1fr; }
  .detail-condition-catalog { grid-template-columns: 1fr 1fr; max-height: 220px; }
  .filter-condition-row { grid-template-columns: 1fr 92px 25px; }
  .filter-condition-row input { grid-column: 1 / 3; grid-row: 2; }
  .filter-condition-row button { grid-column: 3; grid-row: 1 / 3; }
  .source-grid-scroll { max-height: calc(100vh - 500px); }
  .evidence-tray { height: auto; min-height: 44px; grid-template-columns: auto 1fr auto; }
  .evidence-chips > button { max-width: 130px; }
}

/* Flat operating surfaces: separation comes from crisp rules, never haze. */
.surface,
.grid-surface,
.command-panel,
.command-kpi,
.risk-policy-card,
.risk-policy-preview,
.incident-bulk-bar,
.drawer,
.drawer.alert-investigation,
.modal,
.toast,
.filter-builder > div,
.column-picker > div,
.column-picker-menu,
.cell-action-menu,
.capture-option-list,
.control-deck,
.timeline-event,
.geo-popup { box-shadow: none !important; }

/* Detail surfaces use one title only; redundant micro-labels add no operator value. */
.drawer > header { height: 50px; padding: 7px 12px; color: #172c3d; border-bottom: 1px solid #cbd9e5; background: #fff; }
.drawer > header > div > span,
#modal-kicker { display: none; }
.drawer > header h2 { margin: 0; color: #172c3d; font-size: 14px; font-weight: 500; }
body[data-page="rule-management"] .modal .form-note { display: none; }
.drawer.alert-investigation { background: #fbfdff; }

/* Incident detail: one chronological fact table and one fixed inspector grammar. */
.drawer.alert-investigation {
  right: calc(-1 * min(1440px, calc(100vw - 32px)) - 24px);
  width: min(1440px, calc(100vw - 32px));
  border-color: #bfd0de;
  background: #fff;
}
.drawer.alert-investigation.open { right: 8px; }
.drawer.alert-investigation #drawer-body { padding: 7px 8px 0; background: #fff; }
.incident-detail-layout { min-height: calc(100vh - 74px); display: flex; flex-direction: column; gap: 7px; }
.incident-detail-overview {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 11px;
  border: 1px solid #cbd9e5;
  border-radius: 7px;
  background: #fff;
}
.incident-detail-overview > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.incident-detail-overview > div:first-child { display: grid; gap: 3px; }
.incident-detail-overview b {
  overflow: hidden;
  color: #142c3f;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-detail-overview span,
.incident-detail-overview time { color: #526a7c; font: 10px var(--font-mono); white-space: nowrap; }
.incident-detail-overview .incident-risk { width: 28px; min-width: 28px; min-height: 20px; }
.incident-detail-overview .badge { min-height: 20px; font-size: 9px; font-weight: 500; }
.incident-reason-panel { overflow: hidden; border: 1px solid #cbd9e5; border-radius: 7px; background: #fff; }
.incident-reason-panel > header {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #cbd9e5;
}
.incident-reason-panel > header h3 { margin: 0; color: #172f42; font-size: 12px; font-weight: 500; }
.incident-reason-panel > header span { color: #0d78bd; font: 10px var(--font-mono); }
.incident-reason-columns,
.incident-reason-row > summary {
  display: grid;
  grid-template-columns: 38px 74px 72px minmax(250px, .9fr) minmax(300px, 1.25fr) 44px 16px;
  align-items: center;
  gap: 8px;
}
.incident-reason-columns {
  min-height: 28px;
  padding: 4px 9px;
  color: #536b7c;
  border-bottom: 1px solid #d5e0e8;
  background: #f3f8fc;
  font-size: 9.5px;
  font-weight: 500;
}
.incident-reason-row { border-bottom: 1px solid #dce5ec; background: #fff; }
.incident-reason-row:last-child { border-bottom: 0; }
.incident-reason-row > summary {
  min-height: 35px;
  padding: 5px 9px;
  color: #20384a;
  cursor: pointer;
  list-style: none;
}
.incident-reason-row > summary::-webkit-details-marker { display: none; }
.incident-reason-row > summary:hover { background: #f7fbfe; }
.incident-reason-row[open] > summary { color: #0b5f97; background: #eef7fd; }
.incident-reason-row > summary > * { min-width: 0; }
.incident-reason-row > summary > b,
.incident-reason-row .incident-important {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-reason-row .incident-important { color: #425d70; }
.incident-reason-row > summary time { color: #667e8f; font: 9.5px var(--font-mono); }
.incident-sequence { color: #667e8f; font: 9.5px var(--font-mono); text-align: center; }
.incident-source-kind { color: #1478b3; font: 9.5px var(--font-mono); }
.incident-reason-row.source-alert .incident-source-kind { color: #d2505a; }
.incident-reason-row.source-pcap .incident-source-kind { color: #0b86cf; }
.incident-finding-score { display: flex; align-items: center; justify-content: center; }
.incident-finding-score .incident-risk { width: 28px; min-width: 28px; min-height: 18px; font-weight: 400; }
.incident-reason-row > summary > .lucide { width: 12px; height: 12px; color: #668091; transition: transform .15s ease; }
.incident-reason-row[open] > summary > .lucide { transform: rotate(180deg); }
.incident-inline-inspector { padding: 7px 9px 9px; border-top: 1px solid #d4e0e8; background: #f8fbfe; }
.incident-inspector-identity {
  min-height: 30px;
  display: grid;
  grid-template-columns: 70px 84px 170px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}
.incident-inspector-identity > span { color: #0b78bd; font: 9.5px var(--font-mono); }
.incident-inspector-identity > b { color: #293f50; font-size: 10px; font-weight: 500; }
.incident-inspector-identity > time,
.incident-inspector-identity > code { overflow: hidden; color: #536b7d; font: 9.5px var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.incident-inspector-identity > button { min-height: 25px; padding: 3px 7px; color: #075e98; border-color: #a9c9df; background: #fff; font-size: 9.5px; }
.incident-inspector-identity > button .lucide { width: 11px; height: 11px; }
.incident-inspector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.incident-inspector-grid section { min-width: 0; border: 1px solid #cfdae3; background: #fff; }
.incident-inspector-grid h4 { margin: 0; padding: 5px 7px; color: #254258; border-bottom: 1px solid #d8e2e9; background: #f4f8fb; font-size: 10px; font-weight: 500; }
.incident-inspector-grid dl { margin: 0; }
.incident-inspector-grid dl > div { min-height: 27px; display: grid; grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr); border-bottom: 1px solid #e2e9ee; }
.incident-inspector-grid dl > div:last-child { border-bottom: 0; }
.incident-inspector-grid dt,
.incident-inspector-grid dd { min-width: 0; margin: 0; padding: 5px 7px; font-size: 9.5px; }
.incident-inspector-grid dt { color: #567083; border-right: 1px solid #e2e9ee; }
.incident-inspector-grid dd { overflow: hidden; color: #172f42; text-overflow: ellipsis; white-space: nowrap; }
.incident-inspector-empty { min-height: 27px; display: flex; align-items: center; padding: 5px 7px; color: #7890a0; font-size: 9.5px; }
.incident-decision-dock {
  position: sticky;
  z-index: 4;
  bottom: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 6px 8px;
  border: 1px solid #bfcfdb;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #fff;
}
.incident-decision-dock label { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 6px; color: #304b60; font-size: 10px; }
.incident-decision-dock textarea { width: 100%; min-height: 31px; height: 31px; padding: 6px 8px; resize: vertical; color: #172f42; border-color: #bdcdda; background: #fff; font-size: 10.5px; }
.incident-decision-dock .incident-action-options { max-width: none; display: flex; overflow: visible; opacity: 1; transform: none; pointer-events: auto; }
.incident-decision-dock .incident-action-options button { min-width: 48px; min-height: 31px; padding: 4px 9px; font-size: 10px; font-weight: 500; }
.incident-decision-dock .incident-action-options .decision-true.active { color: #087552; border-color: #51b997; background: #e8f8f2; }
.incident-decision-dock .incident-action-options .decision-false.active { color: #b6323d; border-color: #ec8f97; background: #fff0f1; }

@media (max-width: 900px) {
  .incident-reason-columns,
  .incident-reason-row > summary { grid-template-columns: 30px 58px 56px minmax(180px, .9fr) minmax(210px, 1fr) 38px 14px; gap: 5px; }
  .incident-inspector-grid { grid-template-columns: 1fr; }
  .incident-inspector-identity { grid-template-columns: 54px 70px minmax(130px, 1fr) auto; }
  .incident-inspector-identity > code { display: none; }
}
