/* ==========================================================================
   Q-DASH AI BUSINESS OPERATING SYSTEM PLATFORM (BESPOKE VISUAL ENGINE v6.2)
   Living Workflow Canvas, Operations Map, Before/After Split Engine,
   Simulated Diagnostic Telemetry, Diagnostic Scanner Terminal, Transformation Wall,
   3-Tier Governance Matrix, 8-Industry Scene Simulator & 5-Layer Architecture
   Aligned with Q-DASH Brand Standards: White/Beige Primary Rhythm, Inherited Typography
   ========================================================================== */

:root {
  --ai-navy: #0B1F33;
  --ai-navy-dark: #06121E;
  --ai-navy-card: #0E243A;
  --ai-navy-surface: #132B45;
  --ai-orange: #E05C2A;
  --ai-orange-hover: #FF6B35;
  --ai-orange-glow: rgba(224, 92, 42, 0.35);
  --ai-orange-subtle: #FFF7ED;
  --ai-tech-accent: #2563EB;
  --ai-tech-accent-soft: rgba(37, 99, 235, 0.08);
  --ai-green-success: #10B981;
  --ai-green-soft: rgba(16, 185, 129, 0.1);
  --ai-wa-green: #25D366;
  --ai-sand-light: #FAF8F5;
  --ai-sand-card: #F3EDE4;
  --ai-sand-warm: #EBE3D7;
  --ai-border: #E2E8F0;
  --ai-border-warm: #E6DFD5;
  --ai-text-main: #0B1F33;
  --ai-text-body: #334155;
  --ai-text-muted: #64748B;
  --ai-radius-sm: 10px;
  --ai-radius-md: 16px;
  --ai-radius-lg: 22px;
  --ai-radius-xl: 28px;
  --ai-shadow-card: 0 10px 30px -5px rgba(11, 31, 51, 0.06), 0 2px 8px rgba(11, 31, 51, 0.02);
  --ai-shadow-hover: 0 20px 45px -8px rgba(11, 31, 51, 0.12), 0 4px 16px -2px rgba(224, 92, 42, 0.15);
}

/* Inherit typography from master site design system */
body, button, input, select, textarea {
  font-family: inherit;
}

/* ==================== SECTION TYPOGRAPHIC INDEX & RHYTHM ==================== */
.ai-section-idx {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--ai-orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ai-section-idx::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2.5px;
  background: var(--ai-orange);
  border-radius: 2px;
}

.ai-sec-title-split {
  font-size: clamp(23px, 3.1vw, 35px);
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 14px 0;
  color: var(--ai-navy);
}

.ai-sec-title-split .accent {
  color: var(--ai-orange);
  position: relative;
  display: inline-block;
}

.ai-sec-title-split .accent::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(224, 92, 42, 0.18);
  border-radius: 4px;
  z-index: -1;
}

/* Simulated Tag Indicator */
.ai-simulated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--ai-sand-card);
  color: var(--ai-text-muted);
  border: 1px solid var(--ai-border-warm);
}

.ai-simulated-badge i {
  color: var(--ai-orange);
  font-size: 10px;
}

/* ==================== 1. HERO: ASYMMETRIC LIVING WORKFLOW CANVAS ==================== */
.ai-hero-wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  min-height: 560px;
}

.ai-os-canvas {
  background: radial-gradient(circle at 50% 15%, #153250 0%, #06121E 100%);
  border: 2px solid rgba(224, 92, 42, 0.4);
  border-radius: var(--ai-radius-xl);
  padding: 26px 22px;
  box-shadow: 0 25px 60px rgba(6, 18, 30, 0.55), 0 0 35px rgba(224, 92, 42, 0.15);
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
}

.ai-os-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ai-tech-accent), var(--ai-orange), var(--ai-green-success));
}

.ai-os-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-os-dot-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #34D399;
  letter-spacing: 0.5px;
}

.ai-os-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ai-green-success);
  box-shadow: 0 0 12px var(--ai-green-success);
  animation: aiPulse 1.8s infinite;
}

@keyframes aiPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.4; }
}

.ai-os-telemetry-chip {
  font-size: 11px;
  background: rgba(224, 92, 42, 0.2);
  color: #FF8C5A;
  border: 1px solid rgba(224, 92, 42, 0.35);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Living Flow Stream */
.ai-flow-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.ai-flow-node {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ai-radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  backdrop-filter: blur(8px);
}

.ai-flow-node.active-node {
  background: rgba(224, 92, 42, 0.22);
  border-color: var(--ai-orange);
  box-shadow: 0 0 20px rgba(224, 92, 42, 0.3);
  transform: scale(1.015);
}

.ai-node-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.ai-node-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-flow-node.active-node .ai-node-icon {
  background: var(--ai-orange);
  border-color: var(--ai-orange);
  color: #FFFFFF;
}

.ai-node-text {
  overflow: hidden;
}

.ai-node-text strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-node-text span {
  display: block;
  font-size: 11px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-flow-node.active-node .ai-node-text span {
  color: #FED7AA;
}

.ai-node-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-connector-arrow {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  line-height: 1;
  margin: -3px 0;
}

/* ==================== 2. AI OPPORTUNITY FINDER (CLEAN WHITE) ==================== */
.ai-opp-wrapper {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border);
  border-radius: var(--ai-radius-xl);
  padding: 32px;
  box-shadow: var(--ai-shadow-card);
}

.ai-opp-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
}

.ai-pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-pill-btn {
  background: var(--ai-sand-light);
  border: 1.5px solid var(--ai-border-warm);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ai-navy);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-pill-btn:hover {
  background: #FFFFFF;
  border-color: var(--ai-orange);
  color: var(--ai-orange);
  transform: translateY(-1px);
}

.ai-pill-btn.active {
  background: var(--ai-orange);
  border-color: var(--ai-orange);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px var(--ai-orange-glow);
}

.ai-opp-result-panel {
  background: radial-gradient(circle at 50% 10%, #153250 0%, #0B1F33 100%);
  border: 2px solid rgba(224, 92, 42, 0.35);
  border-radius: var(--ai-radius-lg);
  padding: 26px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  box-shadow: 0 15px 40px rgba(11, 31, 51, 0.3);
}

.ai-opp-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-opp-workflow-canvas {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--ai-radius-sm);
  padding: 14px;
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.ai-opp-step-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.ai-step-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  color: #F8FAFC;
  font-weight: 700;
}

.ai-step-arr {
  color: var(--ai-orange);
  font-weight: 900;
}

/* ==================== 3. OPERATIONS HUB MAP (NAVY ANALYTICAL ANCHOR) ==================== */
.ai-map-container {
  background: radial-gradient(circle at 50% 10%, #153250 0%, #06121E 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ai-radius-xl);
  padding: 36px 30px;
  box-shadow: 0 25px 60px rgba(6, 18, 30, 0.6);
  color: #FFFFFF;
}

.ai-map-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.ai-hub-topology {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.ai-hub-core-pulse {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #E05C2A 0%, #B84218 70%, #0B1F33 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px var(--ai-orange-glow);
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
}

.ai-hub-core-pulse::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(224, 92, 42, 0.5);
  animation: spinSlow 30s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-nodes-grid-12 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.ai-map-node-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ai-radius-sm);
  padding: 12px 8px;
  text-align: center;
  color: #E2E8F0;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 750;
}

.ai-map-node-btn:hover {
  background: rgba(224, 92, 42, 0.2);
  border-color: var(--ai-orange);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.ai-map-node-btn.active-node-btn {
  background: var(--ai-orange);
  border-color: var(--ai-orange);
  color: #FFFFFF;
  box-shadow: 0 6px 20px var(--ai-orange-glow);
}

.ai-map-node-btn.active-node-btn i {
  color: #FFFFFF !important;
}

.ai-map-details-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--ai-radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
}

/* ==================== 4. BEFORE / AFTER (WARM SAND/BEIGE) ==================== */
.ai-split-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.ai-split-card-before {
  background: #FFFFFF;
  border: 1.5px solid #FCA5A5;
  border-radius: var(--ai-radius-xl);
  padding: 30px;
  box-shadow: var(--ai-shadow-card);
}

.ai-split-card-after {
  background: #FFFFFF;
  border: 2px solid var(--ai-orange);
  border-radius: var(--ai-radius-xl);
  padding: 30px;
  box-shadow: 0 15px 40px rgba(224, 92, 42, 0.12);
  position: relative;
}

.ai-island-item {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  border-radius: var(--ai-radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #7F1D1D;
}

.ai-pipeline-item {
  background: var(--ai-sand-light);
  border: 1px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ai-navy);
}

.ai-pipeline-item strong {
  color: var(--ai-orange);
}

/* ==================== 5. ANALYTICAL INDICATORS (CLEAN WHITE) ==================== */
.ai-indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.ai-indicator-card {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  padding: 24px;
  box-shadow: var(--ai-shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.ai-indicator-card:hover {
  border-color: var(--ai-orange);
  box-shadow: var(--ai-shadow-hover);
  transform: translateY(-2px);
}

.ai-indicator-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ai-indicator-gauge-bar {
  background: var(--ai-sand-light);
  border: 1px solid var(--ai-border);
  height: 8px;
  border-radius: 100px;
  overflow: hidden;
  margin: 10px 0 14px;
}

.ai-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ai-orange), var(--ai-orange-hover));
  border-radius: 100px;
  transition: width 1s ease-in-out;
}

/* ==================== 6. BOTTLENECK DIAGNOSTIC TERMINAL (WARM BEIGE) ==================== */
.ai-symptoms-terminal {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-xl);
  padding: 32px;
  box-shadow: var(--ai-shadow-card);
}

.ai-symptoms-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.ai-symptom-chip {
  background: var(--ai-sand-light);
  border: 1.5px solid var(--ai-border-warm);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ai-navy);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-symptom-chip:hover {
  background: #FFFFFF;
  border-color: var(--ai-orange);
  color: var(--ai-orange);
  transform: translateY(-1px);
}

.ai-symptom-chip.selected {
  background: var(--ai-navy);
  border-color: var(--ai-navy);
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(11, 31, 51, 0.25);
}

.ai-symptom-chip.selected .ai-symptom-chip-dot {
  background: var(--ai-orange);
}

.ai-symptom-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ai-text-muted);
}

/* ==================== 7. TRANSFORMATION WALL (LIGHT WARM) ==================== */
.ai-trans-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-trans-row {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 40px 1.4fr;
  align-items: center;
  gap: 18px;
  box-shadow: var(--ai-shadow-card);
}

.ai-trans-stage {
  padding: 14px 18px;
  border-radius: var(--ai-radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.ai-stage-raw {
  background: #FFF5F5;
  border: 1px dashed #FCA5A5;
  color: #7F1D1D;
}

.ai-stage-final {
  background: var(--ai-orange-subtle);
  border: 1.5px solid rgba(224, 92, 42, 0.3);
  color: var(--ai-navy);
}

/* ==================== 8. HUMAN + AI GOVERNANCE (CLEAN WHITE) ==================== */
.ai-swimlanes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.ai-lane-col {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border);
  border-radius: var(--ai-radius-xl);
  padding: 24px;
  box-shadow: var(--ai-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-lane-header {
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--ai-border);
}

.ai-lane-item {
  background: var(--ai-sand-light);
  border: 1px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ai-navy);
  line-height: 1.5;
}

/* ==================== 9. INDUSTRY SCENE SIMULATOR (CLEAN WHITE/SAND) ==================== */
.ai-industry-stage-light {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-xl);
  padding: 34px;
  box-shadow: var(--ai-shadow-card);
}

.ai-scene-box-light {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.ai-scene-action-card-light {
  background: var(--ai-sand-light);
  border: 1.5px solid var(--ai-border-warm);
  border-radius: var(--ai-radius-lg);
  padding: 28px;
  text-align: center;
}

/* ==================== 10. 5-LAYER ARCHITECTURE (WARM BEIGE) ==================== */
.ai-arch-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-arch-layer {
  background: #FFFFFF;
  border: 1.5px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 14px rgba(11, 31, 51, 0.04);
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 1024px) {
  .ai-hero-wrap,
  .ai-opp-grid,
  .ai-map-layout,
  .ai-split-comparison,
  .ai-swimlanes-grid,
  .ai-scene-box-light {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ai-nodes-grid-12 {
    grid-template-columns: repeat(3, 1fr);
  }

  .ai-trans-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ai-arch-layer {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .ai-opp-wrapper,
  .ai-map-container,
  .ai-symptoms-terminal,
  .ai-industry-stage-light {
    padding: 20px 16px;
  }

  .ai-nodes-grid-12 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-pill-btn,
  .ai-symptom-chip {
    padding: 8px 14px;
    font-size: 12.5px;
  }

  .ai-indicators-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .ai-os-pulse-dot,
  .ai-hub-core-pulse::after {
    animation: none !important;
  }

  .ai-flow-node,
  .ai-pill-btn,
  .ai-map-node-btn,
  .ai-symptom-chip,
  .ai-indicator-card {
    transition: none !important;
    transform: none !important;
  }
}
