/* Monitor satelital. Layout mapa + panel tomado de proyectos-geo (sitio/comun.css),
   con los colores de NODOAGRO. No usa Tailwind: src/input.css solo escanea index.html. */
:root {
  --fondo: #ffffff;
  --fondo-2: #f9fafb;
  --texto: #1f2937;
  --texto-2: #4b5563;
  --borde: #e5e7eb;
  --acento: #15803d;
  --acento-fuerte: #166534;
  --aviso-fondo: #faeeda;
  --aviso-texto: #633806;
  --wa: #25d366;
  --wa-hover: #1ebe5b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #1a1c1a;
    --fondo-2: #232623;
    --texto: #eef1ec;
    --texto-2: #b3b9b1;
    --borde: #363a36;
    --acento: #4ade80;
    --acento-fuerte: #86efac;
    --aviso-fondo: #412402;
    --aviso-texto: #fac775;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Montserrat (la de la landing) en la marca y los títulos; Hanken Grotesk en el texto y las cifras */
html, body { margin: 0; height: 100%; font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--texto); background: var(--fondo); }
body { display: flex; }
#mapa { flex: 1; min-height: 100%; background: var(--fondo-2); }
#panel { width: 380px; overflow-y: auto; padding: 20px; border-left: 1px solid var(--borde); background: var(--fondo); }

.marca, h1, h2 { font-family: "Montserrat", system-ui, sans-serif; }
.marca { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--acento); text-decoration: none; margin-bottom: 12px; }
h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.sub { font-size: 13px; color: var(--texto-2); margin: 0; line-height: 1.45; }
.aviso { display: block; font-size: 13px; background: var(--aviso-fondo); color: var(--aviso-texto); padding: 8px 10px; border-radius: 6px; margin: 12px 0 0; }
header { padding-bottom: 16px; }
section { border-top: 1px solid var(--borde); padding: 16px 0; }

label { display: block; font-size: 13px; color: var(--texto-2); margin: 14px 0 6px; }
select, input[type=range] { width: 100%; }
select, button { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--borde); border-radius: 6px; background: var(--fondo); color: var(--texto); }
button { cursor: pointer; }
input[type=range] { accent-color: var(--acento); }
.nota { font-size: 12px; color: var(--texto-2); margin: 8px 0 0; }
.explica { font-size: 13px; line-height: 1.45; margin: 12px 0 0; }

.indices { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.indices button { font-weight: 500; }
.indices button[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: #fff; }
@media (prefers-color-scheme: dark) { .indices button[aria-pressed="true"] { color: #10210f; } }

.leyenda { margin-top: 10px; font-size: 12px; color: var(--texto-2); }
.leyenda .barra { height: 10px; border-radius: 3px; }
.leyenda .extremos { display: flex; justify-content: space-between; margin-top: 4px; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }
.leyenda .items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.leyenda .items b { font-weight: 600; color: var(--texto); }
.leyenda i.vacio { border: 1px solid var(--texto-2); background: transparent; }

.alertas { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.45; }
.alertas li { border-left: 3px solid var(--color, var(--borde)); padding: 4px 0 4px 10px; margin-bottom: 6px; }
.alertas li.normal { color: var(--texto-2); }
.alertas .nivel { font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; padding: 1px 6px; border-radius: 999px; background: var(--color); }
.alertas li.vigilancia .nivel { color: #111827; }
.alertas li.alerta .nivel { color: #fff; }

dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 12px 0 16px; }
dt { color: var(--texto-2); }
dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.grafico { position: relative; height: 200px; }

.cta p { font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.boton-wa { display: block; text-align: center; background: var(--wa); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.boton-wa:hover { background: var(--wa-hover); }
.enlace { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--acento); }
.pie { border-top: 1px solid var(--borde); padding-top: 12px; font-size: 11px; color: var(--texto-2); line-height: 1.45; }
.pie p { margin: 0 0 6px; }

.leaflet-container { font-family: inherit; }
.leaflet-tile.capa-indice { image-rendering: pixelated; }

@media (max-width: 720px) {
  body { flex-direction: column; }
  #mapa { min-height: 55vh; }
  #panel { width: 100%; border-left: 0; border-top: 1px solid var(--borde); padding: 16px; }
}
