/* ═══════════════════════════════════════════════════════
   Spotlight SOC Platform — Design System
   Bootstrap 5.3 base + custom dark/light SOC theme
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root,
[data-bs-theme="dark"] {
  --soc-bg:          #0d1117;
  --soc-surface:     #161b22;
  --soc-surface-2:   #1c2128;
  --soc-border:      #21262d;
  --soc-border-2:    #30363d;
  --soc-text:        #e6edf3;
  --soc-text-muted:  #8b949e;
  --soc-text-dim:    #484f58;
  --soc-accent:      #388bfd;
  --soc-accent-dim:  #1f4e8c;
  --soc-critical:    #f85149;
  --soc-critical-bg: rgba(248,81,73,.12);
  --soc-high:        #db6d28;
  --soc-high-bg:     rgba(219,109,40,.12);
  --soc-medium:      #d29922;
  --soc-medium-bg:   rgba(210,153,34,.12);
  --soc-low:         #388bfd;
  --soc-low-bg:      rgba(56,139,253,.12);
  --soc-ok:          #3fb950;
  --soc-ok-bg:       rgba(63,185,80,.12);
  --soc-sidebar-w:   220px;
  --soc-topbar-h:    52px;
  --soc-mono:        'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --soc-badge-radius: 4px;   /* one corner radius for every badge / tag / risk chip */
  --soc-ui-font:     system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* tables, key-value lists */
}

[data-bs-theme="light"] {
  --soc-bg:          #f6f8fa;
  --soc-surface:     #ffffff;
  --soc-surface-2:   #f6f8fa;
  --soc-border:      #d0d7de;
  --soc-border-2:    #bbc0c6;
  --soc-text:        #1f2328;
  --soc-text-muted:  #57606a;
  --soc-text-dim:    #8c959f;
  --soc-accent:      #0969da;
  --soc-accent-dim:  #ddf4ff;
  --soc-critical:    #cf222e;
  --soc-critical-bg: rgba(207,34,46,.08);
  --soc-high:        #bc4c00;
  --soc-high-bg:     rgba(188,76,0,.08);
  --soc-medium:      #7d4e00;
  --soc-medium-bg:   rgba(125,78,0,.08);
  --soc-low:         #0969da;
  --soc-low-bg:      rgba(9,105,218,.08);
  --soc-ok:          #1a7f37;
  --soc-ok-bg:       rgba(26,127,55,.08);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  background: var(--soc-bg);
  color: var(--soc-text);
  overflow: hidden;
}

/* ── Layout Shell ───────────────────────────────────── */
.soc-shell {
  display: grid;
  grid-template-columns: var(--soc-sidebar-w) 1fr;
  grid-template-rows: var(--soc-topbar-h) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Top Bar ────────────────────────────────────────── */
.soc-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--soc-surface);
  border-bottom: 1px solid var(--soc-border);
  z-index: 100;
}

.soc-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--soc-sidebar-w);
  padding-left: 4px;
  text-decoration: none;
  flex-shrink: 0;
}

.soc-topbar .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--soc-text);
  letter-spacing: .5px;
}

.soc-topbar .brand-name span { color: var(--soc-accent); }

.soc-topbar .brand-icon {
  width: 28px;
  height: 28px;
  background: var(--soc-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.soc-topbar .spacer { flex: 1; }

.soc-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Sidebar ────────────────────────────────────────── */
.soc-sidebar {
  grid-column: 1;
  grid-row: 2;
  background: var(--soc-surface);
  border-right: 1px solid var(--soc-border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.soc-sidebar::-webkit-scrollbar { width: 4px; }
.soc-sidebar::-webkit-scrollbar-track { background: transparent; }
.soc-sidebar::-webkit-scrollbar-thumb { background: var(--soc-border-2); border-radius: 2px; }

.soc-nav { padding: 8px 0; }

.soc-nav-section {
  padding: 12px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--soc-text-dim);
}

/* Rubrics open and close with an arrow (js/sidenav.js). */
.soc-nav-section[role="button"] {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; transition: color .12s;
}
.soc-nav-section[role="button"]:hover { color: var(--soc-text); }
.soc-nav-arrow { font-size: 10px; transition: transform .15s; }
.soc-nav-section.collapsed .soc-nav-arrow { transform: rotate(-90deg); }
@media (min-width: 901px) { .soc-nav-group.collapsed { display: none; } }

.soc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 6px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--soc-text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
  white-space: nowrap;
}

.soc-nav a:hover {
  background: var(--soc-surface-2);
  color: var(--soc-text);
}

.soc-nav a.active {
  background: var(--soc-accent-dim);
  color: var(--soc-accent);
}

.soc-nav a svg,
.soc-nav a .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .8;
}

.soc-nav .badge-count {
  margin-left: auto;
  background: var(--soc-critical);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ── Main Content ───────────────────────────────────── */
.soc-main {
  grid-column: 2;
  grid-row: 2;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--soc-bg);
}

.soc-main::-webkit-scrollbar { width: 6px; }
.soc-main::-webkit-scrollbar-track { background: transparent; }
.soc-main::-webkit-scrollbar-thumb { background: var(--soc-border); border-radius: 3px; }

.soc-page {
  padding: 20px 24px;
  max-width: 1600px;
}

/* ── Page Header ────────────────────────────────────── */
.soc-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--soc-border);
}

.soc-page-header h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--soc-text);
}

.soc-page-header .subtitle {
  font-size: 12px;
  color: var(--soc-text-muted);
  margin-top: 2px;
}

.soc-page-header .actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Cards ──────────────────────────────────────────── */
.soc-card {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  padding: 16px;
}

.soc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.soc-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--soc-text-muted);
}

/* ── Metric Cards ───────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}

.metric-card.critical::before { background: var(--soc-critical); }
.metric-card.high::before     { background: var(--soc-high); }
.metric-card.medium::before   { background: var(--soc-medium); }
.metric-card.low::before      { background: var(--soc-low); }
.metric-card.ok::before       { background: var(--soc-ok); }
.metric-card.accent::before   { background: var(--soc-accent); }

.metric-label {
  font-size: 11px;
  color: var(--soc-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 500;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--soc-text);
}

.metric-card.critical .metric-value { color: var(--soc-critical); }
.metric-card.high .metric-value     { color: var(--soc-high); }

.metric-sub {
  font-size: 11px;
  color: var(--soc-text-dim);
  margin-top: 4px;
}

/* ── Severity Badges ────────────────────────────────── */
.sev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.sev-critical { background: var(--soc-critical-bg); color: var(--soc-critical); }
.sev-high     { background: var(--soc-high-bg);     color: var(--soc-high); }
.sev-medium   { background: var(--soc-medium-bg);   color: var(--soc-medium); }
.sev-low      { background: var(--soc-low-bg);      color: var(--soc-low); }

.sev-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Status Badges ──────────────────────────────────── */
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.status-new        { background: var(--soc-critical-bg); color: var(--soc-critical); }
.status-inprogress { background: var(--soc-medium-bg);   color: var(--soc-medium); }
.status-resolved   { background: var(--soc-ok-bg);       color: var(--soc-ok); }
.status-closed     { background: var(--soc-surface-2);   color: var(--soc-text-muted); }
.status-active     { background: var(--soc-ok-bg);       color: var(--soc-ok); }
.status-inactive   { background: var(--soc-surface-2);   color: var(--soc-text-muted); }

/* ── Risk Score Bar ─────────────────────────────────── */
.risk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-bar-track {
  flex: 1;
  height: 4px;
  background: var(--soc-border);
  border-radius: 2px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s;
}

.risk-0  .risk-bar-fill { background: var(--soc-ok); }
.risk-25 .risk-bar-fill { background: var(--soc-low); }
.risk-50 .risk-bar-fill { background: var(--soc-medium); }
.risk-75 .risk-bar-fill { background: var(--soc-high); }
.risk-90 .risk-bar-fill { background: var(--soc-critical); }

.risk-score-text {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--soc-mono);
  min-width: 32px;
  text-align: right;
}

/* ── Tables ─────────────────────────────────────────── */
.soc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.soc-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--soc-text-muted);
  border-bottom: 1px solid var(--soc-border);
  white-space: nowrap;
}

.soc-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--soc-border);
  vertical-align: middle;
  color: var(--soc-text);
}

.soc-table tr:last-child td { border-bottom: none; }

.soc-table tbody tr {
  transition: background .1s;
}

.soc-table tbody tr:hover { background: var(--soc-surface-2); }

.soc-table tbody tr.clickable { cursor: pointer; }

.mono {
  font-family: var(--soc-mono);
  font-size: 12px;
  color: var(--soc-text-muted);
}

/* ── Buttons ────────────────────────────────────────── */
.btn-soc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--soc-border);
  background: var(--soc-surface-2);
  color: var(--soc-text);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}

.btn-soc:hover {
  background: var(--soc-border);
  color: var(--soc-text);
  text-decoration: none;
}

.btn-soc.primary {
  background: var(--soc-accent);
  border-color: var(--soc-accent);
  color: #fff;
}

.btn-soc.primary:hover { opacity: .85; }

.btn-soc.danger {
  background: var(--soc-critical-bg);
  border-color: var(--soc-critical);
  color: var(--soc-critical);
}

.btn-soc.ok {
  background: var(--soc-ok-bg);
  border-color: var(--soc-ok);
  color: var(--soc-ok);
}

.btn-soc.sm { padding: 3px 8px; font-size: 11px; }

/* ── Generic Input ──────────────────────────────────── */
.soc-input {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  color: var(--soc-text);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}

.soc-input:focus {
  outline: none;
  border-color: var(--soc-accent);
}

/* ── Filter Bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar select,
.filter-bar input {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  color: var(--soc-text);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--soc-accent);
}

.filter-bar select option { background: var(--soc-surface); }

/* ── Search ─────────────────────────────────────────── */
.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  color: var(--soc-text);
  border-radius: 6px;
  padding: 6px 12px 6px 34px;
  font-size: 13px;
}

.search-box::before {
  content: '⌕';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--soc-text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* ── Forms ──────────────────────────────────────────── */
.soc-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--soc-text-muted);
  margin-bottom: 4px;
}

.soc-form input,
.soc-form select,
.soc-form textarea {
  width: 100%;
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  color: var(--soc-text);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.soc-form input:focus,
.soc-form select:focus,
.soc-form textarea:focus {
  outline: none;
  border-color: var(--soc-accent);
  box-shadow: 0 0 0 3px rgba(56,139,253,.15);
}

.form-error {
  color: var(--soc-critical);
  font-size: 12px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--soc-critical-bg);
  border-radius: 6px;
  border: 1px solid rgba(248,81,73,.25);
}

/* ── Login Page ─────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soc-bg);
}

.login-card {
  width: 380px;
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 12px;
  padding: 36px 32px;
}

.login-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--soc-text);
}

.login-logo span { color: var(--soc-accent); }

.login-tagline {
  font-size: 12px;
  color: var(--soc-text-muted);
  margin-top: 2px;
  margin-bottom: 28px;
}

/* ── Timeline ───────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--soc-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px; top: 5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--soc-accent);
  border: 2px solid var(--soc-surface);
}

.timeline-item.critical::before { background: var(--soc-critical); }
.timeline-item.high::before     { background: var(--soc-high); }
.timeline-item.medium::before   { background: var(--soc-medium); }

.timeline-time {
  font-size: 11px;
  color: var(--soc-text-muted);
  font-family: var(--soc-mono);
}

.timeline-content {
  font-size: 12.5px;
  margin-top: 2px;
}

/* ── Offline Banner ─────────────────────────────────── */
.offline-banner {
  position: fixed;
  top: var(--soc-topbar-h);
  left: 0; right: 0;
  background: var(--soc-high-bg);
  border-bottom: 1px solid var(--soc-high);
  color: var(--soc-high);
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  z-index: 200;
  display: none;
}

.offline-banner.visible { display: block; }

/* ── Live Feed ──────────────────────────────────────── */
.live-feed {
  font-size: 12px;
  max-height: 340px;
  overflow-y: auto;
}

.live-feed::-webkit-scrollbar { width: 3px; }
.live-feed::-webkit-scrollbar-thumb { background: var(--soc-border); }

.feed-row {
  display: grid;
  grid-template-columns: 70px 80px 1fr 80px 60px;
  gap: 8px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--soc-border);
  align-items: center;
  transition: background .1s;
}

.feed-row:hover { background: var(--soc-surface-2); }
.feed-row.new { animation: fadeIn .4s; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }

/* ── Charts Placeholder ─────────────────────────────── */
.chart-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--soc-text-dim);
  font-size: 12px;
  border: 1px dashed var(--soc-border);
  border-radius: 6px;
}

/* ── Tabs ───────────────────────────────────────────── */
.soc-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--soc-border);
  margin-bottom: 16px;
}

.soc-tab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--soc-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .12s;
  text-decoration: none;
}

.soc-tab:hover { color: var(--soc-text); text-decoration: none; }

.soc-tab.active {
  color: var(--soc-accent);
  border-bottom-color: var(--soc-accent);
}

/* ── Alerts ─────────────────────────────────────────── */
.soc-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.soc-alert.error {
  background: var(--soc-critical-bg);
  border-color: rgba(248,81,73,.3);
  color: var(--soc-critical);
}

.soc-alert.warning {
  background: var(--soc-high-bg);
  border-color: rgba(227,179,65,.3);
  color: var(--soc-high);
}

.soc-alert.info {
  background: var(--soc-low-bg);
  border-color: rgba(56,139,253,.3);
  color: var(--soc-accent);
}

/* ── Pagination ─────────────────────────────────────── */
.soc-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 12px 0;
}

.soc-pager a, .soc-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--soc-border);
  border-radius: 5px;
  font-size: 12px;
  text-decoration: none;
  color: var(--soc-text-muted);
  transition: background .1s;
}

.soc-pager a:hover { background: var(--soc-surface-2); color: var(--soc-text); }
.soc-pager .current { background: var(--soc-accent); border-color: var(--soc-accent); color: #fff; }

/* ── Topbar Controls ────────────────────────────────── */
.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--soc-border);
  background: transparent;
  color: var(--soc-text-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
  text-decoration: none;
  font-size: 15px;
}

.topbar-btn:hover { background: var(--soc-surface-2); color: var(--soc-text); }

.topbar-tenant {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--soc-accent-dim);
  color: var(--soc-accent);
  letter-spacing: .3px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--soc-text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--soc-border);
  text-decoration: none;
}

.topbar-user:hover { background: var(--soc-surface-2); color: var(--soc-text); }

.avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--soc-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Investigation Job Indicator (top-bar) ──────────── */
.job-indicator-wrap { position: relative; }

.job-indicator-badge {
  position: absolute; top: -4px; right: -4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--soc-surface);
}
.job-indicator-badge.queued    { background: #d29922; }
.job-indicator-badge.running   { background: var(--soc-accent); }
.job-indicator-badge.done      { background: var(--soc-ok); }
.job-indicator-badge.cancelled { background: var(--soc-critical); }

#job-indicator-btn.job-running #job-indicator-icon {
  color: var(--soc-accent);
  display: inline-block;
  animation: pulse 1.4s ease-in-out infinite;
}
#job-indicator-btn.job-queued  #job-indicator-icon { color: #d29922; }
#job-indicator-btn.job-done    #job-indicator-icon { color: var(--soc-ok); }
@media (prefers-reduced-motion: reduce) {
  #job-indicator-btn.job-running #job-indicator-icon { animation: none; }
}

.job-indicator-panel {
  position: absolute; top: 40px; right: 0;
  width: 320px; max-height: 420px;
  overflow-y: auto;
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 1000;
  padding: 10px;
}
.job-indicator-panel-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--soc-text-muted);
  padding: 2px 4px 8px;
  border-bottom: 1px solid var(--soc-border);
  margin-bottom: 6px;
}
.job-indicator-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--soc-border);
  font-size: 12px;
}
.job-indicator-row:last-child { border-bottom: none; }
.job-indicator-row.clickable { cursor: pointer; }
.job-indicator-row.clickable:hover { background: var(--soc-hover, rgba(255,255,255,.04)); }
.job-indicator-row .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.job-indicator-row .dot.pending, .job-indicator-row .dot.queued { background: #d29922; }
.job-indicator-row .dot.running   { background: var(--soc-accent); animation: pulse 1.4s ease-in-out infinite; }
.job-indicator-row .dot.completed { background: var(--soc-ok); }
.job-indicator-row .dot.failed, .job-indicator-row .dot.cancelled { background: var(--soc-critical); }
.job-indicator-row .job-indicator-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.job-indicator-row .job-title {
  color: var(--soc-text); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-indicator-row .stage { color: var(--soc-text-muted); }
.job-indicator-row .cancel-link {
  color: var(--soc-critical); cursor: pointer; font-size: 11px; text-decoration: underline;
  background: none; border: none; padding: 0;
}
.job-indicator-empty { padding: 14px 4px; color: var(--soc-text-muted); font-size: 12px; text-align: center; }

/* ── Job-completion toasts (bottom-right, any page) ─────────────────── */
.job-toast-container {
  position: fixed; right: 16px; bottom: 16px; z-index: 2000;
  display: flex; flex-direction: column-reverse; gap: 8px;
  max-width: 340px;
}
.job-toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--soc-panel, #1c2128);
  border: 1px solid var(--soc-border);
  border-left: 3px solid var(--soc-ok);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  animation: job-toast-in .18s ease-out;
  cursor: pointer;
}
.job-toast.failed, .job-toast.cancelled { border-left-color: var(--soc-critical); }
.job-toast .job-toast-icon { font-size: 15px; line-height: 1.3; flex-shrink: 0; }
.job-toast .job-toast-body { flex: 1; min-width: 0; }
.job-toast .job-toast-title {
  font-size: 12px; font-weight: 700; color: var(--soc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-toast .job-toast-msg { font-size: 11px; color: var(--soc-text-muted); margin-top: 2px; }
.job-toast .job-toast-close {
  background: none; border: none; color: var(--soc-text-muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 0 0 4px; flex-shrink: 0;
}
.job-toast .job-toast-close:hover { color: var(--soc-text); }
@keyframes job-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Health Indicator ───────────────────────────────── */
.health-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--soc-ok);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── Code / Raw Data ────────────────────────────────── */
.raw-data {
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  border-radius: 6px;
  padding: 12px;
  font-family: var(--soc-mono);
  font-size: 11.5px;
  color: var(--soc-text-muted);
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre;
}

/* ── Utilities ──────────────────────────────────────── */
.text-critical { color: var(--soc-critical) !important; }
.text-high     { color: var(--soc-high) !important; }
.text-medium   { color: var(--soc-medium) !important; }
.text-low      { color: var(--soc-low) !important; }
.text-ok       { color: var(--soc-ok) !important; }
.text-muted    { color: var(--soc-text-muted) !important; }
.text-dim      { color: var(--soc-text-dim) !important; }

.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.ai-center { align-items: center; }
.jc-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-11  { font-size: 11px; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --soc-sidebar-w: 52px; }
  .soc-nav a span { display: none; }
  .soc-nav-section { display: none; }
  .soc-nav-group.collapsed { display: block; }
  .soc-topbar .brand-name { display: none; }
}

/* ── License module lock ─────────────────────────────── */
.soc-nav a.nav-locked {
  opacity: 0.45;
  pointer-events: auto;
  cursor: not-allowed;
}
.soc-nav a.nav-locked:hover {
  opacity: 0.6;
  background: none;
}
.nav-lock-icon {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.8;
}
