:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d7dee9;
  --primary: #1463ff;
  --green: #16a34a;
  --red: #b91c1c;
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.topbar { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:28px 36px; background:linear-gradient(135deg,#0f172a,#1e3a8a); color:#fff; }
.topbar h1 { margin:4px 0 6px; font-size:38px; letter-spacing:.02em; }
.topbar p { margin:0; color:#dbeafe; max-width:850px; }
.eyebrow { text-transform:uppercase; letter-spacing:.18em; font-size:12px; font-weight:800; color:#93c5fd; }
.session-box { display:flex; align-items:center; gap:10px; }
.session-pill { padding:10px 14px; border-radius:999px; background:rgba(255,255,255,.14); font-weight:700; }
.layout { width:min(1180px, calc(100% - 32px)); margin:24px auto 48px; display:grid; gap:18px; }
.login-view { min-height:calc(100vh - 150px); display:grid; place-items:center; padding:24px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); padding:24px; }
.login-card { width:min(560px, 100%); }
h2 { margin:0 0 8px; font-size:24px; }
p { color:var(--muted); line-height:1.45; }
.grid { display:grid; gap:14px; }
.grid.two { grid-template-columns:repeat(2, minmax(0, 1fr)); }
label { display:grid; gap:8px; color:#334155; font-weight:800; }
input, select, textarea { width:100%; border:1px solid #cbd5e1; border-radius:14px; padding:13px 14px; font:inherit; background:#fff; color:var(--ink); }
input:focus, select:focus { outline:3px solid rgba(20,99,255,.14); border-color:var(--primary); }
button { border:0; border-radius:14px; padding:13px 18px; font-weight:900; cursor:pointer; }
button:disabled { opacity:.55; cursor:not-allowed; }
.primary { background:var(--primary); color:#fff; }
.secondary { background:#e2e8f0; color:#0f172a; }
.toolbar { display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:18px; }
.msg { color:var(--muted); font-weight:800; }
.error { color:var(--red); font-weight:900; margin-top:12px; }
.section-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.summary { color:var(--muted); font-weight:900; }
.centers-list { display:grid; gap:12px; }
.center-row { display:grid; grid-template-columns:1.2fr .8fr .8fr .8fr; gap:12px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:18px; background:#f8fafc; }
.center-code { font-weight:950; font-size:18px; }
.badges { display:flex; flex-wrap:wrap; gap:6px; }
.badge { display:inline-flex; padding:5px 9px; border-radius:999px; background:#e0f2fe; color:#075985; font-size:12px; font-weight:900; }
.badge.green { background:#dcfce7; color:#166534; }
.badge.amber { background:#fef3c7; color:#92400e; }
.toast { position:fixed; right:18px; bottom:18px; background:#0f172a; color:#fff; padding:14px 18px; border-radius:16px; box-shadow:var(--shadow); font-weight:900; }
code { background:#e2e8f0; padding:2px 6px; border-radius:6px; }
@media (max-width: 760px) { .topbar { flex-direction:column; align-items:flex-start; padding:24px; } .grid.two, .center-row { grid-template-columns:1fr; } }

/* --- Mejora consulta ADMIN municipal en SUPERADMIN --- */
.current-admins-panel {
  margin-top: 22px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 20px;
  padding: 18px;
}
.compact-head {
  align-items: center;
  margin-bottom: 12px;
}
.compact-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}
.compact-head p {
  margin: 0;
}
.admin-list {
  display: grid;
  gap: 10px;
}
.empty-admins {
  color: var(--muted);
  font-weight: 800;
  padding: 14px;
  border: 1px dashed #bfdbfe;
  background: #eff6ff;
  border-radius: 16px;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #ffffff;
}
.admin-name {
  font-weight: 950;
  color: var(--ink);
  font-size: 16px;
}
.admin-meta {
  margin-top: 3px;
  color: #334155;
  font-weight: 850;
}
.admin-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}
.small-btn {
  padding: 9px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
.center-row-warning {
  border-color: #fde68a;
  background: #fffaf0;
}
.center-admin-summary {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 850;
  font-size: 13px;
}
.center-admin-summary.missing {
  background: #fef3c7;
  color: #92400e;
}
.license-card { border-color:#bfdbfe; background:linear-gradient(180deg,#fff,#f4f8ff); }
.license-check { display:flex; grid-template-columns:none; align-items:center; gap:10px; padding:14px; border:1px solid #dbe3ef; border-radius:14px; background:#fff; }
.license-check input { width:auto; }
.center-actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .admin-row,
  .center-actions {
    grid-template-columns: 1fr;
  }
  .small-btn,
  .center-actions button {
    width: 100%;
  }
}


/* Catálogo maestro App Vecino */
.category-catalog-card {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.compact-toolbar {
  margin-top: 0;
  justify-content: flex-end;
}
.category-catalog-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.category-catalog-row {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #ffffff;
}
.category-main-fields {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr .7fr .55fr .55fr .55fr;
  gap: 12px;
  align-items: end;
}
.category-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f1f5f9;
}
.category-flags label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 850;
}
.category-flags input {
  width: auto;
}
@media (max-width: 980px) {
  .category-main-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-toolbar {
    justify-content: flex-start;
  }
}
@media (max-width: 620px) {
  .category-main-fields {
    grid-template-columns: 1fr;
  }
}
