* {
  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%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.dashboard {
  max-width: 1400px;
  margin: 0 auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #fe9d1a 0%, #11385a 100%);
}

.metric-label {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-value {
  font-size: 2.5em;
  font-weight: bold;
  color: #11385a;
  margin-bottom: 10px;
}

.metric-unit {
  color: #fe9d1a;
  font-size: 0.5em;
}

.metric-progress {
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.metric-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #fe9d1a 0%, #ff7b00 100%);
  border-radius: 10px;
  transition: width 1s ease;
}

.pump-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.pump-status {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 20px 40px;
  border-radius: 50px;
  background: #f5f5f5;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.pump-status.active {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.pump-icon {
  width: 60px;
  height: 60px;
  position: relative;
}

.pump-icon svg {
  width: 100%;
  height: 100%;
}

.pump-status.active .water-flow {
  animation: flow 1s linear infinite;
}

@keyframes flow {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-10px);
  }
}

.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.chart-title {
  color: #11385a;
  font-size: 1.2em;
  margin-bottom: 20px;
  font-weight: 600;
}

.controls-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.control-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.control-btn {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  background: linear-gradient(135deg, #fe9d1a 0%, #ff7b00 100%);
  box-shadow: 0 4px 15px rgba(254, 157, 26, 0.3);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 157, 26, 0.4);
}

.control-btn.secondary {
  background: linear-gradient(135deg, #11385a 0%, #1e5185 100%);
  box-shadow: 0 4px 15px rgba(17, 56, 90, 0.3);
}

.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}

.alert-banner {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: none;
  animation: slideIn 0.5s ease;
}

.alert-banner.show {
  display: block;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-radius: 15px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
}

.stat-value {
  color: #11385a;
  font-size: 1.5em;
  font-weight: bold;
}

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

  .footer h1 {
    font-size: 1.8em;
  }

  .metric-value {
    font-size: 2em;
  }
}
