/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  padding: 20px;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  padding: 10px 15px;
  border-radius: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 10px;
}

.lang-btn {
  padding: 8px 16px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 14px;
}

.lang-btn:hover {
  transform: scale(1.05);
}

.lang-btn.active {
  background: #667eea;
  color: white;
}

/* Header */
header {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
}

h1 {
  color: #667eea;
  font-size: 2.5em;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  font-size: 1.1em;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-5px);
}

.kpi-label {
  color: #888;
  font-size: 0.9em;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.kpi-value {
  font-size: 2em;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.kpi-subtext {
  color: #666;
  font-size: 0.85em;
}

/* Tooltips */
.tooltip-term {
  position: relative;
  display: inline-block;
  border-bottom: 2px dotted #667eea;
  cursor: help;
  color: #667eea;
  font-weight: 600;
}

.tooltip-content {
  visibility: hidden;
  position: absolute;
  background: #333;
  color: white;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.85em;
  width: 280px;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  font-weight: normal;
  line-height: 1.5;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-term:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Chart Grid */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-container {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.chart-title {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

/* Insights Section */
.insights-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.8em;
  color: #667eea;
  margin-bottom: 20px;
  border-bottom: 3px solid #667eea;
  padding-bottom: 10px;
}

.insight-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 5px solid #667eea;
}

.insight-card.success {
  border-left-color: #28a745;
}

.insight-card.warning {
  border-left-color: #ffc107;
}

.insight-card.info {
  border-left-color: #17a2b8;
}

.insight-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  font-size: 1.1em;
}

.insight-message {
  color: #666;
  line-height: 1.6;
}

.insight-metric {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  margin-top: 8px;
}

/* Recommendations */
.recommendations {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.recommendation-card {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 5px solid #764ba2;
}

.rec-priority {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 10px;
}

.rec-priority.high {
  background: #dc3545;
  color: white;
}

.rec-priority.medium {
  background: #ffc107;
  color: #333;
}

.rec-category {
  color: #667eea;
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 5px;
}

.rec-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.rec-impact {
  background: #e3f2fd;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  color: #1976d2;
  font-weight: 500;
}

.rec-actions {
  margin-top: 15px;
}

.rec-actions strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
}

.rec-actions ul {
  margin-left: 20px;
}

.rec-actions li {
  margin-bottom: 8px;
  color: #666;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.8em;
  }

  .language-switcher {
    top: 10px;
    right: 10px;
  }

  body {
    padding: 10px;
  }
}
