/**
 * Autonomous TechStack & SaaS Growth Simulator — Marcelo Design X Dark Luxury Stylesheet
 * Architectural Dark Luxury • Cybernetic Telemetry • Responsive High-DPI
 * Directed by El Vairus | PLAN → BUILD → FLOW → GROW
 */

:root {
  --sim-bg: #080605;
  --sim-surface: #100C0A;
  --sim-surface-hover: #17110E;
  --sim-surface-active: #221813;
  --sim-border: rgba(255, 255, 255, 0.08);
  --sim-border-gold: rgba(252, 211, 77, 0.35);
  --sim-border-active: rgba(252, 211, 77, 0.6);

  --sim-gold: #FCD34D;
  --sim-gold-glow: rgba(252, 211, 77, 0.15);
  --sim-blue: #38BDF8;
  --sim-blue-glow: rgba(56, 189, 248, 0.15);
  --sim-purple: #A855F7;
  --sim-purple-glow: rgba(168, 85, 247, 0.15);
  --sim-emerald: #34D399;
  --sim-coral: #F87171;

  --sim-text-main: #FAF8F4;
  --sim-text-muted: #9E948A;
  --sim-text-dim: #6B6459;

  --font-display: 'Bebas Neue', 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-arabic: 'Cairo', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.simulator-body {
  background-color: var(--sim-bg);
  color: var(--sim-text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Atmosphere */
.sim-ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 20%, rgba(252, 211, 77, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(56, 189, 248, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.03) 0%, transparent 55%);
  z-index: 0;
}

.sim-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.sim-container {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

/* --- Upper Command Bar (HUD) --- */
.sim-cmd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 12, 10, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sim-border);
  border-radius: 14px;
  padding: 12px 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sim-cmd-left, .sim-cmd-center, .sim-cmd-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sim-cmd-monogram {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sim-cmd-logo {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(252, 211, 77, 0.3));
}

.sim-cmd-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--sim-text-main);
}

.sim-cmd-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--sim-gold);
  background: var(--sim-gold-glow);
  border: 1px solid var(--sim-border-gold);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.sim-cmd-sep {
  width: 1px;
  height: 20px;
  background: var(--sim-border);
}

.sim-cycle-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  border-radius: 8px;
  padding: 3px;
}

.sim-cycle-btn {
  background: transparent;
  border: none;
  color: var(--sim-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-cycle-btn.active {
  background: var(--sim-gold);
  color: #080605;
  font-weight: 700;
}

.sim-curr-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  color: var(--sim-text-main);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.sim-share-btn, .sim-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sim-border);
  color: var(--sim-text-main);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Hero Intro Blade --- */
.sim-hero-blade {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 32px;
}

.sim-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--sim-blue);
  background: var(--sim-blue-glow);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.sim-hero-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--sim-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--sim-blue);
}

.sim-hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #FAF8F4 30%, #C4B9AD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sim-hero-desc {
  color: var(--sim-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- Archetype Selector Strip --- */
.sim-archetype-strip {
  margin-bottom: 28px;
  background: var(--sim-surface);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.sim-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sim-strip-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--sim-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sim-archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.sim-arch-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--sim-border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.sim-arch-card:hover {
  border-color: rgba(252, 211, 77, 0.3);
  transform: translateY(-2px);
}

.sim-arch-card.active {
  background: rgba(252, 211, 77, 0.06);
  border-color: var(--sim-gold);
  box-shadow: 0 4px 16px rgba(252, 211, 77, 0.12);
}

.sim-arch-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--sim-text-main);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.sim-arch-card.active .sim-arch-name {
  color: var(--sim-gold);
}

.sim-arch-desc {
  font-size: 0.74rem;
  color: var(--sim-text-muted);
  line-height: 1.35;
}

/* --- Main Layout Grid: Builder (Left) + Telemetry HUD (Right) --- */
.sim-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 980px) {
  .sim-workspace-grid {
    grid-template-columns: 1fr;
  }
  .sim-hud-panel {
    order: -1;
    position: static;
    margin-bottom: 24px;
  }
}

/* --- Left Column: Controls & Tech Stack Matrix --- */
.sim-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sim-card {
  background: var(--sim-surface);
  border: 1px solid var(--sim-border);
  border-radius: 14px;
  padding: 22px;
}

.sim-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sim-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-card-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sim-text-dim);
}

/* Slider Rows */
.sim-slider-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-slider-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
}

.sim-slider-label {
  color: var(--sim-text-muted);
}

.sim-slider-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--sim-gold);
}

.sim-range-input {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  accent-color: var(--sim-gold);
  cursor: pointer;
}

/* AI Automation Tier Switcher */
.sim-ai-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.sim-ai-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-ai-btn:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.sim-ai-btn.active {
  background: var(--sim-purple-glow);
  border-color: var(--sim-purple);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.2);
}

.sim-ai-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.sim-ai-btn.active .sim-ai-title {
  color: var(--sim-purple);
}

.sim-ai-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sim-text-muted);
}

/* --- Tech Stack Tool Matrix --- */
.sim-tools-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-region-filter {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--sim-border);
  border-radius: 6px;
  padding: 2px;
}

.sim-region-btn {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sim-text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.sim-region-btn.active {
  background: var(--sim-blue);
  color: #080605;
  font-weight: 700;
}

.sim-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--sim-border);
  scrollbar-width: thin;
}

.sim-cat-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--sim-text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.sim-cat-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sim-cat-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--sim-border);
  color: var(--sim-text-main);
  font-weight: 600;
}

.sim-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.sim-tool-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--sim-border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  position: relative;
}

.sim-tool-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.sim-tool-card.selected {
  background: rgba(252, 211, 77, 0.05);
  border-color: var(--sim-border-active);
}

.sim-tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.sim-tool-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--sim-text-main);
}

.sim-tool-card.selected .sim-tool-name {
  color: var(--sim-gold);
}

.sim-tool-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sim-text-muted);
}

.sim-tool-badge.mena {
  background: rgba(56, 189, 248, 0.15);
  color: var(--sim-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sim-tool-desc {
  font-size: 0.72rem;
  color: var(--sim-text-muted);
  line-height: 1.3;
  margin-bottom: 8px;
}

.sim-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}

.sim-tool-price-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sim-tool-price {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sim-text-main);
}

.sim-tool-unit {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--sim-text-dim);
}

.sim-edit-price-btn {
  background: transparent;
  border: none;
  color: var(--sim-text-dim);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.sim-edit-price-btn:hover {
  color: var(--sim-gold);
}

.sim-tool-check {
  width: 18px;
  height: 18px;
  border: 1px solid var(--sim-border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: transparent;
  transition: all 0.2s ease;
}

.sim-tool-card.selected .sim-tool-check {
  background: var(--sim-gold);
  border-color: var(--sim-gold);
  color: #080605;
  font-weight: 900;
}

/* --- Right Column: Telemetry & Impact Projection HUD --- */
.sim-hud-panel {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sim-hud-card {
  background: var(--sim-surface);
  border: 1px solid var(--sim-border-gold);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.sim-hud-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(252, 211, 77, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Health Gauge & Big Metrics */
.sim-hud-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sim-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sim-gauge-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--sim-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sim-gauge-circle.high {
  border-color: var(--sim-emerald);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.2);
}

.sim-gauge-circle.med {
  border-color: var(--sim-gold);
  box-shadow: 0 0 16px rgba(252, 211, 77, 0.2);
}

.sim-gauge-circle.low {
  border-color: var(--sim-coral);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.2);
}

.sim-gauge-score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.sim-gauge-max {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--sim-text-dim);
}

.sim-gauge-meta {
  display: flex;
  flex-direction: column;
}

.sim-gauge-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sim-text-muted);
  text-transform: uppercase;
}

.sim-gauge-status {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

/* Primary Numbers Grid */
.sim-metrics-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}

.sim-trio-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.sim-trio-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.sim-trio-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--sim-text-muted);
  text-transform: uppercase;
}

/* SVG Chart */
.sim-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
  height: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 18px;
}

.sim-chart-svg {
  width: 100%;
  height: 140px;
  display: block;
}

.sim-chart-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sim-text-muted);
}

.sim-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.sim-legend-dot.algo { background: var(--sim-gold); }
.sim-legend-dot.base { background: var(--sim-text-dim); }

/* Diagnostic Breakdown Accordion */
.sim-leakage-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.sim-leakage-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sim-coral);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-leakage-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: var(--sim-text-muted);
}

.sim-leakage-item:last-child {
  border-bottom: none;
}

.sim-leakage-val {
  font-family: var(--font-mono);
  color: var(--sim-text-main);
  font-weight: 600;
}

/* High Intent CTAs */
.sim-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-primary-cta {
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  color: #080605;
  border: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(252, 211, 77, 0.3);
}

.sim-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(252, 211, 77, 0.45);
}

.sim-secondary-cta {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sim-border);
  color: var(--sim-text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sim-secondary-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modal Price Editor */
.sim-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
}

.sim-modal-backdrop.open {
  display: flex;
}

.sim-modal-card {
  background: #140E0B;
  border: 1px solid var(--sim-border-gold);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  margin: auto;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sim-modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.sim-modal-subtitle {
  font-size: 0.8rem;
  color: var(--sim-text-muted);
  margin-bottom: 16px;
}

.sim-modal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--sim-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--sim-gold);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 16px;
  outline: none;
}

.sim-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Brand Vector Icons & Logos --- */
.sim-tool-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-tool-icon-box {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.sim-tool-icon-box svg {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* --- Visualizer View Switcher Tabs --- */
.sim-vis-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--sim-border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.sim-vis-tab {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sim-text-muted);
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.sim-vis-tab:hover {
  color: var(--sim-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.sim-vis-tab.active {
  background: var(--sim-gold);
  color: #080605;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(252, 211, 77, 0.25);
}

/* --- Canvas Topology Network HUD --- */
.sim-topology-wrap {
  position: relative;
  width: 100%;
  height: 230px;
  background: radial-gradient(circle at 50% 50%, rgba(20, 15, 12, 0.9) 0%, rgba(8, 6, 5, 0.98) 100%);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}

#sim-topology-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sim-topology-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--sim-border);
  color: var(--sim-text-dim);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

[dir="rtl"] .sim-topology-badge {
  left: auto;
  right: 12px;
}

.sim-topology-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sim-emerald);
  box-shadow: 0 0 6px var(--sim-emerald);
}

/* --- AI Chained Model Architecture Selector Card --- */
.sim-ai-chain-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--sim-border);
  border-radius: 12px;
  padding: 14px;
}

.sim-ai-chain-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sim-ai-chain-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sim-border);
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.sim-ai-chain-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.sim-ai-chain-card.active {
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--sim-emerald);
}

.sim-ai-chain-card.danger.active {
  background: rgba(248, 113, 113, 0.08);
  border-color: var(--sim-coral);
}

.sim-ai-chain-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.sim-ai-chain-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 4px;
  border-radius: 4px;
}

/* Visual Chaining Cascade Diagram */
.sim-cascade-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sim-text-muted);
}

.sim-cascade-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sim-cascade-node strong {
  color: var(--sim-text-main);
  font-size: 0.76rem;
}

.sim-cascade-arrow {
  color: var(--sim-gold);
  font-size: 0.9rem;
}


/* ==========================================================================
   ENHANCED EXTENSIONS: Granular Billing, Comparative Bars, Info Popovers & Guided Wizard
   Directed by CIO Brain, The Jenius | Algorizms High-Board
   ========================================================================== */

/* 1. Per-Tool Granular Billing Cycle Switcher */
.sim-tool-cycle-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 1px;
  margin-left: 6px;
  cursor: pointer;
  user-select: none;
}

.sim-cycle-pill {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 1px 6px;
  border-radius: 9999px;
  color: var(--sim-text-muted);
  transition: all 0.15s ease;
}

.sim-cycle-pill.active {
  background: var(--sim-gold);
  color: #080605;
  font-weight: 700;
}

.sim-tool-annual-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--sim-emerald);
  margin-left: 4px;
}

/* 2. Clickable "ⓘ" Info Trigger & Modal */
.sim-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sim-text-muted);
  font-size: 0.62rem;
  font-family: var(--font-mono);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 5px;
  vertical-align: middle;
  transition: all 0.2s ease;
  line-height: 1;
}

.sim-info-btn:hover {
  background: var(--sim-gold);
  color: #080605;
  border-color: var(--sim-gold);
  transform: scale(1.15);
}

.sim-info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
}

.sim-info-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sim-info-modal-box {
  background: #120E0C;
  border: 1px solid rgba(252, 211, 77, 0.25);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(252, 211, 77, 0.05);
  padding: 24px;
  position: relative;
  margin: auto;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Luxury Dark-Gold Custom Scrollbars */
.sim-guided-modal-box::-webkit-scrollbar,
.sim-modal-card::-webkit-scrollbar,
.sim-info-modal-box::-webkit-scrollbar {
  width: 6px;
}

.sim-guided-modal-box::-webkit-scrollbar-track,
.sim-modal-card::-webkit-scrollbar-track,
.sim-info-modal-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}

.sim-guided-modal-box::-webkit-scrollbar-thumb,
.sim-modal-card::-webkit-scrollbar-thumb,
.sim-info-modal-box::-webkit-scrollbar-thumb {
  background: rgba(252, 211, 77, 0.35);
  border-radius: 4px;
}

.sim-guided-modal-box::-webkit-scrollbar-thumb:hover,
.sim-modal-card::-webkit-scrollbar-thumb:hover,
.sim-info-modal-box::-webkit-scrollbar-thumb:hover {
  background: rgba(252, 211, 77, 0.75);
}

.sim-info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--sim-text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.sim-info-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--sim-text-main);
}

.sim-info-formula-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--sim-gold);
  margin: 12px 0;
  word-break: break-all;
}

/* 3. Comparative Bar Charts Studio */
.sim-barcharts-wrap {
  background: rgba(14, 10, 8, 0.85);
  border: 1px solid var(--sim-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-barchart-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-barchart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sim-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 4px;
}

.sim-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--sim-text-main);
}

.sim-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.sim-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px currentColor;
}

/* 4. Guided Onboarding Banner & Modal */
.sim-guided-banner {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.12), rgba(124, 58, 237, 0.12), rgba(252, 211, 77, 0.12));
  border: 1px solid rgba(252, 211, 77, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.sim-guided-btn {
  background: linear-gradient(135deg, var(--sim-gold), #F59E0B);
  color: #080605;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sim-guided-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(252, 211, 77, 0.3);
}

.sim-guided-modal-box {
  background: #110D0B;
  border: 1px solid rgba(252, 211, 77, 0.3);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  margin: auto;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  position: relative;
}

.sim-guided-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sim-gold);
  margin-bottom: 12px;
}

.sim-posture-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.sim-posture-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sim-border);
  border-radius: 8px;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.sim-posture-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.sim-posture-card.active {
  border-color: var(--sim-gold);
  background: rgba(252, 211, 77, 0.08);
}

/* --- Salary Per Head Toggle Pills --- */
.sim-salary-toggle-wrap {
  margin-top: 18px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
}

.sim-salary-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 640px) {
  .sim-salary-pills {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sim-salary-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.sim-salary-pill:hover {
  border-color: rgba(252, 211, 77, 0.4);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.sim-salary-pill.active {
  background: rgba(252, 211, 77, 0.12);
  border-color: #FCD34D;
  box-shadow: 0 0 14px rgba(252, 211, 77, 0.18);
}

.sim-salary-pill .sim-salary-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: #FAF8F4;
  letter-spacing: 0.02em;
}

.sim-salary-pill.active .sim-salary-val {
  color: #FCD34D;
}

.sim-salary-pill .sim-salary-desc {
  font-size: 0.64rem;
  color: #9E948A;
  line-height: 1.2;
}

.sim-salary-pill.active .sim-salary-desc {
  color: #FAF8F4;
}

/* --- Dark-Luxury Currency Segmented Switcher --- */
.sim-currency-pills {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.sim-currency-pill {
  background: transparent;
  border: none;
  color: #9E948A;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sim-currency-pill:hover {
  color: #FAF8F4;
  background: rgba(255, 255, 255, 0.06);
}

.sim-currency-pill.active {
  background: rgba(252, 211, 77, 0.15);
  color: #FCD34D;
  border: 1px solid rgba(252, 211, 77, 0.4);
  box-shadow: 0 0 10px rgba(252, 211, 77, 0.18);
}

/* --- Signature Collapsible Section Accordions --- */
.sim-section-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.sim-section-header-wrap:hover .sim-section-toggle-btn {
  border-color: rgba(252, 211, 77, 0.4);
  color: #FCD34D;
}

.sim-section-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #9E948A;
  transition: all 0.2s ease;
}

.sim-rotator-icon {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.75rem;
}

.sim-rotator-icon.is-rotated {
  transform: rotate(180deg);
}

.sim-collapsible-content {
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.25s ease;
  overflow: hidden;
  max-height: 4000px;
  opacity: 1;
}

.sim-collapsible-content.is-collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* --- Click-to-Edit Price on Tool Cards --- */
.sim-tool-price.clickable {
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  border-bottom: 1px dashed rgba(252, 211, 77, 0.4);
}

.sim-tool-price.clickable:hover {
  background: rgba(252, 211, 77, 0.15);
  color: #FCD34D;
  border-bottom-color: #FCD34D;
}

/* --- Upgraded Price Modal Cycle & Presets --- */
.sim-price-cycle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-price-cycle-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9E948A;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sim-price-cycle-btn.active {
  background: rgba(252, 211, 77, 0.12);
  border-color: #FCD34D;
  color: #FCD34D;
  font-weight: 700;
}

.sim-preset-pills-row {
  display: flex;
  gap: 6px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

.sim-preset-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #9E948A;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-preset-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FAF8F4;
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Operating State HUD Badge for Canvas Topology --- */
.sim-topology-state-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.sim-topology-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #FAF8F4;
  font-weight: 700;
}

.sim-topology-state-badge .state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sim-gold);
  box-shadow: 0 0 8px var(--sim-gold);
}

.sim-topology-state-metrics {
  display: flex;
  gap: 12px;
  color: #9E948A;
  font-size: 0.68rem;
}

.sim-topology-state-metrics span strong {
  color: #FAF8F4;
}

/* --- Organic SVG Trajectory Chart Styles & Milestones --- */
.sim-chart-milestones-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-chart-milestone-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}

.sim-chart-milestone-item .m-month {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--sim-gold);
  display: block;
  font-weight: 700;
}

.sim-chart-milestone-item .m-label {
  font-size: 0.68rem;
  color: #FAF8F4;
  margin-top: 2px;
  display: block;
}

.sim-chart-milestone-item .m-impact {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #34D399;
  margin-top: 2px;
  display: block;
}
