/* General */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #e6f0ff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Login */
.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  margin: auto;
  box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
  transition: all 0.3s ease-in-out;
}

h1 {
  text-align: center;
  color: #003366;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  color: #003366;
}

.btn-primary {
  background-color: #003366;
  border-color: #003366;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #00509e;
  border-color: #00509e;
}

#login-error {
  text-align: center;
  margin-top: 0.75rem;
  color: #cc0000;
  font-size: 0.9rem;
}

/* Secciones */
.seccion {
  margin-top: 56px;
  padding: 20px;
}

.d-none {
  display: none !important;
}

.visible {
  display: block;
}

table {
  margin-top: 1rem;
}

/* Navegación */
.nav-tabs {
  z-index: 1000;
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #ccc;
}

.nav-tabs .nav-link {
  color: #003366;
  font-weight: bold;
}

.nav-tabs .nav-link.active {
  color: #00509e;
  border-color: #00509e #00509e #fff;
}

/* Mapa */
#map {
  width: 100vw;
  height: calc(100vh - 56px);
  position: fixed;
  top: 56px;
  left: 0;
  z-index: 1;
}

/* Gráficos de viento */
#wind-chart-container {
  position: fixed;
  top: 70px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 500;
}

#wind-chart {
  max-width: 250px;
  max-height: 250px;
}

/* Panel derecho */
#panel-derecho {
  position: absolute;
  top: 56px;
  right: 0;
  width: 30%;
  height: calc(100vh - 56px);
  background: white;
  border-left: 2px solid #ccc;
  overflow-y: auto;
  padding: 20px;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

#panel-derecho table {
  width: 100%;
  border-collapse: collapse;
}

#panel-derecho th,
#panel-derecho td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

#panel-derecho th {
  background: #f5f5f5;
}

/* Forecast container */
#forecast-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-height: 220px;
  background: rgba(255, 255, 255, 0.95);
  overflow-y: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  z-index: 800;
  padding: 10px;
}

#forecast-container h4 {
  margin-top: 0;
  font-size: 16px;
  font-weight: bold;
  color: #003366;
}

#forecast-table-wrapper {
  max-height: 160px;
  overflow-y: auto;
}

#forecast-container table {
  width: 100%;
  font-size: 12px;
}

#forecast-container th,
#forecast-container td {
  padding: 4px 6px;
  text-align: center;
  border: 1px solid #ddd;
}

/* Flechas */
.arrow-icon {
  display: inline-block;
  transform-origin: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: #003366;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
}

/* Mejoras responsivas */
@media (max-width: 768px) {
  #panel-derecho {
    width: 100%;
    position: static;
    height: auto;
    border-left: none;
    box-shadow: none;
  }

  #forecast-container {
    max-height: 160px;
  }
}


/* Subtabs específicas dentro de Datos */
#datos .nav-tabs {
  position: relative;
  top: auto;
  margin-top: 20px;
  background: none;
  border-bottom: 1px solid #ddd;
}


td.fecha {
  white-space: nowrap;
}
