/* ============================================
   DATI PAGE - CSS CUSTOM SPECIFICO
   Nomi classi unici per evitare conflitti
   ============================================ */

/* Header Section - Extended version of project-header for /dati page */
.dati-header-extended {
  padding: 5rem 0; /* Increased from 4rem to accommodate area selector */
  background: linear-gradient(90deg, var(--forest-600) 0%, var(--tuff-600) 100%);
  color: white;
}

.dati-header-extended h1 {
  margin-bottom: 1.5rem; /* Slightly more space for subtitle */
}

.dati-header-extended p {
  margin-bottom: 2rem; /* More space before area selector */
}

/* Monitoring Area Selector */
.mpso-area-selector-container {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.mpso-area-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mpso-area-selector-label {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  color: white;
}

.mpso-area-selector-label i {
  font-size: 1.1rem;
}

.mpso-area-selector-dropdown {
  min-width: 250px;
  background: white;
  color: #374151;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.mpso-area-selector-loading {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mpso-area-selector-loading i {
  animation: spin 1s linear infinite;
}

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

/* Metric Cards Container */
.mpso-metric-cards-container {
  padding: 3rem 0;
  background: #f8fafc;
}

.mpso-metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Individual Metric Card */
.mpso-metric-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 1rem;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mpso-metric-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.mpso-metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -5px rgba(16, 185, 129, 0.4);
}

.mpso-metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.mpso-metric-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mpso-metric-card-icon {
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
}

.mpso-metric-card-value {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0.5rem 0;
  line-height: 1;
}

.mpso-metric-card-status {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

/* Status Color Variants */
.mpso-metric-card.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3);
}

.mpso-metric-card.warning:hover {
  box-shadow: 0 20px 40px -5px rgba(245, 158, 11, 0.4);
}

.mpso-metric-card.critical {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 10px 25px -5p rgba(239, 68, 68, 0.3);
}

.mpso-metric-card.critical:hover {
  box-shadow: 0 20px 40px -5px rgba(239, 68, 68, 0.4);
}

/* Charts and Weather Section */
.mpso-charts-weather-section {
  padding: 3rem 0;
  background: white;
}

.mpso-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Temperature Chart Card */
.mpso-temperature-chart-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.mpso-chart-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mpso-chart-container {
  height: 300px;
  position: relative;
}

/* Weather Forecast Card */
.mpso-weather-forecast-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.mpso-weather-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mpso-weather-days {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mpso-weather-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.mpso-weather-day-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.mpso-weather-icon {
  font-size: 1.5rem;
  width: 2rem;
  text-align: center;
}

.mpso-weather-day-name {
  font-weight: 600;
  color: #374151;
  min-width: 4rem;
}

.mpso-weather-date {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 400;
  margin-top: 2px;
}

.mpso-weather-description {
  color: #6b7280;
  font-size: 0.875rem;
  flex: 1;
}

.mpso-weather-temp {
  font-weight: 700;
  color: #374151;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.mpso-temp-max {
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc2626;
}

.mpso-temp-min {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
}

/* Parameters Section */
.mpso-parameters-section {
  padding: 3rem 0;
  background: #f8fafc;
}

.mpso-parameters-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #374151;
  text-align: center;
  margin-bottom: 3rem;
}

.mpso-parameters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Parameter Card */
.mpso-parameter-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.mpso-parameter-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.mpso-parameter-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.mpso-parameter-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.mpso-parameter-content {
  flex: 1;
}

.mpso-parameter-name {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.5rem;
}

.mpso-parameter-description {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.mpso-parameter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Status Badges */
.mpso-status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mpso-status-badge.optimal {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.mpso-status-badge.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.mpso-status-badge.critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mpso-metric-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .mpso-charts-grid {
    grid-template-columns: 1fr;
  }

  .mpso-dati-title {
    font-size: 2.5rem;
  }

  .mpso-parameter-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .mpso-metric-cards-grid {
    grid-template-columns: 1fr;
  }

  .mpso-metric-card {
    padding: 1.5rem;
  }

  .mpso-dati-title {
    font-size: 2rem;
  }
}
