/* ==========================================================================
   Syntrace Incident War Room & Split Workbench Styles
   Layout Archetype: Split Incident Workbench & Causality Graph
   ========================================================================== */

.warroom-hero {
  background-color: var(--canvas-bg);
  padding: 24px 0 52px 0;
  border-bottom: 1px solid var(--border-light);
}

.warroom-frame {
  background: #0B0F19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: #F8FAFC;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(9, 13, 22, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Incident Top Header */
.warroom-header {
  background: #070A12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.incident-badge-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.incident-title {
  color: #F1F5F9;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.incident-meta {
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.74rem;
}

/* Telemetry Stats Bar with Live Mini Sparklines */
.warroom-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0E1424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-cell {
  padding: 14px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-cell:last-child {
  border-right: none;
}

.stat-cell-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-cell-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #F8FAFC;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.val-failing {
  color: #FB7185 !important;
  text-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.val-remediated {
  color: #34D399 !important;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

/* Interactive Workbench Navigation Tabs */
.workbench-tabs-bar {
  background: #090D18;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workbench-tabs {
  display: flex;
  gap: 4px;
}

.wb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.wb-tab:hover {
  color: #F8FAFC;
}

.wb-tab.active {
  color: #F8FAFC;
  border-bottom-color: #38BDF8;
}

/* Split Workbench: 2-Column War Room Interface */
.warroom-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 520px;
}

/* Left Panel: Causality & eBPF Telemetry */
.workbench-left {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.workbench-panel-header {
  padding: 10px 18px;
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.causality-tree {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0B0F19;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.causality-node {
  background: #131B2E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.causality-node.node-failing {
  border-color: #F43F5E;
  background: rgba(244, 63, 94, 0.12);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.15);
}

.causality-node.node-ok {
  border-color: rgba(255, 255, 255, 0.08);
}

.node-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.node-metrics {
  color: #94A3B8;
  font-size: 0.72rem;
}

/* Service Mesh Topology Interactive View */
.mesh-topology-view {
  display: none;
  padding: 20px;
  background: #0B0F19;
  flex-direction: column;
  gap: 16px;
}

.mesh-topology-view.active {
  display: flex;
}

.topology-cluster-box {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #080C16;
}

/* Live Terminal Log Stream */
.terminal-stream {
  padding: 14px 18px;
  background: #050811;
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.65;
  color: #94A3B8;
  max-height: 240px;
}

.log-line {
  display: flex;
  gap: 12px;
}

.log-time {
  color: #475569;
  flex-shrink: 0;
}

.log-err {
  color: #FB7185;
}

.log-warn {
  color: #FBBF24;
}

.log-info {
  color: #38BDF8;
}

.log-success {
  color: #34D399;
}

/* Right Panel: AST Git Diff & Automated Remediation */
.workbench-right {
  display: flex;
  flex-direction: column;
  background: #0B0F19;
}

.diff-viewer {
  padding: 16px 18px;
  flex: 1;
  background: #070B14;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.6;
  overflow-x: auto;
}

.diff-header {
  color: #94A3B8;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diff-line-del {
  background: rgba(244, 63, 94, 0.18);
  color: #FECDD3;
  display: block;
  padding: 2px 8px;
  border-left: 2px solid #F43F5E;
}

.diff-line-add {
  background: rgba(16, 185, 129, 0.18);
  color: #A7F3D0;
  display: block;
  padding: 2px 8px;
  border-left: 2px solid #10B981;
}

.diff-line-ctx {
  color: #64748B;
  display: block;
  padding: 2px 8px;
}

/* Remediation Action Box at Bottom of Right Panel */
.remediation-box {
  padding: 18px 22px;
  background: #0E1526;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.remediation-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remediation-details {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.5;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive Workbench */
@media (max-width: 960px) {
  .warroom-split {
    grid-template-columns: 1fr;
  }
  .workbench-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .warroom-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-cell:nth-child(2) {
    border-right: none;
  }
}
