:root {
  --bg: #0e0f13;
  --bg-2: #15171e;
  --card: #1a1d26;
  --card-2: #212532;
  --linea: #2a2f3d;
  --texto: #eef1f7;
  --texto-2: #9aa3b5;
  --acento: #7c4dff;
  --acento-2: #b18cff;
  --verde: #22c55e;
  --rojo: #ef4444;
  --ambar: #f59e0b;
  --radio: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* El atributo hidden debe ganar siempre (display:grid de secciones/modales lo anulaban). */
[hidden] { display: none !important; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--texto);
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input {
  font-family: inherit; font-size: 15px; color: var(--texto);
  background: var(--bg-2); border: 1.5px solid var(--linea);
  border-radius: 10px; padding: 11px 14px; width: 100%; outline: none;
}
input:focus { border-color: var(--acento); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--texto-2); margin: 14px 0 6px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(700px 400px at 15% -10%, #2a1b5e33, transparent),
    radial-gradient(600px 400px at 110% 110%, #7c4dff22, transparent),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--linea); border-radius: 20px; padding: 30px 28px;
  box-shadow: 0 20px 60px #00000055;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--acento), #b452ff);
  box-shadow: 0 8px 20px #7c4dff44;
}
.brand-name { font-weight: 800; font-size: 19px; }
.brand-name span { color: var(--acento-2); }
.brand-sub { color: var(--texto-2); font-size: 13px; }
.brand.small .brand-logo { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
.btn-primario {
  margin-top: 20px; width: 100%; border: 0; border-radius: 12px; padding: 13px;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--acento), #9a5cff);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primario:hover { transform: translateY(-1px); box-shadow: 0 10px 24px #7c4dff55; }
.btn-texto {
  margin-top: 10px; width: 100%; background: none; border: 0;
  color: var(--texto-2); font-size: 14px; font-weight: 600; padding: 8px;
}
.btn-texto:hover { color: var(--texto); }
.error-box {
  margin-top: 14px; background: #ef444415; border: 1px solid #ef444455;
  color: #fca5a5; font-size: 13px; padding: 10px 12px; border-radius: 10px;
}
.verify-hint { color: var(--texto-2); font-size: 14px; line-height: 1.5; }
.verify-hint strong { color: var(--texto); }

/* ---------- App ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; background: var(--card); border-bottom: 1px solid var(--linea);
  position: sticky; top: 0; z-index: 20;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-nombre { color: var(--texto-2); font-size: 14px; font-weight: 600; }
.btn-icono {
  background: var(--card-2); color: var(--texto); border: 1px solid var(--linea);
  width: 36px; height: 36px; border-radius: 10px; font-size: 15px;
  display: grid; place-items: center;
}
.btn-icono:hover { border-color: var(--acento); }

.tabs {
  display: flex; gap: 4px; padding: 0 26px; background: var(--card);
  border-bottom: 1px solid var(--linea); overflow-x: auto;
}
.tab {
  background: none; border: 0; padding: 15px 16px; color: var(--texto-2);
  font-weight: 700; font-size: 14px; white-space: nowrap;
  border-bottom: 2.5px solid transparent;
}
.tab:hover { color: var(--texto); }
.tab.activo { color: var(--acento-2); border-bottom-color: var(--acento); }
.badge {
  background: var(--acento); color: #fff; border-radius: 20px;
  font-size: 11px; padding: 1px 7px; margin-left: 5px; font-weight: 800;
}

.contenido { padding: 24px 26px 60px; max-width: 1200px; width: 100%; margin: 0 auto; }
.contenido h2 { font-size: 19px; margin-bottom: 18px; }

.grid-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.stat {
  background: var(--card); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 18px;
}
.stat .num { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.stat .etq { color: var(--texto-2); font-size: 13px; font-weight: 600; }
.stat .num.rojo { color: var(--rojo); }
.stat .num.verde { color: var(--verde); }
.stat .num.ambar { color: var(--ambar); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card); color: var(--texto-2); border: 1px solid var(--linea);
  border-radius: 30px; padding: 7px 15px; font-weight: 700; font-size: 13px;
}
.chip:hover { color: var(--texto); }
.chip.activo { background: var(--acento); border-color: var(--acento); color: #fff; }
#buscar-usuario { max-width: 280px; }

.tabla-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--linea); border-radius: var(--radio); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.tabla th {
  text-align: left; color: var(--texto-2); font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--linea);
}
.tabla td { padding: 12px 16px; border-bottom: 1px solid #1f2330; vertical-align: middle; }
.tabla tr:hover td { background: #ffffff08; }
.celda-usuario { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  background: var(--card-2); flex-shrink: 0;
}
.avatar.placeholder { display: grid; place-items: center; color: var(--texto-2); font-weight: 700; }
.correo-celda { color: var(--texto-2); font-size: 12.5px; }
.rol-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.rol-turista { background: #22c55e1a; color: #4ade80; }
.rol-fotografo { background: #7c4dff1a; color: var(--acento-2); }
.rol-admin { background: #f59e0b1a; color: var(--ambar); }
.estado-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.estado-ok { background: #22c55e1a; color: #4ade80; }
.estado-bloq { background: #ef44441a; color: #f87171; }
.btn-mini {
  border: 0; border-radius: 9px; padding: 7px 13px; font-weight: 700; font-size: 12.5px;
}
.btn-mini.bloquear { background: #ef44441f; color: #f87171; }
.btn-mini.bloquear:hover { background: #ef444433; }
.btn-mini.desbloquear { background: #22c55e1f; color: #4ade80; }
.btn-mini.desbloquear:hover { background: #22c55e33; }
.btn-mini.ver { background: var(--card-2); color: var(--texto); border: 1px solid var(--linea); }
.btn-mini.ver:hover { border-color: var(--acento); }
.btn-mini.accion { background: var(--acento); color: #fff; }
.btn-mini.accion:hover { filter: brightness(1.15); }
.btn-mini.peligro { background: #ef44441f; color: #f87171; }
.btn-mini.peligro:hover { background: #ef444433; }
.vacio { color: var(--texto-2); text-align: center; padding: 40px; }
.paginador { display: flex; gap: 8px; justify-content: center; margin-top: 16px; align-items: center; color: var(--texto-2); font-size: 13px; }
.paginador button {
  background: var(--card); border: 1px solid var(--linea); color: var(--texto);
  width: 32px; height: 32px; border-radius: 8px; font-weight: 700;
}
.paginador button:disabled { opacity: .35; cursor: default; }

/* ---------- Modal detalle ---------- */
.modal {
  position: fixed; inset: 0; background: #00000088; backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal-card {
  width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--linea); border-radius: 18px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--linea); position: sticky; top: 0;
  background: var(--card);
}
.modal-head h3 { font-size: 17px; }
#detalle-cuerpo { padding: 20px 22px; }
.bloque-usuario { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.bloque-usuario .avatar { width: 64px; height: 64px; font-size: 22px; }
.sub-seccion { margin: 18px 0 10px; font-size: 13px; color: var(--texto-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mini-tabla { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.mini-tabla th { text-align: left; color: var(--texto-2); font-size: 11.5px; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--linea); }
.mini-tabla td { padding: 9px 10px; border-bottom: 1px solid #1f2330; }
.dato-clave { color: var(--texto-2); }

/* ---------- Foto de registro ---------- */
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.foto-card {
  background: var(--card); border: 1px solid var(--linea); border-radius: var(--radio);
  overflow: hidden;
}
.foto-card img { width: 100%; height: 220px; object-fit: cover; display: block; background: #000; }
.foto-info { padding: 13px 15px; }
.foto-info .nombre { font-weight: 700; font-size: 14.5px; }
.foto-info .correo { color: var(--texto-2); font-size: 12.5px; }
.foto-acciones { display: flex; gap: 8px; padding: 0 15px 15px; }
.foto-acciones .btn-mini { flex: 1; }

/* ---------- Reportes ---------- */
.reporte-card {
  background: var(--card); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 18px 20px; margin-bottom: 14px;
}
.reporte-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.reporte-meta { color: var(--texto-2); font-size: 13px; margin-top: 6px; }
.reporte-meta b { color: var(--texto); }
.reporte-detalle { margin-top: 10px; background: var(--bg-2); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--texto-2); line-height: 1.5; }
.chip-motivo { display: inline-block; background: #ef44441a; color: #f87171; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 11px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--linea); color: var(--texto);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 40px #00000066; z-index: 100;
  animation: subir .2s ease;
}
@keyframes subir { from { transform: translate(-50%, 12px); opacity: 0; } }

@media (max-width: 640px) {
  .contenido { padding: 18px 14px 40px; }
  .topbar { padding: 12px 14px; }
  .tabs { padding: 0 10px; }
  #buscar-usuario { max-width: 100%; width: 100%; }
}
