/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* Dashboard container */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 20px;
}

.nav-button {
  background: white;
  border: 1px solid #ddd;
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-button:hover,
.nav-button.active {
  background: #f5f5f5;
  border-color: #bbb;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 40px;
  width: auto;
}

/* Main content */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Chart sections */
.chart-section {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-align: center;
  margin-bottom: 15px;
}

.chart-title-small {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  text-align: center;
  margin-bottom: 10px;
}

/* Chart legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 15px;
  padding-left: 10px;
}

.chart-legend-right {
  justify-content: flex-end;
  padding-right: 60px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.orange {
  background-color: #F4A460;
}

.legend-dot.brown {
  background-color: #8B4513;
}

.legend-dot.blue {
  background-color: #4169E1;
}

.legend-dot.green {
  background-color: #228B22;
}

.legend-dot.purple {
  background-color: #9932CC;
}

.legend-dot.red {
  background-color: #FF6347;
}

/* Charts */
.chart {
  width: 100%;
  min-height: 250px;
}

/* Period selector */
.period-selector {
  margin-bottom: 10px;
}

.period-selector select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  min-width: 150px;
}

.period-selector select:focus {
  outline: none;
  border-color: #4169E1;
}

/* Footer */
.dashboard-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 10px;
  }

  .chart-legend {
    flex-direction: column;
    gap: 8px;
  }

  .chart-legend-right {
    justify-content: flex-start;
    padding-right: 0;
  }

  .chart {
    min-height: 200px;
  }
}

/* ApexCharts overrides */
.apexcharts-tooltip {
  background: white !important;
  border: 1px solid #ddd !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.apexcharts-xaxis-label,
.apexcharts-yaxis-label {
  fill: #666 !important;
  font-size: 11px !important;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  margin: 40px auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  color: #666;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  padding: 15px 20px;
  background: white;
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px 30px 30px;
}

.modal-body h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.modal-body h2 {
  font-size: 20px;
  color: #333;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.modal-body p {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 15px;
  text-align: justify;
}

.modal-body ul {
  margin: 15px 0;
  padding-left: 25px;
}

.modal-body li {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 8px;
}

.modal-body .system-stages li {
  margin-bottom: 6px;
}

.modal-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-caption {
  font-size: 12px;
  color: #666;
  font-style: italic;
  text-align: center;
  margin-top: -10px;
  margin-bottom: 20px;
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal-content {
    margin: 20px auto;
    width: 95%;
    max-height: calc(100vh - 40px);
  }

  .modal-body {
    padding: 15px 20px 20px;
  }

  .modal-body h1 {
    font-size: 20px;
  }

  .modal-body h2 {
    font-size: 18px;
  }

  .modal-close {
    font-size: 28px;
    padding: 10px 15px;
  }
}
