/* ============================================================================
   EXECUTIVE VIEW STYLES
   Based on EXECUTIVE_VIEW_DESIGN_PRINCIPLES.md
   Philosophy: "From Data to Decisions in 30 Seconds"
   ============================================================================ */

/* === HERO SECTION === */

.exec-hero-section {
  margin-bottom: 40px;
}

.exec-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1400px) {
  .exec-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .exec-hero-grid {
    grid-template-columns: 1fr;
  }
}

.exec-hero-kpi-card {
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-elev) 100%);
  border-radius: 12px;
  padding: 24px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.exec-hero-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #5ee6a8, #7ab7ff);
  opacity: 0;
  transition: opacity 0.3s;
}

.exec-hero-kpi-card:hover::before {
  opacity: 1;
}

.exec-hero-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Data-driven border colors */
.exec-hero-kpi-card[data-health-level="excellent"] {
  border-color: rgba(94, 230, 168, 0.3);
}

.exec-hero-kpi-card[data-health-level="good"] {
  border-color: rgba(122, 183, 255, 0.3);
}

.exec-hero-kpi-card[data-health-level="warning"] {
  border-color: rgba(255, 193, 7, 0.3);
}

.exec-hero-kpi-card[data-health-level="critical"] {
  border-color: rgba(255, 87, 51, 0.3);
  animation: pulse-critical 2s ease-in-out infinite;
}

@keyframes pulse-critical {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(255, 87, 51, 0.4);
  }
  50% { 
    box-shadow: 0 0 20px 10px rgba(255, 87, 51, 0.1);
  }
}

.exec-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.exec-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.exec-kpi-number {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #7ab7ff 0%, #5ee6a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.exec-kpi-unit {
  font-size: 24px;
  color: var(--ink-muted);
  font-weight: 600;
}

.exec-kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
}

.exec-kpi-trend.positive {
  color: #5ee6a8;
  background: rgba(94, 230, 168, 0.1);
}

.exec-kpi-trend.negative {
  color: #ff5733;
  background: rgba(255, 87, 51, 0.1);
}

.exec-kpi-trend.neutral {
  color: #ffc107;
  background: rgba(255, 193, 7, 0.1);
}

.exec-kpi-subtitle {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.exec-kpi-sparkline {
  margin-top: 16px;
  height: 40px;
  opacity: 0.6;
}

/* === AI INSIGHTS SECTION === */

.exec-ai-insights-section {
  margin-bottom: 40px;
}

.exec-section-header {
  margin-bottom: 24px;
}

.exec-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px 0;
}

.exec-section-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

.exec-ai-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .exec-ai-insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .exec-ai-insights-grid {
    grid-template-columns: 1fr;
  }
}

.exec-ai-insight-card {
  background: linear-gradient(135deg, 
    rgba(147, 112, 219, 0.08) 0%, 
    rgba(122, 183, 255, 0.08) 100%);
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid #9370db;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.exec-ai-insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(147, 112, 219, 0.05) 0%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.exec-ai-insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.exec-ai-insight-card:hover::before {
  opacity: 1;
}

.exec-ai-insight-card.priority-high {
  border-left-color: #ff5733;
}

.exec-ai-insight-card.priority-medium {
  border-left-color: #ffc107;
}

.exec-ai-insight-card.priority-low {
  border-left-color: #7ab7ff;
}

.exec-ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.exec-ai-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 8px rgba(147, 112, 219, 0.6));
}

.exec-ai-badge {
  background: rgba(147, 112, 219, 0.2);
  color: #9370db;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.exec-ai-insight-card.priority-high .exec-ai-badge {
  background: rgba(255, 87, 51, 0.2);
  color: #ff5733;
}

.exec-ai-insight-card.priority-medium .exec-ai-badge {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.exec-ai-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.4;
}

.exec-ai-description {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.exec-ai-impact {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  flex-wrap: wrap;
}

.exec-impact-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 120px;
}

.exec-impact-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.exec-impact-value {
  font-size: 20px;
  font-weight: 700;
  color: #5ee6a8;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.exec-ai-action-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #9370db 0%, #7ab7ff 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.exec-ai-action-btn:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.4);
}

/* === BUSINESS PERFORMANCE QUADRANTS === */

.exec-quadrants-section {
  margin-bottom: 40px;
}

.exec-quadrant-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .exec-quadrant-container {
    grid-template-columns: 1fr;
  }
}

.exec-quadrant {
  background: var(--panel);
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid transparent;
  transition: all 0.3s ease;
}

.exec-quadrant.financial {
  border-top-color: #5ee6a8;
}

.exec-quadrant.operational {
  border-top-color: #7ab7ff;
}

.exec-quadrant.customer {
  border-top-color: #ffc107;
}

.exec-quadrant.safety {
  border-top-color: #ff5733;
}

.exec-quadrant:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.exec-quadrant-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.exec-quadrant-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.exec-quadrant-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.exec-quadrant-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exec-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.exec-metric-row:last-child {
  border-bottom: none;
}

.exec-metric-label {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}

.exec-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.exec-metric-value span {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.exec-metric-value span.positive,
.exec-metric-value.positive span {
  background: rgba(94, 230, 168, 0.2);
  color: #5ee6a8;
}

.exec-metric-value span.negative,
.exec-metric-value.negative span {
  background: rgba(255, 87, 51, 0.2);
  color: #ff5733;
}

/* === DEEP DIVE SECTIONS === */

.exec-deep-dive-wrapper {
  margin-bottom: 40px;
}

.exec-deep-dive-section {
  background: var(--panel);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all 0.3s ease;
}

.exec-deep-dive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.exec-deep-dive-header:hover {
  background: var(--panel-elev);
}

.exec-deep-dive-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.exec-deep-dive-chevron {
  transition: transform 0.3s ease;
  color: var(--accent);
  min-width: 20px;
}

.exec-deep-dive-section.expanded .exec-deep-dive-chevron {
  transform: rotate(90deg);
}

.exec-deep-dive-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.exec-summary-stat {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.exec-summary-badge {
  background: rgba(94, 230, 168, 0.2);
  color: #5ee6a8;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.exec-deep-dive-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 24px;
}

.exec-deep-dive-section.expanded .exec-deep-dive-content {
  max-height: 2000px;
  padding: 0 24px 24px 24px;
}

.exec-deep-dive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .exec-deep-dive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .exec-deep-dive-grid {
    grid-template-columns: 1fr;
  }
}

.exec-deep-dive-card {
  background: var(--panel-elev);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--line);
}

.exec-deep-dive-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exec-deep-dive-card .exec-metric-row {
  padding: 8px 0;
  font-size: 13px;
}

/* === COMPETITIVE BENCHMARKING === */

.exec-benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .exec-benchmark-grid {
    grid-template-columns: 1fr;
  }
}

.exec-benchmark-card {
  background: var(--panel-elev);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--line);
}

.exec-benchmark-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exec-benchmark-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.exec-benchmark-label {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exec-benchmark-value {
  font-size: 28px;
  font-weight: 700;
}

.exec-benchmark-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.exec-benchmark-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exec-benchmark-bar-label {
  font-size: 11px;
  color: var(--ink-muted);
  min-width: 60px;
  text-align: right;
}

.exec-benchmark-bar-track {
  flex: 1;
  height: 8px;
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
}

.exec-benchmark-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.exec-benchmark-status {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}

.exec-benchmark-status.leading {
  background: rgba(94, 230, 168, 0.2);
  color: #5ee6a8;
}

.exec-benchmark-status.chasing {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

/* === RESPONSIVE ADJUSTMENTS === */

@media (max-width: 768px) {
  .exec-section-title {
    font-size: 24px;
  }
  
  .exec-kpi-number {
    font-size: 36px;
  }
  
  .exec-kpi-unit {
    font-size: 18px;
  }
  
  .exec-ai-title {
    font-size: 16px;
  }
  
  .exec-deep-dive-title {
    font-size: 14px;
  }
  
  .exec-deep-dive-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* === ANIMATIONS === */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exec-hero-kpi-card,
.exec-ai-insight-card,
.exec-quadrant {
  animation: fadeIn 0.5s ease forwards;
}

.exec-hero-kpi-card:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.exec-hero-kpi-card:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.exec-hero-kpi-card:nth-child(3) { animation-delay: 0.3s; opacity: 0; }
.exec-hero-kpi-card:nth-child(4) { animation-delay: 0.4s; opacity: 0; }

.exec-ai-insight-card:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.exec-ai-insight-card:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.exec-ai-insight-card:nth-child(3) { animation-delay: 0.3s; opacity: 0; }

