/* ================================
   TEMA OSCURO HÍBRIDO PREMIUM
   Tonos púrpura + azul
   ================================ */

:root {
  --bg-main: #0d0b1a;
  --bg-card: #161427;
  --bg-card-hover: #1d1a33;

  --text-main: #e6e6f0;
  --text-soft: #9a9ab8;

  --accent-1: #8a4fff;   /* púrpura */
  --accent-2: #4f9dff;   /* azul */
  --accent-3: #ff6bcb;   /* rosa */
  --accent-4: #4dffdf;   /* turquesa */

  --border-soft: rgba(255,255,255,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.45);

  --font-main: "Segoe UI", Roboto, system-ui, sans-serif;
}

/* ================================
   GENERAL
   ================================ */

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
}

h1, h2, h3 {
  font-weight: 500;
  margin: 0;
}

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.4rem;
  color: var(--accent-2);
  border-left: 4px solid var(--accent-1);
  padding-left: 10px;
}

/* ================================
   HEADER
   ================================ */

header {
  background: #131124;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

header h1 {
  font-size: 1.8rem;
  color: var(--accent-1);
}

header p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ================================
   TARJETAS
   ================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  transition: 0.2s;
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.card h2 {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.card .value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-2);
}

/* Flecha de viento */
.wind-arrow {
  font-size: 40px;
  text-align: center;
  margin-top: 5px;
  color: var(--accent-1);
  transition: transform 0.4s ease-out;
}

/* ================================
   GRÁFICOS
   ================================ */

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.chart-box {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.chart-box h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-3);
  font-size: 1rem;
}

/* ================================
   ROSA DE VIENTOS
   ================================ */

#windRose {
  max-width: 400px;
  margin: auto;
}

/* ================================
   FOOTER
   ================================ */

footer {
  margin-top: 2rem;
  padding: 1rem 2rem;
  text-align: right;
  color: var(--text-soft);
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
}

/* ================================
   CABECERA IES ISBILYA
   ================================ */

.header-ies {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #131124;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-soft);
}

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

.logo-ies {
    height: 70px;
    width: auto;
}

.title-box h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--accent-1);
}

.title-box h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-soft);
}

.update-text {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* Alineación derecha del texto + botón */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* separación entre texto y botón */
}

/* Botón pequeño estilo icono */
.fullscreen-btn {
    background: var(--accent-1);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transition: 0.2s;
}

.fullscreen-btn:hover {
    background: var(--accent-2);
}

.download-container {
    padding: 2rem;
}

.download-container h2 {
    margin-top: 2rem;
    color: var(--accent-2);
}

.download-btn {
    display: inline-block;
    margin: 0.5rem 0;
    padding: 10px 16px;
    background: var(--accent-1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.2s;
}

.download-btn:hover {
    background: var(--accent-2);
}

.range-form {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.range-form input {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid var(--border-soft);
}

th {
    cursor: pointer;
    background: #444;
    color: black;
    font-weight: bold;
    padding: 10px;
    font-size: 0.9rem;
}

#graficoMes {
    width: 500px !important;
    height: 300px !important;
    display: block;
    margin: 20px auto;
}

.range-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.range-form button,
.range-form input,
.range-form select {
    max-width: 300px;
}

.grafico-container {
    text-align: center;
}

.range-form {
    text-align: left !important;
    align-items: flex-start !important;
}



