
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: url('../images/background.webp') center center / cover no-repeat fixed;
  color: #ffffff;
  scroll-behavior: smooth;
  max-width: 100vw;
  overflow-x: hidden;
}

.navbar {
  background: transparent;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 10;
  border-bottom: none;
}

.navbar > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 2rem;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #3498db;
}

.navbar-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-access {
  background: linear-gradient(to right, #3498db, #007bff);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
  text-decoration: none;
  display: inline-block;
}

.client-access:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.6);
}

.hero {
  text-align: center;
  padding: 10rem 2rem 5rem 2rem;
  position: relative;
  z-index: 1;
}

h1.hero-title {
  margin-bottom: 0.1rem;
}

.hero::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-title {
  font-size: 3rem;
  margin-top: 1rem;
  padding: 0;
  animation: fadeIn 2s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #3498db;
  animation: fadeIn 3s ease-out;
}

.features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 4rem 2rem;
  flex-wrap: wrap;
}

.feature-card {
  background-color: transparent;
  border: none; 
  box-shadow: none;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  width: 180px;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 16px rgba(52, 152, 219, 0.6);
}

.feature-card svg {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: #3498db;
}

.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #1c1f2b;
  background-color: transparent;
  margin-top: 4rem;
  font-size: 0.9rem;
  backdrop-filter: none;
}

.fade-in-observer {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-observer.visible {
  opacity: 1;
  transform: translateY(0);
}

.dark-mode {
  background-color: #ffffff;
  color: #0c0f1a;
}

.client-access-page {
  min-height: 100vh;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
}

.client-access-container {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #0c0f1a;
}

.client-access-container .error {
  background: #ffcccc;
  border: 1px solid #cc0000;
  padding: 10px;
  margin: 10px auto;
  width: 100%;
  max-width: 350px;
  text-align: center;
  color: #990000;
  font-weight: bold;
  border-radius: 4px;
}


.login-logo {
  width: 100px;
  height: auto;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.login-form label {
  font-weight: bold;
  color: #0c0f1a;
}

.login-form input {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.login-form input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.login-form button {
  margin-top: 1rem;
  background: linear-gradient(to right, #3498db, #007bff);
  color: #fff;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease all;
}

.login-form button:hover {
  background: linear-gradient(to right, #007bff, #0056b3);
}

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


/* === DASHBOARD STYLES (ADMIN / USER) === */

main.admin-dashboard,
main.user-dashboard {
  padding: 40px;
  background-color: #f7f9fc;
  min-height: 100vh;
}

main h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #003366;
}

main p {
  font-size: 16px;
  margin-bottom: 30px;
  color: #333;
}

main ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

main ul li {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

main ul li:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

main ul li a {
  text-decoration: none;
  color: #0059b3;
  font-weight: bold;
  display: block;
}

.client-access-container .error {
  background: #ffdddd;
  border: 1px solid #cc0000;
  padding: 10px;
  color: #990000;
  margin-bottom: 20px;
  border-radius: 5px;
}

.navbar-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-icons .username {
  font-weight: bold;
  color: #003366;
}

.navbar-icons .logout-link {
  color: #cc0000;
  font-weight: bold;
  text-decoration: none;
}

.client-access-container .info {
  background: #e0f8e9;
  border: 1px solid #4CAF50;
  color: #2a5934;
  padding: 10px;
  margin-bottom: 20px;
  text-align: center;
  border-radius: 4px;
  font-weight: bold;
}

main.light-section {
  padding-top: 120px;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.section-content {
  background: rgba(255, 255, 255, 0.08); /* fondo translúcido */
  backdrop-filter: blur(10px);       	/* efecto glass */
  -webkit-backdrop-filter: blur(10px);   /* compatibilidad */
  border-radius: 16px;
  padding: 3rem;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 1s ease-out;
}

.section-content h1,
.section-content h2 {
  color: #ffffff;
  margin-top: 0;
  font-weight: 700;
  line-height: 1.3;
}

.section-content p {
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #e0e0e0;
}

.section-content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.section-content li {
  margin-bottom: 1rem;
  color: #d0d0d0;
}


/* === AÑADIDO POR CÉSAR === */

.pozo-dashboard {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding: 2rem 1rem 4rem 1rem;
  background: rgba(10, 20, 40, 0.92);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.pozo-dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.pozo-dashboard-header h1 {
  color: #5ecbff;
  font-size: 2.2rem;
  margin: 0;
}

.pozo-dashboard-id-centered {
  font-size: 1.2rem;
  color: #fff;
  background: #1e293b;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

.pozo-dashboard-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Tarjetas principales en blanco */
.pozo-dashboard-card,
.chart-card {
  background: #fff;
  color: #222;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 2rem 1.5rem;
}

/* Títulos de las tarjetas */
.pozo-dashboard-card h2,
.pozo-dashboard-card h3,
.chart-card h3 {
  color: #1e293b;
  text-align: center;
}

.pozo-dashboard-map {
  flex: 2 1 500px;
  min-width: 350px;
}

.pozo-dashboard-status {
  flex: 1.2 1 320px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pozo-dashboard-status-info {
  margin-bottom: 1.5rem;
}

/* Ajusta los textos de Estado Actual */
.pozo-dashboard-label {
  color: #007bff;
  font-weight: 600;
}

.pozo-dashboard-value {
  color: #222;
}

.pozo-dashboard-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.pozo-btn {
  background: linear-gradient(90deg, #5ecbff, #1e90ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
  min-width: 160px;      /* <-- Fuerza el mismo ancho mínimo */
  text-align: center;
  box-sizing: border-box;
}

.pozo-btn.apagar {
  background: linear-gradient(90deg, #ff5e5e, #ff1e1e);
}

.pozo-btn:hover {
  opacity: 0.92;
}

.pozo-dashboard-charts {
  margin-bottom: 2rem;
}

.pozo-dashboard-charts-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.chart-card {
  min-width: 260px;
  text-align: center;
  flex: 1 1 320px;
  box-sizing: border-box;
  background: #fff;              /* Fondo blanco */
  color: #222;                   /* Texto oscuro para contraste */
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 2rem 1.5rem;
}}

.export-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Tabla de alertas */
.pozo-dashboard-alerts table {
  background: #fff;
  color: #222;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.pozo-dashboard-alerts th, .pozo-dashboard-alerts td {
  padding: 0.8rem;
  text-align: center;
  color: #fff;
}

.pozo-dashboard-alerts th {
  background: #1e293b;
  color: #fff;
}

.pozo-dashboard-alerts td {
  color: #222;
}

/* Estado de alerta */
.alerta-completa {
  background: #4CAF50;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 8px;
  font-weight: bold;
}

.alerta-pendiente {
  background: #ff9800;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 8px;
  font-weight: bold;
}

@media (max-width: 900px) {
  .pozo-dashboard-row, .pozo-dashboard-charts-row {
    flex-direction: column;
    gap: 1rem;
  }
  .pozo-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.pozo-dashboard-title {
  text-align: center !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.pozo-dashboard-id {
  text-align: center;
  margin: 0.5rem auto 0 auto;
  font-size: 1.2rem;
  color: #fff;
  background: #1e293b;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  display: inline-block;
}

.chart-card h3,
.chart-card label,
.chart-card select,
.chart-card button {
  color: #222 !important;
}

.chart-card .export-buttons button {
  background: linear-gradient(90deg, #5ecbff, #1e90ff);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  cursor: pointer;
}