/* ============================================================
   RECLUTAMIENTO DIGITAL — Centro de Mando Industrial
   Standalone CSS — Dark Industrial Command Center Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg: #1a1d23;
  --bg-card: #21242b;
  --bg-muted: #282b33;
  --fg: #e5e7eb;
  --fg-muted: #9ca3af;
  --fg-dim: #6b7280;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.15);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6,182,212,0.15);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.15);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168,85,247,0.15);
  --pink: #ec4899;
  --pink-dim: rgba(236,72,153,0.15);
  --orange: #f97316;
  --orange-dim: rgba(249,115,22,0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59,130,246,0.15);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --radius: 0.5rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---- Utilities ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.font-mono { font-family: var(--font-mono); }
.text-amber { color: var(--amber); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--fg-muted); }
.text-dim { color: var(--fg-dim); }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- LED Pulse Animation ---- */
@keyframes ledPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px currentColor; }
  50% { opacity: 0.5; box-shadow: 0 0 8px currentColor; }
}
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.led-sm { width: 8px; height: 8px; }
.led-md { width: 10px; height: 10px; }
.led-active { background: #22c55e; color: #22c55e; animation: ledPulse 2s infinite; }
.led-processing { background: #f59e0b; color: #f59e0b; animation: ledPulse 1.5s infinite; }
.led-idle { background: #71717a; color: #71717a; }
.led-completed { background: #06b6d4; color: #06b6d4; }

/* ---- Data Flow Animation ---- */
@keyframes dataFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.data-flow-line {
  height: 2px;
  background: linear-gradient(90deg, var(--amber-dim), var(--cyan), var(--amber-dim));
  background-size: 200% 100%;
  animation: dataFlow 2s linear infinite;
  border-radius: 1px;
}

/* ---- Fade In Animation ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(6px) translateX(-50%); }
}

/* ---- Bar Animation ---- */
@keyframes growWidth {
  from { width: 0; }
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(33,36,43,0.85);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 16px;
}
.header-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.header-subtitle {
  font-size: 10px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.header-status {
  display: none;
  align-items: center;
  gap: 24px;
}
@media (min-width: 768px) { .header-status { display: flex; } }
.header-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.header-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
}
.header-clock-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.header-clock-tz {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}
@media (min-width: 768px) { .hero { height: 340px; } }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,29,35,0.92), rgba(26,29,35,0.7), transparent);
}
.hero-overlay-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #1a1d23, transparent, transparent);
}
.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
}
@media (min-width: 768px) { .hero-content { padding: 0 3rem; } }
.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hero-badge-text {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.hero-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  max-width: 560px;
}
@media (min-width: 768px) { .hero-title { font-size: 2.25rem; } }
.hero-title span { color: var(--amber); }
.hero-desc {
  font-size: 0.875rem;
  color: #d4d4d8;
  margin-top: 12px;
  max-width: 520px;
  line-height: 1.6;
}
.hero-tags {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}
.hero-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a1a1aa;
  font-family: var(--font-mono);
}
.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.hero-scroll {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: #71717a;
  font-size: 20px;
}

/* ============================================================
   SECTION NAVIGATION
   ============================================================ */
.section-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
}
.section-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.section-nav-btn:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.03);
}
.section-nav-btn.active {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(245,158,11,0.3);
}

/* ============================================================
   METRIC PANEL
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 768px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .metrics-grid { grid-template-columns: repeat(6, 1fr); } }
.metric-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(33,36,43,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
}
.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}
.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-top: 2px;
}
.metric-sub {
  font-size: 10px;
  color: var(--fg-dim);
}

/* ============================================================
   AGENT PIPELINE
   ============================================================ */
.pipeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) { .pipeline-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pipeline-grid { grid-template-columns: repeat(4, 1fr); } }
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  transition: border-color 0.3s;
}
.agent-card:hover { border-color: rgba(245,158,11,0.5); }
.agent-card-led {
  position: absolute;
  top: 12px;
  right: 12px;
}
.agent-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}
.agent-id {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}
.agent-name {
  font-size: 12px;
  color: var(--fg-muted);
}
.agent-role {
  font-size: 10px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.agent-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.agent-count {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}
.agent-count-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.agent-status-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
}
.agent-activity {
  font-size: 10px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  margin-top: 8px;
}

/* ============================================================
   CARD (Generic)
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}
.card-subtitle {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.section-label-bar {
  width: 4px;
  height: 16px;
  background: var(--amber);
  border-radius: 2px;
}
.section-label-text {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}

/* ============================================================
   CANDIDATE CARDS
   ============================================================ */
.candidates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .candidates-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .candidates-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .candidates-grid { grid-template-columns: repeat(4, 1fr); } }

.candidate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s;
}
.candidate-card:hover {
  border-color: rgba(245,158,11,0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.candidate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
}
.candidate-info { margin-left: 12px; flex: 1; min-width: 0; }
.candidate-name {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}
.candidate-card:hover .candidate-name { color: var(--amber); }
.candidate-user {
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.candidate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
}
.tag-facebook { background: var(--blue-dim); color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.tag-x { background: rgba(113,113,122,0.15); color: #d4d4d8; border-color: rgba(113,113,122,0.3); }
.tag-tiktok { background: var(--pink-dim); color: var(--pink); border-color: rgba(236,72,153,0.3); }
.tag-reddit { background: var(--orange-dim); color: var(--orange); border-color: rgba(249,115,22,0.3); }
.tag-alto { background: var(--red-dim); color: #f87171; border-color: rgba(239,68,68,0.3); }
.tag-medio { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.tag-bajo { background: rgba(113,113,122,0.15); color: #a1a1aa; border-color: rgba(113,113,122,0.3); }
.tag-sector { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(6,182,212,0.3); }

.candidate-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.candidate-detail svg { flex-shrink: 0; width: 12px; height: 12px; }
.candidate-quote {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  padding: 10px;
  border-left: 2px solid rgba(245,158,11,0.4);
  margin-top: 12px;
}
.candidate-quote p {
  font-size: 12px;
  color: var(--fg-muted);
  font-style: italic;
}
.candidate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.candidate-date {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}
.candidate-id {
  font-size: 10px;
  font-family: var(--font-mono);
  color: rgba(245,158,11,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.filters-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: rgba(245,158,11,0.3); }
.filter-btn.active-all { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.filter-btn.active-alto { background: var(--red-dim); color: #f87171; border-color: rgba(239,68,68,0.3); }
.filter-btn.active-medio { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.filter-btn.active-bajo { background: rgba(113,113,122,0.15); color: #a1a1aa; border-color: rgba(113,113,122,0.3); }
.export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--cyan);
  transition: all 0.2s;
}
.export-btn:hover { background: rgba(6,182,212,0.1); }
.results-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.results-count-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}
.results-count-text {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ============================================================
   SENTIMENT CHART (Canvas)
   ============================================================ */
.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--fg-muted);
}
.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ============================================================
   PLATFORM STATS
   ============================================================ */
.platform-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s;
  margin-bottom: 12px;
}
.platform-item:last-child { margin-bottom: 0; }
.platform-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.platform-info { flex: 1; min-width: 0; }
.platform-name {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.platform-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--fg-muted);
}
.platform-stats-row strong {
  font-family: var(--font-mono);
  font-weight: 600;
}
.platform-sentiment {
  flex-shrink: 0;
  width: 80px;
}
.platform-sentiment-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
}
.platform-sentiment-fill {
  height: 100%;
  background: linear-gradient(to right, var(--red), var(--amber));
  border-radius: 3px;
}
.platform-sentiment-val {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-align: right;
  margin-top: 4px;
}

/* ============================================================
   KEYWORD BARS
   ============================================================ */
.keyword-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.keyword-label {
  font-size: 12px;
  color: var(--fg-muted);
  width: 100px;
  text-align: right;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.keyword-bar-bg {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.keyword-bar-fill {
  height: 100%;
  background: linear-gradient(to right, rgba(245,158,11,0.6), rgba(245,158,11,0.3));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  animation: growWidth 0.6s ease-out forwards;
}
.keyword-bar-val {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--fg);
}
.keyword-trend {
  flex-shrink: 0;
  width: 16px;
  font-size: 12px;
  text-align: center;
}

/* ============================================================
   SECTOR CHART
   ============================================================ */
.sector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sector-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sector-name {
  font-size: 12px;
  color: var(--fg-muted);
  flex: 1;
}
.sector-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   WORKFLOW DIAGRAM
   ============================================================ */
.workflow {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.workflow-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
}
.workflow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(33,36,43,0.95), rgba(33,36,43,0.8));
}
.workflow-content {
  position: relative;
  padding: 24px;
}
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .workflow-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .workflow-grid { grid-template-columns: repeat(4, 1fr); } }
.workflow-step {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid;
  backdrop-filter: blur(4px);
}
.workflow-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.workflow-step-num {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.workflow-step-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.workflow-step-subtitle {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.workflow-step-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.workflow-step-stats {
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   ETHICS PANEL
   ============================================================ */
.ethics {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.ethics-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
}
.ethics-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(33,36,43,0.98), rgba(33,36,43,0.9));
}
.ethics-content { position: relative; padding: 24px; }
.ethics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .ethics-grid { grid-template-columns: repeat(2, 1fr); } }
.ethics-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid;
  display: flex;
  gap: 12px;
}
.ethics-card-icon {
  flex-shrink: 0;
  font-size: 20px;
  margin-top: 2px;
}
.ethics-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ethics-card-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ============================================================
   MODAL / DIALOG
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg-muted);
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--fg); }
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
}
.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.modal-info-cell {
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  padding: 12px;
}
.modal-info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.modal-info-value {
  font-size: 14px;
  font-weight: 500;
}
.modal-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-evidence {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  padding: 12px;
  border-left: 2px solid rgba(245,158,11,0.4);
  margin-bottom: 8px;
}
.modal-evidence p {
  font-size: 14px;
  color: rgba(229,231,235,0.9);
  font-style: italic;
}
.modal-outreach-box {
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
  padding: 12px;
}
.modal-outreach-box p {
  font-size: 14px;
  color: rgba(229,231,235,0.9);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-green {
  background: #16a34a;
  color: white;
}
.btn-green:hover { background: #15803d; }
.btn-outline-green {
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}
.btn-outline-green:hover { background: rgba(34,197,94,0.1); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  color: #22c55e;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   ANALYTICS GRID
   ============================================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 1024px) {
  .analytics-grid { grid-template-columns: 2fr 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-text {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-date {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-dim);
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section-space { margin-top: 24px; }
.hidden { display: none !important; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
