*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rojo:    #C0392B;
  --rojo-s:  #E74C3C;
  --amarillo:#F4C430;
  --azul:    #1A3A5C;
  --azul-s:  #2563A8;
  --fondo:   #0F1923;
  --panel:   #162030;
  --borde:   #243448;
  --texto:   #E8EDF2;
  --muted:   #7A95B0;
  --acopio:  #F4C430;
  --refugio: #3FBFA6;
  --pendiente:#7A95B0;

  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-sans);
  background: var(--fondo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* HEADER */
header {
  background: var(--panel);
  border-bottom: 2px solid var(--rojo);
  padding: 0 1.25rem;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: .75rem; }
.brand-flag { font-size: 1.5rem; }

.brand h1 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--texto);
  letter-spacing: .03em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--amarillo);
  letter-spacing: .05em;
  margin-top: 1px;
}

/* LAYOUT */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--borde);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filters {
  display: flex;
  gap: .5rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--borde);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border: 1px solid var(--borde);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--texto);
  color: var(--texto);
  background: var(--borde);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 1rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--muted);
  border-bottom: 1px solid var(--borde);
}

.point-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
}

.point-list::-webkit-scrollbar { width: 4px; }
.point-list::-webkit-scrollbar-track { background: transparent; }
.point-list::-webkit-scrollbar-thumb { background: var(--borde); border-radius: 2px; }

.point-item {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--borde);
  cursor: pointer;
  transition: background .1s;
}

.point-item:hover { background: var(--borde); }

.point-item-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .3rem;
}

.point-name {
  font-weight: 600;
  font-size: .85rem;
  flex: 1;
}

.point-estado {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--muted);
  margin-bottom: .25rem;
}

.point-detail {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.4;
}

.point-contact {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: #6BA8E0;
  margin-top: .3rem;
  word-break: break-word;
}

.loading-item {
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
}

.sidebar-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--borde);
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--muted);
  line-height: 1.8;
}

.sidebar-footer a {
  color: var(--azul-s);
  text-decoration: none;
}

/* DOTS */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-acopio   { background: var(--acopio); }
.dot-refugio  { background: var(--refugio); }
.dot-pendiente{ background: var(--pendiente); }

/* MAP */
.map-container {
  flex: 1;
  position: relative;
}

#map { width: 100%; height: 100%; }

.map-legend {
  position: absolute;
  bottom: 1.5rem;
  right: 1rem;
  background: var(--panel);
  border: 1px solid var(--borde);
  padding: .6rem .875rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--muted);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* BUTTONS */
.btn-report {
  background: var(--rojo);
  color: #fff;
  border: none;
  padding: .45rem 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: .03em;
  transition: background .15s;
}
.btn-report:hover { background: var(--rojo-s); }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,16,23,.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-top: 3px solid var(--rojo);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 2px;
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.modal-header h2 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: .25rem;
}
.modal-close:hover { color: var(--texto); }

.modal-note {
  font-size: .75rem;
  color: var(--amarillo);
  background: rgba(244,196,48,.08);
  border-left: 2px solid var(--amarillo);
  padding: .5rem .75rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--fondo);
  border: 1px solid var(--borde);
  color: var(--texto);
  font-family: var(--font-sans);
  font-size: .85rem;
  padding: .6rem .75rem;
  border-radius: 2px;
  outline: none;
  transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--azul-s);
}

.form-group select option { background: var(--fondo); }

.btn-submit {
  width: 100%;
  background: var(--rojo);
  color: #fff;
  border: none;
  padding: .75rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  margin-top: .5rem;
  transition: background .15s;
}
.btn-submit:hover { background: var(--rojo-s); }
.btn-submit:disabled { background: var(--borde); cursor: not-allowed; }

.form-disclaimer {
  font-size: .65rem;
  color: var(--muted);
  text-align: center;
  margin-top: .75rem;
  line-height: 1.5;
}

/* SUCCESS */
.form-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  width: 48px;
  height: 48px;
  background: rgba(63,191,166,.15);
  color: var(--refugio);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.form-success h3 {
  font-family: var(--font-mono);
  margin-bottom: .5rem;
}

.form-success p {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  html, body { overflow: auto; }

  .layout { flex-direction: column; height: auto; }

  .sidebar {
    width: 100%;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--borde);
  }

  .map-container { height: 50vh; }
}

/* ===== AÑADIDOS: moderación híbrida + mapa del formulario ===== */

/* Sello "sin verificar" en la lista */
.badge-verificar {
  font-family: var(--font-mono);
  font-size: .52rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--pendiente);
  color: var(--fondo);
  padding: 1px 5px;
  border-radius: 2px;
  flex-shrink: 0;
}

.point-item.por-verificar { border-left: 2px solid var(--pendiente); }

/* Punto sin verificar: el dot se muestra en gris */
.dot-unv { background: var(--pendiente) !important; }

/* Dot de la leyenda para "sin verificar" */
.dot-unv-legend { background: var(--pendiente); }

/* Mini-mapa dentro del formulario de reporte */
.report-map {
  width: 100%;
  height: 200px;
  border: 1px solid var(--borde);
  border-radius: 2px;
  background: var(--fondo);
}

.report-map-note {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--muted);
  margin-top: .35rem;
  line-height: 1.4;
}

/* Honeypot anti-spam: fuera de la vista, fuera del flujo */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Globos del mapa (Google InfoWindow): más grandes y legibles */
.gm-style .gm-style-iw-d { overflow: visible !important; }
.iw {
  font-family: var(--font-sans);
  width: 300px;
  max-width: 80vw;
  padding: 4px 6px 6px;
  color: #0F1923;
}
.iw-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: #0F1923;
}
.iw-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .04em;
  background: #E2E8EF;
  color: #3A4754;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.iw-estado {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #5A6B7A;
  margin-top: 7px;
}
.iw-dir {
  font-size: 14.5px;
  line-height: 1.5;
  color: #1F2D3A;
  margin-top: 4px;
}
.iw-row {
  font-size: 14px;
  line-height: 1.5;
  color: #1F2D3A;
  margin-top: 7px;
}
.iw-row b { color: #0F1923; }
.iw-contact {
  font-size: 14px;
  font-weight: 600;
  color: #1565A0;
  margin-top: 9px;
  word-break: break-word;
}

/* Banner de error cuando falta la clave de Google Maps */
.map-error {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: 90%;
  background: var(--rojo);
  color: #fff;
  border-radius: 2px;
  padding: .6rem .9rem;
  font-size: .78rem;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
