:root {
  --bg: #edf2f7;
  --bg-soft: #ffffff;
  --bg-panel: #0f172a;
  --card: rgba(255, 255, 255, 0.96);
  --card-muted: #f8fafc;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #102033;
  --muted: #526277;
  --muted-strong: #314154;

  --cyan: #0f9db6;
  --blue: #295fd6;
  --purple: #5b58d6;
  --indigo: #384fc5;
  --amber: #c58817;
  --green: #128164;
  --red: #d64b4b;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 28px 60px rgba(15, 23, 42, 0.14);

  /* Status colors */
  --status-queued: #2563eb;
  --status-running: #06b6d4;
  --status-completed: #10b981;
  --status-failed: #ef4444;
  --status-cancelled: #64748b;
  --status-blocked: #ef4444;
  --status-review: #f59e0b;
  --status-picked-up: #7c3aed;
  --status-needs-review: #f59e0b;
  --status-completed-with-gaps: #0ea5e9;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(41, 95, 214, 0.08), transparent 34%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
}
body { min-height: 100vh; }
a { color: inherit; }

.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(180deg, #111b2d 0%, #0f172a 100%);
  color: #e5eefc;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}
.brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.brand-badge {
  width: 44px; height: 44px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(86, 108, 255, 0.98), rgba(16, 185, 129, 0.8));
  box-shadow: 0 12px 28px rgba(3, 10, 24, 0.42);
  font-weight: 800;
}
.brand h1 { font-size: 1rem; margin: 0; color: #f8fbff; }
.brand p { margin: 2px 0 0; color: rgba(226, 232, 240, 0.74); font-size: 0.85rem; }

.nav-list { display: flex; flex-direction: column; gap: 10px; }
.nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(41,95,214,0.2), rgba(15,157,182,0.12));
  border-color: rgba(125, 164, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 10px 30px rgba(3, 10, 24, 0.24);
}
.nav-btn .title { font-weight: 600; display: block; }
.nav-btn .desc { font-size: 0.82rem; color: rgba(226, 232, 240, 0.64); display: block; margin-top: 2px; }

.sidebar-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
}

.main { padding: 30px; }
.page { display: none; animation: fadeIn 0.24s ease; }
.page.active { display: block; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.page-header h2 { margin: 0; font-size: 1.9rem; letter-spacing: -0.02em; }
.page-header p { margin: 8px 0 0; color: var(--muted); max-width: 780px; line-height: 1.5; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08); color: var(--muted-strong);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  font-size: 0.85rem;
}
.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 4px rgba(18,129,100,0.12); }

/* Status pills */
.status-pill.status-queued .dot { background: var(--status-queued); }
.status-pill.status-running .dot { background: var(--status-running); }
.status-pill.status-picked_up .dot,
.status-pill.status-picked-up .dot { background: var(--status-picked-up); }
.status-pill.status-completed .dot { background: var(--status-completed); }
.status-pill.status-completed_with_gaps .dot,
.status-pill.status-completed-with-gaps .dot { background: var(--status-completed-with-gaps); }
.status-pill.status-failed .dot { background: var(--status-failed); }
.status-pill.status-cancelled .dot { background: var(--status-cancelled); }
.status-pill.status-review .dot,
.status-pill.status-needs_review .dot,
.status-pill.status-needs-review .dot { background: var(--status-needs-review); }
.status-pill.status-blocked .dot { background: var(--status-blocked); }
.status-pill.status-open .dot { background: var(--amber); }
.status-pill.status-resolved .dot,
.status-pill.status-closed .dot,
.status-pill.status-done .dot { background: var(--green); }

.grid { display: grid; gap: 18px; }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  opacity: 0.95;
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56,79,197,0.24);
  box-shadow: var(--shadow-strong);
}
.card h3, .card h4 { margin: 0 0 10px; }
.card-subtle { color: var(--muted); font-size: 0.9rem; }
.metric { font-size: 2.1rem; font-weight: 800; margin: 12px 0 4px; letter-spacing: -0.03em; }
.metric-label { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* Improve label/input spacing inside filter cards */
.card label span.small { display: block; margin-bottom: 10px; }
.card label input, .card label select { margin-top: 2px; }

.kv-list { display: grid; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(15,23,42,0.06); padding-top: 10px; }
.kv-row:first-child { border-top: 0; padding-top: 0; }
.kv-key { color: var(--muted); }
.kv-val { text-align: right; word-break: break-word; color: var(--muted-strong); font-weight: 600; }

.feed { display: grid; gap: 12px; }
.feed-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(248,250,252,0.95), rgba(255,255,255,0.95));
}
.feed-item .meta { color: var(--muted); font-size: 0.84rem; margin-top: 6px; }

.role-group { margin-top: 26px; }
.role-group h3 { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; }
.role-card .role { font-weight: 700; }
.role-card .dept { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.role-card .mini { margin-top: 12px; display: grid; gap: 8px; font-size: 0.92rem; }
.role-card .mini span { color: var(--muted); }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.column {
  min-height: 420px; background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15,23,42,0.08); border-radius: 22px; padding: 16px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  box-shadow: 0 12px 26px rgba(15,23,42,0.05);
}
.column.drag-over {
  border-color: rgba(99,102,241,0.45);
  background: rgba(99,102,241,0.08);
  transform: translateY(-2px);
}
.column h3 { margin: 0 0 14px; font-size: 1rem; }
.task-list { display: grid; gap: 12px; min-height: 80px; }
.task-card {
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,0.98));
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.task-card.dragging {
  opacity: 0.7;
  border-color: rgba(6,182,212,0.5);
}
.task-card .title { font-weight: 700; margin-bottom: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.badge {
  padding: 5px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
  border: 1px solid rgba(148,163,184,0.20);
  background: rgba(148,163,184,0.10);
  color: var(--text);
}

/* Domain badges */
.badge.domain-exec { border-color: rgba(34,211,238,0.35); background: rgba(34,211,238,0.12); }
.badge.domain-platform { border-color: rgba(96,165,250,0.35); background: rgba(96,165,250,0.12); }
.badge.domain-security { border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.12); }
.badge.external { border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.12); }
.badge.review { border-color: rgba(251,113,133,0.35); background: rgba(251,113,133,0.12); }

/* Priority badges */
.badge.priority-urgent { border-color: rgba(251,113,133,0.45); background: rgba(251,113,133,0.14); }
.badge.priority-high { border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.14); }
.badge.priority-normal { border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.14); }
.badge.priority-low { border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.14); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid rgba(15,23,42,0.06); }
th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tr.artifact-row { cursor: pointer; transition: background 0.15s ease; }
tr.artifact-row:hover { background: rgba(15,23,42,0.02); }
.compact-header { margin-bottom: 16px; }
.checkbox-card { display: flex; align-items: center; }
.selected-row { background: rgba(37,99,235,0.08); }
.finding-row { cursor: pointer; }
.finding-row:hover { background: rgba(37,99,235,0.05); }
.finding-detail-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.finding-detail-header h4 { margin:0 0 6px; }
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(41,95,214,0.08);
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.finding-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.finding-meta-line span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: rgba(15,23,42,0.28);
}
.native-close-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.native-close-grid {
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
}
.finding-detail-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.finding-detail-card { padding:16px; }
.detail-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.06);
  color: var(--text);
  line-height: 1.45;
}
.compact-feed-item {
  padding: 12px 13px;
}
.compact-empty {
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.action-cluster {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.action-cluster-label {
  font-weight: 700;
  color: var(--muted-strong);
}
.muted-inline { color: var(--muted); }

.empty {
  border: 1px dashed rgba(15,23,42,0.12);
  border-radius: 16px;
  padding: 20px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.92));
}
.small { font-size: 0.85rem; color: var(--muted); }
.error { color: #fca5a5; }
.good { color: #86efac; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1200px) {
  .grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
}

.task-card { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.task-card:hover { transform: translateY(-2px); border-color: rgba(56,79,197,0.22); box-shadow: var(--shadow-strong); }

.task-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-btn {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.mini-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.10);
}

.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 1000; padding: 20px;
}
.modal-card {
  width: min(860px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.22);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.icon-btn, .primary-btn, .secondary-btn, .danger-btn {
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.icon-btn { background: rgba(15,23,42,0.04); color: var(--text); width: 40px; height: 40px; }
.primary-btn { background: linear-gradient(135deg, #214cc8, #0f9db6); color: white; padding: 10px 15px; border: 0; box-shadow: 0 14px 28px rgba(41,95,214,0.2); }
.secondary-btn { background: rgba(255,255,255,0.88); color: var(--muted-strong); padding: 10px 14px; }
.danger-btn { background: rgba(239,68,68,0.10); color: var(--red); padding: 10px 14px; }
.icon-btn:hover, .primary-btn:hover, .secondary-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 7px; font-size: 0.9rem; color: var(--muted); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  background: rgba(15,23,42,0.03);
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none;
  border-color: rgba(37,99,235,0.35);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.checkbox-row { display: flex !important; align-items: center; gap: 10px; margin-top: 18px; }
.checkbox-row input { width: auto; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.modal-actions-right { display: flex; gap: 10px; }
.integration-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

@media (max-width: 720px) {
  .main { padding: 18px; }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .finding-detail-grid { grid-template-columns: 1fr; }
  .finding-detail-header { flex-direction: column; }
  .detail-status-stack { align-items: flex-start; }
}

.prompt-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

.prompt-output {
  width: 100%;
  background: rgba(248,250,252,0.95);
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 16px;
  padding: 14px;
  font: inherit;
  line-height: 1.45;
}

.task-card-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.mini-btn {
  background: rgba(255,255,255,0.9);
  color: var(--muted-strong);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.mini-btn:hover { border-color: rgba(41,95,214,0.32); background: rgba(41,95,214,0.06); }


.run-requests-grid td { vertical-align: top; }
.rr-main { font-weight: 600; }
.rr-sub { margin-top: 4px; color: var(--muted); }
.rr-meta { margin-top: 8px; color: var(--muted); }
.rr-result { max-width: 340px; line-height: 1.45; color: var(--text); }
.rr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rr-proof-list { margin-top: 8px; display: grid; gap: 4px; color: var(--muted); line-height: 1.4; }
.rr-proof-list strong { color: var(--text); font-weight: 600; }


.primary-btn.is-loading, .secondary-btn.is-loading, .danger-btn.is-loading, .status-pill.is-loading {
  opacity: 0.8;
  cursor: wait !important;
}
.primary-btn:disabled, .secondary-btn:disabled, .danger-btn:disabled, .icon-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}


html, body { width: 100%; overflow-x: hidden; }
.main { min-width: 0; overflow-x: hidden; }
.page-header { flex-wrap: wrap; }
.page-header > div { min-width: 0; }
.grid { min-width: 0; }
.card { min-width: 0; }
input, select, textarea { width: 100%; max-width: 100%; }

#page-tasks .page-header {
  align-items: center;
}

#page-tasks .grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .main { padding: 22px; }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main { padding: 16px; }
  .page-header h2 { font-size: 1.45rem; }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2,
  #page-tasks .grid.cols-4,
  .finding-detail-grid {
    grid-template-columns: 1fr;
  }
  .status-pill { max-width: 100%; }
}


#page-tasks .kanban {
  align-items: start;
  scroll-padding-left: 8px;
}

#page-tasks .column {
  min-width: 260px;
}

#page-tasks .task-card {
  min-width: 0;
}

#page-tasks .task-card .title,
#page-tasks .task-card .small,
#page-tasks .task-card .meta,
#page-tasks .task-card .muted-inline {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1440px) {
  #page-tasks .kanban {
    grid-template-columns: repeat(6, minmax(260px, 1fr));
  }
}

@media (max-width: 980px) {
  #page-tasks .kanban {
    grid-template-columns: repeat(6, minmax(240px, 1fr));
  }
  #page-tasks .column {
    min-width: 240px;
  }
}

@media (max-width: 720px) {
  #page-tasks .kanban {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  #page-tasks .column {
    min-width: 0;
  }
}


.column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.column-head h3 {
  margin: 0;
}
.column-subtitle {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.column-count {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(79,70,229,0.10);
  color: var(--indigo);
  font-weight: 700;
}
.column-inbox { border-top: 3px solid rgba(37,99,235,0.55); }
.column-planned { border-top: 3px solid rgba(6,182,212,0.55); }
.column-in_progress { border-top: 3px solid rgba(124,58,237,0.55); }
.column-review { border-top: 3px solid rgba(245,158,11,0.55); }
.column-blocked { border-top: 3px solid rgba(239,68,68,0.55); }
.column-done { border-top: 3px solid rgba(16,185,129,0.55); }
.task-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.task-card-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}
.task-card-desc {
  line-height: 1.45;
  margin-top: 6px;
}
.task-list .empty {
  padding: 16px;
  font-size: 0.84rem;
}


#page-tasks .kanban {
  scroll-snap-type: x proximity;
}

#page-tasks .column {
  scroll-snap-align: start;
}

#page-tasks .column-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
}

.task-card.priority-urgent {
  border-color: rgba(239,68,68,0.28);
  box-shadow: 0 10px 24px rgba(239,68,68,0.08);
}
.task-card.priority-high {
  border-color: rgba(245,158,11,0.24);
}


.task-status-subtle > span {
  color: var(--muted);
}
.task-status-subtle select {
  border-color: rgba(15,23,42,0.08) !important;
  background: rgba(15,23,42,0.02) !important;
}
#task-status-help {
  margin-top: 8px;
}


.is-disabled-soft {
  opacity: 0.72;
}


.task-card-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.task-card-live {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(59,130,246,0.18);
  background: rgba(59,130,246,0.10);
  color: #1d4ed8;
  white-space: nowrap;
}
.task-card-live.queued,
.task-card-live.picked_up,
.task-card-live.running {
  background: rgba(6,182,212,0.10);
  border-color: rgba(6,182,212,0.20);
  color: #0f766e;
}
.task-card-live.needs_review,
.task-card-live.completed_with_gaps {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.22);
  color: #b45309;
}
.task-card-live.failed,
.task-card-live.cancelled {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.18);
  color: #b91c1c;
}
.task-card-live.completed {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.20);
  color: #047857;
}

/* Paperclip-style Org Map */
.org-tree {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
}

.org-executive {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.org-executive-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(79,70,229,0.1));
  border: 2px solid rgba(124,58,237,0.3);
  border-radius: 16px;
  padding: 20px 32px;
  text-align: center;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}

.org-executive-card .role-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}

.org-executive-card .role-dept {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.org-departments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  position: relative;
}

.org-dept-column {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}

.org-dept-column::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 50%;
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  transform: translateX(-50%);
}

.org-dept-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.org-dept-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.org-dept-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.org-dept-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.org-role-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.org-role-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-role-item:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateY(-1px);
}

.org-role-item.active {
  border-color: var(--blue);
  background: rgba(37,99,235,0.05);
}

.org-role-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.org-role-info {
  flex: 1;
  min-width: 0;
}

.org-role-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-role-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
}

.org-role-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-role-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.org-role-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.org-role-status-dot.busy {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.org-role-status-dot.offline {
  background: var(--muted);
}

.org-role-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.org-role-item:hover .org-role-actions {
  opacity: 1;
}

/* Role Detail Panel */
.org-role-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
}

.org-role-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.org-role-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.org-role-detail-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
}

.org-role-detail-info p {
  margin: 0;
  color: var(--muted);
}

.org-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.org-stat-card {
  background: rgba(148,163,184,0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.org-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.org-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tactical redesign overrides */

html,
body {
  background:
    radial-gradient(circle at top, rgba(0, 217, 255, 0.1), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(91, 88, 214, 0.14), transparent 34%),
    linear-gradient(180deg, #05070a 0%, #030508 100%);
  color: #e1e3e6;
  font-family: "Inter", system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(rgba(74, 78, 85, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 78, 85, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 14%, black 18%, transparent 74%);
  opacity: 0.18;
}

body::after {
  background:
    radial-gradient(circle at 50% 16%, rgba(0, 217, 255, 0.1), transparent 24%),
    url("./radar-texture.png") center top / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.08;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(8, 11, 15, 0.94), rgba(5, 7, 10, 0.98)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 28%);
  border-right: 1px solid rgba(74, 78, 85, 0.28);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.brand {
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.95), rgba(91, 88, 214, 0.68));
  color: #030508;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.brand-badge svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  min-width: 0;
}

.brand-overline {
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.brand h1 {
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.brand p {
  color: rgba(225, 227, 230, 0.72);
}

.nav-list {
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  background: rgba(11, 13, 16, 0.2);
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(17, 19, 24, 0.92);
  border-color: rgba(36, 40, 48, 0.96);
}

.nav-btn.active {
  border-left-color: #00d9ff;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(36, 40, 48, 0.96);
  background: rgba(11, 13, 16, 0.95);
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-copy {
  display: block;
  flex: 1;
  min-width: 0;
}

.nav-btn .title {
  color: inherit;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-btn .desc {
  margin-top: 4px;
  color: rgba(225, 227, 230, 0.62);
  font-size: 0.75rem;
  line-height: 1.35;
}

.sidebar-footer-label {
  color: rgba(139, 143, 150, 0.64);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.main {
  background: rgba(11, 13, 16, 0.76);
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(74, 78, 85, 0.28);
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.84);
}

.top-strip-live,
.top-strip-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-strip-live {
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.top-strip-meta {
  color: #8b8f96;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

#top-strip-time {
  color: #e1e3e6;
}

.card,
.column,
.modal-card,
.feed-item,
.empty {
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.96), rgba(17, 19, 24, 0.94));
  border-color: rgba(36, 40, 48, 0.96);
  color: #e1e3e6;
}

.metric-card {
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.4), transparent 68%);
}

.metric,
.card h3,
.card h4,
.page-header h2 {
  color: #f8fbff;
}

.page-header h2 {
  font-family: "Space Grotesk", sans-serif;
}

.small,
.metric-label,
.status-pill,
.top-strip,
#global-status,
th {
  font-family: "JetBrains Mono", monospace;
}

table,
td,
.kv-val {
  color: #e1e3e6;
}

th,
.metric-label,
.small,
.kv-key {
  color: #8b8f96;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  background: rgba(17, 19, 24, 0.96);
  border-color: rgba(36, 40, 48, 0.96);
  color: #e1e3e6;
}

.primary-btn {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.92), rgba(91, 88, 214, 0.72));
  color: #030508;
}

@media (max-width: 720px) {
  .top-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* High-contrast readability pass for the hosted dark dashboard. */
.brand-overline,
.top-strip-live,
.nav-icon {
  color: #67e8f9;
}

.brand h1,
.nav-btn,
.nav-btn .title,
.sidebar-footer-label,
.page-header h2,
.card h3,
.card h4,
.column h3,
.metric,
#top-strip-time {
  color: #f8fafc;
}

.brand p,
.nav-btn .desc,
.page-header p,
.top-strip-meta,
.metric-label,
.card .small,
.column .small,
.feed-item .meta,
.kv-key,
.muted-inline,
.column-subtitle,
th,
.rr-sub,
.rr-meta,
.rr-proof-list,
.org-role-meta,
.org-role-detail-info p,
.org-dept-subtitle,
.org-stat-label {
  color: #dbeafe;
}

.nav-btn {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.18);
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(103, 232, 249, 0.42);
}

.sidebar-footer-label {
  font-weight: 800;
  opacity: 1;
}

#global-status {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.top-strip {
  color: #e0f2fe;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  color: #f8fafc;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.9);
}

input::placeholder,
textarea::placeholder {
  color: #475569;
  opacity: 1;
}

label,
.form-grid label,
.card label span.small,
.checkbox-row span {
  color: #e0f2fe;
}

.task-card {
  color: #0f172a;
}

.task-card .title,
.task-card .small,
.task-card .meta,
.task-card .muted-inline,
.task-card-status,
.task-card-desc {
  color: #334155;
}

.task-card .title {
  color: #0f172a;
}

.empty {
  color: #e0f2fe;
  border-color: rgba(148, 163, 184, 0.36);
}

.task-list .empty {
  background: rgba(15, 23, 42, 0.72);
  color: #e0f2fe;
}

.column-count {
  background: rgba(103, 232, 249, 0.16);
  color: #a5f3fc;
}

/* SecOps Command upgrade: stronger hierarchy, denser analyst panels, clearer data surfaces. */
:root {
  --command-canvas: #030508;
  --command-panel: #0b0d10;
  --command-panel-2: #111827;
  --command-line: rgba(100, 116, 139, 0.36);
  --command-line-strong: rgba(103, 232, 249, 0.38);
  --command-text: #f8fafc;
  --command-subtext: #dbeafe;
  --command-muted: #a8b3c7;
  --command-cyan: #67e8f9;
  --command-amber: #fbbf24;
  --command-red: #fb7185;
  --command-green: #34d399;
}

html,
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.16), transparent 34%),
    radial-gradient(circle at 96% 18%, rgba(251, 191, 36, 0.09), transparent 26%),
    linear-gradient(135deg, #030508 0%, #08111f 44%, #030508 100%);
  color: var(--command-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(103, 232, 249, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), rgba(0,0,0,0.16));
}

.app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: 312px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.98), rgba(11, 13, 16, 0.96)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.14), transparent 32%);
  border-right: 1px solid var(--command-line);
  padding: 24px 18px;
}

.brand {
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.42));
}

.brand-badge {
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 1), rgba(34, 211, 238, 0.58)),
    #67e8f9;
  color: #020617;
}

.brand-overline {
  color: var(--command-cyan);
  text-shadow: 0 0 18px rgba(103, 232, 249, 0.28);
}

.nav-list {
  gap: 9px;
}

.nav-btn {
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.52));
  color: var(--command-text);
}

.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.94));
  border-color: var(--command-line-strong);
  box-shadow: 0 12px 36px rgba(8, 47, 73, 0.34), inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.nav-btn .title {
  font-size: 0.82rem;
  color: #ffffff;
}

.nav-btn .desc {
  color: #dbeafe;
  font-size: 0.77rem;
}

.nav-icon {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(8, 47, 73, 0.42);
  color: var(--command-cyan);
}

.sidebar-footer {
  border-top-color: rgba(100, 116, 139, 0.3);
}

.main {
  padding: 24px;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.72), rgba(2, 6, 23, 0.86));
}

.top-strip {
  min-height: 44px;
  border-color: rgba(103, 232, 249, 0.24);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.28));
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.24);
}

.top-strip-meta,
.page-header p,
.small,
.metric-label,
.column-subtitle,
.kv-key,
.muted-inline {
  color: var(--command-subtext);
}

.page-header {
  padding: 18px 18px 20px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 13, 24, 0.74)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.09), transparent 35%);
}

.page-header h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.45rem);
  letter-spacing: -0.04em;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
}

.status-pill:hover,
.mini-btn:hover {
  border-color: rgba(103, 232, 249, 0.48);
  background: rgba(8, 47, 73, 0.5);
}

.card,
.column,
.modal-card,
.feed-item,
.empty {
  border-radius: 14px;
  border-color: rgba(100, 116, 139, 0.3);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
}

.card h3,
.card h4,
.column h3 {
  letter-spacing: 0.01em;
}

.grid.cols-5,
.grid.cols-4 {
  gap: 14px;
}

.metric-card {
  min-height: 118px;
  border-color: rgba(103, 232, 249, 0.18);
}

.metric-card::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.88), rgba(251, 191, 36, 0.5), transparent);
}

.metric {
  color: var(--command-text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

#finding-summary {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

#finding-summary .card {
  padding: 16px 18px;
  min-height: 112px;
}

#page-findings > .grid.cols-2 {
  grid-template-columns: minmax(680px, 1.35fr) minmax(420px, 0.75fr);
  align-items: start;
}

#page-findings > .grid.cols-2 > .card {
  min-height: 640px;
}

#findings-table .table-wrap {
  max-height: min(76vh, 860px);
  overflow: auto;
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.82);
}

#findings-table table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

#findings-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(3, 7, 18, 0.98);
  color: #bae6fd;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

#findings-table tbody tr {
  background: rgba(15, 23, 42, 0.64);
}

#findings-table tbody tr:nth-child(even) {
  background: rgba(8, 13, 24, 0.74);
}

#findings-table tbody tr:hover,
#findings-table tbody tr.selected-row {
  background: rgba(8, 47, 73, 0.66);
}

#findings-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.22);
  color: #f8fafc;
  vertical-align: top;
}

#findings-table td strong {
  color: #ffffff;
  font-size: 0.95rem;
}

#findings-table td .small {
  color: #cbd5e1;
  line-height: 1.5;
}

#findings-table td:nth-child(1) {
  min-width: 280px;
}

#findings-table td:nth-child(4),
#findings-table td:nth-child(5) {
  min-width: 210px;
}

#findings-table td:nth-child(6) {
  min-width: 180px;
}

.badge,
.task-card-status,
.task-card-live,
.status-pill {
  font-family: "JetBrains Mono", monospace;
}

.badge {
  border-color: rgba(103, 232, 249, 0.28);
  background: rgba(8, 47, 73, 0.34);
  color: #e0f2fe;
}

.badge.priority-urgent,
.badge.priority-critical {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.52);
  background: rgba(127, 29, 29, 0.36);
}

.badge.priority-high {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(120, 53, 15, 0.36);
}

.badge.priority-normal,
.badge.priority-low {
  color: #bae6fd;
  border-color: rgba(103, 232, 249, 0.38);
  background: rgba(8, 47, 73, 0.36);
}

.finding-detail-header,
.finding-detail-card,
.action-cluster,
.native-close-panel {
  border-color: rgba(100, 116, 139, 0.26);
}

.detail-summary {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(100, 116, 139, 0.28);
  color: #f8fafc;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  background: rgba(2, 6, 23, 0.86);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.5);
}

input::placeholder,
textarea::placeholder {
  color: #cbd5e1;
}

select option {
  background: #020617;
  color: #f8fafc;
}

.checkbox-row {
  color: #e0f2fe;
}

.task-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  color: #0f172a;
}

.task-card:hover {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow: 0 22px 42px rgba(8, 47, 73, 0.24);
}

.column-head {
  border-bottom-color: rgba(103, 232, 249, 0.18);
  background: rgba(15, 23, 42, 0.96);
}

.column-count {
  background: rgba(103, 232, 249, 0.2);
  color: #e0f2fe;
}

@media (max-width: 1320px) {
  #page-findings > .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  #page-findings > .grid.cols-2 > .card {
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  #finding-summary {
    grid-template-columns: 1fr;
  }
}

/* Tasks board refinement: consistent, readable command cards. */
#page-tasks .kanban {
  gap: 18px;
  padding: 4px 4px 18px;
}

#page-tasks .column {
  min-width: 292px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.88));
  border-color: rgba(100, 116, 139, 0.34);
}

#page-tasks .column-head {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -2px -2px 0;
  padding: 12px 12px 14px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.58), rgba(15, 23, 42, 0.98));
}

#page-tasks .column-head h3 {
  color: #ffffff;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#page-tasks .column-subtitle {
  color: #cbd5e1;
  font-size: 0.76rem;
  line-height: 1.35;
}

#page-tasks .column-count {
  min-width: 36px;
  height: 36px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  background: rgba(8, 47, 73, 0.74);
  color: #ffffff;
}

#page-tasks .task-list {
  gap: 14px;
  align-content: start;
}

#page-tasks .task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 232px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 4px solid rgba(103, 232, 249, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.96));
  color: #0f172a;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

#page-tasks .task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.92), rgba(103, 232, 249, 0.24));
}

#page-tasks .task-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.68);
  box-shadow: 0 24px 52px rgba(8, 47, 73, 0.38);
}

#page-tasks .task-card.priority-urgent {
  border-left-color: #fb7185;
}

#page-tasks .task-card.priority-urgent::before {
  background: linear-gradient(90deg, #fb7185, rgba(251, 113, 133, 0.18));
}

#page-tasks .task-card.priority-high {
  border-left-color: #fbbf24;
}

#page-tasks .task-card.priority-high::before {
  background: linear-gradient(90deg, #fbbf24, rgba(251, 191, 36, 0.18));
}

#page-tasks .task-card.priority-low {
  border-left-color: #34d399;
}

#page-tasks .task-card.priority-low::before {
  background: linear-gradient(90deg, #34d399, rgba(52, 211, 153, 0.18));
}

#page-tasks .task-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 16px 10px;
  align-items: start;
}

#page-tasks .task-card .title {
  margin: 0;
  color: #0f172a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

#page-tasks .task-card-top-right {
  align-items: flex-end;
  max-width: 112px;
}

#page-tasks .task-card-status,
#page-tasks .task-card-live {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#page-tasks .task-card-desc {
  min-height: 58px;
  margin: 0;
  padding: 0 16px;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#page-tasks .badges {
  min-height: 58px;
  margin: 12px 0 0;
  padding: 0 16px;
  align-content: flex-start;
}

#page-tasks .badge {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.07);
  color: #1e293b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.025em;
}

#page-tasks .badge.domain-exec,
#page-tasks .badge.domain-platform,
#page-tasks .badge.domain-security {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.22);
  color: #075985;
}

#page-tasks .badge.priority-urgent {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
  color: #9f1239;
}

#page-tasks .badge.priority-high {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.34);
  color: #92400e;
}

#page-tasks .badge.priority-normal {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.26);
  color: #1d4ed8;
}

#page-tasks .badge.priority-low {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
  color: #047857;
}

#page-tasks .task-card > .small:not(.task-card-desc) {
  margin-top: auto;
  padding: 12px 16px 0;
  color: #475569;
  font-size: 0.76rem;
}

#page-tasks .task-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.035);
}

#page-tasks .task-card-actions .mini-btn {
  justify-content: center;
  min-height: 34px;
  padding: 7px 8px;
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.69rem;
  line-height: 1.15;
  white-space: normal;
}

#page-tasks .task-card-actions .mini-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

#page-tasks .task-card-actions .mini-btn:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #f8fafc;
}

#page-tasks .task-list .empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-style: solid;
  color: #dbeafe;
  text-align: center;
}

@media (max-width: 980px) {
  #page-tasks .column {
    min-width: 270px;
  }

  #page-tasks .task-card {
    min-height: 210px;
  }
}

/* Kimi-inspired task-card palette correction: no washed-out cards, only signal colors. */
#page-tasks .column {
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.98), rgba(5, 7, 10, 0.96));
  border-color: rgba(36, 40, 48, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 44px rgba(0, 0, 0, 0.32);
}

#page-tasks .column-head {
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
  border-color: rgba(74, 78, 85, 0.58);
}

#page-tasks .column-inbox .column-head,
#page-tasks .column-planned .column-head,
#page-tasks .column-in_progress .column-head {
  box-shadow: inset 3px 0 0 #00d9ff;
}

#page-tasks .column-review .column-head {
  box-shadow: inset 3px 0 0 #ffb627;
}

#page-tasks .column-blocked .column-head {
  box-shadow: inset 3px 0 0 #ff2a2a;
}

#page-tasks .column-done .column-head {
  box-shadow: inset 3px 0 0 #36b37e;
}

#page-tasks .task-card {
  min-height: 224px;
  border: 1px solid rgba(36, 40, 48, 0.96);
  border-left: 3px solid #00d9ff;
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.98));
  color: #e1e3e6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

#page-tasks .task-card::before {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.62), rgba(0, 217, 255, 0.08), transparent);
}

#page-tasks .task-card:hover {
  background:
    linear-gradient(180deg, rgba(26, 29, 35, 0.99), rgba(11, 13, 16, 0.98));
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 217, 255, 0.08);
}

#page-tasks .task-card.priority-urgent {
  border-left-color: #ff2a2a;
}

#page-tasks .task-card.priority-urgent::before {
  background: linear-gradient(90deg, rgba(255, 42, 42, 0.72), rgba(255, 42, 42, 0.1), transparent);
}

#page-tasks .task-card.priority-high {
  border-left-color: #ffb627;
}

#page-tasks .task-card.priority-high::before {
  background: linear-gradient(90deg, rgba(255, 182, 39, 0.72), rgba(255, 182, 39, 0.1), transparent);
}

#page-tasks .task-card.priority-low {
  border-left-color: #36b37e;
}

#page-tasks .task-card.priority-low::before {
  background: linear-gradient(90deg, rgba(54, 179, 126, 0.72), rgba(54, 179, 126, 0.1), transparent);
}

#page-tasks .task-card .title {
  color: #f8fbff;
}

#page-tasks .task-card-desc,
#page-tasks .task-card .small,
#page-tasks .task-card .meta,
#page-tasks .task-card .muted-inline {
  color: #b8c2d6;
}

#page-tasks .task-card > .small:not(.task-card-desc) {
  color: #8b8f96;
}

#page-tasks .task-card-status,
#page-tasks .task-card-live {
  border-color: rgba(74, 78, 85, 0.72);
  background: rgba(3, 5, 8, 0.72);
  color: #e1e3e6;
}

#page-tasks .task-card-live.queued,
#page-tasks .task-card-live.picked_up,
#page-tasks .task-card-live.running {
  border-color: rgba(0, 217, 255, 0.38);
  background: rgba(0, 217, 255, 0.12);
  color: #7ee9ff;
}

#page-tasks .task-card-live.needs_review,
#page-tasks .task-card-live.completed_with_gaps {
  border-color: rgba(255, 182, 39, 0.42);
  background: rgba(255, 182, 39, 0.12);
  color: #ffd166;
}

#page-tasks .task-card-live.failed,
#page-tasks .task-card-live.cancelled {
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(255, 42, 42, 0.12);
  color: #ff8a8a;
}

#page-tasks .task-card-live.completed {
  border-color: rgba(54, 179, 126, 0.42);
  background: rgba(54, 179, 126, 0.12);
  color: #8df0c1;
}

#page-tasks .badge {
  border-color: rgba(74, 78, 85, 0.76);
  background: rgba(5, 7, 10, 0.72);
  color: #cbd5e1;
}

#page-tasks .badge.domain-exec,
#page-tasks .badge.domain-platform,
#page-tasks .badge.domain-security {
  border-color: rgba(0, 217, 255, 0.32);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
}

#page-tasks .badge.external,
#page-tasks .badge.priority-high {
  border-color: rgba(255, 182, 39, 0.38);
  background: rgba(255, 182, 39, 0.12);
  color: #ffd166;
}

#page-tasks .badge.review,
#page-tasks .badge.priority-urgent {
  border-color: rgba(255, 42, 42, 0.38);
  background: rgba(255, 42, 42, 0.12);
  color: #ff9a9a;
}

#page-tasks .badge.priority-normal {
  border-color: rgba(0, 217, 255, 0.32);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
}

#page-tasks .badge.priority-low {
  border-color: rgba(54, 179, 126, 0.38);
  background: rgba(54, 179, 126, 0.12);
  color: #9af2ca;
}

#page-tasks .task-card-actions {
  border-top-color: rgba(74, 78, 85, 0.42);
  background: rgba(3, 5, 8, 0.34);
}

#page-tasks .task-card-actions .mini-btn {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(11, 13, 16, 0.94);
  color: #e1e3e6;
}

#page-tasks .task-card-actions .mini-btn:hover {
  border-color: rgba(0, 217, 255, 0.6);
  background: rgba(0, 217, 255, 0.12);
  color: #ffffff;
}

/* Full-dashboard command surface pass: apply the same readable SecOps Command style everywhere. */
:root {
  --signal-canvas: #030508;
  --signal-panel: #0b0d10;
  --signal-panel-2: #111318;
  --signal-panel-3: #1a1d23;
  --signal-panel-4: #242830;
  --signal-line: rgba(74, 78, 85, 0.72);
  --signal-line-soft: rgba(74, 78, 85, 0.42);
  --signal-line-bright: rgba(0, 217, 255, 0.42);
  --signal-text: #e1e3e6;
  --signal-text-strong: #f8fbff;
  --signal-muted: #b8c2d6;
  --signal-muted-2: #8b8f96;
  --signal-cyan: #00d9ff;
  --signal-cyan-soft: rgba(0, 217, 255, 0.12);
  --signal-amber: #ffb627;
  --signal-amber-soft: rgba(255, 182, 39, 0.14);
  --signal-red: #ff2a2a;
  --signal-red-soft: rgba(255, 42, 42, 0.14);
  --signal-green: #36b37e;
  --signal-green-soft: rgba(54, 179, 126, 0.14);
}

html,
body {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 217, 255, 0.14), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(255, 182, 39, 0.1), transparent 24%),
    radial-gradient(circle at 58% 100%, rgba(54, 179, 126, 0.08), transparent 26%),
    linear-gradient(135deg, var(--signal-canvas) 0%, #070b10 46%, var(--signal-canvas) 100%);
  color: var(--signal-text);
}

body::before {
  background:
    linear-gradient(rgba(0, 217, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 8%, rgba(0, 217, 255, 0.08), transparent 24%);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  opacity: 1;
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 217, 255, 0.08), transparent 24%),
    radial-gradient(circle at 100% 18%, rgba(255, 182, 39, 0.05), transparent 22%);
  mix-blend-mode: screen;
  opacity: 1;
}

.app-shell {
  grid-template-columns: 312px minmax(0, 1fr);
}

.main {
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.78), rgba(3, 5, 8, 0.92));
}

.sidebar {
  background:
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.99), rgba(11, 13, 16, 0.98));
  border-right-color: rgba(74, 78, 85, 0.62);
}

.brand {
  border-color: rgba(0, 217, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.96), rgba(11, 13, 16, 0.78)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 36%);
}

.brand-badge {
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.98), rgba(54, 179, 126, 0.72));
  color: #030508;
}

.brand-overline,
.top-strip-live,
.nav-icon,
.detail-eyebrow {
  color: var(--signal-cyan);
}

.nav-btn {
  border-color: rgba(74, 78, 85, 0.44);
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.9), rgba(11, 13, 16, 0.68));
}

.nav-btn:hover,
.nav-btn.active {
  border-color: rgba(0, 217, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(17, 19, 24, 0.98));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), inset 2px 0 0 var(--signal-cyan);
}

.nav-btn .title,
.brand h1,
.page-header h2,
.card h3,
.card h4,
.column h3,
.metric,
table strong,
.feed-item strong,
.action-cluster-label,
.kv-val,
.rr-proof-list strong,
label,
.form-grid label {
  color: var(--signal-text-strong);
}

.brand p,
.nav-btn .desc,
.page-header p,
.small,
.metric-label,
.feed-item .meta,
.kv-key,
.muted-inline,
.column-subtitle,
.rr-sub,
.rr-meta,
.rr-proof-list,
.org-role-meta,
.org-role-detail-info p,
.org-dept-subtitle,
.org-stat-label,
th {
  color: var(--signal-muted);
}

.top-strip,
.page-header,
.card,
.column,
.modal-card,
.feed-item,
.empty,
.table-wrap,
.detail-summary,
.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn,
.prompt-output {
  border-color: var(--signal-line-soft);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
  color: var(--signal-text);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3);
}

.page-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.98), rgba(5, 7, 10, 0.9)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 36%);
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.72), rgba(255, 182, 39, 0.34), transparent);
}

.top-strip {
  border-color: rgba(0, 217, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(17, 19, 24, 0.96), rgba(0, 217, 255, 0.08), rgba(17, 19, 24, 0.9));
}

.top-strip-meta,
#global-status {
  color: var(--signal-text);
}

#global-status {
  border-color: rgba(0, 217, 255, 0.26);
  background: rgba(3, 5, 8, 0.72);
}

.dot {
  background: var(--signal-green);
  box-shadow: 0 0 0 4px rgba(54, 179, 126, 0.14), 0 0 18px rgba(54, 179, 126, 0.32);
}

.status-pill {
  min-height: 38px;
  border-color: rgba(0, 217, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(3, 5, 8, 0.82));
}

.status-pill:hover,
.mini-btn:hover,
.secondary-btn:hover,
.icon-btn:hover {
  border-color: rgba(0, 217, 255, 0.58);
  background: rgba(0, 217, 255, 0.12);
  color: #ffffff;
}

.primary-btn {
  border: 1px solid rgba(0, 217, 255, 0.55);
  background: linear-gradient(135deg, var(--signal-cyan), rgba(54, 179, 126, 0.86));
  color: #030508;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(0, 217, 255, 0.16);
}

.danger-btn {
  border-color: rgba(255, 42, 42, 0.46);
  background: rgba(255, 42, 42, 0.12);
  color: #ff9a9a;
}

.mini-btn {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(11, 13, 16, 0.94);
  color: var(--signal-text);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.01em;
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before,
.feed-item::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.36), rgba(0, 217, 255, 0.06), transparent);
  pointer-events: none;
}

.metric-card,
#mission-stats .card,
#finding-summary .card,
#integration-summary .card {
  min-height: 126px;
  border-color: rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.96));
}

.metric-card:hover,
#mission-stats .card:hover,
#finding-summary .card:hover,
#integration-summary .card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 217, 255, 0.46);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(0, 217, 255, 0.08);
}

.metric-card::before,
#mission-stats .card::before,
#finding-summary .card::before,
#integration-summary .card::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.82), rgba(255, 182, 39, 0.42), transparent);
}

.metric {
  color: var(--signal-text-strong);
  text-shadow: 0 0 24px rgba(0, 217, 255, 0.12);
}

#mission-overview {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#mission-events,
#mission-runs {
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.feed-item {
  position: relative;
  border-left-color: var(--signal-cyan);
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.98), rgba(17, 19, 24, 0.94));
}

.compact-feed-item {
  border-radius: 12px;
  margin-bottom: 10px;
}

.empty,
.compact-empty {
  border-style: dashed;
  border-color: rgba(0, 217, 255, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(0, 217, 255, 0.035) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, rgba(11, 13, 16, 0.94), rgba(17, 19, 24, 0.9));
  color: var(--signal-muted);
}

.kv-list {
  gap: 8px;
}

.kv-row {
  align-items: flex-start;
  border-top-color: rgba(74, 78, 85, 0.34);
  padding: 10px 0 0;
}

.kv-key {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.kv-val {
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.detail-eyebrow {
  border: 1px solid rgba(0, 217, 255, 0.26);
  background: rgba(0, 217, 255, 0.1);
  font-family: "JetBrains Mono", monospace;
}

.finding-detail-header {
  padding: 14px;
  border: 1px solid rgba(74, 78, 85, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.96), rgba(3, 5, 8, 0.8));
}

.finding-meta-line {
  color: var(--signal-muted);
}

.finding-meta-line span:not(:last-child)::after {
  color: rgba(0, 217, 255, 0.34);
}

.detail-status-stack {
  min-width: 160px;
}

.finding-detail-grid {
  gap: 14px;
}

.finding-detail-card {
  border-color: rgba(74, 78, 85, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
}

.detail-summary {
  border-color: rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.86), rgba(11, 13, 16, 0.72));
  color: var(--signal-text);
}

.action-cluster,
.native-close-panel {
  border-top-color: rgba(0, 217, 255, 0.18);
}

.native-close-grid {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

#finding-summary,
#integration-summary,
#mission-stats {
  grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
}

#page-findings > .grid.cols-2 {
  grid-template-columns: minmax(680px, 1.25fr) minmax(430px, 0.75fr);
  align-items: start;
}

#page-findings > .grid.cols-2 > .card,
#page-integrations > .card,
#mission-overview > .card,
#page-mission-control > .grid.cols-2 > .card {
  border-color: rgba(74, 78, 85, 0.48);
}

#page-findings > .grid.cols-2 > .card > h3,
#page-integrations > .card h3,
#mission-overview > .card h3,
#page-mission-control > .grid.cols-2 > .card h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

#page-findings > .grid.cols-2 > .card > h3::before,
#page-integrations > .card h3::before,
#mission-overview > .card h3::before,
#page-mission-control > .grid.cols-2 > .card h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--signal-cyan);
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.48);
}

.table-wrap,
#findings-table .table-wrap,
#run-requests-table .table-wrap,
#native-sessions-table .table-wrap,
#routes-table .table-wrap {
  overflow: auto;
  border: 1px solid rgba(74, 78, 85, 0.54);
  border-radius: 14px;
  background: rgba(3, 5, 8, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 46px rgba(0, 0, 0, 0.28);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
  background: rgba(3, 5, 8, 0.98);
  color: #9ff2ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

td {
  border-bottom-color: rgba(74, 78, 85, 0.28);
  color: var(--signal-text);
  vertical-align: top;
}

tbody tr {
  background: rgba(17, 19, 24, 0.68);
}

tbody tr:nth-child(even) {
  background: rgba(11, 13, 16, 0.82);
}

tbody tr:hover,
.finding-row:hover,
.selected-row {
  background: rgba(0, 217, 255, 0.1);
}

td .small,
td .muted-inline,
.rr-result {
  color: var(--signal-muted);
  line-height: 1.5;
}

#findings-table table,
#run-requests-table table,
#native-sessions-table table,
#routes-table table {
  min-width: 940px;
}

#findings-table .task-card-actions,
#run-requests-table .task-card-actions,
#native-sessions-table .task-card-actions,
#native-session-detail .task-card-actions,
#intel-summary .task-card-actions {
  gap: 7px;
  align-items: center;
}

#findings-table .mini-btn,
#run-requests-table .mini-btn,
#native-sessions-table .mini-btn,
#native-session-detail .mini-btn,
#intel-summary .mini-btn {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  white-space: normal;
}

#integration-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#integration-summary .card:nth-child(3),
#integration-summary .card:nth-child(6) {
  border-color: rgba(255, 182, 39, 0.28);
}

#integration-summary .card:nth-child(3)::before,
#integration-summary .card:nth-child(6)::before {
  background: linear-gradient(90deg, rgba(255, 182, 39, 0.76), rgba(255, 182, 39, 0.08), transparent);
}

#integration-config {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#integration-config .card {
  min-height: 278px;
}

#native-session-detail > .finding-detail-card {
  padding: 0;
}

#native-session-detail > .finding-detail-card > .finding-detail-header {
  margin-bottom: 14px;
}

#native-session-detail .finding-detail-grid,
#intel-summary .finding-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#intel-summary > .finding-detail-header {
  margin-bottom: 14px;
}

#intel-summary .card[style],
#native-session-detail .card[style] {
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.96)) !important;
  border-color: rgba(74, 78, 85, 0.46) !important;
}

.badge {
  border-color: rgba(0, 217, 255, 0.28);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
  font-family: "JetBrains Mono", monospace;
}

.badge.priority-urgent,
.badge.priority-critical,
.status-pill.status-failed,
.status-pill.status-blocked {
  border-color: rgba(255, 42, 42, 0.42);
  background: var(--signal-red-soft);
  color: #ff9a9a;
}

.badge.priority-high,
.status-pill.status-review,
.status-pill.status-needs_review,
.status-pill.status-needs-review,
.status-pill.status-open {
  border-color: rgba(255, 182, 39, 0.42);
  background: var(--signal-amber-soft);
  color: #ffd166;
}

.status-pill.status-completed,
.status-pill.status-completed_with_gaps,
.status-pill.status-completed-with-gaps,
.status-pill.status-resolved,
.status-pill.status-closed,
.status-pill.status-done {
  border-color: rgba(54, 179, 126, 0.42);
  background: var(--signal-green-soft);
  color: #9af2ca;
}

.status-pill.status-queued,
.status-pill.status-running,
.status-pill.status-picked_up,
.status-pill.status-picked-up,
.badge.priority-normal,
.badge.priority-low {
  border-color: rgba(0, 217, 255, 0.36);
  background: var(--signal-cyan-soft);
  color: #9ff2ff;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(3, 5, 8, 0.86);
  color: var(--signal-text-strong);
  caret-color: var(--signal-cyan);
}

input:focus,
select:focus,
textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.prompt-output:focus {
  outline: none;
  border-color: rgba(0, 217, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--signal-muted-2);
}

select option {
  background: #030508;
  color: var(--signal-text-strong);
}

label span,
.form-grid label span,
.card label span.small,
.checkbox-row span {
  color: var(--signal-muted);
}

.modal {
  background:
    radial-gradient(circle at top, rgba(0, 217, 255, 0.14), transparent 36%),
    rgba(3, 5, 8, 0.76);
}

.modal-card {
  position: relative;
  border-color: rgba(0, 217, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(5, 7, 10, 0.98));
}

.modal-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(74, 78, 85, 0.38);
}

.modal-head h3 {
  color: var(--signal-text-strong);
}

.form-grid {
  gap: 16px;
}

.modal-actions {
  padding-top: 16px;
  border-top: 1px solid rgba(74, 78, 85, 0.32);
}

.prompt-output {
  min-height: 260px;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.55;
}

.checkbox-row input {
  accent-color: var(--signal-cyan);
}

#page-tasks .grid.cols-4 .card,
#page-tasks .small + .grid.cols-4 .card {
  min-height: 108px;
}

#page-tasks > .small,
#page-tasks .small[style*="margin-top:14px"] {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 12px;
  background: rgba(3, 5, 8, 0.42);
  color: var(--signal-muted);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 5, 8, 0.86);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(3, 5, 8, 0.86);
  border-radius: 999px;
  background: rgba(0, 217, 255, 0.38);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 217, 255, 0.62);
}

@media (max-width: 1320px) {
  #page-findings > .grid.cols-2,
  #native-session-detail .finding-detail-grid,
  #intel-summary .finding-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .page-header {
    padding: 16px;
  }

  .nav-list,
  #finding-summary,
  #integration-summary,
  #mission-stats,
  #integration-config,
  .native-close-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  #findings-table .table-wrap,
  #run-requests-table .table-wrap,
  #native-sessions-table .table-wrap,
  #routes-table .table-wrap {
    max-width: calc(100vw - 28px);
  }

  .modal-actions,
  .modal-actions-right {
    align-items: stretch;
    flex-direction: column;
  }
}
