/* ============================================================
   ESTILOS — Registro de evidencias
   Rediseño completo: periódico de denuncia pública
   Layout 3 columnas responsivo + panel admin fullscreen
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

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

:root {
  /* Paleta principal */
  --morado:       #6d28d9;
  --morado-vivo:  #7c3aed;
  --morado-dark:  #4c1d95;
  --morado-deep:  #ede9fe;
  --morado-glow:  rgba(109, 40, 217, 0.15);

  --rojo:         #dc2626;
  --rojo-claro:   rgba(220,38,38,0.08);
  --rojo-borde:   rgba(220,38,38,0.25);
  --rojo-texto:   #991b1b;

  --azul:         #2563eb;
  --azul-claro:   rgba(37,99,235,0.07);
  --azul-borde:   rgba(37,99,235,0.2);
  --azul-texto:   #1e40af;

  --verde:        #16a34a;
  --verde-claro:  rgba(22,163,74,0.08);
  --verde-borde:  rgba(22,163,74,0.25);

  --amarillo:     #d97706;
  --amarillo-claro: rgba(217,119,6,0.08);
  --amarillo-borde: rgba(217,119,6,0.25);

  /* Superficies */
  --bg-page:      #2d1b4e;
  --bg-card:      #cabedf;
  --bg-card2:     #e4dff0;
  --bg-input:     #d8d2e8;
  --bg-hover:     rgba(109,40,217,0.05);

  /* Texto sobre tarjetas (oscuro, contraste sobre pastel) */
  --texto:        #1a1028;
  --texto-sec:    #3a2c56;
  --texto-ter:    #6a5888;
  --texto-muted:  #9a88b8;

  /* Texto sobre fondo de página (claro, visible sobre morado oscuro) */
  --texto-pagina:     #e8e0f8;
  --texto-pagina-sec: #c0b0e0;
  --texto-pagina-ter: #9880c8;

  /* Bordes */
  --borde:        rgba(109,40,217,0.1);
  --borde-med:    rgba(109,40,217,0.18);
  --borde-morado: rgba(109,40,217,0.22);
  --borde-morado-vivo: rgba(109,40,217,0.4);

  /* Sombras */
  --sombra:       0 8px 40px rgba(109,40,217,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --sombra-card:  0 2px 16px rgba(109,40,217,0.08), 0 1px 4px rgba(0,0,0,0.04);

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Forma */
  --radio:        8px;
  --radio-sm:     5px;
  --radio-lg:     12px;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--texto);
  line-height: 1.65;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════════════
   FONDO — degradado morado oscuro con textura de ladrillos sutil
   ══════════════════════════════════════════════════════════ */
.brick-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #2d1b4e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Crect width='120' height='60' fill='%232d1b4e'/%3E%3Crect x='1' y='1' width='57' height='26' rx='1.5' fill='%23351f5a' stroke='%23231540' stroke-width='0.8'/%3E%3Crect x='62' y='1' width='57' height='26' rx='1.5' fill='%23321d57' stroke='%23231540' stroke-width='0.8'/%3E%3Crect x='-28' y='33' width='57' height='26' rx='1.5' fill='%23361f5c' stroke='%23231540' stroke-width='0.8'/%3E%3Crect x='33' y='33' width='57' height='26' rx='1.5' fill='%23301c55' stroke='%23231540' stroke-width='0.8'/%3E%3Crect x='92' y='33' width='57' height='26' rx='1.5' fill='%23341e59' stroke='%23231540' stroke-width='0.8'/%3E%3C/svg%3E");
  background-size: 120px 60px;
}

.brick-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(120,40,200,0.55) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(80,20,160,0.45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(60,15,130,0.35) 0%, transparent 70%),
    linear-gradient(160deg, rgba(90,25,160,0.5) 0%, rgba(35,12,80,0.6) 50%, rgba(70,18,140,0.45) 100%);
  pointer-events: none;
}

/* Sin franja central — fondo uniforme */
.contenedor {
  position: relative;
}

/* ══════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL — 3 columnas en desktop
   ══════════════════════════════════════════════════════════ */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  grid-template-areas: "flyer main contexto";
  gap: 0 32px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 6rem;
  min-height: 100vh;
  align-items: start;
  box-sizing: border-box;
}

/* ── Columna izquierda: flyer ────────────────────────────── */
.col-flyer {
  grid-area: flyer;
  position: sticky;
  top: 2rem;
  align-self: start;
}

.flyer-wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(159,90,255,0.25),
    0 12px 48px rgba(0,0,0,0.7),
    0 0 60px rgba(100,20,180,0.2);
}

.flyer-img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.flyer-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texto-ter);
  margin-top: 10px;
  text-align: center;
}

/* ── Columna central ────────────────────────────────────── */
.contenedor {
  grid-area: main;
  min-width: 0;
}

/* ── Columna derecha ─────────────────────────────────────── */
.col-contexto {
  grid-area: contexto;
  position: sticky;
  top: 2rem;
  align-self: start;
}

.contexto-card {
  background: var(--bg-card);
  border: 1px solid var(--borde-morado);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  box-shadow: var(--sombra-card);
}

.contexto-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--morado-vivo);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.contexto-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--morado-vivo);
  box-shadow: 0 0 8px var(--morado-vivo);
  flex-shrink: 0;
}

.contexto-titulo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 12px;
  line-height: 1.3;
}

.contexto-cuerpo {
  font-size: 15px;
  color: var(--texto-sec);
  line-height: 1.8;
  white-space: pre-line;
}
.contexto-cuerpo p { margin-bottom: 0.75em; }

.contexto-vacio {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-muted);
  font-style: italic;
  text-align: center;
  padding: 1.5rem 0;
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--borde-med);
  margin-bottom: 1.5rem;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.etiqueta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--morado-vivo);
  padding: 3px 10px;
  border: 1px solid var(--borde-morado-vivo);
  border-radius: 3px;
  background: rgba(109,40,217,0.07);
}

.header-reg {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--texto-pagina-ter);
}

.site-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--texto-pagina);
  margin-bottom: 10px;
}

.descripcion {
  font-size: 14px;
  font-weight: 300;
  color: var(--texto-pagina-sec);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 14px;
  font-style: italic;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--texto-pagina-ter);
}

.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.verde { background: var(--verde); box-shadow: 0 0 6px var(--verde); }

.meta-sep { color: var(--texto-muted); font-size: 11px; }

/* ── NAVEGACIÓN ──────────────────────────────────────────── */
.seccion-nav-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

/* Indicadores de scroll fade en ambos lados */
.seccion-nav-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 2px;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--bg-page) 90%);
  pointer-events: none;
  z-index: 2;
  border-radius: 0 4px 0 0;
}

.seccion-nav {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 2px solid rgba(109,40,217,0.4);
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  scroll-behavior: smooth;
}
.seccion-nav::-webkit-scrollbar { display: none; }

/* En móvil: fade al borde para indicar scroll horizontal */
@media (max-width: 640px) {
  .seccion-nav {
    -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
    mask-image: linear-gradient(to right, black 75%, transparent 100%);
  }
  .seccion-nav-wrapper::after { width: 56px; }
}

/* En desktop: wrap normal, sin fade */
@media (min-width: 641px) {
  .seccion-nav {
    flex-wrap: wrap;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .seccion-nav-wrapper::after { display: none; }
}

.snav-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--texto-pagina-ter);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -2px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.snav-btn:hover { color: var(--morado-deep); background: rgba(109,40,217,0.04); }
.snav-btn.activo {
  color: #c4a8ff;
  border-bottom-color: #c4a8ff;
  font-weight: 600;
}

/* ── SECCIONES ───────────────────────────────────────────── */
.seccion { display: none; }
.seccion.activa { display: block; }

.sec-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--borde);
}

.sec-titulo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--texto-pagina);
  margin-bottom: 5px;
}

.sec-desc {
  font-size: 13px;
  color: var(--texto-pagina-sec);
  font-style: italic;
}

/* ── TOOLBAR + FILTROS ───────────────────────────────────── */
.toolbar { margin-bottom: 1.25rem; }

.filtros {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filtro-btn {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--borde-med);
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  color: var(--texto-pagina-ter);
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.filtro-btn:hover { border-color: var(--borde-morado); color: var(--morado); background: rgba(109,40,217,0.04); }
.filtro-btn.activo {
  background: var(--morado);
  border-color: var(--morado);
  color: #fff;
  box-shadow: 0 2px 8px rgba(109,40,217,0.25);
}

/* ── FEED ────────────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── ENTRY: Actualización de texto ──────────────────────── */
.entry-texto {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-left: 3px solid var(--morado);
  border-radius: 0 var(--radio) var(--radio) 0;
  padding: 1rem 1.25rem;
  animation: fadeIn 0.2s ease;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--sombra-card);
}
.entry-texto:hover { border-color: var(--borde-morado); border-left-color: var(--morado-vivo); box-shadow: 0 4px 20px rgba(109,40,217,0.1); }

.entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.entry-tipo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid;
  flex-shrink: 0;
}
.entry-tipo-dot.upd { background: rgba(124,58,237,0.2); border-color: var(--morado-vivo); }

.entry-autor {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--texto-sec);
  font-weight: 500;
}

.entry-fecha {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--texto-ter);
  margin-left: auto;
}

.entry-body {
  font-size: 16px;
  color: var(--texto-sec);
  line-height: 1.75;
  white-space: pre-line;
}

.entry-footer {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.entry-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
}
.entry-tag.upd       { background: rgba(124,58,237,0.1); color: rgba(159,90,255,0.8); border: 1px solid rgba(124,58,237,0.2); }
.entry-tag.prensa    { background: rgba(96,165,250,0.1); color: var(--azul-texto); border: 1px solid var(--azul-borde); }
.entry-tag.testimonio { background: rgba(159,90,255,0.08); color: rgba(159,90,255,0.7); border: 1px solid rgba(159,90,255,0.2); }
.entry-tag.fiscalia  { background: rgba(251,191,36,0.08); color: var(--amarillo); border: 1px solid var(--amarillo-borde); }

/* ── ENTRY: Documento ───────────────────────────────────── */
.entry-doc {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--sombra-card);
}
.entry-doc:hover { border-color: var(--borde-morado); box-shadow: 0 4px 20px rgba(109,40,217,0.1); }
.entry-doc.pinned { border-color: rgba(220,38,38,0.3); }

.doc-preview-area {
  position: relative;
  height: 110px;
  background: #ddd8ef;
  overflow: hidden;
  cursor: pointer;
}

/* Thumbnail de Drive — cubre toda el área de preview */
.doc-drive-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.doc-preview-area:hover .doc-drive-thumb { opacity: 1; }
.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.preview-icono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 3px;
}
.preview-icono.pdf    { background: rgba(220,38,38,0.15); color: var(--rojo-texto); border: 1px solid var(--rojo-borde); }
.preview-icono.imagen { background: var(--azul-claro);    color: var(--azul-texto); border: 1px solid var(--azul-borde); }
.preview-icono.texto  { background: var(--verde-claro);   color: var(--verde);      border: 1px solid var(--verde-borde); }
.preview-icono.otro   { background: var(--amarillo-claro);color: var(--amarillo);   border: 1px solid var(--amarillo-borde); }

.preview-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.doc-preview-area:hover .preview-overlay { opacity: 1; }

.btn-preview-abrir {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  color: var(--texto);
  cursor: pointer;
  letter-spacing: 0.05em;
}

.doc-info {
  padding: 0.9rem 1rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.doc-info-body { flex: 1; min-width: 0; }

.doc-titulo {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--texto);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-desc {
  font-size: 14px;
  color: var(--texto-sec);
  line-height: 1.55;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.doc-tags { display: flex; gap: 5px; flex-wrap: wrap; }

.tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
}
.tag.rojo   { background: var(--rojo-claro); color: var(--rojo-texto); border: 1px solid var(--rojo-borde); }
.tag.morado { background: rgba(124,58,237,0.1); color: rgba(159,90,255,0.8); border: 1px solid rgba(124,58,237,0.2); }

.doc-acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.doc-fecha {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-ter);
  white-space: nowrap;
}
.btn-drive {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 3px 9px;
  border: 1px solid var(--borde-morado);
  border-radius: 3px;
  background: transparent;
  color: var(--morado-vivo);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-drive:hover { background: rgba(124,58,237,0.15); }
.btn-drive.disabled { opacity: 0.35; cursor: default; }

/* ── ENTRY: Prensa ──────────────────────────────────────── */
.entry-prensa {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
  box-shadow: var(--sombra-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.entry-prensa:hover { border-color: var(--borde-morado); box-shadow: 0 4px 20px rgba(109,40,217,0.1); }

.prensa-embed-area {
  position: relative;
  cursor: pointer;
}
.prensa-og {
  display: flex;
  gap: 0;
  background: #e0daf2;
  border-bottom: 1px solid var(--borde);
  overflow: hidden;
}
.prensa-og-img {
  width: 120px;
  min-height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}
.prensa-og-info {
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
}
.prensa-og-source {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--azul);
  margin-bottom: 4px;
}
.prensa-og-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--texto);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prensa-og-desc {
  font-size: 12px;
  color: var(--texto-ter);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
}
.prensa-embed-area .preview-overlay { border-radius: 0; }

/* Fallback cuando no hay imagen OG */
.prensa-og-fallback {
  display: flex;
  align-items: center;
  min-height: 80px;
  background: #e0daf2;
  border-bottom: 1px solid var(--borde);
}

/* Placeholder visual con inicial de la fuente */
.prensa-og-thumb-placeholder {
  width: 100px;
  min-height: 80px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(109,40,217,0.1) 0%, rgba(37,99,235,0.08) 100%);
  border-right: 1px solid var(--borde);
  display: flex;
  align-items: center;
  justify-content: center;
}
.prensa-og-inicial {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: rgba(109,40,217,0.3);
  user-select: none;
  line-height: 1;
}

.prensa-info {
  padding: 0.9rem 1rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.prensa-info-body { flex: 1; min-width: 0; }
.prensa-titulo {
  font-size: 16px;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 4px;
}
.prensa-desc {
  font-size: 14px;
  color: var(--texto-sec);
  line-height: 1.55;
  margin-bottom: 7px;
}
.prensa-acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.prensa-fecha { font-family: var(--font-mono); font-size: 9px; color: var(--texto-ter); white-space: nowrap; }

.btn-articulo {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 3px 9px;
  border: 1px solid var(--azul-borde);
  border-radius: 3px;
  background: transparent;
  color: var(--azul);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.12s;
}
.btn-articulo:hover { background: var(--azul-claro); }

/* ── ENTRY: Fiscalía ─────────────────────────────────────── */
.entry-fiscalia {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-left: 3px solid var(--amarillo);
  border-radius: 0 var(--radio) var(--radio) 0;
  padding: 1rem 1.25rem;
  animation: fadeIn 0.2s ease;
  box-shadow: var(--sombra-card);
  transition: box-shadow 0.15s;
}
.fiscalia-radicado {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--amarillo);
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.fiscalia-titulo {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 6px;
}
.fiscalia-cuerpo {
  font-size: 15px;
  color: var(--texto-sec);
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: 10px;
}
.fiscalia-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fiscalia-fecha {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-ter);
  margin-left: auto;
}

/* ── GALERÍA ─────────────────────────────────────────────── */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.galeria-item {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  animation: fadeIn 0.2s ease;
  box-shadow: var(--sombra-card);
}
.galeria-item:hover { border-color: var(--borde-morado); box-shadow: 0 4px 16px rgba(109,40,217,0.12); }
.galeria-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.galeria-thumb-placeholder {
  width: 100%;
  height: 130px;
  background: #ddd8ef;
  display: flex;
  align-items: center;
  justify-content: center;
}
.galeria-info { padding: 8px 10px; }
.galeria-titulo {
  font-size: 12px;
  color: var(--texto-sec);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.galeria-fecha {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-ter);
  margin-top: 3px;
}

/* ── Q&A ─────────────────────────────────────────────────── */
.lista-qa { display: flex; flex-direction: column; gap: 6px; margin-bottom: 2rem; }

.qa-item {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
  box-shadow: var(--sombra-card);
}
.qa-pregunta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.qa-pregunta:hover { background: rgba(109,40,217,0.04); }
.qa-q-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--morado-vivo);
  background: rgba(109,40,217,0.08);
  border: 1px solid rgba(109,40,217,0.2);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
}
.qa-texto {
  font-size: 16px;
  color: var(--texto-sec);
  flex: 1;
}
.qa-chevron {
  font-size: 10px;
  color: var(--texto-ter);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.qa-item.abierto .qa-chevron { transform: rotate(90deg); }

.qa-respuesta {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--borde);
  background: rgba(109,40,217,0.03);
}
.qa-item.abierto .qa-respuesta { display: block; }
.qa-r-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--morado-vivo);
  margin-bottom: 6px;
}
.qa-r-texto { font-size: 15px; color: var(--texto-sec); line-height: 1.7; }

/* ── COMENTARIOS ─────────────────────────────────────────── */
.lista-comentarios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 2rem; }

.comentario-item {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem;
  animation: fadeIn 0.2s ease;
  box-shadow: var(--sombra-card);
}
.comentario-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.comentario-nombre {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-sec);
}
.badge-anonimo {
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(251,191,36,0.1);
  color: var(--amarillo);
  border: 1px solid var(--amarillo-borde);
  letter-spacing: 0.06em;
}
.comentario-fecha {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-ter);
  margin-left: auto;
}
.comentario-texto {
  font-size: 15px;
  color: var(--texto-sec);
  line-height: 1.7;
  white-space: pre-line;
}
.comentario-link {
  display: inline-block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--azul);
  text-decoration: none;
}
.comentario-link:hover { text-decoration: underline; }

/* ── FORMULARIOS PÚBLICOS ────────────────────────────────── */
.form-publico {
  background: var(--bg-card2);
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}

/* Inputs públicos */
.form-publico input,
.form-publico textarea {
  background: var(--bg-input);
  color: var(--texto);
  border: 1px solid var(--borde-med);
  border-radius: var(--radio-sm);
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.15s;
}
.form-publico input:focus,
.form-publico textarea:focus {
  outline: none;
  border-color: var(--borde-morado-vivo);
}
.form-publico input::placeholder,
.form-publico textarea::placeholder {
  color: var(--texto-ter);
  opacity: 0.6;
}

.form-titulo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 6px;
}
.form-aviso {
  font-size: 12.5px;
  color: var(--texto-ter);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.form-alerta {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: var(--radio-sm);
  margin-top: 10px;
}
.form-alerta.ok  { background: var(--verde-claro); color: var(--verde); border: 1px solid var(--verde-borde); }
.form-alerta.err { background: var(--rojo-claro);  color: var(--rojo-texto); border: 1px solid var(--rojo-borde); }

.btn-enviar-pub {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radio-sm);
  background: var(--morado);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(109,40,217,0.25);
}
.btn-enviar-pub:hover { background: var(--morado-vivo); box-shadow: 0 4px 14px rgba(109,40,217,0.35); }
.btn-enviar-pub:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

/* ── CARGANDO ─────────────────────────────────────────────── */
.estado-carga {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-pagina-ter);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--borde-med);
  border-top-color: var(--morado-vivo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sin-resultados {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-pagina-ter);
  text-align: center;
  padding: 2.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--borde);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-texto {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--texto-pagina-ter);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.secret-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--texto-muted);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.secret-dot.activado { background: var(--morado-vivo); box-shadow: 0 0 8px var(--morado-vivo); }

/* ══════════════════════════════════════════════════════════
   MODAL PREVIEW
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--borde-morado);
  border-radius: var(--radio-lg);
  width: 100%;
  max-width: 900px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--borde);
  flex-shrink: 0;
  gap: 10px;
}
.modal-header-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.modal-titulo { font-size: 14px; font-weight: 600; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-meta { font-family: var(--font-mono); font-size: 9.5px; color: var(--texto-ter); }
.modal-acciones { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-modal-drive {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--borde-morado);
  border-radius: 3px;
  background: transparent;
  color: var(--morado-vivo);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-modal-drive:hover { background: rgba(124,58,237,0.15); }

.btn-modal-cerrar {
  width: 28px; height: 28px;
  border: 1px solid var(--borde-med);
  border-radius: 3px;
  background: transparent;
  color: var(--texto-ter);
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s;
}
.btn-modal-cerrar:hover { background: var(--rojo-claro); border-color: var(--rojo-borde); color: var(--rojo-texto); }

.modal-body {
  flex: 1;
  overflow: hidden;
}
.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.modal-img-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  padding: 1rem;
  background: #1a1028;
  cursor: grab;
  user-select: none;
}
.modal-img-body:active { cursor: grabbing; }

.modal-img-body img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

/* Barra de controles de zoom */
.modal-zoom-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: #160828;
  border-top: 1px solid rgba(109,40,217,0.25);
  padding: 8px 16px;
}
.zoom-btn {
  width: 30px; height: 30px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #e0d8f8;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
  flex-shrink: 0;
}
.zoom-btn:hover { background: rgba(124,58,237,0.35); border-color: rgba(139,92,246,0.5); }
.zoom-level {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(200,185,240,0.8);
  min-width: 38px;
  text-align: center;
  letter-spacing: 0.04em;
}
.zoom-btn-reset {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: transparent;
  color: rgba(200,185,240,0.7);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.12s;
  white-space: nowrap;
}
.zoom-btn-reset:hover { background: rgba(124,58,237,0.25); }
.zoom-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(160,140,210,0.55);
  margin-left: 4px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
@media (max-width: 640px) { .zoom-hint { display: none; } }


/* ── MODAL LOGIN ─────────────────────────────────────────── */
.modal-login-box {
  background: var(--bg-card);
  border: 1px solid var(--borde-morado);
  border-radius: var(--radio-lg);
  width: 100%;
  max-width: 360px;
  padding: 2rem;
  box-shadow: var(--sombra);
}
.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.login-header .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-ter);
}
.login-desc {
  font-size: 13.5px;
  color: var(--texto-sec);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--borde-med);
  border-radius: var(--radio-sm);
  background: var(--bg-card2);
  color: var(--texto);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  letter-spacing: 0.04em;
}
.btn-google:hover { background: rgba(124,58,237,0.2); border-color: var(--borde-morado-vivo); }
.login-error {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rojo);
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   PANEL ADMIN — PANTALLA COMPLETA
   ══════════════════════════════════════════════════════════ */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0f0820;
  display: none;
  flex-direction: column;
}
.admin-overlay.visible { display: flex; }

/* Barra superior del panel admin */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  border-bottom: 1px solid rgba(109,40,217,0.35);
  flex-shrink: 0;
  background: #160830;
  gap: 1rem;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--morado-vivo);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-brand::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--morado-vivo);
  box-shadow: 0 0 10px var(--morado-vivo);
}

.admin-user-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--texto-ter);
  padding: 3px 10px;
  border: 1px solid var(--borde);
  border-radius: 20px;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-admin-salir {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 12px;
  border: 1px solid var(--borde-med);
  border-radius: var(--radio-sm);
  background: transparent;
  color: var(--texto-ter);
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.05em;
}
.btn-admin-salir:hover { color: var(--rojo); border-color: var(--rojo-borde); }

.btn-admin-cerrar-panel {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 12px;
  border: 1px solid var(--borde-morado);
  border-radius: var(--radio-sm);
  background: rgba(124,58,237,0.1);
  color: var(--morado-vivo);
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.05em;
}
.btn-admin-cerrar-panel:hover { background: rgba(124,58,237,0.2); }

/* Layout del panel admin: sidebar + content */
.admin-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  flex: 1;
  overflow: hidden;
}

/* Sidebar de navegación admin */
.admin-sidebar {
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  padding: 1rem 0;
  background: #120528;
  flex-shrink: 0;
}

.admin-sidebar-section {
  margin-bottom: 1.5rem;
}
.admin-sidebar-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texto-muted);
  padding: 0 1rem;
  margin-bottom: 4px;
}
.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 1rem;
  border: none;
  background: transparent;
  color: var(--texto-ter);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0;
}
.admin-nav-btn:hover { background: var(--bg-hover); color: var(--texto-sec); }
.admin-nav-btn.activo {
  background: rgba(124,58,237,0.15);
  color: var(--morado-vivo);
  border-right: 2px solid var(--morado-vivo);
}
.admin-nav-ico {
  width: 16px;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* Área de contenido admin */
.admin-content {
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

/* Panel de creación (2 columnas en pantalla grande) */
.admin-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.admin-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--borde);
}

.admin-card {
  background: var(--bg-card2);
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 1.25rem;
}
.admin-card-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--morado-vivo);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-card-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--morado-vivo);
  border-radius: 2px;
}

/* Panel de lista/CRUD */
.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.admin-list-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--texto-ter);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-list-item {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.12s;
}
.admin-list-item:hover { border-color: var(--borde-med); }

.admin-list-item-body { flex: 1; min-width: 0; }
.admin-list-item-titulo {
  font-size: 15px;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-list-item-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-ter);
  margin-bottom: 4px;
}
.admin-list-item-preview {
  font-size: 13px;
  color: var(--texto-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-list-item-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.btn-admin-edit {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border: 1px solid var(--borde-morado);
  border-radius: 3px;
  background: transparent;
  color: var(--morado-vivo);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-admin-edit:hover { background: rgba(124,58,237,0.12); }

.btn-admin-del {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border: 1px solid var(--rojo-borde);
  border-radius: 3px;
  background: transparent;
  color: var(--rojo-texto);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-admin-del:hover { background: var(--rojo-claro); }

.btn-admin-toggle {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border: 1px solid var(--verde-borde);
  border-radius: 3px;
  background: transparent;
  color: var(--verde);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-admin-toggle.off {
  border-color: var(--amarillo-borde);
  color: var(--amarillo);
}
.btn-admin-toggle:hover { background: var(--verde-claro); }
.btn-admin-toggle.off:hover { background: var(--amarillo-claro); }

/* Modal de edición dentro del panel admin */
.admin-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.admin-edit-modal.visible { display: flex; }
.admin-edit-box {
  background: var(--bg-card);
  border: 1px solid var(--borde-morado);
  border-radius: var(--radio-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--sombra);
}
.admin-edit-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Formulario admin */
.afield { margin-bottom: 12px; }
.afield label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--texto-sec);
  margin-bottom: 5px;
}
.afield input,
.afield textarea,
.afield select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--borde-med);
  border-radius: var(--radio-sm);
  background: var(--bg-input);
  color: var(--texto);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.12s;
}
.afield input:focus,
.afield textarea:focus,
.afield select:focus { border-color: var(--borde-morado-vivo); }
.afield textarea { resize: vertical; min-height: 80px; }
.afield select option { background: #1a0a2e; }
.afield-check { display: flex; align-items: center; gap: 8px; }
.afield-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--morado-vivo); }
.afield-check label {
  font-size: 13px;
  color: var(--texto-sec);
  font-family: var(--font-body);
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.btn-pub {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--borde-morado-vivo);
  border-radius: var(--radio-sm);
  background: rgba(124,58,237,0.18);
  color: var(--texto);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0;
  margin-top: 6px;
  transition: background 0.12s;
}
.btn-pub:hover { background: rgba(124,58,237,0.32); }
.btn-pub:disabled { opacity: 0.4; cursor: default; }
.btn-pub.peligro {
  border-color: var(--rojo-borde);
  background: var(--rojo-claro);
  color: var(--rojo-texto);
}
.btn-pub.peligro:hover { background: rgba(220,38,38,0.2); }

.admin-alerta {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: var(--radio-sm);
  margin-bottom: 12px;
  display: none;
}
.admin-alerta.ok  { background: var(--verde-claro); color: var(--verde); border: 1px solid var(--verde-borde); }
.admin-alerta.err { background: var(--rojo-claro);  color: var(--rojo-texto); border: 1px solid var(--rojo-borde); }

/* Moderación en admin */
.mod-item {
  background: rgba(8,2,18,0.6);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 0.9rem 1rem;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--texto-sec);
}
.mod-item-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-ter);
  margin-bottom: 5px;
}
.mod-item-texto {
  color: var(--texto-sec);
  margin-bottom: 10px;
  line-height: 1.6;
}
.mod-item-acciones { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-mod {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 4px 12px;
  border-radius: 3px;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
  letter-spacing: 0.04em;
}
.btn-mod.aprobar   { border-color: var(--verde-borde); color: var(--verde); }
.btn-mod.aprobar:hover { background: var(--verde-claro); }
.btn-mod.rechazar  { border-color: var(--rojo-borde);  color: var(--rojo-texto); }
.btn-mod.rechazar:hover { background: var(--rojo-claro); }

.btn-entry-del {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 8px;
  border: 1px solid var(--rojo-borde);
  border-radius: 3px;
  background: transparent;
  color: var(--rojo);
  cursor: pointer;
  transition: background 0.12s;
}
.btn-entry-del:hover { background: var(--rojo-claro); }

.admin-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--texto-muted);
  text-align: center;
  padding: 1.5rem 1rem;
  font-style: italic;
}

/* Logout */
.btn-logout {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--borde-med);
  border-radius: var(--radio-sm);
  background: transparent;
  color: var(--texto-ter);
  cursor: pointer;
  transition: all 0.12s;
}
.btn-logout:hover { color: var(--rojo); border-color: var(--rojo-borde); }

/* Admin user row (dentro del panel) */
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem 0.6rem;
  border-bottom: 0.5px solid var(--borde);
}
.admin-user-info { font-size: 13px; color: var(--texto-sec); font-weight: 300; }
.admin-user-info strong { font-weight: 600; font-size: 13px; color: var(--texto); display: block; }

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   ADMIN PANEL — Overrides para mantener tema oscuro interno
   El panel admin es siempre oscuro, independiente del tema de página
   ══════════════════════════════════════════════════════════ */
.admin-overlay,
.admin-overlay * {
  --texto:       #f0eaff;
  --texto-sec:   #c4b5d9;
  --texto-ter:   #7c6a99;
  --texto-muted: #4a3d5c;
  --bg-card:     rgba(22,8,44,0.98);
  --bg-card2:    rgba(28,10,54,0.98);
  --bg-input:    rgba(8,2,18,0.85);
  --bg-hover:    rgba(109,40,217,0.14);
  --borde:       rgba(255,255,255,0.07);
  --borde-med:   rgba(255,255,255,0.11);
  --borde-morado: rgba(109,40,217,0.3);
  --borde-morado-vivo: rgba(139,92,246,0.45);
  --morado-vivo: #a78bfa;
  --sombra-card: 0 2px 16px rgba(0,0,0,0.4);
}
.admin-content { background: #0e0420; color: #f0eaff; }
.admin-nav-btn { color: #9980bb; }
.admin-nav-btn:hover { background: rgba(109,40,217,0.12); color: #c4b5d9; }
.admin-nav-btn.activo { background: rgba(109,40,217,0.18); color: #a78bfa; border-right-color: #a78bfa; }
.admin-sidebar-label { color: #4a3d5c; }
.admin-section-title { color: #f0eaff; border-bottom-color: rgba(255,255,255,0.07); }
.admin-card { background: rgba(22,8,44,0.98); border-color: rgba(255,255,255,0.07); }
.admin-list-item { background: rgba(14,4,32,0.9); border-color: rgba(255,255,255,0.07); }
.admin-list-item:hover { border-color: rgba(255,255,255,0.12); }
.admin-list-item-titulo { color: #f0eaff; }
.mod-item { background: rgba(8,2,18,0.7); border-color: rgba(255,255,255,0.07); color: #c4b5d9; }
.mod-item-meta { color: #7c6a99; }
.afield label { color: #c4b5d9; }
.afield input,
.afield textarea,
.afield select { background: rgba(8,2,18,0.85); color: #f0eaff; border-color: rgba(255,255,255,0.11); }
.afield input:focus, .afield textarea:focus, .afield select:focus { border-color: rgba(139,92,246,0.5); }
.afield select option { background: #1a0a2e; }
.btn-pub { background: rgba(109,40,217,0.2); color: #f0eaff; border-color: rgba(139,92,246,0.4); }
.btn-pub:hover { background: rgba(109,40,217,0.35); }
.admin-edit-box { background: #160830; border-color: rgba(109,40,217,0.4); }
.admin-edit-title { color: #f0eaff; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* Tablet grande: columnas laterales más angostas */
@media (max-width: 1280px) {
  .page-wrapper {
    grid-template-columns: 220px 1fr 260px;
    gap: 0 22px;
    padding: 2rem 1.75rem 5rem;
  }
}

/* Tablet: sin columnas laterales */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
  }
  .col-flyer,
  .col-contexto { display: none; }

  /* En tablet/móvil: mostrar flyer + contexto siempre visible */
  .mobile-flyer-contexto {
    display: block;
    margin-bottom: 1.5rem;
  }
}

/* Móvil */
@media (max-width: 640px) {
  .page-wrapper { padding: 1.25rem 1rem 3rem; }
  .site-header h1 { font-size: 24px; }
  .seccion-nav { gap: 0; }
  .snav-btn { padding: 9px 13px; font-size: 9.5px; }
  .doc-titulo { white-space: normal; }
  /* Modal pantalla completa en mobile */
  .modal-overlay { padding: 0; }
  .modal-box { height: 100dvh; border-radius: 0; max-width: 100%; }
  .modal-img-body { padding: 0.5rem; }
  .galeria-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* Panel admin en mobile: pantalla completa, sidebar como tabs */
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--borde);
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    height: 48px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-sidebar-section { display: flex; margin: 0; flex-shrink: 0; }
  .admin-sidebar-label { display: none; }
  .admin-nav-btn {
    white-space: nowrap;
    height: 48px;
    padding: 0 14px;
    border-bottom: none;
    border-right: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 10px;
    width: auto;
    gap: 5px;
  }
  /* Ocultar texto, mostrar solo emoji en mobile admin */
  .admin-nav-btn span:not(.admin-nav-ico) { display: none; }
  .admin-nav-ico { width: auto; font-size: 14px; }
  .admin-nav-btn.activo {
    border-right: none;
    border-bottom: 2px solid var(--morado-vivo);
    background: rgba(124,58,237,0.1);
  }
  .admin-content { padding: 1rem; }
  .admin-create-grid { grid-template-columns: 1fr; }
}

/* ── BLOQUE PARA MOBILE: flyer + contexto siempre visible ── */
.mobile-flyer-contexto {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-flyer-contexto {
    display: block;
  }

  .mobile-flyer-contexto .flyer-img {
    width: 100%;
    max-width: 320px;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  }

  /* Ocultar el toggle/acordeón — contexto siempre abierto */
  .mobile-ctx-toggle {
    display: none !important;
  }

  .mobile-ctx-body {
    display: block !important;
    background: var(--bg-card);
    border: 1px solid var(--borde-morado);
    border-radius: var(--radio);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 15px;
    color: var(--texto-sec);
    line-height: 1.75;
    box-shadow: var(--sombra-card);
  }
  .mobile-ctx-body.abierto { display: block; }
}
/* ══ COMUNIDAD: sub-tabs ══════════════════════════════════ */
.comunidad-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--borde);
  padding-bottom: 0;
}
.ctab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--texto-ter);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.ctab-btn:hover { color: var(--texto-sec); }
.ctab-btn.activo {
  color: var(--morado-vivo);
  border-bottom-color: var(--morado-vivo);
}
.ctab-panel { display: none; }
.ctab-panel.activo { display: block; }

/* ══ COMUNIDAD: selector tipo mensaje ════════════════════ */
.tipo-mensaje-selector {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.tipo-btn {
  background: var(--bg-card);
  border: 1px solid var(--borde);
  color: var(--texto-ter);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 16px;
  border-radius: var(--radio);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tipo-btn:hover {
  border-color: var(--borde-morado);
  color: var(--texto-sec);
}
.tipo-btn.activo {
  background: rgba(124,58,237,0.12);
  border-color: var(--morado-vivo);
  color: var(--morado-vivo);
}