:root{
    --header-h: 76px;
    --bg: #0b1020;
    --fg: #e7edf6;
    --muted: #a6b0c3;
    --brand: #2d7ef7;
    --panel-bg: rgba(10, 14, 23, 0.75);
    --panel-bd: rgba(255,255,255,0.1);
    --shadow: 0 6px 20px rgba(0,0,0,0.25);
    --radius: 14px;
  }
  
  *{ box-sizing: border-box; }
  html,body{ height:100%; margin:0; background:#050814; color:var(--fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji"; }
  
  #appHeader{
    height: var(--header-h);
    padding: 10px 14px;
    background: linear-gradient(180deg, #058061 0%, #058061 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center;
  }


  
  .filters{
    width:100%; display:flex; gap:2px; align-items: center; justify-content: left;
  }
  

  .filters label{ font-size:12px; color:var(--muted); }
  .filters select{
    height:36px; padding: 0 8px; border-radius: 10px; border:1px solid rgba(255,255,255,0.12);
    background: #076a51; color:#fff; outline:none; width: 180px; font-size: 12px;
    display:flex; flex: 1;
    max-width: 300px;
  }


  .filters input{
    height:36px; padding: 0 8px; border-radius: 10px; border:1px solid rgba(255,255,255,0.12);
    background: #076a51; color:#fff; outline:none; width: 80px;
    display:flex; flex: 1;
    max-width: 300px;
  }
  

  .filters input::placeholder{
    color: #d9e6ff;
  }
  
  .stats{ display:flex; gap:18px; align-items:center; color:var(--fg); font-size:14px; }
  .stats strong{ color:#bcd1ff; }
  
  #map{
    height: calc(100vh - var(--header-h));
    width: 100%;
  }
  
  /* Info panel */
  #infoPanel{
    position: fixed;
    right: 14px; bottom: 14px;
    width: 360px; max-width: calc(100vw - 28px);
    background: var(--panel-bg);
    border: 1px solid var(--panel-bd);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 12px 14px 14px;
    color:var(--fg);
    top: 100px;;
  }
  #infoPanel.hidden{ display:none; }
  #infoPanel #infoClose{
    position:absolute; top:8px; right:8px;
    width:26px; height:26px; line-height:24px; border-radius:10px;
    border:1px solid rgba(255,255,255,0.12);
    background:#076a51; color:#FFF; cursor:pointer;
  }
  #infoPanel h3{ margin:6px 0 10px; font-size:16px; color:#d9e3ff;}
  #infoPanel .mini{ color:var(--muted); font-size:12px; }
  #infoPanel .row{ margin:6px 0; }
  #infoPanel .badge{
    display:inline-block; background:#18306a; color:#cfe0ff; border:1px solid rgba(255,255,255,0.08);
    padding:4px 8px; border-radius:999px; font-size:12px; margin-right:6px;
  }
  
  /* Cluster UI (opcional) */
  .marker-cluster-small, .marker-cluster-medium, .marker-cluster-large{
    background: rgba(45,126,247,0.2);
  }
  .marker-cluster div{
    background: #2d7ef7; color:#fff; border:2px solid #fff; font-weight:600;
  }
  
  /* Marker “badge” con cantidad */
  .leaflet-div-icon.qty {
    background: rgba(15,23,60,0.95);
    color: #e7f0ff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 8px; border-radius: 10px;
    box-shadow: var(--shadow);
    font-size: 12px; line-height: 14px; text-align: center;
  }
  .leaflet-div-icon.qty .big { display:block; font-size:15px; line-height:16px; font-weight:700; }
  .leaflet-div-icon.qty .lab { display:block; font-size:10px; color:#b7c5e5; }
  

  /* Asegura que el panel queda por encima de los panes de Leaflet */
#infoPanel{
    z-index: 2000;          /* > 1000 de los controles de Leaflet */
    pointer-events: auto;   /* el panel recibe clicks */
  }
  #map{
    position: relative;     /* crea contexto y evita rarezas */
    z-index: 0;
  }
  

  /* Modo gris o gris-azulado SOLO para las teselas del mapa */
#map.grey .leaflet-tile-pane {
    filter: grayscale(1) saturate(.25) brightness(1.05) contrast(1.15);
}
#map.bluegrey .leaflet-tile-pane {
    filter: grayscale(1) saturate(.30) hue-rotate(200deg) brightness(1.05) contrast(1.10);
}
/* Asegura que los puntos/overlays no se vean afectados por el filtro */
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-shadow-pane {
    filter: none !important; 
}
  

.btn{
  display:inline-block;padding:8px 10px; padding-bottom: 10px;; border-radius:10px;color:#d9e6ff;
  background:#076a51;border:2px solid rgba(255,255,255,0.5);text-decoration:none;
  line-height: 1;
}




/* Badge del cluster con SUMA de 'cantidad' */
.mc .mc-badge{
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(5, 146, 80, 0.92); color: #fff; font-weight: 400; font-size: 12px;
  border: 1px solid rgba(255,255,255,.6); box-shadow: 0 0 6px rgba(0,0,0,.35);
}
.mc .mc-badge.md{ min-width: 32px; height: 32px; font-size: 14px; }
.mc .mc-badge.lg{ min-width: 38px; height: 38px; font-size: 15px; }


/* Opcional: panel info estilos mínimos */
#infoPanel.hidden{ display:none; }
#infoPanel .mini{ font-size:.85em; opacity:.8; }
#infoPanel .row{ margin:.25rem 0; }


/* Estilos para colegios */
.pf-dot-colegio {
  z-index: 1000 !important;
}

.mc-colegio .mc-badge {
  background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%) !important;
  border: 2px solid #0d47a1 !important;
}

.badge-colegio {
  display: inline-block;
  padding: 2px 8px;
  background: #2196f3;
  color: white;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
}






























/* Estilos para el mini-mapa */
#miniMapContainer {
  border: 2px solid #2c3e50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.minimap-tooltip {
  background: rgba(44, 62, 80, 0.95);
  border: none;
  border-radius: 4px;
  color: white;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.minimap-tooltip::before {
  border-top-color: rgba(44, 62, 80, 0.95);
}

.minimap-gmaps-btn {
  background: white;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.minimap-gmaps-btn:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.minimap-gmaps-btn a {
  color: #4285f4;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.minimap-gmaps-btn svg {
  width: 20px;
  height: 20px;
}

/* Ajustar controles del mini-mapa */
#miniMapContainer .leaflet-control-layers {
  font-size: 11px;
}

#miniMapContainer .leaflet-control-layers-toggle {
  width: 28px;
  height: 28px;
  background-size: 18px 18px;
}