/* ============================================================
   Zenti — home.css  (rediseño 2026)

   Cubre todo el dashboard /inicio + estilos compartidos:
     · Topbar, navegación
     · Layout dashboard 3 columnas
     · Cards (perfil, notificaciones, invitar, cumpleaños, amigos)
     · Composer + feed + comentarios + eventos
     · Avatares
     · Botones

   Las secciones específicas de /perfil (pestañas, muro, entradas,
   fotos…) viven al final y NO se han tocado.
   ============================================================ */


/* ============ TOKENS ============ */
:root {
  /* Paleta calmada */
  --z-blue-50:   #EFF6FE;
  --z-blue-100:  #D9EAFB;
  --z-blue-200:  #B7D7F4;
  --z-blue-300:  #8BC0EC;
  --z-blue-400:  #4A9AD9;
  --z-blue-500:  #2F7BD1;
  --z-blue-600:  #2566B5;
  --z-blue-700:  #1B4E8E;
  --z-blue-800:  #163E7A;
  --z-blue-900:  #0E2A56;

  --z-cyan:      #06B6D4;
  --z-green:     #10B981;
  --z-amber:     #F59E0B;
  --z-rose:      #F43F5E;
  --z-red-bg:    #FFF5F5;
  --z-red-fg:    #C84F4F;

  /* Superficie + texto */
  --z-bg:           #F7F9FC;
  --z-bg-alt:       #ECF1F7;
  --z-surface:      #FFFFFF;
  --z-surface-2:    #F2F5F9;
  --z-border:       #E3E9F1;
  --z-border-soft:  #EEF2F7;

  --z-text:         #0E1F3A;
  --z-text-soft:    #4B5C75;
  --z-text-mute:    #7A8BA4;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Sombras */
  --sh-card:       0 1px 2px rgba(14,31,58,0.04), 0 4px 12px -4px rgba(14,31,58,0.06);
  --sh-card-hover: 0 1px 2px rgba(14,31,58,0.04), 0 12px 24px -8px rgba(14,31,58,0.12);
  --sh-pop:        0 8px 32px -8px rgba(14,31,58,0.20);

  --z-tr: 160ms cubic-bezier(.4,0,.2,1);
}


/* ============ BASE ============ */
body.app {
  background: var(--z-bg);
  color: var(--z-text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.app a { color: inherit; text-decoration: none; }

.muted        { color: var(--z-text-mute); font-size: 13px; }
.muted.small  { font-size: 12px; }


/* ============ TOPBAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 64px;
  background: linear-gradient(180deg, #5fa5da 0%, #4a8cc4 60%, #3d7eb8 100%);
  box-shadow: 0 2px 8px -2px rgba(14,31,58,0.18);
  z-index: 100;
  color: #fff;
}
.topbar-inner {
  width: 95%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex; align-items: center; gap: 8px;
}

.topbar-logo {
  display: flex; align-items: center;
  padding: 6px 8px;
  flex-shrink: 0;
}
.topbar-logo img {
  height: 32px;
  display: block;
}

.topbar-nav {
  display: flex; gap: 2px;
  margin-left: 16px;
  flex: 1; min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  transition: color var(--z-tr), background var(--z-tr);
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.18);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #fff; color: var(--z-blue-700);
  font-size: 11px; font-weight: 700;
  border-radius: 9px;
}
/* El badge nunca debe mostrar "0" (poco estético).
   El JS de chat.js ya pone `hidden`; esta regla es un cinturón extra
   por si en algún momento se pinta con value=0 visible. */
.nav-badge[hidden] { display: none !important; }

/* Botón "Subir fotos" en topbar */
.nav-upload {
  margin-left: auto;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 8px 14px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.28);
}
.nav-upload:hover {
  background: rgba(255,255,255,0.28);
}

/* Mi cuenta */
.topbar-account {
  position: relative;
  flex-shrink: 0;
}
.account-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--z-tr);
}
.account-trigger:hover { background: rgba(255,255,255,0.22); }
.account-trigger svg { color: rgba(255,255,255,0.75); }
.account-trigger .acc-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #d7ecfd);
  color: var(--z-blue-700);
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-pop);
  padding: 6px;
  z-index: 110;
  display: none;
  /* Aislamos el menú del color heredado del topbar */
  color: var(--z-text);
}
/* app.js añade .is-open al contenedor .js-account-dropdown */
.js-account-dropdown.is-open .account-menu { display: block; }
/* Especificidad alta para ganar a `body.app a { color: inherit; }` */
.topbar .account-menu a,
body.app .account-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--z-text);
  font-size: 13.5px;
  text-decoration: none;
  transition: background var(--z-tr);
}
.topbar .account-menu a:hover,
body.app .account-menu a:hover { background: var(--z-bg-alt); color: var(--z-text); }
.account-menu hr { border: 0; border-top: 1px solid var(--z-border-soft); margin: 4px 0; }
.topbar .account-menu a.danger,
body.app .account-menu a.danger { color: var(--z-red-fg); }
.topbar .account-menu a.danger:hover,
body.app .account-menu a.danger:hover { background: var(--z-red-bg); color: var(--z-red-fg); }


/* ============ AVATARES ============ */
.zenti-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #6FB6E8, var(--z-blue-700));
  color: #fff;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(14,31,58,0.10);
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}
.zenti-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.zenti-avatar-letter { text-transform: uppercase; }

.zenti-avatar.avatar-28  { width:  28px; height:  28px; font-size: 12px; }
.zenti-avatar.avatar-32  { width:  32px; height:  32px; font-size: 13px; }
.zenti-avatar.avatar-40  { width:  40px; height:  40px; font-size: 15px; }
.zenti-avatar.avatar-48  { width:  48px; height:  48px; font-size: 18px; }
.zenti-avatar.avatar-56  { width:  56px; height:  56px; font-size: 20px; }
.zenti-avatar.avatar-64  { width:  64px; height:  64px; font-size: 22px; }
.zenti-avatar.avatar-96  { width:  96px; height:  96px; font-size: 36px; }
.zenti-avatar.avatar-120 { width: 120px; height: 120px; font-size: 46px; }


/* ============ LAYOUT DASHBOARD ============ */
.dashboard {
  width: 95%;
  max-width: none;
  margin: 24px auto;
  padding: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.dash-col {
  display: flex; flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.dash-left, .dash-right {
  position: sticky; top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--z-border) transparent;
}
.dash-left::-webkit-scrollbar              { width: 6px; }
.dash-left::-webkit-scrollbar-thumb        { background: var(--z-border); border-radius: 3px; }
.dash-left::-webkit-scrollbar-track        { background: transparent; }


/* ============ CARDS BASE ============ */
.dash-card {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-card);
  transition: box-shadow var(--z-tr);
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.dash-card h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--z-text);
  letter-spacing: -0.005em;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  text-transform: none;
}
.dash-card h3 .h-icon {
  width: 18px; height: 18px;
  color: var(--z-blue-500);
  flex-shrink: 0;
}

.dash-card.empty {
  border-style: dashed;
  color: var(--z-text-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  min-height: 200px;
  text-align: center;
}
.dash-feed.empty { min-height: 600px; }


/* ============ PROFILE CARD ============ */
.profile-card {
  padding: 16px 18px;
}
.profile-card .profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
/* Separación entre la fila de la foto/nombre y los botones de acción */
.profile-card .profile-actions {
  margin-top: 12px;
}
/* Botón "Enviar mensaje" del perfil (destacado) */
.btn-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #4a8cc4, #3d7eb8);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px -4px rgba(74, 140, 196, 0.55);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-message:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px -5px rgba(74, 140, 196, 0.65);
}
.btn-message:active { transform: translateY(0); }
.btn-message svg { width: 18px; height: 18px; }
.profile-card .profile-text {
  min-width: 0;
  flex: 1;
}
.profile-card .profile-name {
  display: block;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700; font-size: 15px;
  color: var(--z-text);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
  line-height: 1.3;
  /* Nombre completo: si es largo salta de línea, sin recortar */
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: color var(--z-tr);
}
.profile-card .profile-name:hover { color: var(--z-blue-600); }
.profile-card .profile-visits {
  font-size: 12px;
  color: var(--z-text-mute);
  line-height: 1.4;
}
.profile-card .profile-visits strong {
  color: var(--z-text);
  font-weight: 700;
}


/* ============ NOTIFICACIONES (sidebar) ============ */
.noti-card .noti-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.noti-card .noti-list li { margin: 0; padding: 0; }

a.noti-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--z-text);
  text-decoration: none;
  transition: background var(--z-tr);
}
a.noti-row:hover { background: var(--z-bg-alt); }
a.noti-row.empty { opacity: 0.5; }
a.noti-row.empty:hover { opacity: 1; }

.noti-icon {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--z-blue-50);
  color: var(--z-blue-600);
}
.noti-icon svg { width: 16px; height: 16px; }
a.noti-row.empty .noti-icon {
  background: var(--z-bg-alt);
  color: var(--z-text-mute);
}

.noti-label {
  flex: 1; min-width: 0;
  color: var(--z-text-soft);
  font-weight: 500;
}
.noti-num {
  font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--z-blue-600);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
a.noti-row.empty .noti-num {
  background: var(--z-bg-alt);
  color: var(--z-text-mute);
}


/* ============ INVITAR ============ */
.invite-card .invite-meta {
  font-size: 13px;
  color: var(--z-text-soft);
  line-height: 1.5;
  margin: 0;
}
.invite-card .invite-meta strong { color: var(--z-blue-700); font-weight: 700; }

.invite-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--z-bg-alt);
  margin: 12px 0 14px;
  overflow: hidden;
}
.invite-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--z-blue-400), var(--z-blue-600));
  border-radius: 999px;
  transition: width 240ms cubic-bezier(.4,0,.2,1);
}


/* ============ EVENTOS / CUMPLEAÑOS ============ */
.events-card .events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.events-card .events-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: background var(--z-tr);
}
.events-card .events-row:hover { background: var(--z-bg-alt); }
.events-card .events-text { min-width: 0; }
.events-card .events-name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--z-text);
  text-decoration: none;
  transition: color var(--z-tr);
}
.events-card .events-name:hover { color: var(--z-blue-600); }
.events-card .events-when {
  font-size: 12px;
  color: var(--z-text-mute);
  margin-top: 1px;
}


/* ============ COLUMNA DER: AMIGOS CONECTADOS ============ */
.dash-friends-card { padding: 18px; }
.friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.friends-header h3 { margin-bottom: 0; }
.friends-count {
  font-size: 12px; font-weight: 700;
  color: var(--z-green);
  background: rgba(16,185,129,0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}


/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  background: var(--z-bg-alt);
  color: var(--z-text);
  transition: background var(--z-tr), transform var(--z-tr), box-shadow var(--z-tr);
}
.btn:hover:not(:disabled) { background: var(--z-border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Botones con color FORZADO. Especificidad alta porque hay una regla previa
   `body.app a { color: inherit; }` que arrastra el color heredado del padre
   cuando el botón es un <a>. Sin esta especificidad, los enlaces estilizados
   como botones verían su texto al color del topbar/contenedor en lugar del
   suyo propio.

   Color: mismo tono que el topbar (#4a8cc4) para coherencia visual. */
.btn-primary,
a.btn-primary,
body.app a.btn-primary {
  background: #4a8cc4;
  color: #fff;
}
.btn-primary:hover:not(:disabled),
a.btn-primary:hover:not(:disabled),
body.app a.btn-primary:hover {
  background: #3d7eb8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -4px rgba(74,140,196,0.4);
}
.btn-primary:active:not(:disabled),
a.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-soft,
a.btn-soft,
body.app a.btn-soft {
  background: var(--z-blue-50);
  color: var(--z-blue-700);
}
.btn-soft:hover:not(:disabled),
a.btn-soft:hover:not(:disabled),
body.app a.btn-soft:hover {
  background: var(--z-blue-100);
  color: var(--z-blue-700);
}

.btn-block { width: 100%; }
.btn-small { padding: 6px 14px; font-size: 13px; }


/* ============ COMPOSER (centro) ============ */
.feed-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
.composer-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
#composer-body {
  flex: 1;
  min-height: 56px;
  max-height: 220px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--z-text);
  outline: 0;
  line-height: 1.5;
}
#composer-body::placeholder { color: var(--z-text-mute); }
#composer-body:focus { outline: 0; }

.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--z-border-soft);
}
.composer-counter {
  font-size: 12px;
  color: var(--z-text-mute);
  font-variant-numeric: tabular-nums;
}
.composer-counter.near-limit { color: var(--z-amber); }
.composer-counter.at-limit   { color: var(--z-rose); font-weight: 700; }

.composer-error {
  padding: 9px 12px;
  background: var(--z-red-bg);
  border: 1px solid #F0A4A4;
  border-radius: var(--r-sm);
  color: #8A1F1F;
  font-size: 13px;
}

/* Línea "Última actualización: ... – hace X" */
.composer-last {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--z-border-soft);
  font-size: 13px;
  line-height: 1.4;
}
.composer-last-label {
  color: var(--z-text-mute);
  font-weight: 600;
}
.composer-last-body {
  color: var(--z-text);
  word-break: break-word;
  white-space: pre-wrap;
}
.composer-last-sep { color: var(--z-text-mute); }
.composer-last-when { color: var(--z-text-mute); font-size: 12px; }


/* ============ FEED ============ */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feed-loading {
  padding: 28px;
  text-align: center;
  color: var(--z-text-mute);
  font-size: 14px;
}

.feed-card {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-card);
  transition: box-shadow var(--z-tr);
}
.feed-card:hover { box-shadow: var(--sh-card-hover); }


/* Tarjeta de estado */
.status-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.status-meta {
  flex: 1;
  min-width: 0;
}
.status-author {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--z-text);
  font-size: 14px;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color var(--z-tr);
}
.status-author:hover { color: var(--z-blue-600); }

.status-sub {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--z-text-mute);
  margin-top: 2px;
}

.status-del {
  background: transparent;
  border: 0;
  color: var(--z-text-mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  transition: background var(--z-tr), color var(--z-tr);
}
.status-del:hover { background: var(--z-red-bg); color: var(--z-red-fg); }

.status-body {
  color: var(--z-text);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.status-actions {
  display: flex;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--z-border-soft);
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--z-text-soft);
  font-family: inherit;
  transition: background var(--z-tr), color var(--z-tr);
}
.act:hover { background: var(--z-bg-alt); color: var(--z-text); }
.act-icon { font-size: 16px; line-height: 1; }
.act-count { font-variant-numeric: tabular-nums; }
.act-liked { color: var(--z-rose); }
.act-liked .act-icon::before { content: "♥"; }


/* Comentarios */
.status-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--z-border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.comment-input {
  flex: 1;
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--z-text);
  outline: 0;
  background: var(--z-surface);
  transition: border-color var(--z-tr), box-shadow var(--z-tr);
}
.comment-input:focus {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.comment-bubble {
  flex: 1;
  background: var(--z-bg-alt);
  border-radius: var(--r-md);
  padding: 8px 14px;
  min-width: 0;
}
.comment-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.comment-author {
  font-weight: 700;
  color: var(--z-text);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--z-tr);
}
.comment-author:hover { color: var(--z-blue-600); }
.comment-body {
  font-size: 13px;
  color: var(--z-text);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 2px;
}
.comment-del {
  background: transparent;
  border: 0;
  color: var(--z-text-mute);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  align-self: center;
  transition: background var(--z-tr), color var(--z-tr);
}
.comment-del:hover { background: var(--z-red-bg); color: var(--z-red-fg); }


/* Comentarios inline (3 últimos + "X más") */
.status-inline-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--z-border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-more-comments {
  align-self: flex-start;
  padding: 4px 8px;
  font-size: 13px;
  color: var(--z-blue-600);
  text-decoration: none;
  border-radius: 4px;
}
.status-more-comments:hover {
  background: var(--z-blue-50);
}


/* Tarjetas de evento (comentario en estado de amigo, nueva amistad…) */
.event-card {
  background: var(--z-surface);
}
.event-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.event-head-double .event-avatars {
  display: inline-flex;
  flex-shrink: 0;
}
.event-head-double .event-avatars .zenti-avatar:nth-child(2) {
  margin-left: -10px;
  border: 2px solid var(--z-surface);
}
.event-text {
  flex: 1;
  font-size: 14px;
  color: var(--z-text);
  line-height: 1.45;
}
.event-when {
  margin-top: 2px;
}
.feed-user-link {
  font-weight: 700;
  color: var(--z-text);
  text-decoration: none;
  transition: color var(--z-tr);
}
.feed-user-link:hover { color: var(--z-blue-600); }

.event-quote {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-left: 3px solid var(--z-blue-300);
  background: var(--z-bg);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.event-quote-status {
  margin-bottom: 6px;
  font-style: italic;
  color: var(--z-text-soft);
}
.event-quote-comment {
  font-size: 14px;
  color: var(--z-text);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.event-go {
  margin-top: 10px;
}
.event-go a {
  text-decoration: none;
  color: var(--z-blue-600);
  font-size: 13px;
  font-weight: 500;
}
.event-go a:hover { text-decoration: underline; }

/* "Cargar más" */
.feed-load-more {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.feed-empty {
  background: var(--z-surface);
  border: 1px dashed var(--z-border);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--z-text-mute);
}

/* Event-entry (nueva entrada del blog de amigo) */
.event-entry .event-entry-link {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--z-blue-500);
  background: var(--z-bg);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  text-decoration: none;
  color: inherit;
  transition: background var(--z-tr);
}
.event-entry .event-entry-link:hover {
  background: var(--z-blue-50);
}
.event-entry-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--z-text);
  margin-bottom: 4px;
}
.event-entry-excerpt {
  font-size: 13px;
  color: var(--z-text-soft);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.event-pca strong { color: var(--z-blue-700); }


/* ============ FOTOS EN MOSAICO (eventos del feed con varias fotos) ============ */
.photos-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px;
  margin-top: 12px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.photos-tile {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--z-bg-alt);
  overflow: hidden;
  transition: transform var(--z-tr);
}
.photos-tile:hover { transform: scale(1.02); }
.photos-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}


/* ============ RESPONSIVE: 3 → 2 → 1 columna ============ */
@media (max-width: 1280px) {
  .dashboard {
    grid-template-columns: 270px minmax(0, 1fr) 280px;
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  /* Quitamos la columna derecha; el chat se mantiene como overlay flotante */
  .dashboard {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .dash-right { display: none; }
}

@media (max-width: 760px) {
  body.app { padding-top: 56px; }
  .topbar { height: 56px; }
  .topbar-inner { width: 96%; }
  .topbar-logo img { height: 26px; }
  .nav-item { padding: 6px 10px; font-size: 13px; }
  .account-trigger span:not(.acc-avatar) { display: none; }

  .dashboard {
    width: 96%;
    grid-template-columns: 1fr;
    margin: 14px auto;
    gap: 14px;
  }
  .dash-left {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .topbar-inner { width: 100%; padding: 0 12px; }
  .dashboard    { width: 100%; padding: 0 12px; }
  .nav-item { padding: 6px 9px; font-size: 12.5px; }
  .nav-upload span { display: none; }
  .dash-card { padding: 14px; }
  .feed-card { padding: 14px; }
  .status-body { font-size: 14px; }
}


/* ============================================================
   25) PERFIL: pestañas (Espacio Personal · Estados · Comentarios)
   ============================================================ */

.profile-tabs {
  padding: 0;
  overflow: hidden;
}

.profile-tabs-nav {
  display: flex;
  border-bottom: 1px solid #e5ebf2;
  background: #f7fafd;
}
.profile-tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  color: #6b7d92;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.profile-tab:hover { color: #1a4870; background: rgba(74, 140, 196, 0.05); }
.profile-tab.active {
  color: #1a4870;
  border-bottom-color: #4a8cc4;
  background: #fff;
}

.profile-tab-panel {
  padding: 18px 18px 24px;
}

.profile-loading {
  padding: 24px;
  text-align: center;
  color: #6b7d92;
  font-size: 14px;
}
.profile-empty {
  background: #fafcfe;
  border: 1px dashed #cbd6e4;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  margin-top: 10px;
}
.profile-load-more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* --- Composer de entradas --- */
.entry-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-title-input {
  width: 100%;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  font-weight: bold;
  color: #1a4870;
  outline: none;
}
.entry-title-input:focus {
  border-color: #4a8cc4;
  box-shadow: 0 0 0 3px rgba(74, 140, 196, 0.15);
}
.entry-body-input {
  width: 100%;
  min-height: 120px;
  max-height: 400px;
  resize: vertical;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a3148;
  outline: none;
  line-height: 1.5;
}
.entry-body-input:focus {
  border-color: #4a8cc4;
  box-shadow: 0 0 0 3px rgba(74, 140, 196, 0.15);
}
.entry-composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Tarjeta de entrada --- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.entry-post {
  background: #fff;
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.entry-post-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.entry-post-meta {
  flex: 1;
  min-width: 0;
}
.entry-post-author {
  font-weight: bold;
  color: #1a4870;
  text-decoration: none;
  font-size: 14px;
}
.entry-post-author:hover { text-decoration: underline; }
.entry-post-when { font-size: 12px; margin-top: 2px; }

.entry-post-title {
  font-size: 18px;
  font-weight: bold;
  color: #1a3148;
  margin: 8px 0 10px;
  line-height: 1.3;
}
.entry-post-body {
  color: #1a3148;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

/* --- Estados (pestaña Estados) reusan .feed-card y .status-card --- */
.statuses-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Muro del perfil --- */
.wall-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fafcfe;
  border: 1px solid #e5ebf2;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.wall-composer textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a3148;
  outline: none;
  line-height: 1.4;
}
.wall-composer textarea:focus {
  border-color: #4a8cc4;
  box-shadow: 0 0 0 3px rgba(74, 140, 196, 0.15);
}
.wall-composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wall-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wall-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.wall-bubble {
  flex: 1;
  background: #f3f7fb;
  border-radius: 12px;
  padding: 8px 14px;
  min-width: 0;
}
.wall-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.wall-author {
  font-weight: bold;
  color: #1a4870;
  font-size: 14px;
  text-decoration: none;
}
.wall-author:hover { text-decoration: underline; }
.wall-when { font-size: 12px; }
.wall-body {
  font-size: 14px;
  color: #1a3148;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 2px;
}

/* --- Pestaña Comentarios: títulos de las dos sub-secciones --- */
.comments-section-title {
  font-size: 14px;
  font-weight: bold;
  color: #6b7d92;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef2f7;
}
.comments-section-title:first-child { margin-top: 0; }

.status-comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status-comments-group {
  background: #fafcfe;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  padding: 10px 14px;
}
.status-comments-group-head {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef2f7;
}
.status-comments-quote {
  font-style: italic;
  color: #4a5c70;
  font-size: 13px;
}
.status-comments-group-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Perfil: línea "Último estado" --- */
.profile-last-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.4;
}

/* --- Mini-grid de fotos en columna derecha del perfil --- */
.profile-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.profile-photos-tile {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f3f7fb;
  border-radius: 4px;
  overflow: hidden;
  transition: transform .12s ease;
}
.profile-photos-tile:hover {
  transform: scale(1.04);
}
.profile-photos-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}


/* ============================================================
   29) PERFIL — dashboard modernizado (2026)
   ============================================================ */

/* ----- Card de avatar grande ----- */
.profile-card.profile-card-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 18px 20px;
}
/* Avatar con click-para-ampliar: el botón debe ser totalmente
   transparente para que solo se vea el círculo del avatar.
   Aplica tanto a .profile-card (página /perfil) como a
   .profile-card-large (variante grande usada en /usuario.php). */
.profile-card .avatar-zoom-btn,
.profile-card-large .avatar-zoom-btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  border-radius: 50%;
  transition: transform var(--z-tr);
  /* Que el botón no añada ningún rectángulo visible: que sea
     exactamente del tamaño del avatar que envuelve */
  display: inline-block;
  line-height: 0;
}
.profile-card .avatar-zoom-btn:hover,
.profile-card-large .avatar-zoom-btn:hover { transform: scale(1.02); }
.profile-card .avatar-zoom-btn:focus-visible,
.profile-card-large .avatar-zoom-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(74,154,217,0.30);
}
.profile-card-large .zenti-avatar.avatar-120 {
  box-shadow: 0 4px 16px rgba(14,31,58,0.18);
}
.profile-card-large .profile-name-big {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--z-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 16px 0 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.profile-card-large .profile-visits-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--z-text-mute);
  background: var(--z-bg-alt);
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 4px;
}
.profile-card-large .profile-visits-row svg { width: 14px; height: 14px; }
.profile-card-large .profile-visits-row strong { color: var(--z-text); font-weight: 700; }

/* ----- Estudios y trayectoria ----- */
.edu-group { margin-bottom: 14px; }
.edu-group:last-of-type { margin-bottom: 0; }
.edu-kind {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--z-text-mute);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.edu-kind svg { width: 14px; height: 14px; color: var(--z-blue-500); }
.edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edu-list li {
  position: relative;
  background: var(--z-bg);
  border: 1px solid var(--z-border-soft);
  border-left: 3px solid var(--z-blue-300);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  padding-right: 36px;       /* hueco para el botón eliminar */
  font-size: 13px;
  overflow-wrap: anywhere;
  transition: border-color var(--z-tr), background var(--z-tr);
}
.edu-list li:hover {
  border-left-color: var(--z-blue-500);
  background: var(--z-blue-50);
}
.edu-institution {
  font-weight: 700;
  color: var(--z-text);
  font-size: 13.5px;
  margin-bottom: 1px;
}
.edu-delete-form {
  position: absolute;
  top: 6px;
  right: 6px;
}
.edu-delete-form button {
  background: transparent;
  border: 0;
  color: var(--z-text-mute);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--z-tr), color var(--z-tr);
}
.edu-delete-form button:hover {
  background: var(--z-red-bg);
  color: var(--z-red-fg);
}

/* ----- Datos personales ----- */
.user-data-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-data-list > div { margin: 0; min-width: 0; }
.user-data-list dt {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--z-text-mute);
  font-weight: 600;
  margin: 0 0 3px;
}
.user-data-list dd {
  font-size: 14px;
  color: var(--z-text);
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

/* ----- Pestañas del perfil (override del bloque legacy) ----- */
.profile-tabs {
  padding: 0;
  overflow: hidden;
}
.profile-tabs-nav {
  display: flex;
  gap: 4px;
  padding: 12px 12px 0;
  background: var(--z-surface);
  border-bottom: 1px solid var(--z-border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs-nav::-webkit-scrollbar { display: none; }
.profile-tab {
  position: relative;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--z-text-mute);
  cursor: pointer;
  border-radius: 0;
  transition: color var(--z-tr), border-color var(--z-tr), background var(--z-tr);
  margin-bottom: -1px;
  white-space: nowrap;
}
.profile-tab:hover {
  color: var(--z-text);
  background: var(--z-bg-alt);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.profile-tab.active {
  color: var(--z-blue-700);
  border-bottom-color: var(--z-blue-600);
  background: transparent;
  border-radius: 0;
}
.profile-tab-panel {
  padding: 18px 18px 22px;
  background: var(--z-surface);
}

/* ----- Composer de entradas (perfil propio) ----- */
.entry-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}
.entry-title-input {
  width: 100%;
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--z-text);
  outline: 0;
  background: var(--z-surface);
  transition: border-color var(--z-tr), box-shadow var(--z-tr);
}
.entry-title-input:focus {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}
.entry-body-input {
  width: 100%;
  min-height: 120px;
  max-height: 400px;
  resize: vertical;
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--z-text);
  outline: 0;
  line-height: 1.55;
  background: var(--z-surface);
  transition: border-color var(--z-tr), box-shadow var(--z-tr);
}
.entry-body-input:focus {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}
.entry-composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ----- Entradas del blog personal ----- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.entry-post {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-card);
  transition: box-shadow var(--z-tr);
}
.entry-post:hover { box-shadow: var(--sh-card-hover); }
.entry-post-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.entry-post-meta { flex: 1; min-width: 0; }
.entry-post-author {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--z-text);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--z-tr);
}
.entry-post-author:hover { color: var(--z-blue-600); }
.entry-post-when {
  font-size: 12px;
  color: var(--z-text-mute);
  margin-top: 2px;
}
.entry-post-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--z-text);
  letter-spacing: -0.015em;
  margin: 6px 0 10px;
  line-height: 1.3;
}
.entry-post-body {
  color: var(--z-text);
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

/* ----- Muro / Tablón ----- */
.wall-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--z-bg);
  border: 1px solid var(--z-border-soft);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 16px;
}
.wall-composer textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--z-text);
  outline: 0;
  line-height: 1.45;
  background: var(--z-surface);
  transition: border-color var(--z-tr), box-shadow var(--z-tr);
}
.wall-composer textarea:focus {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}
.wall-composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wall-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wall-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.wall-bubble {
  flex: 1;
  background: var(--z-bg-alt);
  border-radius: var(--r-md);
  padding: 10px 14px;
  min-width: 0;
}
.wall-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.wall-author {
  font-weight: 700;
  color: var(--z-text);
  font-size: 13.5px;
  text-decoration: none;
  transition: color var(--z-tr);
}
.wall-author:hover { color: var(--z-blue-600); }
.wall-when { font-size: 12px; color: var(--z-text-mute); }
.wall-body {
  font-size: 14px;
  color: var(--z-text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 2px;
}

/* ----- Fotos del perfil (override del bloque al final) ----- */
.profile-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.profile-photos-tile {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--z-bg-alt);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: transform var(--z-tr), box-shadow var(--z-tr);
}
.profile-photos-tile:hover {
  transform: scale(1.04);
  box-shadow: var(--sh-card);
  z-index: 1;
  position: relative;
}
.profile-photos-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-photos-more {
  margin-top: 12px;
  text-align: right;
}
.profile-photos-more a {
  font-size: 13px;
  font-weight: 600;
  color: var(--z-blue-600);
  text-decoration: none;
}
.profile-photos-more a:hover { text-decoration: underline; }

/* ----- Mis amigos ----- */
.profile-friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.profile-friend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: inherit;
  transition: background var(--z-tr), transform var(--z-tr);
  min-width: 0;
}
.profile-friend:hover {
  background: var(--z-bg-alt);
  transform: translateY(-1px);
}
.profile-friend .zenti-avatar {
  box-shadow: 0 1px 3px rgba(14,31,58,0.08);
}
.profile-friend-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--z-text);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.profile-friends-more {
  margin-top: 12px;
  text-align: right;
  font-size: 13px;
}
.profile-friends-more a {
  color: var(--z-blue-600);
  font-weight: 600;
  text-decoration: none;
}
.profile-friends-more a:hover { text-decoration: underline; }
.friends-count-inline {
  color: var(--z-text-mute);
  font-weight: 500;
  margin-left: 4px;
}

/* ----- Lightbox del avatar ----- */
.zenti-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14,31,58,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.zenti-lightbox[hidden] { display: none; }
.zenti-lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--r-md);
  box-shadow: 0 24px 48px -8px rgba(0,0,0,0.5);
}
.zenti-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: background var(--z-tr);
}
.zenti-lightbox-close:hover { background: rgba(255,255,255,0.28); }
#zenti-lightbox-caption {
  color: #fff;
  margin-top: 18px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 500;
  text-align: center;
}

/* ----- Responsive perfil ----- */
@media (max-width: 1100px) {
  .profile-photos-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .profile-tabs-nav { padding: 8px 8px 0; flex-wrap: wrap; }
  .profile-tab { padding: 8px 12px; font-size: 13px; }
  .profile-tab-panel { padding: 14px 14px 18px; }
  .profile-photos-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-card-large { padding: 20px 16px 16px; }
  .profile-card-large .zenti-avatar.avatar-120 { width: 96px; height: 96px; font-size: 36px; }
}


/* ============================================================
   30) FOOTER — pie de página global (zona autenticada)
   ============================================================ */

.app-footer {
  width: 95%;
  margin: 20px auto 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--z-border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--z-text-mute);
  flex-wrap: wrap;
}
.app-footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.app-footer-copyright { white-space: nowrap; }

.app-footer-langs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
/* Especificidad alta porque `body.app a { color: inherit; }` se llevaría
   el color hacia un gris que apenas se distingue. */
body.app a.app-footer-lang,
.app-footer-lang {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--z-text-mute);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background var(--z-tr), color var(--z-tr);
}
body.app a.app-footer-lang:hover,
.app-footer-lang:hover {
  background: var(--z-bg-alt);
  color: var(--z-text);
}
body.app a.app-footer-lang.active,
.app-footer-lang.active {
  background: var(--z-blue-100);
  color: var(--z-blue-700);
  font-weight: 700;
}

.app-footer-links {
  display: flex;
  align-items: center;
  gap: 4px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.app a.app-footer-link,
.app-footer-link {
  color: var(--z-text-mute);
  text-decoration: none;
  font-size: 12.5px;
  transition: color var(--z-tr);
}
body.app a.app-footer-link:hover,
.app-footer-link:hover {
  color: var(--z-blue-600);
  text-decoration: underline;
}

@media (max-width: 760px) {
  .app-footer {
    width: 100%;
    padding: 16px 14px 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .app-footer-left,
  .app-footer-links { justify-content: center; }
}


/* ============================================================
   31) CONFIGURACIÓN — overrides modernos (2026)
   Sustituyen los estilos legacy de la sección 14-15
   ============================================================ */

body.app .config-layout {
  width: 95%;
  max-width: 1200px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  flex: 1;
}

body.app .config-sidebar {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-lg);
  padding: 14px 0;
  box-shadow: var(--sh-card);
  position: sticky;
  top: 80px;
}
body.app .config-sidebar h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--z-text-mute);
  margin: 0 0 8px;
  padding: 0 18px;
}
body.app .config-sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.app .config-sidebar nav a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--z-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--z-tr), border-color var(--z-tr), color var(--z-tr);
  font-weight: 500;
}
body.app .config-sidebar nav a:hover {
  background: var(--z-bg-alt);
  color: var(--z-blue-700);
}
body.app .config-sidebar nav a.is-active {
  background: var(--z-blue-50);
  border-left-color: var(--z-blue-600);
  color: var(--z-blue-700);
  font-weight: 700;
}
body.app .config-sidebar nav a.is-danger {
  color: var(--z-red-fg);
}
body.app .config-sidebar nav a.is-danger:hover {
  background: var(--z-red-bg);
  color: var(--z-red-fg);
}
body.app .config-sidebar nav a.is-danger.is-active {
  background: var(--z-red-bg);
  border-left-color: var(--z-red-fg);
  color: var(--z-red-fg);
}

body.app .config-content {
  min-width: 0;
}
body.app .config-content h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--z-text);
  margin: 0 0 18px;
}
body.app .config-content h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--z-text);
  margin: 0 0 14px;
}
body.app .config-content h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--z-text);
  margin: 0 0 10px;
}

/* Paneles */
body.app .panel {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-card);
  margin-bottom: 18px;
}
body.app .panel:last-child { margin-bottom: 0; }
body.app .panel + .panel { margin-top: 0; }

/* Mensajes ok / error */
body.app .msg.ok {
  background: #ECF8F0;
  border: 1px solid #B8E0C4;
  color: #1F6B3A;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
body.app .msg.error {
  background: var(--z-red-bg);
  border: 1px solid #F0A4A4;
  color: #8A1F1F;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
body.app .msg.error div + div { margin-top: 4px; }

/* Inputs en .panel — modernizar lo que define forms.css */
body.app .panel label {
  display: block;
  margin-bottom: 14px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--z-text-soft);
  letter-spacing: 0;
  text-transform: none;
}
body.app .panel label small.muted {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--z-text-mute);
  margin-top: 4px;
  font-family: inherit;
}
body.app .panel input[type="text"],
body.app .panel input[type="email"],
body.app .panel input[type="password"],
body.app .panel input[type="date"],
body.app .panel input[type="number"],
body.app .panel input[type="url"],
body.app .panel select,
body.app .panel textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-top: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--z-text);
  background: var(--z-surface);
  box-sizing: border-box;
  outline: 0;
  transition: border-color var(--z-tr), box-shadow var(--z-tr);
}
body.app .panel input:focus,
body.app .panel select:focus,
body.app .panel textarea:focus {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}
body.app .panel input::placeholder,
body.app .panel textarea::placeholder {
  color: var(--z-text-mute);
}

body.app .panel .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
body.app .panel .form-row-2 > label { margin-bottom: 0; }

body.app .panel button[type="submit"],
body.app .panel .btn {
  margin-top: 6px;
}

/* Checkbox row */
body.app .panel .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
  color: var(--z-text);
  cursor: pointer;
  margin-bottom: 14px;
}
body.app .panel .checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* ============ AVATAR EDIT ============ */
body.app .avatar-edit {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
}
body.app .avatar-preview-wrap { flex-shrink: 0; }
body.app .avatar-preview {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--z-blue-400), var(--z-blue-600));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  color: #fff;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 52px;
  box-shadow: 0 4px 12px rgba(14,31,58,0.15);
}
body.app .avatar-preview.avatar-letter {
  text-transform: uppercase;
}
body.app .avatar-actions {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.app .avatar-actions p.muted {
  margin: 0 0 4px;
  line-height: 1.5;
}
body.app .avatar-upload-form,
body.app .avatar-remove-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}
body.app .avatar-upload-form input[type="file"] {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--z-text-soft);
}

/* ============ EDUCACIÓN — lista, formulario, borrar ============ */
body.app .config-content .edu-group {
  margin-bottom: 16px;
}
body.app .config-content .edu-group:last-of-type { margin-bottom: 0; }
body.app .config-content .edu-kind {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--z-text-mute);
  margin-bottom: 8px;
}
body.app .config-content .edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.app .config-content .edu-list li {
  position: relative;
  background: var(--z-bg);
  border: 1px solid var(--z-border-soft);
  border-left: 3px solid var(--z-blue-300);
  border-radius: var(--r-sm);
  padding: 10px 36px 10px 14px;
  font-size: 13px;
  overflow-wrap: anywhere;
  transition: border-color var(--z-tr), background var(--z-tr);
}
body.app .config-content .edu-list li:hover {
  border-left-color: var(--z-blue-500);
  background: var(--z-blue-50);
}
body.app .config-content .edu-institution {
  font-weight: 700;
  color: var(--z-text);
  font-size: 13.5px;
  margin-bottom: 1px;
}
body.app .edu-delete-form {
  position: absolute;
  top: 6px;
  right: 6px;
  margin: 0;
}
body.app .edu-delete-btn {
  background: transparent;
  border: 0;
  color: var(--z-text-mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--z-tr), color var(--z-tr);
}
body.app .edu-delete-btn:hover {
  background: var(--z-red-bg);
  color: var(--z-red-fg);
}

body.app .edu-add-details {
  margin-top: 18px;
  border-top: 1px solid var(--z-border-soft);
  padding-top: 14px;
}
body.app .edu-add-details > summary {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--z-blue-600);
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
  list-style: none;
}
body.app .edu-add-details > summary::-webkit-details-marker { display: none; }
body.app .edu-add-details > summary:hover { color: var(--z-blue-700); }
body.app .edu-add-details[open] > summary { margin-bottom: 12px; }
body.app .edu-add-form > label {
  display: block;
  margin-bottom: 14px;
}

/* ============ Danger zone ============ */
body.app .panel .danger-zone {
  border: 0;
  background: transparent;
  padding: 0;
}
body.app .btn-danger {
  background: #B83232;
  color: #fff;
  font-weight: 700;
}
body.app .btn-danger:hover:not(:disabled) {
  background: #9c2828;
  color: #fff;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  body.app .config-layout {
    grid-template-columns: 1fr;
  }
  body.app .config-sidebar {
    position: static;
    top: auto;
  }
  body.app .config-sidebar nav ul {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.app .config-sidebar nav ul::-webkit-scrollbar { display: none; }
  body.app .config-sidebar nav a {
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  body.app .config-sidebar nav a.is-active {
    border-left: 0;
    border-bottom-color: var(--z-blue-600);
  }
  body.app .config-sidebar nav a.is-danger.is-active {
    border-bottom-color: var(--z-red-fg);
  }
  body.app .config-sidebar h2 { display: none; }
}
@media (max-width: 600px) {
  body.app .panel { padding: 18px; }
  body.app .panel .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  body.app .panel .form-row-2 > label { margin-bottom: 14px; }
}


/* ============================================================
   32) EDITOR DE AVATAR (modal de recorte + zoom)
   ============================================================ */

.avatar-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 31, 58, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: avatarEdFadeIn 180ms ease-out;
}
.avatar-editor-overlay[hidden] { display: none; }
@keyframes avatarEdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.avatar-editor {
  background: var(--z-surface);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 48px -8px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 400px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: avatarEdSlideUp 220ms cubic-bezier(.4,0,.2,1);
}
@keyframes avatarEdSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.avatar-editor-header {
  text-align: center;
}
.avatar-editor-header h2 {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--z-text);
}
.avatar-editor-header p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--z-text-mute);
}

/* Stage: zona del canvas + overlay circular */
.avatar-editor-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background:
    repeating-conic-gradient(#e6ebf2 0% 25%, #f2f5fa 0% 50%) 50% / 16px 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: grab;
  touch-action: none;          /* permite usar gestos sin scroll de página */
  user-select: none;
}
.avatar-editor-stage.is-dragging { cursor: grabbing; }
.avatar-editor-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.avatar-editor-overlay-circle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Círculo de recorte inscrito en el stage: toca los 4 bordes.
     Las 4 esquinas del stage quedan fuera del círculo (zona descartada). */
  background:
    radial-gradient(
      circle closest-side at 50% 50%,
      transparent 0,
      transparent calc(100% - 1px),
      rgba(255,255,255,0.95) calc(100% - 1px),
      rgba(255,255,255,0.95) 100%,
      rgba(14,31,58,0.55) 100%
    );
}

/* Indicador de carga */
.avatar-editor-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--z-text-mute);
  font-size: 13px;
  background: var(--z-bg);
}
.avatar-editor-loading[hidden] { display: none; }

/* Slider de zoom */
.avatar-editor-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-editor-zoom-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--z-bg-alt);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--z-text);
  transition: background var(--z-tr);
  flex-shrink: 0;
}
.avatar-editor-zoom-btn:hover { background: var(--z-blue-100); color: var(--z-blue-700); }
.avatar-editor-zoom-btn svg { width: 14px; height: 14px; }

.avatar-editor-zoom input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--z-bg-alt);
  border-radius: 999px;
  outline: 0;
  cursor: pointer;
}
.avatar-editor-zoom input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--z-blue-600);
  border: 2px solid var(--z-surface);
  box-shadow: 0 1px 3px rgba(14,31,58,0.20);
  cursor: grab;
}
.avatar-editor-zoom input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; }
.avatar-editor-zoom input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--z-blue-600);
  border: 2px solid var(--z-surface);
  box-shadow: 0 1px 3px rgba(14,31,58,0.20);
  cursor: grab;
}

/* Botones del modal */
.avatar-editor-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.avatar-editor-actions-primary {
  display: flex;
  gap: 10px;
}
.avatar-editor-actions-primary .btn { flex: 1; }
.avatar-editor-reset {
  background: transparent;
  border: 0;
  color: var(--z-text-mute);
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px;
  transition: color var(--z-tr);
  align-self: center;
}
.avatar-editor-reset:hover { color: var(--z-blue-600); }

/* Spinner del botón submit */
.avatar-editor-actions .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

@media (max-height: 700px) {
  .avatar-editor { gap: 12px; padding: 18px; }
  .avatar-editor-header p { display: none; }
}


/* ============================================================
   33) SCHOOL PICKER — autocompletar centros educativos
   ============================================================ */

/* --- Visibilidad por modo (data-mode en el <form>) --- 
   Por defecto el form arranca en data-mode="edu", así que si el JS
   no llega a ejecutarse JAMÁS se ven los dos a la vez. */
.edu-add-form[data-mode="edu"]  .edu-mode-work { display: none !important; }
.edu-add-form[data-mode="work"] .edu-mode-edu  { display: none !important; }
/* Fallback: si por alguna razón no hay data-mode aún, ocultamos el de trabajo */
.edu-add-form:not([data-mode="work"]) .edu-mode-work { display: none !important; }

.school-picker {
  position: relative;
  margin-top: 6px;
}

/* Estado "elegido" — chip con nombre + botón × */
.school-picker-chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--z-blue-50);
  border: 1px solid var(--z-blue-200);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  min-height: 42px;
}
.school-picker-chosen[hidden] { display: none; }
.school-chosen-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--z-blue-700);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.school-chosen-clear {
  flex-shrink: 0;
  background: transparent;
  border: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--z-text-mute);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background var(--z-tr), color var(--z-tr);
}
.school-chosen-clear:hover {
  background: var(--z-blue-200);
  color: var(--z-blue-700);
}

/* Input de búsqueda */
body.app .panel .school-search-input {
  margin-top: 0; /* override del estilo genérico .panel input */
}
.school-search-input[hidden] { display: none; }

/* Dropdown de resultados */
.school-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pop);
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}
.school-search-dropdown[hidden] { display: none; }
.school-search-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--z-text);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.35;
  transition: background var(--z-tr);
}
.school-search-item:hover,
.school-search-item:focus-visible {
  background: var(--z-blue-50);
  color: var(--z-blue-700);
  outline: 0;
}
.school-search-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--z-text-mute);
  text-align: center;
  font-style: italic;
}

/* ============ Filtro escuela en /gente ============
   El centro educativo va en su propia fila (todo el ancho) — la grid original
   tiene 4 columnas que se quedarían apretadas si lo metemos al lado. */
.gente-search-grid .gs-school {
  grid-column: 1 / -1;
  min-width: 0;
}

/* El school-picker dentro del filtro: replicar el alto/look de los demás
   inputs de la grid (.gs-field input), no usar los del .panel */
.school-picker--filter {
  margin-top: 4px;
}
.school-picker--filter .school-search-input {
  width: 100%;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--z-border, #c8d4e1);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--z-text, #1a4870);
  outline: 0;
  box-sizing: border-box;
  margin: 0;
  display: block;
}
.school-picker--filter .school-search-input::placeholder {
  color: #a8b6c5;
}
.school-picker--filter .school-search-input:focus {
  border-color: var(--z-blue-400, #4a8cc4);
  box-shadow: 0 0 0 3px rgba(74,140,196,.12);
}
.school-picker--filter .school-picker-chosen {
  min-height: 38px;
  padding: 6px 12px;
  margin: 0;
}

/* === Mes + año (modo trabajo en form de estudios) === */
.form-row-monthyear {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-top: 8px;
}
.my-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.my-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--z-text, #1a4870);
}
.my-fields {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 1fr;
  gap: 8px;
  min-width: 0;
}
body.app .panel .my-fields .my-month,
body.app .panel .my-fields .my-year {
  margin-top: 0;
  min-width: 0;
}
@media (max-width: 540px) {
  .form-row-monthyear { grid-template-columns: 1fr; }
}

/* ============ Filtros nuevos del buscador de gente ============ */
/* Re-grid a 6 columnas iguales para acomodar todos los filtros.
   Orden en el DOM:
     1) Nombre (q)        — span 2  (más prioritario, más ancho)
     2) Ciudad            — span 1
     3) Edad mínima       — span 1
     4) Edad máxima       — span 1
     5) Sexo              — span 1
     6) Provincia         — span 2  (fila 2 col 1-2)
     7) Qué busca         — span 1  (fila 2 col 3)
     8) [hueco col 4]
     9) Centro educativo  — span completo  (fila 3, autocomplete con dropdown)
    10) Solo con foto     — span completo  (fila 4, checkbox)
*/
body.app .gente-search .gente-search-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 14px;
}
body.app .gente-search-grid .gs-name     { grid-column: span 2; }
body.app .gente-search-grid .gs-city     { grid-column: span 1; }
body.app .gente-search-grid .gs-age      { grid-column: span 1; }
body.app .gente-search-grid .gs-gender   { grid-column: span 1; }
body.app .gente-search-grid .gs-province { grid-column: span 2; }
body.app .gente-search-grid .gs-seeking  { grid-column: span 2; }
body.app .gente-search-grid .gs-school   { grid-column: 1 / -1; }
body.app .gente-search-grid .gs-photo    { grid-column: 1 / -1; }

/* El checkbox "Solo con foto" se ve como una fila con label inline.
   Importante: alta especificidad para vencer .gs-field { flex-direction: column } */
body.app .gente-search-grid label.gs-photo-check {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
}
body.app .gente-search-grid label.gs-photo-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--z-blue-500, #4a8cc4);
  cursor: pointer;
}
body.app .gente-search-grid label.gs-photo-check span {
  font-size: 14px;
  font-weight: 500;
  color: var(--z-text, #1a4870);
  cursor: pointer;
  line-height: 1;
}

/* Los <select> heredan el mismo look que los inputs */
.gente-search-grid select {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--z-border, #c8d4e1);
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--z-text, #1a4870);
  outline: 0;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23718096' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.gente-search-grid select:focus {
  border-color: var(--z-blue-400, #4a8cc4);
  box-shadow: 0 0 0 3px rgba(74,140,196,.12);
}

/* Responsive: tablet a 3 cols, móvil a 1 */
@media (max-width: 980px) {
  .gente-search-grid { grid-template-columns: repeat(3, 1fr); }
  .gente-search-grid .gs-name,
  .gente-search-grid .gs-province,
  .gente-search-grid .gs-seeking { grid-column: span 3; }
  .gente-search-grid .gs-city,
  .gente-search-grid .gs-age,
  .gente-search-grid .gs-gender { grid-column: span 1; }
}
@media (max-width: 540px) {
  .gente-search-grid { grid-template-columns: 1fr; }
  .gente-search-grid .gs-field { grid-column: span 1 !important; }
}
/* ============ MIS INVITACIONES (página /invitados) ============ */
body.app .invite-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.app .invite-item {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-left: 3px solid var(--z-border);
  border-radius: var(--z-radius-md);
  padding: 14px 16px;
  box-shadow: var(--z-shadow-soft);
}
body.app .invite-item.active  { border-left-color: var(--z-blue-500); }
body.app .invite-item.used    { border-left-color: #2E9E6B; }
body.app .invite-item.expired { border-left-color: #C24B4B; opacity: .8; }

body.app .invite-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--z-text-mute);
}
body.app .invite-meta .muted,
body.app .invite-meta .small { color: var(--z-text-mute); }

body.app .status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 13px;
  margin-right: 6px;
}
body.app .status-active  { color: var(--z-blue-600); }
body.app .status-used    { color: #2E9E6B; }
body.app .status-expired { color: #C24B4B; }

body.app .invite-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
body.app .invite-url {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-sm);
  background: var(--z-bg-alt);
  color: var(--z-text-dark);
  font-family: var(--z-font-body);
}
body.app .invite-url:focus {
  outline: none;
  border-color: var(--z-blue-400);
  box-shadow: var(--z-ring);
}

/* Estado vacío y mensajes (también usados en otras páginas) */
body.app .empty-state {
  background: var(--z-surface);
  border: 1px dashed var(--z-border);
  border-radius: var(--z-radius-lg);
  padding: 28px 20px;
  text-align: center;
  color: var(--z-text-mute);
  margin-top: 18px;
}
body.app .empty-state p { margin: 0 0 6px; }

body.app .msg {
  border-radius: var(--z-radius-md);
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 14px;
}
body.app .msg.ok    { background: #E7F6EF; color: #1E7A4D; border: 1px solid #BCE6D2; }
body.app .msg.error { background: #FBE9E9; color: #B23B3B; border: 1px solid #F2CACA; }

@media (max-width: 560px) {
  body.app .invite-actions { flex-direction: column; }
  body.app .invite-meta { flex-direction: column; align-items: flex-start; }
}

/* ============ INTERESES Y REDES (configuración + perfil) ============ */
body.app .interest-group { margin-bottom: 14px; }
body.app .interest-cat {
  font-size: 12px; font-weight: 700; color: var(--z-text-mute);
  margin: 0 0 8px; text-transform: uppercase; letter-spacing: .03em;
}
body.app .interest-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
body.app .interest-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--z-blue-50); color: var(--z-blue-700);
  border: 1px solid var(--z-border);
  border-radius: 999px; padding: 5px 6px 5px 12px;
  font-size: 13px; font-weight: 600;
}
body.app .interest-chip.readonly { padding: 5px 14px; }
body.app .interest-del-form { display: inline; margin: 0; }
body.app .interest-del {
  border: none; background: rgba(0,0,0,.06); color: var(--z-text-mute);
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
body.app .interest-del:hover { background: #C24B4B; color: #fff; }
body.app .interest-empty { margin: 0; }
body.app .interest-add-form { margin-top: 12px; }

body.app .profile-social {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
body.app .profile-social a {
  display: inline-flex; align-items: center;
  background: var(--z-bg-alt); color: var(--z-blue-700);
  border: 1px solid var(--z-border); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 600; text-decoration: none;
}
body.app .profile-social a:hover { background: var(--z-blue-50); }
body.app .profile-block { margin-top: 18px; }
body.app .profile-block-title {
  font-size: 13px; font-weight: 700; color: var(--z-text-dark);
  margin: 0 0 8px;
}

/* ============ FORMULARIO DE REDES SOCIALES ============ */
body.app .social-form .social-field {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin-bottom: 10px;
  border: 1px solid var(--z-border); border-radius: var(--z-radius-md);
  background: var(--z-surface);
  transition: border-color .15s, box-shadow .15s;
}
body.app .social-form .social-field:focus-within {
  border-color: var(--z-blue-400);
  box-shadow: 0 0 0 3px rgba(74,154,217,0.15);
}
body.app .social-badge {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; line-height: 1;
}
body.app .social-input-wrap {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px;
}
body.app .social-label {
  font-size: 10.5px; font-weight: 700; color: var(--z-text-mute);
  text-transform: uppercase; letter-spacing: .04em;
}
body.app .social-form .social-field input[type="url"] {
  border: 0 !important; padding: 0 !important; margin: 0 !important;
  width: 100%; font-size: 14px; background: transparent;
  color: var(--z-text-dark); outline: 0; box-shadow: none !important;
  border-radius: 0 !important;
}
body.app .social-form .social-field input[type="url"]:focus {
  box-shadow: none !important;
}
body.app .social-form button { margin-top: 4px; }
