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

:root {
  --bg:       #0f172a;
  --bg2:      #1e293b;
  --bg3:      #263348;
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.13);
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --accent:   #38bdf8;
  --accent2:  #0ea5e9;
  --success:  #34d399;
  --error:    #f87171;
  --radius:   14px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
}
.brand {
  display: flex; align-items: center; gap: .4rem;
  text-decoration: none;
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--text);
}
.nav-links { display: flex; gap: .25rem; }
.nav-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-link:hover, .nav-link.active { background: var(--bg3); color: var(--text); }
.nav-notif { position: relative; }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent2);
  color: #fff;
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg);
}

/* ===== Container ===== */
.container { max-width: 640px; margin: 0 auto; padding: 1rem; }

/* ===== Feed ===== */
.feed { display: flex; flex-direction: column; gap: .75rem; }

/* ===== Tarjeta publicación ===== */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeUp .3s ease both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:none; }
}
.card-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem .6rem;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border2);
}
.card-meta { flex: 1; min-width: 0; }
.card-autor { font-weight: 600; font-size: .9rem; color: var(--text); }
.card-fecha { font-size: .75rem; color: var(--muted); margin-top: 1px; }
.card-badge {
  background: rgba(56,189,248,.12);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,.2);
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 99px;
  letter-spacing: .03em;
}
.card-contenido {
  padding: .1rem 1rem .75rem;
  font-size: .92rem;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Imágenes */
.card-imagenes {
  display: grid;
  gap: 2px;
  margin-bottom: 0;
}
.card-imagenes.n1 { grid-template-columns: 1fr; }
.card-imagenes.n2 { grid-template-columns: 1fr 1fr; }
.card-imagenes.n3 { grid-template-columns: 1fr 1fr; }
.card-imagenes.n3 img:first-child { grid-column: 1/-1; }
.card-imagenes img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; cursor: pointer;
  transition: opacity .15s;
}
.card-imagenes img:hover { opacity: .9; }

/* Acciones */
.card-acciones {
  display: flex;
  border-top: 1px solid var(--border);
}
.btn-accion {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: none; border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .83rem; font-weight: 500;
  padding: .65rem .5rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  border-right: 1px solid var(--border);
}
.btn-accion:last-child { border-right: none; }
.btn-accion:hover { background: var(--bg3); color: var(--text); }
.btn-accion.liked { color: var(--accent2); }
.btn-accion svg { flex-shrink: 0; }

/* Comentarios inline */
.comentarios-box {
  border-top: 1px solid var(--border);
  padding: .75rem 1rem;
  display: none;
}
.comentarios-box.open { display: block; }
.comentario-item {
  display: flex; gap: .6rem;
  margin-bottom: .65rem;
}
.com-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  flex-shrink: 0;
  border: 1px solid var(--border2);
}
.com-body { flex: 1; }
.com-autor { font-size: .78rem; font-weight: 600; color: var(--accent); }
.com-texto { font-size: .83rem; color: #cbd5e1; line-height: 1.4; }
.com-fecha { font-size: .7rem; color: var(--muted); }
.com-input-row {
  display: flex; gap: .5rem; margin-top: .5rem;
}
.com-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  padding: .5rem .75rem;
  outline: none;
  transition: border-color .2s;
}
.com-input-row input:focus { border-color: var(--accent2); }
.com-input-row input::placeholder { color: var(--muted); opacity: .6; }
.com-send {
  background: var(--accent2);
  border: none; border-radius: 8px;
  color: #fff; font-size: .82rem; font-weight: 600;
  padding: .5rem .9rem;
  cursor: pointer;
  transition: background .15s;
}
.com-send:hover { background: var(--accent); }

/* ===== FAB ===== */
.fab {
  position: fixed; bottom: 1.5rem; right: 1.25rem; z-index: 40;
  width: 56px; height: 56px;
  background: var(--accent2);
  border: none; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(14,165,233,.4);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.fab:hover { background: var(--accent); transform: scale(1.07); box-shadow: 0 6px 24px rgba(14,165,233,.5); }
.fab:active { transform: scale(.95); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  width: 100%; max-width: 640px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-header h3 {
  font-size: 1rem; font-weight: 600;
}
.modal-close {
  background: var(--bg3); border: none; border-radius: 8px;
  color: var(--muted); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  padding: .85rem;
  resize: none;
  min-height: 110px;
  outline: none;
  transition: border-color .2s;
  line-height: 1.5;
}
.modal textarea:focus { border-color: var(--accent2); }
.modal textarea::placeholder { color: var(--muted); opacity: .6; }

/* Preview imágenes modal */
.modal-imgs {
  display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem;
}
.modal-imgs img {
  width: 72px; height: 72px;
  object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border2);
}

.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .85rem;
}
.btn-icon {
  width: 38px; height: 38px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-pub {
  background: var(--accent2);
  color: #fff; border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 600;
  padding: .6rem 1.5rem;
  cursor: pointer;
  transition: background .15s, opacity .2s;
  position: relative;
}
.btn-pub:hover { background: var(--accent); }
.btn-pub:disabled { opacity: .5; cursor: not-allowed; }
.btn-pub .spinner-btn {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}
.btn-pub.loading .spinner-btn { display: block; }
.btn-pub.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 5rem; left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: .65rem 1.25rem;
  border-radius: 99px;
  font-size: .88rem;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  transition: opacity .3s;
  white-space: nowrap;
}
.toast.hidden { opacity: 0; pointer-events: none; }

/* ===== Empty / Spinner ===== */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty p { font-size: .9rem; }
.spinner-feed {
  display: flex; gap: .4rem;
  justify-content: center; padding: 2rem;
}
.spinner-feed span {
  width: 8px; height: 8px;
  background: var(--muted);
  border-radius: 50%;
  animation: bounce .8s ease infinite;
}
.spinner-feed span:nth-child(2) { animation-delay: .15s; }
.spinner-feed span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%,80%,100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.lightbox img {
  max-width: 95vw; max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

/* ===== PERFIL ===== */
.p-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.p-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
}
.p-avatar-wrap { position: relative; flex-shrink: 0; }
.p-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  display: block;
}
.p-avatar-empty {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.p-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: var(--accent2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  border: 2px solid var(--bg2);
}
.p-nombre { font-size: 1.1rem; font-weight: 600; }
.p-telefono, .p-loc { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

.p-section { padding: 1rem; border-bottom: 1px solid var(--border); }
.p-section:last-of-type { border-bottom: none; }
.p-section-title {
  font-size: .78rem; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .85rem;
}
.p-form { display: flex; flex-direction: column; gap: .75rem; }
.p-field { display: flex; flex-direction: column; gap: .3rem; }
.p-field label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.p-field input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  padding: .65rem .85rem;
  outline: none;
  transition: border-color .2s;
}
.p-field input:focus { border-color: var(--accent2); }
.p-field input::placeholder { color: var(--muted); opacity: .5; }
.p-btn-save {
  background: var(--accent2); color: #fff; border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 600;
  padding: .7rem; cursor: pointer;
  transition: background .15s, opacity .2s;
  position: relative;
}
.p-btn-save:hover { background: var(--accent); }
.p-btn-save:disabled { opacity: .5; }
.p-btn-save .spinner-btn {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite; margin: 0 auto;
}
.p-btn-save.loading .spinner-btn { display: block; }
.p-btn-save.loading .btn-text { display: none; }

/* Mis publicaciones en perfil */
.p-pub-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.p-pub-item:last-child { border-bottom: none; }
.p-pub-thumb {
  width: 52px; height: 52px;
  border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border2);
}
.p-pub-nopic {
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.p-pub-body { flex: 1; min-width: 0; }
.p-pub-texto {
  font-size: .85rem; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p-pub-meta { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.p-pub-del {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  padding: .4rem; border-radius: 6px;
  transition: background .15s, color .15s;
}
.p-pub-del:hover { background: rgba(248,113,113,.1); color: var(--error); }

.p-btn-logout {
  width: 100%; background: none;
  border: none; border-top: 1px solid var(--border);
  color: var(--error); font-family: 'DM Sans', sans-serif;
  font-size: .9rem; font-weight: 500;
  padding: 1rem; cursor: pointer;
  transition: background .15s;
}
.p-btn-logout:hover { background: rgba(248,113,113,.07); }

/* ===== MENSAJES ===== */
.convs-list { display: flex; flex-direction: column; gap: 0; }
.conv-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  border-radius: 8px;
  padding-left: .5rem; padding-right: .5rem;
}
.conv-item:hover { background: var(--bg2); }
.conv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  border: 1.5px solid var(--border2);
}
.conv-body { flex: 1; min-width: 0; }
.conv-nombre { font-size: .92rem; font-weight: 600; }
.conv-ultimo {
  font-size: .8rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
}
.conv-fecha { font-size: .72rem; color: var(--muted); flex-shrink: 0; }

/* Panel de chat */
.chat-panel {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.chat-panel.open { transform: translateX(0); }
.chat-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-back {
  background: var(--bg3); border: none; border-radius: 8px;
  color: var(--text); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.chat-header-nombre { font-weight: 600; font-size: .95rem; }
.chat-header-tel { font-size: .75rem; color: var(--muted); }
.chat-mensajes {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.msg-burbuja {
  max-width: 75%;
  padding: .6rem .85rem;
  border-radius: 14px;
  font-size: .88rem; line-height: 1.45;
}
.msg-burbuja p { color: var(--text); }
.msg-burbuja span { font-size: .68rem; color: var(--muted); display: block; margin-top: .25rem; }
.msg-burbuja.mio {
  background: var(--accent2);
  border-radius: 14px 14px 4px 14px;
  align-self: flex-end;
}
.msg-burbuja.mio p { color: #fff; }
.msg-burbuja.mio span { color: rgba(255,255,255,.65); }
.msg-burbuja.suyo {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
}
.chat-input-row {
  display: flex; gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem; padding: .65rem .85rem;
  outline: none; transition: border-color .2s;
}
.chat-input-row input:focus { border-color: var(--accent2); }
.chat-input-row input::placeholder { color: var(--muted); opacity: .5; }
.chat-send {
  background: var(--accent2); border: none; border-radius: 10px;
  color: #fff; width: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.chat-send:hover { background: var(--accent); }

/* ===== NOTIFICACIONES ===== */
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.notif-title { font-size: 1.1rem; font-weight: 600; }
.notif-clear {
  background: none; border: 1px solid var(--border2);
  border-radius: 8px; color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem; padding: .35rem .75rem;
  cursor: pointer; transition: background .15s, color .15s;
}
.notif-clear:hover { background: var(--bg2); color: var(--text); }
.notif-list {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.notif-item {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.no-leida { background: rgba(56,189,248,.04); }
.notif-item:hover { background: var(--bg3); }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0; margin-top: 5px;
}
.notif-dot.activo { background: var(--accent2); }
.notif-msg { font-size: .9rem; color: var(--text); line-height: 1.4; }
.notif-fecha { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* ===== BUSCAR ===== */
.search-wrap { display: flex; flex-direction: column; gap: 1rem; }
.search-bar {
  display: flex; align-items: center; gap: .65rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}
.search-bar svg { color: var(--muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none;
  color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: .95rem; outline: none;
}
.search-bar input::placeholder { color: var(--muted); opacity: .6; }
.search-clear {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: .85rem;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .15s;
}
.search-clear:hover { background: var(--bg3); }
.search-count {
  font-size: .78rem; color: var(--muted); margin-bottom: .5rem;
}
.search-card { cursor: pointer; transition: border-color .15s; }
.search-card:hover { border-color: var(--border2); }
.search-meta {
  display: flex; gap: 1rem;
  padding: .6rem 1rem;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--muted);
}

/* ===== DETALLE PUBLICACIÓN ===== */
.btn-back {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem; padding: .5rem .85rem;
  cursor: pointer; margin-bottom: .85rem;
  transition: background .15s, color .15s;
}
.btn-back:hover { background: var(--bg3); color: var(--text); }
.det-card { margin-bottom: .75rem; }
.det-contenido { font-size: 1rem !important; white-space: pre-wrap; }
.det-imgs { margin: 0; }
.det-coms-title {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  margin: 1rem 0 .5rem;
}
.det-coms {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.det-com-input {
  display: flex; gap: .5rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .65rem .75rem;
}
.det-com-input input {
  flex: 1; background: none; border: none;
  color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: .9rem; outline: none;
}
.det-com-input input::placeholder { color: var(--muted); opacity: .5; }

/* ===== PERFIL USUARIO PÚBLICO ===== */
.pu-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: .75rem;
}
.pu-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.pu-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border2);
  flex-shrink: 0;
}
.pu-avatar-empty {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
}
.pu-nombre { font-size: 1.1rem; font-weight: 600; }
.pu-sub { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.pu-actions { padding: .75rem 1rem; }
.pu-btn-msg {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent2); color: #fff; border: none;
  border-radius: 10px; font-family: 'DM Sans', sans-serif;
  font-size: .9rem; font-weight: 600;
  padding: .6rem 1.25rem; cursor: pointer;
  transition: background .15s;
}
.pu-btn-msg:hover { background: var(--accent); }

/* ===== ADMIN ===== */
.admin-wrap { padding-bottom: 2rem; }
.admin-header { margin-bottom: 1rem; }
.admin-title { font-size: 1.2rem; font-weight: 600; }
.admin-tabs {
  display: flex; gap: .4rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
  margin-bottom: 1rem;
}
.admin-tab {
  flex: 1; padding: .55rem;
  background: none; border: none;
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: .88rem; font-weight: 500;
  border-radius: 8px; cursor: pointer;
  transition: all .2s;
}
.admin-tab.active { background: var(--bg3); color: var(--text); }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem;
}
.admin-table th {
  text-align: left; padding: .6rem .75rem;
  color: var(--muted); font-weight: 600;
  font-size: .73rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg3); }
.admin-td-content {
  max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-link {
  color: var(--accent); text-decoration: none;
}
.admin-link:hover { text-decoration: underline; }
.admin-rol-badge {
  background: var(--bg3); color: var(--muted);
  font-size: .72rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 99px;
}
.admin-rol-badge.admin { background: rgba(56,189,248,.15); color: var(--accent); }
.admin-actions-cell { display: flex; gap: .4rem; align-items: center; }
.admin-btn-del {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
  padding: .3rem .5rem; cursor: pointer; font-size: .8rem;
  transition: background .15s, color .15s;
}
.admin-btn-del:hover { background: rgba(248,113,113,.1); color: var(--error); border-color: var(--error); }
.admin-btn-rol {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem; padding: .3rem .6rem;
  cursor: pointer; transition: background .15s, color .15s;
}
.admin-btn-rol:hover { background: rgba(56,189,248,.1); color: var(--accent); border-color: var(--accent); }

/* ===== PRECIO ===== */
.card-precio {
  display: inline-block;
  margin: -.25rem 1rem .75rem;
  background: rgba(52,211,153,.12);
  color: #34d399;
  border: 1px solid rgba(52,211,153,.25);
  font-size: 1.1rem;
  font-weight: 700;
  padding: .25rem .85rem;
  border-radius: 99px;
  letter-spacing: -.01em;
}
.det-precio {
  margin: -.25rem 1rem .85rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #34d399;
}

/* Campo precio en modal */
.precio-input-wrap {
  display: flex; align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: .65rem;
  overflow: hidden;
  transition: border-color .2s;
}
.precio-input-wrap:focus-within { border-color: var(--accent2); }
.precio-simbolo {
  padding: .75rem .75rem .75rem 1rem;
  color: #34d399;
  font-size: 1.1rem; font-weight: 700;
  flex-shrink: 0;
}
.precio-input-wrap input {
  flex: 1; background: none; border: none;
  color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: .95rem; padding: .75rem .75rem .75rem 0;
  outline: none;
}
.precio-input-wrap input::placeholder { color: var(--muted); opacity: .5; }

/* Botón WhatsApp en tarjeta */
.btn-wa {
  color: #25d366 !important;
}
.btn-wa:hover { background: rgba(37,211,102,.08) !important; }

/* Botón WhatsApp grande en detalle */
.btn-wa-grande {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%;
  background: #25d366;
  color: #fff; border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 600;
  padding: .9rem;
  cursor: pointer;
  margin: .75rem 0;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 16px rgba(37,211,102,.25);
}
.btn-wa-grande:hover { background: #1fb855; transform: translateY(-1px); }
.btn-wa-grande:active { transform: scale(.98); }

/* ===== VIDEO ===== */
.card-video-wrap {
  width: 100%;
  background: #000;
  position: relative;
}
.card-video {
  width: 100%;
  max-height: 340px;
  display: block;
  object-fit: contain;
}
.det-video-wrap { margin-bottom: 0; }
.det-video { max-height: 480px; }

/* Preview de video en modal */
.modal-imgs video {
  width: 100%;
  border-radius: 8px;
  max-height: 180px;
  margin-top: .25rem;
}

/* ===== BANNER SUPERIOR ===== */
.site-banner {
  width: 100%;
  background: #0f172a;
  line-height: 0;
  border-bottom: 1px solid rgba(245,158,11,.2);
}
.banner-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

/* ===== BOTONES DE SECCIONES ===== */
.secciones-btns {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1rem;
}
.seccion-btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
  overflow: hidden;
}
.seccion-btn::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .2s;
}
.seccion-btn:hover { transform: translateY(-1px); }
.seccion-btn:hover::before { opacity: 1; }
.seccion-btn:active { transform: scale(.98); }

/* ===== TRANSMISIÓN EN VIVO ===== */
.youtube-live-wrap {
  margin: 0 0 .9rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.youtube-live-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--border);
}

.youtube-live-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,.12);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.youtube-live-info {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.youtube-live-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}

.youtube-live-sub {
  font-size: .72rem;
  color: var(--muted);
}

/* Contenedor del video con altura adaptativa */
.youtube-live-video {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9; /* horizontal por defecto */
  max-height: 80vh;
  min-height: 250px;
}

.youtube-live-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* En móviles (vertical) forzamos un aspecto más alto */
@media (max-width: 600px) {
  .youtube-live-video {
    aspect-ratio: 9 / 16; /* vertical */
    min-height: 50vh;
  }
}

/* Servicios — azul */
.seccion-servicios {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
  border-color: rgba(56,189,248,.2);
  box-shadow: 0 2px 12px rgba(56,189,248,.08);
}
.seccion-servicios:hover {
  border-color: rgba(56,189,248,.4);
  box-shadow: 0 4px 20px rgba(56,189,248,.15);
}
.seccion-servicios::before {
  background: linear-gradient(135deg, rgba(56,189,248,.05), transparent);
}

/* Emergencias — rojo/naranja */
.seccion-emergencias {
  background: linear-gradient(135deg, #3d1f1f 0%, #1e293b 100%);
  border-color: rgba(248,113,113,.2);
  box-shadow: 0 2px 12px rgba(248,113,113,.06);
}
.seccion-emergencias:hover {
  border-color: rgba(248,113,113,.4);
  box-shadow: 0 4px 20px rgba(248,113,113,.12);
}
.seccion-emergencias::before {
  background: linear-gradient(135deg, rgba(248,113,113,.05), transparent);
}

.seccion-ico {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.seccion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.seccion-titulo {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
}
.seccion-sub {
  font-size: .76rem;
  color: var(--muted);
}
.seccion-arrow {
  color: var(--muted);
  flex-shrink: 0;
  opacity: .5;
}

/* ===== COMING SOON ===== */
.coming-wrap { padding-top: .5rem; }
.coming-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: .75rem;
}
.coming-ico { font-size: 3rem; margin-bottom: 1rem; }
.coming-title { font-size: 1.3rem; font-weight: 600; margin-bottom: .65rem; }
.coming-desc { font-size: .9rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.5rem; }
.coming-badge {
  display: inline-block;
  background: rgba(56,189,248,.1);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,.2);
  font-size: .8rem; font-weight: 600;
  padding: .35rem 1rem;
  border-radius: 99px;
  letter-spacing: .05em;
}

/* ===== DIRECTORIO PÚBLICO ===== */
.dir-header { margin-bottom: 1.25rem; }
.dir-title { font-size: 1.2rem; font-weight: 600; margin: .5rem 0 .25rem; }
.dir-sub { font-size: .82rem; color: var(--muted); }

.dir-grupo { margin-bottom: 1.25rem; }
.dir-grupo-titulo {
  font-size: .75rem; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: .5rem;
  padding: 0 .25rem;
}
.dir-lista {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dir-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.dir-item:last-child { border-bottom: none; }
.dir-item:hover { background: var(--bg3); }
.dir-ico {
  font-size: 1.5rem; flex-shrink: 0;
  width: 36px; text-align: center;
}
.dir-info { flex: 1; min-width: 0; }
.dir-nombre { font-size: .92rem; font-weight: 600; color: var(--text); }
.dir-dato { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.dir-tel-btn {
  display: flex; align-items: center; gap: .4rem;
  background: rgba(37,211,102,.1);
  color: #25d366;
  border: 1px solid rgba(37,211,102,.2);
  border-radius: 8px;
  font-size: .8rem; font-weight: 600;
  padding: .45rem .75rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.dir-tel-btn:hover { background: rgba(37,211,102,.2); }

/* ===== DIRECTORIO ADMIN FORM ===== */
.dir-admin-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.dir-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
}
@media (max-width: 500px) {
  .dir-form-grid { grid-template-columns: 1fr 1fr; }
  .dir-form-grid .p-field[style*="span 3"],
  .dir-form-grid .p-field[style*="span 4"] { grid-column: span 2; }
}

/* ===== PUBLICACIÓN DESTACADA ===== */
.card-destacada {
  border-color: rgba(245,158,11,.5) !important;
  box-shadow: 0 0 0 1px rgba(245,158,11,.2),
              0 4px 24px rgba(245,158,11,.12);
  position: relative;
}
.card-destacada::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #fcd34d, #f59e0b);
  border-radius: var(--radius) var(--radius) 0 0;
}
.badge-destacada {
  display: inline-flex; align-items: center; gap: .25rem;
  background: rgba(245,158,11,.12);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,.25);
  font-size: .7rem; font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 99px;
  letter-spacing: .03em;
  margin-right: .35rem;
}

/* Botón destacar en admin */
.admin-btn-dest {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; font-size: .85rem;
  padding: .3rem .5rem; cursor: pointer;
  transition: background .15s, border-color .15s;
  opacity: .5;
}
.admin-btn-dest:hover {
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.4);
  opacity: 1;
}

/* ===== COMUNIDAD ===== */
.card-comunidad {
  color: #34d399;
  font-size: .72rem;
  font-weight: 500;
}

/* ===== PUNTOS ===== */
.puntos-section { background: linear-gradient(135deg, #1a2f1a 0%, var(--bg2) 100%); }
.puntos-wrap {
  display: flex; align-items: center; gap: 1.25rem;
}
.puntos-principal { text-align: center; flex-shrink: 0; }
.puntos-numero {
  font-size: 2.8rem; font-weight: 700;
  color: #fcd34d;
  line-height: 1;
  font-family: 'DM Serif Display', serif;
}
.puntos-label {
  font-size: .72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-top: .15rem;
}
.puntos-info { flex: 1; }
.puntos-detalle { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.puntos-barra-wrap {
  background: var(--bg3);
  border-radius: 99px; height: 6px;
  overflow: hidden; margin-bottom: .5rem;
}
.puntos-barra {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #34d399, #059669);
  border-radius: 99px;
  transition: width .5s ease;
}
.puntos-ayuda {
  background: none; border: none;
  color: var(--accent); font-family: 'DM Sans', sans-serif;
  font-size: .78rem; cursor: pointer; padding: 0;
  text-decoration: underline;
}
.puntos-explicacion {
  margin-top: .85rem;
  background: var(--bg3);
  border-radius: 10px; padding: .85rem;
  display: flex; flex-direction: column; gap: .4rem;
  animation: fadeIn .2s ease;
}
.puntos-explicacion p { font-size: .83rem; color: #cbd5e1; line-height: 1.5; }
.puntos-hist-item {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--text);
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
}
.puntos-hist-item:last-child { border-bottom: none; }

/* Indicador límite en modal */
.modal-limit {
  font-size: .78rem; font-weight: 500;
  min-height: 1rem;
  margin-bottom: .4rem;
}

/* ===== MODO VISITANTE ===== */
.visitor-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56,189,248,.08);
  border-bottom: 1px solid rgba(56,189,248,.15);
  padding: .6rem 1rem;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}
.visitor-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin: 0 .2rem;
}
.visitor-link:hover { text-decoration: underline; }

/* FAB login para visitantes */
.fab-login {
  background: var(--bg2) !important;
  border: 1px solid var(--border2) !important;
  color: var(--accent) !important;
  box-shadow: 0 4px 20px rgba(56,189,248,.2) !important;
  text-decoration: none;
}
.fab-login:hover {
  background: var(--bg3) !important;
  box-shadow: 0 6px 24px rgba(56,189,248,.3) !important;
}

/* Botón login en navbar para visitantes */
.nav-login-btn {
  background: var(--accent2) !important;
  color: #fff !important;
  border-radius: 8px !important;
  width: auto !important;
  padding: 0 .75rem !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  gap: .3rem !important;
}
.nav-login-btn::after { content: 'Entrar'; }
.nav-login-btn:hover { background: var(--accent) !important; }

/* Modal de login requerido */
.modal-login-req-inner {
  text-align: center;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 20px 20px 0 0;
}
.modal-login-ico { font-size: 2.5rem; margin-bottom: .75rem; }
.modal-login-titulo { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.modal-login-desc {
  font-size: .85rem; color: var(--muted);
  line-height: 1.55; margin-bottom: 1.25rem;
}
.modal-login-btn-reg {
  display: block;
  background: var(--accent2); color: #fff;
  border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: .95rem;
  padding: .8rem; margin-bottom: .5rem;
  transition: background .15s;
}
.modal-login-btn-reg:hover { background: var(--accent); }
.modal-login-btn-login {
  display: block;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text); border-radius: 10px;
  text-decoration: none; font-size: .9rem;
  padding: .75rem; margin-bottom: .75rem;
  transition: background .15s;
}
.modal-login-btn-login:hover { background: var(--bg); }
.modal-login-cancelar {
  background: none; border: none;
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: .82rem; cursor: pointer; text-decoration: underline;
}

/* Botón login en sección comentarios */
.com-login-btn {
  width: 100%; background: none;
  border: 1px solid var(--border2);
  border-radius: 8px; color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem; font-weight: 500;
  padding: .55rem; cursor: pointer; margin-top: .5rem;
  transition: background .15s;
}
.com-login-btn:hover { background: rgba(56,189,248,.07); }

/* ===== BORRAR NOTIFICACIONES ===== */
.notif-item { position: relative; }
.notif-del-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  padding: .4rem; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  opacity: 0;
}
.notif-item:hover .notif-del-btn { opacity: 1; }
.notif-del-btn:hover { background: rgba(248,113,113,.1); color: var(--error); }

/* ===== BORRAR CONVERSACION ===== */
.chat-del-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; margin-left: auto;
  transition: background .15s, color .15s;
}
.chat-del-btn:hover { background: rgba(248,113,113,.1); color: var(--error); }

/* ===== BORRAR PUBLICACIÓN EN FEED ===== */
.card-del-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  padding: .35rem; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.card:hover .card-del-btn { opacity: 1; }
.card-del-btn:hover { background: rgba(248,113,113,.1); color: var(--error); }

/* ===== COMPARTIR EN REDES ===== */
.share-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
}
.share-title {
  font-size: .78rem; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .75rem;
}
.share-btns {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.share-btn {
  display: flex; align-items: center; gap: .5rem;
  border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem; font-weight: 600;
  padding: .6rem 1rem;
  cursor: pointer;
  transition: transform .1s, opacity .15s;
  flex: 1; justify-content: center;
  min-width: 100px;
}
.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-btn:active { transform: scale(.97); }
.share-fb      { background: #1877f2; color: #fff; }
.share-copy    { background: var(--bg3); color: var(--text); border: 1px solid var(--border2); }
.share-wacopy  { background: #25d366; color: #fff; }
.share-hint {
  font-size: .75rem; color: var(--muted);
  margin-top: .75rem; line-height: 1.4;
}

/* ===== CONTADOR DE VISITAS ===== */
.visit-counter {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 38px;
  padding: 0 .65rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.visit-counter svg { flex: 0 0 auto; }

/* ===== CONFIGURACIÓN DEL LOGO ===== */
.admin-config-card {
  padding: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-config-help {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  margin: 0 0 .9rem;
}
.logo-config-preview {
  width: 100%;
  min-height: 110px;
  max-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  margin-bottom: .9rem;
}
.logo-config-preview img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  display: block;
}
.logo-upload-form {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.logo-file-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.logo-file-name {
  flex: 1 1 180px;
  color: var(--muted);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .visit-counter {
    padding: 0 .45rem;
    font-size: .68rem;
  }
  .logo-upload-form {
    align-items: stretch;
    flex-direction: column;
  }
  .logo-file-label,
  .logo-upload-form .p-btn-save {
    width: 100%;
  }
}

/* ===== CARRUSEL DE DESTACADAS ===== */
.destacadas-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.destacadas-icon {
  font-size: 1.2rem;
}
.destacadas-titulo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.destacadas-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
  min-height: 160px;
}
.slider-track {
  display: flex;
  transition: transform 0.4s ease;
}
.slider-slide {
  flex: 0 0 100%;
  aspect-ratio: 16/9;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg3);
}
.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}
.slider-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.slider-autor {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}
.slider-dots {
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}
.slider-dot.active {
  background: #fff;
}

/* ===== CONTADORES DE ESTADÍSTICAS ===== */
.stats-bar {
  display: flex;
  justify-content: space-around;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  margin-bottom: 1rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
}
.stat-icon {
  font-size: 1.2rem;
}
.stat-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ===== WIDGET DE PUNTOS EN EL INICIO ===== */
#puntos-widget .puntos-section {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
}
#puntos-widget .puntos-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
#puntos-widget .puntos-principal {
  text-align: center;
  flex-shrink: 0;
}
#puntos-widget .puntos-numero {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fcd34d;
  line-height: 1;
  font-family: 'DM Serif Display', serif;
}
#puntos-widget .puntos-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.1rem;
}
#puntos-widget .puntos-info {
  flex: 1;
}
#puntos-widget .puntos-detalle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
#puntos-widget .puntos-barra-wrap {
  background: var(--bg3);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
#puntos-widget .puntos-barra {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #059669);
  border-radius: 99px;
  transition: width 0.5s ease;
}
#puntos-widget .puntos-ayuda {
  background: none;
  border: none;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ===== BOTÓN TRANSMISIONES EN VIVO EN NAVBAR ===== */
.nav-transmisiones {
  position: relative;
}
.nav-transmisiones .live-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ===== BOTÓN DE INSTALACIÓN ===== */
.nav-install {
  background: rgba(52, 211, 153, 0.15) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  border-radius: 8px !important;
  color: #34d399 !important;
  width: auto !important;
  padding: 0 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  gap: 0.3rem !important;
}
.nav-install::before {
  content: '📲';
  font-size: 1rem;
}
.nav-install:hover {
  background: rgba(52, 211, 153, 0.25) !important;
}

/* ===== BÚSQUEDA DE USUARIOS ===== */
.search-section {
  margin-bottom: 1.5rem;
}
.search-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.search-users-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.search-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.search-user-card:hover {
  border-color: var(--border2);
  background: var(--bg3);
}
.search-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border2);
}
.search-user-avatar-empty {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border2);
}
.search-user-info {
  flex: 1;
  min-width: 0;
}
.search-user-nombre {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.search-user-tel {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.search-user-loc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.search-user-pubs {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
  background: var(--bg3);
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 99px;
}

.search-pubs-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.search-card {
  cursor: pointer;
  transition: border-color 0.15s;
}
.search-card:hover {
  border-color: var(--border2);
}
.search-meta {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== ADMIN: TRANSMISIONES ===== */
.trans-admin-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.trans-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}
.trans-form-grid .p-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.trans-form-grid .p-field label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.trans-form-grid .p-field input,
.trans-form-grid .p-field select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.trans-form-grid .p-field input:focus,
.trans-form-grid .p-field select:focus {
  border-color: var(--accent2);
}
.trans-form-grid .p-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent2);
  cursor: pointer;
}
.trans-form-grid .p-field label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.trans-form-grid small {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

@media (max-width: 600px) {
  .trans-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .trans-form-grid .p-field[style*="span 3"],
  .trans-form-grid .p-field[style*="span 4"] {
    grid-column: span 2;
  }
}

/* ===== BOTONES DE COMPARTIR (versión móvil mejorada) ===== */
.share-section {
  padding: 0.75rem 1rem;
  text-align: center;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.share-section p {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.share-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.2s;
  min-width: 100px;
  justify-content: center;
}
.share-btn:hover {
  opacity: 0.85;
}
.share-fb {
  background: #1877f2;
}
.share-wacopy {
  background: #25d366;
}

/* Ajuste para móviles */
@media (max-width: 480px) {
  .share-btn {
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  .share-btns {
    gap: 0.3rem;
  }
}
.notif-item {
  cursor: pointer;
}
/* ===== ANUNCIOS ===== */
.ad-container {
  text-align: center;
  margin: 0.5rem 0;
  min-height: 100px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.5rem;
}
.ad-container iframe,
.ad-container img {
  max-width: 100%;
  border: 0;
}
.ad-label {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
/* ===== BOTONES PERSONALIZADOS ===== */
.seccion-entretenimiento {
  background: linear-gradient(135deg, #1f3a3a 0%, #1e293b 100%);
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 2px 12px rgba(236, 72, 153, 0.08);
}
.seccion-entretenimiento:hover {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15);
}
.seccion-entretenimiento::before {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), transparent);
}

.seccion-educacion {
  background: linear-gradient(135deg, #1f2a3a 0%, #1e293b 100%);
  border-color: rgba(52, 211, 153, 0.2);
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.08);
}
.seccion-educacion:hover {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.15);
}
.seccion-educacion::before {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.05), transparent);
}