html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: "Noto Sans", Arial, sans-serif;
}

/* Breadcrumb de navegación: Ecuador > Provincia > Cantón */
.breadcrumb {
  padding: 14px 20px;
  font-size: 15px;
  color: #555;
  border-bottom: 1px solid #eee;
}

.breadcrumb .crumb {
  cursor: pointer;
  color: #1a9fe0;
}

.breadcrumb .crumb:not(:last-child)::after {
  content: " › ";
  color: #999;
  cursor: default;
}

.breadcrumb .crumb.current {
  color: #333;
  cursor: default;
  font-weight: 600;
}

/* Vistas: solo una visible a la vez */
.view {
  display: none;
}

.view.is-active {
  display: block;
}

#mapdiv {
  width: 100%;
  height: 600px;
}

#chartdiv {
  width: 100%;
  height: 600px;
}

/* Filtro por parroquia dentro de un cantón */
.parroquia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 4px 20px 20px;
}

.parroquia-pill {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #444;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.parroquia-pill:hover {
  border-color: #1a9fe0;
}

.parroquia-pill.is-active {
  background: #1a6fe0;
  border-color: #1a6fe0;
  color: #fff;
}

.parroquia-pill.is-disabled {
  cursor: not-allowed;
  color: #bbb;
  background: #f5f5f5;
  border-color: #eee;
}

.parroquia-pill.is-disabled:hover {
  border-color: #eee;
}

/* Loading del gráfico de barras */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 400px;
  color: #777;
  font-size: 15px;
}

.loading.is-active {
  display: flex;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #d9ecf7;
  border-top-color: #1a9fe0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.chart-error {
  display: none;
  padding: 20px;
  margin: 0 20px;
  color: #a00000;
  background: #fdeaea;
  border: 1px solid #f3c6c6;
  border-radius: 6px;
}

.chart-error.is-active {
  display: block;
}

#view-cantones h2,
#view-chart h2 {
  padding: 0 20px;
  font-size: 20px;
  color: #333;
}

.canton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 10px 20px 30px;
}

.canton-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.canton-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.canton-card.has-data {
  border-color: #1a9fe0;
  background: #eaf6fd;
  font-weight: 600;
}

.canton-card.no-data {
  cursor: not-allowed;
  color: #999;
  background: #f5f5f5;
}

.canton-card .status {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  color: #999;
}
