body{
  margin:0;
  padding:14px;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, Arial;
  background:#fafafa;
}

/* ===== MENU SUPERIOR ===== */
.topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:#ffffff;
  border-bottom:1px solid #e5e5e5;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:10px;
}

.topbarLink{
  text-decoration:none;
  font-size:14px;
  padding:6px 12px;
  border-radius:10px;
  background:#f2f2f2;
  color:#111;
  transition:background .15s ease;
}
.topbarLink:hover{ background:#e6e6e6; }

/* ===== CONTENIDO ===== */
.pageTitle{ margin:10px 0 6px 0; }

.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.mt10{margin-top:10px}

select,button,input{
  padding:7px;
  border-radius:8px;
  border:1px solid #ccc;
  font-size:14px;
}

button{
  cursor:pointer;
}

#map{
  height:70vh;
  min-height:420px;
  margin-top:10px;
  border:1px solid #ccc;
  border-radius:12px;
  background:#fff;
}

.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#eee;
}

.muted{color:#666;font-size:12px}

/* ✅ Lista con ~2 folios visibles */
#listaFolios{
  margin-top:10px;
  max-height:120px;   /* ~2 folios */
  overflow:auto;
  border:1px solid #ccc;
  border-radius:12px;
  padding:8px;
  background:#fff;
}

.itemFolio{
  padding:8px;
  border-bottom:1px solid #eee;
  cursor:pointer;
  border-radius:10px;
}
.itemFolio:hover{background:#f6f6f6}
.itemFolio.selected{background:#e9f2ff;border:1px solid #b8d2ff}
.folioStrong{font-weight:700}

/* ===== Botones bonitos dentro del InfoWindow ===== */
.iw-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.iw-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  border:1px solid #ddd;
  background:#fff;
  color:#111;
}
.iw-btn:hover{background:#f5f5f5}
.iw-btn-map{background:#111;color:#fff;border-color:#111}
.iw-btn-map:hover{background:#222}
.iw-btn-gestionar{background:#e9f2ff;color:#0b4fd6;border-color:#b8d2ff}
.iw-btn-gestionar:hover{background:#dbeaff}
.iw-btn-fotos{background:#fff7ed;color:#9a3412;border-color:#fed7aa}
.iw-btn-fotos:hover{background:#ffedd5}

/* ===== Galería (popup) ===== */
.galBackdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  z-index:9998;
}

.galModal{
  position:fixed; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(92vw, 720px);
  max-height:90vh;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  z-index:9999;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
}

.galTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid #eee;
  background:#fff;
}

.galCounter{font-size:13px;color:#444;font-weight:700}

.galClose{
  border:0; background:#111; color:#fff;
  border-radius:10px; padding:6px 10px;
  cursor:pointer;
}

.galStage{
  position:relative;
  background:#000;
  display:flex;
  align-items:center;
  justify-content:center;
}

.galImg{
  width:100%;
  max-height:64vh;
  object-fit:contain;
  display:block;
}

.galNav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;height:44px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  cursor:pointer;
  font-size:26px;
  line-height:44px;
  text-align:center;
}
.galPrev{left:10px}
.galNext{right:10px}

.galBottom{
  padding:10px;
  border-top:1px solid #eee;
  background:#fff;
}

.galThumbs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.galThumbs button{
  border:0; padding:0; background:none; cursor:pointer;
}
.galThumbs img{
  width:64px; height:64px;
  object-fit:cover;
  border-radius:12px;
  border:2px solid transparent;
  background:#fff;
}
.galThumbs img.active{
  border-color:#111;
}
