@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

/* ══════════════════════════════════════════
   CSS VARIABLES
══════════════════════════════════════════ */
:root {
  --bg-deep:    #07060B; 
  --bg-panel:   #00000023; 
  --bg-card:    #22204a;
  --bg-card2:   #1e1c3a;
  --accent-hot: #7700ff;
  --accent-bar: #ec5bb4;
  --text-main:  #ffffff;
  --text-muted: #5a5580;
  --pill-bg:    #2a2750;
  --pill-border:#3a3760;
  --radius:     14px;
  --radius-sm:  8px;
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: #1a0933; /* Base morada muy profunda (reemplaza al negro) */
}

body {
  width: 100%;
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-main);
  font-size: 14px;
  overflow: hidden;
  background-color: transparent !important; /* Importante: permite ver el ::before */
}

/* Pseudo-elemento para el fondo radial borroso */
body::before {
  content: '';
  position: fixed; /* Para que se mantenga fijo al fondo */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 10%, #20133430 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, #ff327d22 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, #0f00266a 0%, transparent 60%), 
    radial-gradient(circle at 20% 80%, #ff327d1a 0%, transparent 50%), 
    radial-gradient(circle at 85% 85%, #0900171a 0%, transparent 40%);
  filter: blur(60px); /* Reducido un poco para que no se vea tan lavado/blanco */
  z-index: -1; /* Lo enviamos al fondo, detrás de todo el contenido */
}

/* ══════════════════════════════════════════
   ROOT WRAPPER — 100vh flex column
══════════════════════════════════════════ */
.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 32px;
  gap: 16px;
}

/* ══════════════════════════════════════════
   TOP SECTION
══════════════════════════════════════════ */
.top-section {
    flex: 1; 
    display: grid;
    align-items: center;
    gap: 24px;
    min-height: 300px; 
}

.bottom-section {
    flex: 2; 
    display: grid;
    grid-template-columns: 1fr clamp(300px, 25%, 400px); /* Ajustamos el ancho de meetings */
    gap: 16px;
    min-height: 0;
}

.title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: var(--bg-panel);
  padding: 30px;
  border-radius: var(--radius);
  gap: 15px; /* Reduje un poco el gap para dar más aire */
  backdrop-filter: blur(10px); /* Efecto de filtro borroso para el fondo */
  overflow: hidden; /* EVITA que la imagen se salga del borde redondeado */
}

.title-block h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.8rem); /* Reduje el máximo un poco */
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0; /* Asegura que no haya margenes fantasma empujando la imagen */
  flex-shrink: 0; /* OBLIGA al título a no encogerse para darle espacio a la imagen */
}

.title-image {
  width: 100%;
  flex: 1; /* Ocupa TODO el espacio restante del contenedor */
  min-height: 0; /* TRUCO CLAVE: permite que la imagen se encoja dentro de un flex container */
  object-fit: contain; /* Mantiene la proporción sin deformar */
}
.chart-block {
  position: relative;
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 10px 20px 30px 20px;
  backdrop-filter: blur(10px); /* Efecto de filtro borroso para el fondo */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.date-picker-top {
  position: absolute;
  top: 20px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--pill-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  z-index: 2;
}

.chart-wrapper {
  flex: 1;
  position: relative;
  min-height: 0;
}

.chart-wrapper canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ══════════════════════════════════════════
   BOTTOM SECTION
══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   RESPONSIVE — LAPTOP  ≤ 1280px
══════════════════════════════════════════ */
@media (max-width: 1400px) {
    .dashboard {
        padding: 12px 16px; /* Menos espacio externo */
        gap: 12px;
    }

    html, body {
        font-size: 13px; 
    }

    .top-section {
      flex: 0.5; 
      min-height: 200px; 
  }

    /* Reducimos el padding interno de los bloques para ganar espacio */
    .chart-block, .timeline-panel, .meetings-panel {
        padding: 15px 20px;
    }
}
/* ══════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 900px
   Scroll layout, sections stack vertically
══════════════════════════════════════════ */
@media (max-width: 900px) {
  html, body { overflow: auto; }

  .dashboard {
    height: auto;
    min-height: 100vh;
    padding: 16px;
    gap: 14px;
  }

  .top-section {
    flex: none;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .title-block { height: auto; }

  .chart-block {
    height: 220px;
  }

  .bottom-section {
    flex: none;
    grid-template-columns: 1fr;
    gap: 14px;
  }

}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 600px
══════════════════════════════════════════ */
@media (max-width: 600px) {
  .dashboard {
    padding: 12px;
    gap: 12px;
  }

  .title-block h1 {
    font-size: 1.5rem;
  }

  .chart-block {
    height: 170px;
    padding: 10px 10px 6px;
  }

  .date-picker-top {
    font-size: 10px;
    padding: 3px 9px;
  }
}
