/* ACTSOC console — restrained dark dashboard palette. */

/* ── Design tokens ────────────────────────────────────────────────────── */
:root {
  --bg-canvas:      #111217;
  --bg-canvas-2:    #0e1014;
  --bg-sidebar:     #0b0c0f;
  --bg-surface:     #181b1f;
  --bg-surface-2:   #202328;
  --bg-surface-3:   #2a2d33;
  --border-subtle:  #2b2e34;
  --border-strong:  #3a3d43;
  --accent:         #5794f2;
  --accent-strong:  #3274d9;
  --accent-soft:    #3274d922;
  --text-primary:   #f0f0f1;
  --text-secondary: #c8c9cc;
  --text-muted:     #9da0a6;
  --text-faint:     #777b83;

  --sev-critical:   #f2495c;
  --sev-high:       #ff9830;
  --sev-medium:     #fade2a;
  --sev-low:        #73bf69;
  --sev-info:       #5794f2;

  --topbar-h:       48px;
  --crumb-h:        38px;
  --side-w:         232px;
  --side-w-collapsed: 56px;

  --radius-sm:      2px;
  --radius:         3px;
  --radius-lg:      4px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-canvas);
}
body { min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App shell ─────────────────────────────────────────────────────────── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* sidebar */
aside.sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: width .15s ease;
}
aside.sidebar.collapsed { width: var(--side-w-collapsed); }
aside.sidebar.collapsed .nav-label,
aside.sidebar.collapsed .nav-group-label,
aside.sidebar.collapsed .brand-text { display: none; }

.brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h);
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.brand-logo {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: #f68b25;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: white;
}
.brand-text { line-height: 1.1; }
.brand-text .name { font-weight: 700; font-size: 14px; }
.brand-text .tag  { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

nav.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}
.nav-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 12px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
  border-left: 2px solid transparent;
  transition: background-color .12s, color .12s, border-color .12s;
}
.nav-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text-primary);
  border-left-color: var(--accent);
}
.nav-item .nav-icon {
  width: 18px; flex-shrink: 0; text-align: center; font-size: 14px;
}
.nav-item .nav-icon svg { display:block; width:16px; height:16px; margin:auto; }
aside.sidebar.collapsed .nav-item { justify-content: center; padding: 8px 0; }

.sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 8px;
}
.sidebar-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.sidebar-toggle:hover { background: var(--bg-surface); color: var(--text-primary); }

/* main area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* topbar */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas-2);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
}
.topbar-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 10px 6px 30px;
  font-size: 12.5px;
  border-radius: var(--radius);
  outline: none;
}
.topbar-search input:focus { border-color: var(--accent); }
.topbar-search::before {
  content: "⌕";
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px;
}
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  padding: 4px 8px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
}
.topbar-btn:hover { background: var(--bg-surface); color: var(--text-primary); }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}
.user-avatar {
  width: 24px; height: 24px;
  border-radius: 999px;
  background: #3a3d43;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: white;
}

/* breadcrumb */
.breadcrumb {
  height: var(--crumb-h);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  display: flex; align-items: center;
  padding: 0 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  gap: 6px;
}
.breadcrumb .crumb-sep { color: var(--text-faint); }
.breadcrumb .crumb-cur { color: var(--text-primary); font-weight: 500; }

/* main */
main.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg-canvas);
}

/* page header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.page-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
  font-size: 13.5px;
}
.card-body { padding: 16px; }
.card-body.p-0 { padding: 0; }
.card-body.p-0:has(> .t-table) { overflow-x: auto; }
.card { min-width: 0; }
.t-table { min-width: max-content; width: 100%; }
.dashboard-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.dashboard-summary-grid .card { margin:0; }
.dashboard-summary-grid .card-body.p-0 { overflow-x:auto; }
.mobile-menu-btn, #sidebar-scrim { display:none; }

/* Investigation workspace stays open while students inspect logs and artifacts. */
body.workspace-open #app { margin-right:min(520px,42vw); }
body.workspace-open aside.sidebar { width:var(--side-w-collapsed); }
body.workspace-open aside.sidebar .nav-label,
body.workspace-open aside.sidebar .nav-group-label,
body.workspace-open aside.sidebar .brand-text { display:none; }
body.workspace-open aside.sidebar .nav-item { justify-content:center; padding:8px 0; }
#workspace-root { position:relative; z-index:30; }
.workspace-panel { position:fixed; top:0; right:0; bottom:0; width:min(520px,42vw); display:flex; flex-direction:column; background:var(--bg-surface); border-left:1px solid var(--border-strong); box-shadow:-12px 0 28px #0006; }
.workspace-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border-subtle); }
.workspace-title { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-header-actions { display:flex; gap:6px; }
.workspace-body { flex:1; min-height:0; overflow-y:auto; padding:16px; }
.workspace-footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--border-subtle); }
.workspace-return { display:none; position:fixed; right:16px; bottom:16px; padding:10px 14px; border:1px solid var(--accent); border-radius:var(--radius); background:var(--accent); color:white; cursor:pointer; box-shadow:0 8px 22px #0008; }
body.workspace-minimized #app { margin-right:0; }
body.workspace-minimized .workspace-panel { display:none; }
body.workspace-minimized .workspace-return { display:block; }
.workspace-tool-links { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 14px; }
.workspace-save-status { font-size:11px; color:var(--text-muted); margin-right:auto; align-self:center; }
.ae-event-row { margin-top:12px; padding-top:12px; border-top:1px solid var(--border-subtle); }
.ae-event-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:8px; }
:is(button, input, select, textarea, a):focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

@media (max-width:1100px) {
  .dashboard-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .mobile-menu-btn { display:block; flex:none; }
  #sidebar-scrim { display:block; position:fixed; inset:0; background:#0009; z-index:39; opacity:0; pointer-events:none; }
  body.sidebar-mobile-open #sidebar-scrim { opacity:1; pointer-events:auto; }
  aside.sidebar, aside.sidebar.collapsed { position:fixed; inset:0 auto 0 0; z-index:40; width:250px; transform:translateX(-100%); transition:transform .2s ease; }
  body.sidebar-mobile-open aside.sidebar { transform:translateX(0); }
  aside.sidebar.collapsed .nav-label, aside.sidebar.collapsed .nav-group-label, aside.sidebar.collapsed .brand-text { display:block; }
  aside.sidebar.collapsed .nav-item { justify-content:flex-start; padding:8px 10px; }
  body.workspace-open aside.sidebar { width:250px; }
  body.workspace-open aside.sidebar .nav-label,
  body.workspace-open aside.sidebar .nav-group-label,
  body.workspace-open aside.sidebar .brand-text { display:block; }
  body.workspace-open aside.sidebar .nav-item { justify-content:flex-start; padding:8px 10px; }
  .sidebar-footer { display:none; }
  .topbar { padding:0 10px; gap:8px; }
  .topbar-search { min-width:0; }
  .topbar-spacer { display:none; }
  .topbar-actions { flex:none; }
  .user-chip { padding:3px; }
  #user-badge { display:none; }
  main.content { padding:12px; }
  .page-header { align-items:flex-start; flex-wrap:wrap; gap:10px; }
  .kpi-grid, .dashboard-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .modal { max-height:94dvh; display:flex; flex-direction:column; }
  .modal-body { overflow:auto; }
  .modal-body [style*="display:grid"] { grid-template-columns:1fr !important; }
  .modal-body [style*="grid-column:span 2"] { grid-column:auto !important; }
  .ae-event-grid { grid-template-columns:1fr; }
  .modal-footer { flex-wrap:wrap; }
  body.workspace-open #app { margin-right:0; }
  .workspace-panel { width:100vw; z-index:50; }
  .workspace-footer .btn { flex:1; }
}
@media (max-width:470px) {
  .kpi-grid, .dashboard-summary-grid { grid-template-columns:1fr; }
  .page-title { font-size:18px; }
  .topbar-search input { font-size:11px; }
}

/* ── KPI widgets ───────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.kpi-card.crit::before  { background: var(--sev-critical); }
.kpi-card.high::before  { background: var(--sev-high); }
.kpi-card.warn::before  { background: var(--sev-medium); }
.kpi-card.ok::before    { background: var(--sev-low); }
.kpi-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text-primary); margin-top: 4px; line-height: 1; }
.kpi-sub   { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.kpi-delta { font-size: 11.5px; margin-left: 6px; }
.kpi-delta.up   { color: var(--sev-critical); }
.kpi-delta.down { color: var(--sev-low); }

/* ── Severity bars ─────────────────────────────────────────────────────── */
.sev-row { display: grid; grid-template-columns: 76px 32px 1fr; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.sev-row .sev-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.sev-row .sev-track { background: var(--bg-surface-2); height: 6px; border-radius: 999px; overflow: hidden; }
.sev-row .sev-fill  { height: 100%; }
.sev-critical-bg { background: var(--sev-critical); }
.sev-high-bg     { background: var(--sev-high); }
.sev-medium-bg   { background: var(--sev-medium); }
.sev-low-bg      { background: var(--sev-low); }

/* ── Tables (dense) ────────────────────────────────────────────────────── */
.t-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.t-table thead th {
  text-align: left;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky; top: 0;
}
.t-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.t-table tbody tr:hover { background: var(--bg-surface-2); }
.t-table tbody tr.selected { background: var(--accent-soft); }
.t-table tbody tr:last-child td { border-bottom: none; }

/* ── Pills (severity / status) ────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center; gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill-critical { color: var(--sev-critical); border-color: #7c343e; background: #f2495c16; }
.pill-high     { color: var(--sev-high);     border-color: #795637; background: #ff983016; }
.pill-medium   { color: var(--sev-medium);   border-color: #776b36; background: #fade2a14; }
.pill-low      { color: var(--sev-low);      border-color: #456748; background: #73bf6916; }
.pill-open     { color: var(--sev-high);     border-color: #795637; background: #ff983016; }
.pill-closed   { color: var(--sev-low);      border-color: #456748; background: #73bf6916; }
.pill-progress { color: var(--accent);       border-color: var(--accent-strong); background: var(--accent-soft); }
.pill-tp       { color: var(--sev-critical); border-color: #7c343e; background: #f2495c16; }
.pill-fp       { color: var(--sev-low);      border-color: #456748; background: #73bf6916; }
.pill-pending  { color: var(--sev-medium);   border-color: #776b36; background: #fade2a14; }

/* badge (legacy compat) */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.badge-critical { background: var(--sev-critical); color: white; }
.badge-high     { background: var(--sev-high); color: white; }
.badge-medium   { background: var(--sev-medium); color: #1c1917; }
.badge-low      { background: var(--sev-low); color: #052e16; }
.badge-malicious{ background: var(--sev-critical); color: white; }
.badge-suspicious{ background: #475569; color: #f3f4f6; }
.badge-unknown  { background: var(--bg-surface-2); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.badge-gray     { background: var(--bg-surface-2); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.badge-blue     { background: var(--accent-strong); color: white; }
.badge-green    { background: #15803d; color: white; }
.badge-yellow   { background: #ca8a04; color: white; }

/* result text colors */
.txt-tp { color: var(--sev-critical); }
.txt-fp { color: var(--sev-low); }
.txt-pending { color: var(--sev-medium); }
.txt-open { color: var(--sev-high); }
.txt-closed { color: var(--sev-low); }
.txt-completed { color: var(--sev-low); }
.txt-not-started { color: var(--text-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .12s, transform .04s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: white; }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { background: var(--bg-surface-2); color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-surface-3); }
.btn-danger { background: var(--sev-critical); color: white; }
.btn-danger:hover { background: #cf3c4d; }
.btn-success { background: var(--sev-low); color: white; }
.btn-success:hover { background: #5a9f54; }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-subtle); }
.btn-ghost:hover { background: var(--bg-surface); color: var(--text-primary); }
.btn-xs { padding: 3px 7px; font-size: 11.5px; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.input, select.input, textarea.input {
  width: 100%;
  background: var(--bg-canvas-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-faint); }
.label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

/* ── Modal (for playbook) ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: min(640px, 95%);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
}
.modal-lg { width: min(880px, 95%); }
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}
.modal-body { padding: 18px; }
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Closed-alert investigation graph */
.modal-graph { width:min(1180px,97vw); max-height:92vh; display:flex; flex-direction:column; overflow:hidden; }
.modal-graph .modal-body { padding:0; min-height:0; overflow:hidden; }
.graph-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 18px; border-bottom:1px solid var(--border-subtle); }
.graph-heading > div:first-child { display:flex; flex-direction:column; gap:3px; }
.graph-heading strong { font-size:13px; font-weight:600; }
.graph-heading span { font-size:11px; color:var(--text-muted); }
.graph-heading-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:14px; }
.graph-legend { display:flex; gap:14px; white-space:nowrap; }
.graph-legend span { display:flex; align-items:center; gap:6px; }
.graph-legend i { display:block; width:18px; border-top:2px solid var(--accent); }
.graph-legend .graph-legend-evidence { border-top:2px dashed var(--sev-high); }
.graph-zoom-controls { display:flex; align-items:center; gap:2px; padding:2px; border:1px solid var(--border-strong); border-radius:var(--radius); background:var(--bg-surface-2); }
.graph-zoom-controls button { min-width:28px; height:26px; padding:0 6px; border:0; border-radius:3px; background:transparent; color:var(--text-secondary); font:inherit; font-size:12px; cursor:pointer; }
.graph-zoom-controls button:hover { background:var(--bg-surface); color:var(--text-primary); }
.graph-zoom-controls button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.graph-zoom-controls [data-graph-scale] { min-width:38px; text-align:center; font-variant-numeric:tabular-nums; }
.alert-graph-shell { display:grid; grid-template-columns:minmax(0,1fr) 290px; min-height:520px; height:min(68vh,650px); }
.alert-graph-scroll { position:relative; overflow:hidden; background-color:var(--bg-canvas-2); background-image:radial-gradient(#45495055 1px,transparent 1px); background-size:20px 20px; outline:none; cursor:grab; touch-action:none; user-select:none; }
.alert-graph-scroll.is-dragging { cursor:grabbing; }
.alert-graph-scroll:focus-visible { box-shadow:inset 0 0 0 2px var(--accent); }
.alert-graph-canvas { position:absolute; left:0; top:0; transform-origin:0 0; will-change:transform; }
.alert-graph-lines { position:absolute; inset:0; pointer-events:none; }
.graph-edge { fill:none; stroke-width:2; }
.graph-edge-sequence { stroke:var(--accent); }
.graph-edge-evidence { stroke:var(--sev-high); stroke-dasharray:5 5; opacity:.7; }
.graph-node { position:absolute; display:flex; flex-direction:column; align-items:center; gap:5px; width:150px; min-height:112px; padding:0; border:0; background:none; color:var(--text-primary); text-align:center; cursor:pointer; }
.graph-node:focus-visible { outline:none; }
.graph-node-icon { display:grid; place-items:center; width:62px; height:62px; flex:none; border:2px solid currentColor; border-radius:50%; background:var(--bg-surface); box-shadow:0 0 0 5px var(--bg-canvas-2),0 5px 14px #0005; transition:background .15s,box-shadow .15s,transform .15s; }
.graph-node-icon svg { width:27px; height:27px; }
.graph-node:hover .graph-node-icon { background:var(--bg-surface-2); transform:translateY(-2px); }
.graph-node:focus-visible .graph-node-icon,.graph-node.selected .graph-node-icon { box-shadow:0 0 0 5px var(--bg-canvas-2),0 0 0 7px var(--accent),0 5px 14px #0005; }
.graph-node-kind { position:relative; margin-top:5px; padding:0 3px; background:var(--bg-canvas-2); box-shadow:0 0 0 3px var(--bg-canvas-2); color:var(--text-muted); text-transform:uppercase; font-size:10px; font-weight:700; letter-spacing:.08em; }
.graph-node strong { position:relative; display:-webkit-box; width:100%; max-height:36px; overflow:hidden; background:var(--bg-canvas-2); box-shadow:0 0 0 3px var(--bg-canvas-2); color:var(--text-primary); font-size:12px; line-height:1.4; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.graph-node-alert { color:var(--sev-critical); }
.graph-node-step { color:var(--accent); }
.graph-node-verdict { color:var(--sev-low); }
.graph-node-artifact { color:var(--sev-high); }
.graph-node-reference { color:var(--text-muted); }
.alert-graph-inspector { min-width:0; overflow:auto; padding:18px; border-left:1px solid var(--border-subtle); background:var(--bg-surface); font-size:12px; line-height:1.5; }
.graph-inspector-kind { color:var(--accent); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
.alert-graph-inspector h3 { margin:6px 0 16px; font-size:15px; line-height:1.3; overflow-wrap:anywhere; }
.graph-inspector-content { color:var(--text-secondary); overflow-wrap:anywhere; }
.graph-detail-text { white-space:pre-wrap; }
.graph-record { max-height:260px; margin:4px 0 0; padding:10px; overflow:auto; background:var(--bg-canvas-2); border:1px solid var(--border-subtle); border-radius:var(--radius); color:var(--text-secondary); font:11px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.graph-related-list { display:flex; flex-direction:column; gap:5px; }
.graph-related { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; width:100%; padding:7px 8px; border:1px solid var(--border-subtle); border-radius:var(--radius); background:var(--bg-surface-2); color:var(--text-primary); text-align:left; cursor:pointer; }
.graph-related:hover { border-color:var(--accent); }
.graph-related small { color:var(--text-muted); white-space:nowrap; }
@media(max-width:760px) {
  .graph-heading { align-items:flex-start; flex-direction:column; }
  .graph-heading-actions { justify-content:flex-start; }
  .alert-graph-shell { grid-template-columns:1fr; height:auto; }
  .alert-graph-scroll { height:380px; }
  .alert-graph-inspector { border-left:0; border-top:1px solid var(--border-subtle); max-height:320px; }
}

/* ── Drawer (right-side detail panel) ─────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40;
  animation: fadeIn .15s ease;
}
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(520px, 100%);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 41;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.4);
  animation: slideIn .18s cubic-bezier(.2,.7,.3,1);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-title { font-weight: 600; font-size: 14px; }
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 18px;
  background: var(--bg-canvas-2);
}
.drawer-tab {
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.drawer-tab:hover { color: var(--text-primary); }
.drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ── Code block ────────────────────────────────────────────────────────── */
.code-block {
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius);
  min-width: 240px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
  font-size: 13px;
}
.toast-success { border-color: var(--sev-low); }
.toast-error   { border-color: var(--sev-critical); }
.toast-info    { border-color: var(--accent); }

/* ── Stat card legacy ──────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--text-primary); }
.stat-sub   { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ── Tab bar legacy ────────────────────────────────────────────────────── */
.tabbar { display: flex; border-bottom: 1px solid var(--border-subtle); }
.tab {
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Endpoint event card ──────────────────────────────────────────────── */
.evt-card {
  background: var(--bg-canvas-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

/* ── Progress bar (playbook) ──────────────────────────────────────────── */
.progress-track { background: var(--bg-surface-2); height: 6px; border-radius: 999px; overflow: hidden; }
.progress-bar { background: var(--accent); height: 100%; transition: width .25s; }

/* ── Empty / divider / kbd / muted ────────────────────────────────────── */
.empty-state {
  text-align: center; color: var(--text-muted); padding: 40px 16px; font-size: 13px;
}
.muted { color: var(--text-muted); }
.divider { border-top: 1px solid var(--border-subtle); margin: 16px 0; }
.kbd {
  background: var(--bg-surface-2); border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 1px 6px; font-size: 11px; color: var(--text-secondary); font-family: ui-monospace, monospace;
}

/* ── Filter chips ─────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 11.5px;
  color: var(--text-primary);
}
.chip .chip-x {
  cursor: pointer; opacity: 0.7;
}
.chip .chip-x:hover { opacity: 1; }

/* ── Scrollbar ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-canvas); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Misc utilities ───────────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.text-xs { font-size: 11.5px; }
.text-sm { font-size: 12.5px; }
.text-base { font-size: 14px; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.font-semibold { font-weight: 600; }
/* secondary highlight tone for IPs / hostnames / codes — kept distinct from
   the red accent so the eye doesn't confuse "alert" with "code value". */
.text-blue-300 { color: #8ab8f8; }
.text-blue-400 { color: var(--accent); }
.text-green-400 { color: var(--sev-low); }
.text-yellow-400 { color: var(--sev-medium); }
.text-red-400 { color: var(--sev-critical); }
.cursor-pointer { cursor: pointer; }
.hidden { display: none; }
.opacity-60 { opacity: 0.6; }
.col-span-2 { grid-column: span 2; }
.space-x-1 > * + * { margin-left: 4px; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:col-span-2 { grid-column: span 2; }
  .lg\:col-span-1 { grid-column: span 1; }
}
@media (min-width: 768px) {
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.list-decimal { list-style: decimal; }
.list-disc { list-style: disc; }
.pl-5 { padding-left: 20px; }
.pl-2 { padding-left: 8px; }
.pt-1 { padding-top: 4px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.mt-1 { margin-top: 4px; }
.mt-5 { margin-top: 20px; }
.mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-5 { margin-bottom: 20px; }
.uppercase { text-transform: uppercase; }
.tracking-wide   { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.leading-none { line-height: 1; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 26px; }
.text-lg  { font-size: 15px; }
.text-base { font-size: 14px; }
.italic { font-style: italic; }
.break-all { word-break: break-all; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-hidden { overflow-y: hidden; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.bg-gray-800 { background: var(--bg-surface-2); }
.bg-gray-900 { background: var(--bg-canvas-2); }
.border { border: 1px solid var(--border-subtle); }
.border-gray-700 { border-color: var(--border-strong); }
.rounded { border-radius: var(--radius); }
.rounded-md { border-radius: var(--radius); }
.relative { position: relative; }
.fixed { position: fixed; }
.top-4 { top: 16px; }
.right-4 { right: 16px; }
.z-50 { z-index: 50; }
.text-gray-100 { color: var(--text-primary); }
.text-gray-200 { color: var(--text-secondary); }
.text-gray-300 { color: var(--text-secondary); }
.text-gray-400 { color: var(--text-muted); }
.text-gray-500 { color: var(--text-faint); }
.bg-red-900\/10 { background: rgba(127,29,29,0.1); }
.w-full { width: 100%; }
.w-72 { width: 232px; }
.h-full { height: 100%; }
.max-w-md { max-width: 460px; }
.dark { color-scheme: dark; }

/* SOC dashboard */
.soc-dashboard { max-width: 1580px; margin: 0 auto; padding-bottom: 24px; }
.soc-hero {
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  padding:20px 22px; margin-bottom:12px; overflow:hidden; position:relative;
  border:1px solid var(--border-subtle); border-radius:var(--radius-lg);
  background:var(--bg-surface);
}
.soc-search-hero { display:block; }
.soc-search-form { width:100%; }
.soc-search-form > label { display:block; color:var(--text-primary); font-size:14px; font-weight:600; margin-bottom:10px; }
.soc-search-form p { margin:8px 0 0; color:#9da0a6; font-size:11px; }
.soc-search-input-row { display:flex; align-items:center; min-height:42px; border:1px solid var(--border-strong); border-radius:var(--radius); background:var(--bg-canvas-2); overflow:hidden; }
.soc-search-input-row:focus-within { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.soc-search-input-row > span { color:#5794f2; font-size:25px; padding-left:15px; line-height:1; }
.soc-search-input-row input { flex:1; min-width:0; height:40px; padding:0 13px; color:#f0f0f1; background:transparent; border:0; outline:0; font-size:13px; }
.soc-search-input-row input::placeholder { color:#9da0a6; }
.soc-search-input-row button { align-self:stretch; padding:0 21px; border:0; border-left:1px solid #4a4e55; background:#3274d9; color:#f0f0f1; font-size:12px; font-weight:700; cursor:pointer; }
.soc-search-input-row button:hover { background:var(--accent); }
.soc-dashboard-controls { display:flex; justify-content:flex-end; margin-bottom:11px; }
.soc-search-results { border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); margin-bottom:12px; overflow:hidden; }
.soc-search-results[hidden] { display:none; }
.soc-search-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 16px; border-bottom:1px solid #30343b; color:#c8c9cc; font-size:12px; }
.soc-search-head strong { color:#f0f0f1; margin-right:4px; }
.soc-search-list { max-height:450px; overflow:auto; }
.soc-search-hit { display:block; width:100%; padding:11px 16px; border:0; border-bottom:1px solid #30343b; background:transparent; color:#c8c9cc; text-align:left; cursor:pointer; }
.soc-search-hit:hover,.soc-search-hit:focus-visible { background:#23262b; outline:0; }
.soc-search-hit-meta { display:flex; align-items:center; gap:7px; color:#9da0a6; font-size:10px; }
.soc-search-hit-meta b { padding:2px 5px; border-radius:4px; color:#5794f2; background:#23262b; }
.soc-search-hit > strong { display:block; margin:5px 0 3px; color:#f0f0f1; font-size:12px; }
.soc-search-hit > small { display:block; overflow:hidden; color:#c8c9cc; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.soc-search-hit mark { background:#8e6b2355; color:#f6d776; border-radius:2px; padding:0 1px; }
.soc-search-pages { display:flex; align-items:center; justify-content:center; gap:16px; padding:10px; color:#9da0a6; font-size:11px; }
.soc-search-pages button { border:1px solid #4a4e55; border-radius:5px; padding:4px 10px; background:#23262b; color:#c8c9cc; cursor:pointer; }
.soc-search-pages button:disabled { opacity:.45; cursor:default; }
.soc-search-empty { color:#9da0a6; padding:22px 16px; font-size:12px; }
.soc-search-record { max-height:48vh; overflow:auto; padding:12px; border:1px solid #30343b; border-radius:6px; background:#111217; color:#c8c9cc; font-size:11px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.soc-hero-filters { display:flex; align-items:end; gap:10px; flex-shrink:0; position:relative; }
.soc-hero-filters label { color:#9da0a6; font-size:11px; font-weight:600; display:block; min-width:175px; }
.soc-hero-filters .input { margin-top:5px; min-height:35px; border-color:#4a4e55; background:#111217; font-size:12px; }
.soc-source-strip { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:14px; color:#c8c9cc; }
.soc-range { display:inline-flex; align-items:center; gap:6px; margin-right:auto; font-size:12px; font-weight:700; color:#c8c9cc; }
.soc-range button { border:0; background:transparent; color:#9da0a6; cursor:pointer; font-size:18px; line-height:1; }
.soc-source-label { color:#9da0a6; letter-spacing:.1em; font-size:10px; font-weight:700; margin-right:3px; }
.soc-source-strip > button { border:1px solid #30343b; background:#181b1f; color:#c8c9cc; border-radius:5px; padding:4px 8px; font-size:11px; cursor:pointer; }
.soc-source-strip > button:hover { background:#23262b; border-color:#4a4e55; color:#fff; }
.soc-source-strip > button strong { color:#f0f0f1; margin-left:4px; font-variant-numeric:tabular-nums; }
.soc-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.soc-metric { display:flex; flex-direction:column; min-height:108px; padding:16px 18px; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); }
.soc-metric span { color:#9da0a6; text-transform:uppercase; font-size:10px; font-weight:700; letter-spacing:.1em; }
.soc-metric strong { margin:6px 0 3px; color:#f0f0f1; font-size:30px; line-height:1; font-variant-numeric:tabular-nums; }
.soc-metric small { color:#9da0a6; font-size:11px; }
.soc-overview-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(285px,.8fr); gap:12px; margin-bottom:12px; }
.soc-bottom-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(285px,.8fr); gap:12px; margin-top:12px; }
.soc-panel { min-width:0; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); overflow:hidden; }
.soc-panel-head { min-height:61px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 17px; border-bottom:1px solid #30343b; }
.soc-panel-head h2 { margin:0; color:#f0f0f1; font-size:14px; font-weight:700; }
.soc-panel-head p { margin:3px 0 0; color:#9da0a6; font-size:11px; }
.soc-panel-tag { color:#5794f2; border:1px solid #4a4e55; background:#23262b; border-radius:4px; padding:3px 6px; font-size:10px; letter-spacing:.08em; font-weight:700; white-space:nowrap; }
.soc-text-button { color:#5794f2; background:transparent; border:0; cursor:pointer; font-size:11px; font-weight:700; white-space:nowrap; }
.soc-text-button:hover { color:#5794f2; text-decoration:underline; }
.soc-head-actions { display:flex; align-items:center; gap:12px; }
.soc-chart-bars { display:flex; align-items:stretch; gap:7px; height:208px; padding:15px 17px 6px; }
.soc-chart-bin { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; color:#9da0a6; border:1px solid transparent; border-radius:5px; background:transparent; cursor:pointer; padding:2px 3px 5px; }
.soc-chart-bin:hover { background:#23262b; }
.soc-chart-bin.selected { background:#23262b; border-color:#4a4e55; color:#f0f0f1; }
.soc-chart-total { height:18px; font-size:10px; font-weight:700; color:#c8c9cc; font-variant-numeric:tabular-nums; }
.soc-chart-plot { display:flex; align-items:end; justify-content:center; gap:3px; width:100%; flex:1; min-height:0; border-bottom:1px solid #30343b; background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#ffffff0a calc(25% - 1px),#ffffff0a 25%); }
.soc-chart-plot i { display:block; width:min(26%,23px); min-width:5px; border-radius:3px 3px 0 0; }
.soc-chart-log { background:#5794f2; }
.soc-chart-alert { background:#ff9830; }
.soc-chart-label { display:block; padding-top:7px; font-size:10px; line-height:1.2; text-align:center; min-height:31px; }
.soc-chart-legend { display:flex; justify-content:center; gap:20px; color:#9da0a6; font-size:11px; padding:0 0 15px; }
.soc-chart-legend span { display:flex; align-items:center; gap:6px; }
.soc-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#777b83; flex:none; }
.soc-dot.cyan { background:#5794f2; } .soc-dot.red { background:#ff9830; } .soc-dot.critical { background:#f2495c; }
.soc-dot.high { background:#ff9830; } .soc-dot.medium { background:#fade2a; } .soc-dot.low { background:#73bf69; }
.soc-severity-body { display:flex; align-items:center; justify-content:center; gap:21px; padding:20px 19px; min-height:242px; }
.soc-donut { width:125px; height:125px; border-radius:50%; flex:none; display:grid; place-items:center; }
.soc-donut > span { width:82px; height:82px; background:#181b1f; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.soc-donut strong { color:#f0f0f1; font-size:27px; line-height:1; }
.soc-donut small { color:#9da0a6; font-size:11px; margin-top:4px; }
.soc-severity-list { flex:1; max-width:210px; min-width:100px; }
.soc-severity-row { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; padding:7px 8px; border:1px solid transparent; border-radius:5px; background:transparent; color:#c8c9cc; cursor:pointer; font-size:12px; }
.soc-severity-row:hover,.soc-severity-row.selected { background:#23262b; border-color:#4a4e55; }
.soc-severity-row span { display:flex; align-items:center; gap:8px; }
.soc-severity-row strong { color:#f0f0f1; font-variant-numeric:tabular-nums; }
.soc-alert-panel { margin-top:0; }
.soc-table-wrap { overflow-x:auto; }
.soc-table { width:100%; border-collapse:collapse; font-size:12px; min-width:660px; }
.soc-table th { color:#9da0a6; text-align:left; font-size:10px; letter-spacing:.08em; padding:10px 17px; background:#181b1f; font-weight:700; }
.soc-table td { padding:11px 17px; border-top:1px solid #30343b; color:#c8c9cc; }
.soc-table tr:hover td { background:#23262b; }
.soc-table td:first-child strong { display:block; color:#f0f0f1; font-size:12px; font-weight:600; }
.soc-table td:first-child span { display:block; color:#9da0a6; font-size:10px; margin-top:4px; }
.soc-table .soc-nowrap { white-space:nowrap; color:#c8c9cc; font-variant-numeric:tabular-nums; }
.soc-status { color:#c8c9cc; }
.soc-row-open { color:#5794f2; border:0; background:transparent; white-space:nowrap; font-size:11px; cursor:pointer; font-weight:700; }
.soc-row-open:hover { color:#5794f2; text-decoration:underline; }
.soc-table-empty { padding:22px !important; text-align:center; color:#9da0a6 !important; }
.soc-activity-list { max-height:370px; overflow:auto; }
.soc-activity { width:100%; display:flex; align-items:flex-start; gap:10px; padding:10px 16px; text-align:left; color:#c8c9cc; background:transparent; border:0; border-bottom:1px solid #30343b; cursor:pointer; }
.soc-activity:hover { background:#23262b; }
.soc-activity-dot { width:7px; height:7px; border-radius:50%; background:#5794f2; margin-top:6px; flex:none; }
.soc-activity > span { min-width:0; flex:1; }
.soc-activity strong { display:block; font-size:11px; color:#f0f0f1; }
.soc-activity small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; color:#9da0a6; margin-top:3px; }
.soc-activity time { flex:none; max-width:125px; color:#9da0a6; font-size:10px; text-align:right; }
.soc-empty { color:#9da0a6; text-align:center; padding:32px 18px; font-size:12px; }
.soc-ops-panel { padding-bottom:15px; }
.soc-ops-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:0; padding:17px 15px 13px; }
.soc-ops-stats > div { display:flex; flex-direction:column; align-items:center; border-right:1px solid #30343b; }
.soc-ops-stats > div:last-child { border:0; }
.soc-ops-stats strong { font-size:20px; color:#f0f0f1; line-height:1; }
.soc-ops-stats span { font-size:10px; color:#9da0a6; margin-top:7px; text-align:center; }
.soc-readiness { padding:0 17px; }
.soc-readiness > div { display:flex; justify-content:space-between; gap:9px; padding:8px 0; border-top:1px solid #30343b; color:#9da0a6; font-size:11px; }
.soc-readiness strong { color:#f0f0f1; white-space:nowrap; }
.soc-ops-note { color:#9da0a6; font-size:11px; line-height:1.5; margin:5px 17px 12px; }
.soc-ops-panel > .btn { margin-left:17px; }
@media(max-width:1100px) {
  .soc-overview-grid,.soc-bottom-grid { grid-template-columns:minmax(0,1.4fr) minmax(260px,.9fr); }
  .soc-severity-body { gap:12px; padding:14px; }
  .soc-donut { width:105px; height:105px; }
  .soc-donut > span { width:70px; height:70px; }
}
@media(max-width:900px) {
  .soc-hero { align-items:flex-start; flex-direction:column; }
  .soc-hero-filters { width:100%; }
  .soc-dashboard-controls { justify-content:stretch; }
  .soc-overview-grid,.soc-bottom-grid { grid-template-columns:1fr; }
  .soc-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:520px) {
  .soc-hero { padding:19px; }
  .soc-search-input-row button { padding:0 12px; }
  .soc-search-form > label { font-size:14px; }
  .soc-hero-filters { flex-wrap:wrap; }
  .soc-hero-filters label { flex:1; }
  .soc-metrics { gap:8px; }
  .soc-metric { min-height:95px; padding:12px; }
  .soc-metric strong { font-size:25px; }
  .soc-chart-bars { gap:3px; padding-left:8px; padding-right:8px; }
  .soc-chart-label { font-size:9px; }
  .soc-activity time { display:none; }
}
