/* ==========================================================================
   RADAR Intelligence Platform — Design System
   Design Language: Precision Dark UI / Enterprise Tooling
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surface Hierarchy */
  --surface-void:      #060810;
  --surface-base:      #0b0f1a;
  --surface-raised:    #111827;
  --surface-overlay:   #1a2236;
  --surface-subtle:    rgba(255, 255, 255, 0.03);

  /* Primary Accent — Indigo */
  --accent-primary:    #6366f1;
  --accent-primary-dim: rgba(99, 102, 241, 0.15);
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  --accent-primary-border: rgba(99, 102, 241, 0.3);

  /* Semantic Status */
  --status-idle:      #334155;
  --status-active:    #3b82f6;
  --status-active-bg: rgba(59, 130, 246, 0.1);
  --status-active-glow: rgba(59, 130, 246, 0.3);
  --status-success:   #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.1);
  --status-warning:   #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.08);
  --status-critical:  #ef4444;
  --status-critical-bg: rgba(239, 68, 68, 0.08);
  --status-rejection: #ec4899;
  --status-rejection-bg: rgba(236, 72, 153, 0.08);

  /* Supervisor Tiers */
  --tier-auditor:     #a78bfa;
  --tier-auditor-bg:  rgba(167, 139, 250, 0.08);
  --tier-ceo:         #f59e0b;
  --tier-ceo-bg:      rgba(245, 158, 11, 0.08);

  /* Typography */
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Cascadia Code', monospace;

  /* Text Scale */
  --text-muted:   #475569;
  --text-dim:     #64748b;
  --text-body:    #94a3b8;
  --text-default: #cbd5e1;
  --text-strong:  #e2e8f0;
  --text-white:   #f8fafc;

  /* Border */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-base:   rgba(255, 255, 255, 0.07);
  --border-raised: rgba(255, 255, 255, 0.1);

  /* Layout */
  --sidebar-w:    300px;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Transition */
  --t-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:  250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:  400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--surface-void);
  color: var(--text-default);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

.mono { font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   Application Shell
   -------------------------------------------------------------------------- */
.shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  padding: 10px;
  gap: 10px;
  box-sizing: border-box;
  background: var(--surface-void);
}

/* ── Fixed Sidebar Layout (Permanently Expanded) ── */
:root {
  --sidebar-w: 260px;
}

.control-plane {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-base) transparent;
  position: relative;
  z-index: 100;
}

.control-plane::-webkit-scrollbar { width: 4px; }
.control-plane::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 2px; }

/* Brand styling */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  height: 73px;
}

.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }

.brand-text {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-white);
}

.brand-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Panel Groups */
.panel-group {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-group-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  white-space: nowrap;
}

.panel-group-label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-dim);
  fill: currentColor;
}

.panel-label-text {
  opacity: 1;
}

/* Fields styling */
.field-stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }

.field-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  white-space: nowrap;
  height: 16px;
}

.field-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-dim);
}

.field-icon path,
.field-icon svg {
  fill: currentColor !important;
  stroke: currentColor;
}

.field-label-text {
  opacity: 1;
  visibility: visible;
}

.field-input,
.field-select {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-default);
  font-size: 12px;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  appearance: none;
}

.field-input.mono { font-family: var(--font-mono); font-size: 11px; }
.field-input::placeholder { color: var(--text-muted); }

.field-input:focus,
.field-select:focus {
  border-color: var(--accent-primary-border);
  box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

/* Execute Button */
.execute-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 4px 12px var(--accent-primary-glow);
  overflow: hidden;
  height: 38px;
  white-space: nowrap;
}


.execute-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.execute-btn svg { width: 12px; height: 12px; }

/* Agent Rows */
.agent-row {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--t-base);
}

.agent-row.active { border-color: var(--status-active); }
.agent-row.success { border-color: var(--status-success); }
.agent-row.rejected { border-color: var(--status-rejection); }

.agent-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-monogram {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--surface-overlay);
  border: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-body);
  font-family: var(--font-mono);
}

.agent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.agent-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.agent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-dot.idle    { background: var(--status-idle); }
.agent-dot.active  { background: var(--status-success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); animation: pulse-dot 1.2s ease-in-out infinite; }
.agent-dot.success { background: var(--status-success); }
.agent-dot.rejected{ background: var(--status-rejection); }

/* --------------------------------------------------------------------------
   Workspace
   -------------------------------------------------------------------------- */
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 600px 400px at 80% 10%, rgba(99, 102, 241, 0.04) 0%, transparent 70%),
    var(--surface-void);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

/* ─── Topbar: Two-Row Navigation Header ─── */
.topbar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 50;
}

/* Row 1 — Brand title + Controls */
.topbar-row {
  display: flex;
  align-items: center;
}

.topbar-row--top {
  justify-content: space-between;
  height: 44px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

/* Row 2 — Nav Tabs */
.topbar-row--nav {
  justify-content: space-between;
  height: 42px;
  padding: 0 20px 0 16px;
}

/* Brand Title */
.topbar-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-body);
}

/* Controls cluster */
.topbar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-control-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Vertical divider */
.topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-base);
}

/* Custom Select Wrapper with Chevron */
.select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-60%) rotate(45deg);
  width: 4px;
  height: 4px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  pointer-events: none;
  transition: border-color var(--t-fast);
}
.select-wrapper:hover::after { border-color: var(--text-strong); }

/* Selects inside topbar */
.topbar-select {
  height: 28px;
  background: var(--surface-raised);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-md);
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: all var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#select-lang {
  width: 68px;
  padding: 0 24px 0 10px;
}

#select-campaign {
  width: 220px;
  padding: 0 28px 0 10px;
  text-overflow: ellipsis;
}

.topbar-select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--surface-overlay);
}

.topbar-select:focus {
  border-color: var(--accent-primary);
  background: var(--surface-overlay);
  box-shadow: 0 0 0 2px var(--accent-primary-dim);
}

/* Status Capsule */
.status-capsule {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-base);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
  transition: all var(--t-base);
}

.status-capsule.running {
  background: var(--status-active-bg);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--status-active);
}

.status-capsule.done {
  background: var(--status-success-bg);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--status-success);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-success);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.status-capsule.running .status-dot { background: var(--status-active); animation: pulse-dot 1.2s ease-in-out infinite; }
.status-capsule.done .status-dot    { background: var(--status-success); }
.status-capsule.idle .status-dot    { background: var(--status-success); }



/* Pipeline Rail */
.pipeline-rail {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-base) transparent;
}

.pipeline-nodes {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}

.p-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  width: 240px;
  min-width: 240px;
  height: 56px !important;
  min-height: 56px !important;
  box-sizing: border-box;
  transition: all var(--t-base);
  position: relative;
}

.p-node.processing {
  border-color: var(--status-active);
  background: var(--status-active-bg);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.p-node.done {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--status-success-bg);
}

.p-node.rejected {
  border-color: rgba(236, 72, 153, 0.3);
  background: var(--status-rejection-bg);
}

.p-node-supervisor { border-color: rgba(167, 139, 250, 0.15); }
.p-node-supervisor.processing { border-color: var(--tier-auditor); background: var(--tier-auditor-bg); box-shadow: 0 0 16px rgba(167, 139, 250, 0.2); }

.p-node-ceo { border-color: rgba(245, 158, 11, 0.15); }
.p-node-ceo.processing { border-color: var(--tier-ceo); background: var(--tier-ceo-bg); box-shadow: 0 0 16px rgba(245, 158, 11, 0.2); }

.p-node-monogram {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-overlay);
  border: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-body);
  letter-spacing: 0.5px;
}

.p-node-monogram.supervisor { color: var(--tier-auditor); border-color: rgba(167, 139, 250, 0.2); }
.p-node-monogram.ceo        { color: var(--tier-ceo); border-color: rgba(245, 158, 11, 0.2); }

.p-node.processing .p-node-monogram { color: var(--status-active); border-color: rgba(59, 130, 246, 0.3); }
.p-node.done .p-node-monogram       { color: var(--status-success); border-color: rgba(16, 185, 129, 0.3); }

.p-node-body { display: flex; flex-direction: column; }

.p-node-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

.p-node-sub {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.p-node-state {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-void);
  color: var(--text-muted);
  white-space: nowrap;
}

.p-node.processing .p-node-state { background: rgba(59, 130, 246, 0.15); color: var(--status-active); }
.p-node.done .p-node-state       { background: rgba(16, 185, 129, 0.1); color: var(--status-success); }
.p-node.rejected .p-node-state   { background: var(--status-rejection-bg); color: var(--status-rejection); }

.p-connector {
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.p-connector-line {
  width: 20px;
  height: 1px;
  background: linear-gradient(to right, var(--border-base), transparent);
}

/* --------------------------------------------------------------------------
   Feeds Grid
   -------------------------------------------------------------------------- */
.feeds-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0;
  border-top: none;
}

.feed-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

.feed-panel:last-child { border-right: none; }

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.feed-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-monogram {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-overlay);
  border: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-body);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.feed-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
}

.feed-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.feed-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--border-base) transparent;
}

.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 2px; }

/* Placeholder State */
.log-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.log-placeholder-monogram {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-overlay);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Communications Log Messages
   -------------------------------------------------------------------------- */
.comm-entry {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  animation: slide-in var(--t-base) ease;
  border-left: 2px solid transparent;
}

.comm-entry.normal   { border-left-color: var(--accent-primary); }
.comm-entry.warning  { border-left-color: var(--status-warning); background: var(--status-warning-bg); }
.comm-entry.rejection{ border-left-color: var(--status-rejection); background: var(--status-rejection-bg); }
.comm-entry.success  { border-left-color: var(--status-success); background: var(--status-success-bg); }
.comm-entry.auditor  { border-left-color: var(--tier-auditor); background: var(--tier-auditor-bg); }
.comm-entry.ceo      { border-left-color: var(--tier-ceo); background: var(--tier-ceo-bg); }

.comm-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  gap: 8px;
}

.comm-route {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comm-actor {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}

.comm-actor.worker   { color: var(--text-body); border-color: var(--border-base); background: var(--surface-overlay); }
.comm-actor.auditor  { color: var(--tier-auditor); border-color: rgba(167, 139, 250, 0.2); background: var(--tier-auditor-bg); }
.comm-actor.ceo      { color: var(--tier-ceo); border-color: rgba(245, 158, 11, 0.2); background: var(--tier-ceo-bg); }

.comm-arrow {
  font-size: 9px;
  color: var(--text-muted);
}

.comm-timestamp {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.comm-body {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-body);
  white-space: pre-wrap;
}

.comm-entry.rejection .comm-body { color: var(--status-rejection); }
.comm-entry.success .comm-body   { color: var(--status-success); }
.comm-entry.warning .comm-body   { color: var(--status-warning); }

/* --------------------------------------------------------------------------
   Lead Cards
   -------------------------------------------------------------------------- */
.lead-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color var(--t-base), transform var(--t-fast);
  animation: slide-in var(--t-base) ease;
}

.lead-card:hover { border-color: var(--border-base); transform: translateY(-1px); }
.lead-card.approved { border-color: rgba(16, 185, 129, 0.3); }
.lead-card.rejected-card { opacity: 0.4; transform: none; }

.lead-card-top {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
}

.lead-identity { display: flex; flex-direction: column; gap: 3px; }

.lead-company {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}

.lead-contact-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.contact-name { font-weight: 600; color: var(--text-body); }
.contact-role { color: var(--text-muted); }
.contact-divider { color: var(--border-base); }
.contact-email {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 10px;
}

.lead-score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.score-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}

.score-value.score-high   { color: var(--status-success); }
.score-value.score-medium { color: var(--status-warning); }
.score-value.score-low    { color: var(--status-critical); }

.score-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Lead Data Sections */
.lead-sections { display: flex; flex-direction: column; }

.lead-section {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.lead-section:last-of-type { border-bottom: none; }

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.section-monogram {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: var(--surface-overlay);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  color: var(--text-muted);
}

.section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-cell strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-cell span {
  font-size: 11px;
  color: var(--text-body);
  line-height: 1.4;
}

/* LinkedIn Bridges */
.bridge-list { display: flex; flex-direction: column; gap: 6px; }

.bridge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-overlay);
  border: 1px solid var(--border-subtle);
  gap: 8px;
}

.bridge-name { font-size: 11px; font-weight: 600; color: var(--text-strong); }
.bridge-company { font-size: 10px; color: var(--text-muted); }

.bridge-tag {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.bridge-tag.hot  { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.bridge-tag.warm { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.bridge-tag.cold { background: var(--surface-overlay); color: var(--text-muted); border: 1px solid var(--border-subtle); }

/* Intent Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }

.intent-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--accent-primary-dim);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary-border);
  font-weight: 500;
}

.pain-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--status-critical-bg);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 500;
}

/* Outreach Copy */
.outreach-block {
  background: #080c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.outreach-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-void);
}

.outreach-toolbar-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.outreach-text {
  padding: 12px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-body);
  white-space: pre-wrap;
  outline: none;
  min-height: 80px;
  font-family: var(--font-body);
}

/* Lead Actions */
.lead-actions {
  display: flex;
  gap: 1px;
  border-top: 1px solid var(--border-subtle);
  background: var(--border-subtle);
}

.action-btn {
  flex: 1;
  padding: 9px;
  background: var(--surface-raised);
  border: none;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.action-btn svg { width: 11px; height: 11px; }

.action-btn.approve { color: var(--status-success); }
.action-btn.approve:hover { background: var(--status-success-bg); }

.action-btn.edit { color: var(--text-body); }
.action-btn.edit:hover { background: var(--surface-overlay); }

.action-btn.reject { color: var(--status-critical); }
.action-btn.reject:hover { background: var(--status-critical-bg); }

/* Counters */
.lead-counter {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-raised);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Icon Buttons */
.icon-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--t-fast);
  padding: 0;
}

.icon-btn svg { width: 12px; height: 12px; }
.icon-btn:hover { background: var(--surface-raised); color: var(--text-body); border-color: var(--border-base); }

/* Approved / rejected card states */
.action-confirmed {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-confirmed.approved-msg { color: var(--status-success); }
.action-confirmed.rejected-msg { color: var(--status-critical); }

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinning { animation: spin 1s linear infinite; }

/* --------------------------------------------------------------------------
   Tabs and SPA Page Navigation Stills
   -------------------------------------------------------------------------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-body);
  padding: 0 14px;
  font-size: 12.5px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  border-radius: 0;
  white-space: nowrap;
  position: relative;
}

.nav-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity var(--t-fast);
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link:hover svg {
  opacity: 0.8;
}

.nav-link.active {
  color: var(--text-white);
  border-bottom-color: var(--accent-primary);
}

.nav-link.active svg {
  opacity: 1;
  color: var(--accent-primary);
}


.badge {
  background: var(--accent-primary);
  color: var(--text-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
  margin-left: 4px;
}

.page-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-base) transparent;
  box-sizing: border-box;
}

.page-content.active-page {
  display: flex;
  flex-direction: column;
}

#page-operations.active-page {
  display: flex; /* Dynamic flexbox layout */
}

/* --------------------------------------------------------------------------
   Settings Page
   -------------------------------------------------------------------------- */
.settings-container,
.queue-container {
  padding: 0; /* Padding is handled by .page-content now */
  width: 100%;
  max-width: 100%;
}

.section-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 24px;
}

.queue-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.settings-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.settings-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-item .field-select {
  background: var(--surface-void);
  border-color: var(--border-base);
}

/* ── Campaigns & Company Cards Layout ── */
#select-campaign {
  border-color: var(--border-base);
  font-weight: 500;
  cursor: pointer;
}

#companies-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.company-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slide-in var(--t-base);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.company-card:hover {
  border-color: var(--border-base);
  background: var(--surface-raised);
}

.company-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.company-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.company-card-domain {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  text-decoration: none;
  margin-left: 12px;
  display: inline-block;
}

.company-card-domain:hover {
  text-decoration: underline;
}

.company-card-collapsed-content {
  margin-top: 4px;
}

.collapsed-projects-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.collapsed-projects-list {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-default);
}

.company-card-expanded-content {
  display: none;
  animation: slide-in var(--t-base);
}

.company-card.expanded .company-card-expanded-content {
  display: block;
}

.company-card.expanded {
  border-color: var(--accent-primary-border);
}

.webhook-success { color: var(--status-success); }
.webhook-error   { color: var(--status-critical); }

/* ── Outreach Message Tab Switching Buttons ── */
.outreach-tab-btn {
  background: var(--surface-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  outline: none;
}

.outreach-tab-btn:hover {
  color: var(--text-white);
  border-color: var(--border-base);
  background: var(--surface-base);
}

.outreach-tab-btn.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.08); /* slight purple tint */
}

/* =============================================================================
   CIRCULAR Radar Pipeline & 3D Neon i18n Styles
   ============================================================================= */
.circular-radar-view {
  background: radial-gradient(circle at 50% 50%, rgba(30, 32, 50, 0.5) 0%, rgba(10, 11, 20, 0) 80%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 40px 20px;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pipeline-canvas-container {
  position: relative;
  width: 960px;
  height: 380px;
  max-width: 100%;
  perspective: 1200px; /* 3D Depth */
}

/* SVG Laser Connections Overlay */
.pipeline-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.laser-line {
  stroke: rgba(99, 102, 241, 0.04);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Connected glowing lines when active */
.laser-line.active-pulse {
  stroke: #6366f1;
  stroke-width: 2.5;
  stroke-dasharray: 6 12;
  animation: laserPulseFlow 0.8s linear infinite;
  filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.8));
}

.laser-line.active-audit {
  stroke: #f59e0b;
  stroke-width: 2.8;
  stroke-dasharray: 6 8;
  animation: laserPulseFlowReverse 0.7s linear infinite;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.95));
}

.laser-line.active-delivery {
  stroke: #10b981;
  stroke-width: 3.5;
  stroke-dasharray: 14 6;
  animation: laserPulseFlow 0.6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 1));
}

@keyframes laserPulseFlow {
  from { stroke-dashoffset: 36; }
  to { stroke-dashoffset: 0; }
}

@keyframes laserPulseFlowReverse {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 36; }
}

/* Dynamic Grid Nodes Position & Holographic Aesthetics */
.nodes-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}

.p-node.w-node {
  position: absolute;
  width: 240px !important;
  min-width: 240px !important;
  transform: translateY(-50%) rotateY(10deg); /* Sleek fütüristik eğim */
  background: rgba(17, 18, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.p-node.w-node:hover {
  transform: translateY(-53%) rotateY(2deg) scale(1.03);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

/* Absolute coordinates of workers matching SVG endpoints */
.pos-left-top    { left: 10px; top: 65px; }
.pos-left-mid    { left: 10px; top: 180px; }
.pos-left-bot    { left: 10px; top: 295px; }

.pos-right-top   { right: 10px; top: 65px; }
.pos-right-mid   { right: 10px; top: 180px; }
.pos-right-bot   { right: 10px; top: 295px; }

/* Supervisor Nodes positioned in center */
.p-node.p-node-supervisor, .p-node.p-node-ceo {
  position: absolute;
  width: 240px !important;
  min-width: 240px !important;
  transform: translate(-50%, -50%);
  left: 50%;
  background: rgba(17, 18, 30, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.pos-center-top  { top: 110px; }
.pos-center-bot  { top: 250px; }

/* Glowing active states */
.p-node.processing {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.12) !important;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4) !important;
  animation: hologramPulse 2s infinite alternate;
}

@keyframes hologramPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

.p-node-supervisor.processing {
  border-color: #a78bfa !important;
  background: rgba(167, 139, 250, 0.12) !important;
  box-shadow: 0 0 25px rgba(167, 139, 250, 0.4) !important;
}

.p-node-ceo.processing {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.12) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4) !important;
}

.p-node.done {
  border-color: rgba(16, 185, 129, 0.3) !important;
  background: rgba(16, 185, 129, 0.05) !important;
}

/* Custom state indicator styling to prevent layout overflow */
.p-node-state {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--surface-overlay);
  border: 1px solid var(--border-light);
  margin-left: auto;
  min-width: 68px;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.processing .p-node-state {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.35) 50%, rgba(99, 102, 241, 0.12) 100%);
  background-size: 200% 100%;
  animation: loadingSweep 1.5s infinite linear;
  border-color: rgba(99, 102, 241, 0.45);
  color: #818cf8;
}

/* Auditor checking sweep */
.processing.p-node-supervisor .p-node-state {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.12) 0%, rgba(167, 139, 250, 0.35) 50%, rgba(167, 139, 250, 0.12) 100%);
  background-size: 200% 100%;
  animation: loadingSweep 1.5s infinite linear;
  border-color: rgba(167, 139, 250, 0.45);
  color: #c084fc;
}

@keyframes loadingSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.done .p-node-state {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* =============================================================================
   Active Node Growth & Glowing Scale (10% Zoom Effect)
   ============================================================================= */
.p-node.w-node.processing {
  transform: translateY(-50%) rotateY(2deg) scale(1.1) !important;
  z-index: 10;
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
}

.p-node.p-node-supervisor.processing {
  transform: translate(-50%, -50%) scale(1.1) !important;
  z-index: 10;
  box-shadow: 0 15px 35px rgba(245, 158, 11, 0.45) !important; /* Orange glow for Auditor */
  border-color: rgba(245, 158, 11, 0.6) !important;
}

.p-node.p-node-ceo.processing {
  transform: translate(-50%, -50%) scale(1.1) !important;
  z-index: 10;
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.45) !important; /* Green glow for CEO */
  border-color: rgba(16, 185, 129, 0.6) !important;
}

/* =============================================================================
   Email Tracking Dashboard & Status Badges
   ============================================================================= */
.tracking-table th, 
.tracking-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  vertical-align: middle;
}

.tracking-table tbody tr {
  transition: background 0.2s ease;
}

.tracking-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  font-family: var(--font-mono);
}

.status-badge.sent {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.status-badge.opened {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge.replied {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.bounced {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.failed {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* =============================================================================
   Performance Reports & Summary Dashboard Cards
   ============================================================================= */
.report-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
}

.report-card:hover::before {
  left: 125%;
}

@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .reports-grid {
    grid-template-columns: 1fr !important;
  }
}




