/* ===== Panel Municipio — Estilos ===== */
:root {
  --primary: #0b6eb0;
  --bg: #eef3f8;
  --card: #fff;
  --text: #12324d;
  --muted: #5b7289;
  --border: #dbe7f1;
  --ok: #1a7f37;
  --warn: #e67e22;
  --danger: #c62828;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); height: 100vh; display: flex; flex-direction: column; }

.admin-header {
  background: var(--primary); color: #fff; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.admin-header h1 { font-size: 1.15rem; }
.admin-header small { opacity: .85; }
.header-actions { display: flex; gap: 8px; }

.btn {
  border: none; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer;
  font-family: inherit; font-size: .9rem;
}
.btn-outline { background: rgba(255,255,255,.15); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn:active { opacity: .8; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 14px 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.stat-num { font-size: 1.6rem; font-weight: 800; display: block; color: var(--primary); }
.stat-label { font-size: .75rem; color: var(--muted); }

.admin-body { flex: 1; display: flex; padding: 0 20px 20px; gap: 14px; min-height: 0; }
.admin-map { flex: 1; border-radius: 12px; border: 1px solid var(--border); z-index: 0; }

.filtros { width: 240px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; height: fit-content; }
.filtros h3 { margin-bottom: 10px; font-size: .95rem; }
.filtro-row { margin-bottom: 12px; }
.filtro-row label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.filtro-row select { width: 100%; padding: 8px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; }

.detalle {
  position: fixed; right: 20px; top: 80px; bottom: 20px; width: 380px; max-width: 95vw;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; z-index: 1000;
}
.detalle-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.detalle-body { padding: 14px 16px; overflow-y: auto; }
.det-foto { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.det-foto img { width: 120px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.det-info p { margin: 5px 0; font-size: .88rem; }
.det-actions { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.det-actions label { display: block; font-size: .8rem; font-weight: 600; margin: 8px 0 4px; }
.det-actions select { width: 100%; padding: 8px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; margin-bottom: 8px; }
.det-actions .btn { width: 100%; }
.icon-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.muted { color: var(--muted); font-size: .85rem; }
.hidden { display: none !important; }

@media (max-width: 700px) {
  .admin-body { flex-direction: column; }
  .filtros { width: 100%; }
  .detalle { left: 10px; right: 10px; top: 70px; width: auto; }
}
