/* ═══════════════════════════════════════════
   FONDO SOLIDARIO FAMILIAR — DESIGN SYSTEM
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  /* Paleta */
  --navy:    #0F1F3D;
  --navy2:   #162847;
  --blue:    #1E40AF;
  --blue2:   #2563EB;
  --blue-lt: #3B82F6;
  --red:     #DC2626;
  --red2:    #B91C1C;
  --red-lt:  #EF4444;
  --green:   #059669;
  --green-bg:#D1FAE5;
  --amber:   #D97706;
  --amber-bg:#FEF3C7;
  --purple:  #7C3AED;

  /* Neutrals */
  --bg:      #F0F4F8;
  --bg2:     #E8EDF4;
  --surface: #FFFFFF;
  --border:  #DDE3EE;
  --border2: #C8D0DF;
  --text:    #0F1F3D;
  --text2:   #4B5563;
  --muted:   #9CA3AF;

  /* Shadows */
  --s1: 0 1px 3px rgba(15,31,61,.06), 0 1px 2px rgba(15,31,61,.04);
  --s2: 0 4px 16px rgba(15,31,61,.08), 0 1px 3px rgba(15,31,61,.04);
  --s3: 0 10px 40px rgba(15,31,61,.12), 0 2px 8px rgba(15,31,61,.06);

  /* Misc */
  --r:    8px;
  --r2:   14px;
  --r3:   20px;
  --sw:   268px;
  --th:   64px;
  --font: 'Inter', system-ui, sans-serif;
  --disp: 'Sora', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14.5px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ═══════════════════════════════════════
   LOGIN — Estilo WoWonder
═══════════════════════════════════════ */
#pg-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  /* Fondo degradado oscuro tipo red social */
  background: linear-gradient(135deg, var(--navy) 0%, #1a3260 40%, #7a1218 100%);
}

/* Capa de patrón geométrico sutil en el fondo */
#pg-login::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(37,99,235,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(220,38,38,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(37,99,235,.12) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.04' stroke-width='1'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/svg%3E");
}

/* Columna izquierda: texto descriptivo (se oculta en móvil) */
.login-left {
  flex: 1; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 3rem 3rem 4rem;
}
@media(max-width:900px){ .login-left { display: none; } }

.ll-content { max-width: 420px; }

.ll-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px); border-radius: 99px;
  padding: .4rem 1.1rem; margin-bottom: 2rem;
  font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.9);
  letter-spacing: .08em; text-transform: uppercase;
}

.ll-logo {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem;
}
.ll-logo-hex {
  width: 56px; height: 56px; background: linear-gradient(135deg, var(--red), #8B1A1F);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 1.05rem; color: white;
  box-shadow: 0 8px 28px rgba(220,38,38,.45); flex-shrink: 0;
}
.ll-logo-text h1 { font-family: var(--disp); font-size: 1.35rem; font-weight: 700; color: white; line-height: 1.2; }
.ll-logo-text p  { font-size: .72rem; color: rgba(255,255,255,.55); margin-top: .25rem; letter-spacing: .05em; }

.ll-headline {
  font-family: var(--disp); font-size: 2.6rem; font-weight: 800;
  line-height: 1.15; color: white; margin-bottom: 1.2rem;
}
.ll-headline em { font-style: normal; color: #f87171; }

.ll-desc { font-size: .9rem; color: rgba(255,255,255,.65); line-height: 1.75; margin-bottom: 2rem; }

.ll-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.ll-pill {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); padding: .35rem .95rem; border-radius: 99px;
  font-size: .76rem; font-weight: 500;
}

.ll-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 2rem;
}
.ll-stat-val { font-family: var(--disp); font-size: 1.6rem; font-weight: 800; color: white; }
.ll-stat-lbl { font-size: .73rem; color: rgba(255,255,255,.55); margin-top: .2rem; }

/* ── Tarjeta central de login (estilo WoWonder) ── */
.login-right {
  position: relative; z-index: 1;
  width: 440px; min-width: 300px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.2);
  padding: 2.4rem 2.2rem 2rem;
  margin: 2rem 1rem;
  overflow-y: auto; max-height: calc(100vh - 2rem);
  animation: cardIn .5s cubic-bezier(.34,1.3,.64,1);
}
@keyframes cardIn { from { opacity:0; transform: translateY(28px) scale(.96); } to { opacity:1; transform: none; } }
@media(max-width:900px){ .login-right { width: 100%; max-width: 440px; margin: 1.5rem auto; } }
@media(max-width:480px){ .login-right { border-radius: 14px; padding: 2rem 1.5rem 1.6rem; } }

/* Logo en la tarjeta (siempre visible) */
.login-right-logo {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; margin-bottom: 1.6rem; text-align: center;
}
.login-right-logo-hex {
  width: 62px; height: 62px;
  background: linear-gradient(135deg, var(--red), #8B1A1F);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 1rem; color: white;
  box-shadow: 0 8px 24px rgba(220,38,38,.35); flex-shrink: 0;
  margin-bottom: .4rem;
}
.login-right-logo h2 {
  font-family: var(--disp); font-size: 1.2rem; font-weight: 800; color: var(--navy);
  letter-spacing: -.01em;
}
.login-right-logo p {
  font-size: .75rem; color: var(--muted); margin-top: .1rem;
}

/* Tabs */
.tab-btns {
  display: flex; background: var(--bg); border-radius: 10px; padding: 3px;
  margin-bottom: 1.8rem; border: 1px solid var(--border);
}
.tab-btn {
  flex: 1; padding: .58rem; border: none; background: transparent;
  font-family: var(--font); font-size: .88rem; font-weight: 600;
  color: var(--text2); cursor: pointer; border-radius: 8px;
  transition: all .2s;
}
.tab-btn.active {
  background: var(--red); color: white;
  box-shadow: 0 4px 14px rgba(220,38,38,.35);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }
.tab-pane h3 {
  font-family: var(--disp); font-size: 1.35rem; font-weight: 700;
  color: var(--navy); margin-bottom: .25rem; text-align: center;
}
.tab-sub { font-size: .82rem; color: var(--muted); margin-bottom: 1.4rem; line-height: 1.5; text-align: center; }

.login-err {
  display: none; background: #FEF2F2; border: 1px solid #FCA5A5;
  color: var(--red2); padding: .7rem 1rem; border-radius: var(--r);
  font-size: .83rem; margin-bottom: 1rem; font-weight: 500; text-align: center;
}

/* Form fields */
.fg { margin-bottom: .95rem; }
.fg label {
  display: block; font-size: .73rem; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .38rem;
}
.fg input, .fg select, .fg textarea {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: .93rem; color: var(--text);
  background: var(--bg); transition: border-color .2s, box-shadow .2s; outline: none;
}
.fg input:focus, .fg select:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.12);
  background: var(--surface);
}

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.6rem; }
.eye { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: .4; font-size: .95rem; user-select: none; transition: opacity .15s; }
.eye:hover { opacity: .8; }

/* Botón principal */
.btn-in {
  width: 100%; padding: .9rem; background: var(--red); color: white;
  border: none; border-radius: 10px;
  font-family: var(--disp); font-size: .96rem; font-weight: 700;
  letter-spacing: .03em; cursor: pointer;
  transition: all .2s; box-shadow: 0 4px 18px rgba(220,38,38,.4);
  margin-top: .5rem;
}
.btn-in:hover { background: var(--red2); box-shadow: 0 6px 26px rgba(220,38,38,.5); transform: translateY(-1px); }
.btn-in:active { transform: translateY(0); }

/* Divider "o" */
.login-or {
  display: flex; align-items: center; gap: .8rem;
  margin: 1rem 0; color: var(--muted); font-size: .78rem;
}
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Footer link "ya tienes cuenta" */
.login-switch {
  text-align: center; margin-top: 1.2rem;
  font-size: .82rem; color: var(--muted);
}
.login-switch a { color: var(--red); font-weight: 600; cursor: pointer; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }

/* Footer copyright dentro de tarjeta */
.login-footer-card {
  text-align: center; margin-top: 1.4rem;
  font-size: .72rem; color: var(--muted); line-height: 1.6;
  border-top: 1px solid var(--border); padding-top: 1rem;
}
.login-footer-card a { color: var(--muted); text-decoration: none; }
.login-footer-card a:hover { color: var(--text2); }

.login-register-note {
  margin-top: .9rem; padding: .75rem .9rem; background: #EFF6FF;
  border-radius: 8px; border: 1px solid #BFDBFE;
  font-size: .79rem; color: var(--blue); line-height: 1.5;
}

/* ═══════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════ */
#pg-app { display: flex; min-height: 100vh; }

/* ══ SIDEBAR ══ */
.sidebar {
  width: var(--sw); background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 24px rgba(15,31,61,.18);
  overflow: hidden;
}
/* Sidebar overlay (dark bg behind) */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 99; backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }
/* Collapsed state — works on all screen sizes */
.sidebar.collapsed { transform: translateX(-100%); }
.main.sidebar-collapsed { margin-left: 0 !important; }
/* Toggle button — visible always */
.menu-btn {
  background: none; border: none;
  font-size: 1.25rem; cursor: pointer; color: var(--navy); padding: .3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .15s;
}
.menu-btn:hover { background: var(--bg); }

.sb-logo {
  padding: 1.4rem 1.4rem 1rem;
  display: flex; align-items: center; gap: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sb-logo-hex {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #8B1A1F);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: .75rem; color: white;
}
.sb-logo-text { font-family: var(--disp); font-weight: 700; font-size: .95rem; color: white; line-height: 1.2; }
.sb-logo-sub  { font-size: .68rem; color: rgba(255,255,255,.45); margin-top: .1rem; }

.sb-nav { flex: 1; overflow-y: auto; padding: .8rem 0; }
.sb-section {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: 1rem 1.4rem .4rem; margin-top: .2rem;
}

.ni {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.4rem; color: rgba(255,255,255,.6);
  font-size: .88rem; font-weight: 500; cursor: pointer;
  transition: all .15s; border-left: 2px solid transparent; user-select: none;
  position: relative;
}
.ni:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.ni.active {
  background: rgba(255,255,255,.1); color: white; font-weight: 600;
  border-left-color: var(--red-lt);
}
.ni.active::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 60%; background: var(--red-lt); border-radius: 4px 0 0 4px;
}
.ni-ic { font-size: .95rem; width: 18px; text-align: center; opacity: .9; }

.ni-badge {
  margin-left: auto; background: var(--red); color: white;
  font-size: .65rem; font-weight: 700; border-radius: 99px;
  padding: .1rem .45rem; min-width: 18px; text-align: center;
}

/* Sidebar bottom */
.sb-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .8rem 1.2rem;
}

.sb-user {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border-radius: var(--r);
  cursor: pointer; transition: background .15s;
}
.sb-user:hover { background: rgba(255,255,255,.07); }
.sb-av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: white;
  background: var(--red); border: 2px solid rgba(255,255,255,.2);
  background-size: cover; background-position: center;
}
.sb-uinfo { flex: 1; min-width: 0; }
.sb-uinfo b { display: flex; align-items: center; gap: .25rem; color: white; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-uinfo small { font-size: .7rem; color: rgba(255,255,255,.45); letter-spacing: .04em; }
.sb-out-btn {
  background: none; border: none; color: rgba(255,255,255,.4);
  cursor: pointer; font-size: 1.05rem; padding: .3rem;
  transition: color .15s; flex-shrink: 0;
}
.sb-out-btn:hover { color: var(--red-lt); }

/* Full-width logout button */
.sb-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .55rem .7rem; margin-top: .6rem;
  background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.2);
  color: rgba(255,255,255,.7); border-radius: var(--r);
  font-family: var(--font); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.sb-logout-btn:hover { background: rgba(220,38,38,.25); color: white; border-color: rgba(220,38,38,.4); }

/* ══ MAIN ══ */
.main {
  flex: 1; margin-left: var(--sw); min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ══ TOPBAR ══ */
.topbar {
  height: var(--th); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.8rem; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(15,31,61,.04);
  position: relative;
}
.menu-btn {
  background: none; border: none;
  font-size: 1.25rem; cursor: pointer; color: var(--navy); padding: .3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .15s;
}
.menu-btn:hover { background: var(--bg); }
.tb-title { font-family: var(--disp); font-size: 1.05rem; font-weight: 700; color: var(--navy); flex: 1; }
.tb-date  { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.tb-user  { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.tb-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: white;
  background-size: cover; background-position: center;
}
.tb-user span { font-size: .85rem; font-weight: 600; color: var(--navy); }

/* ══ CONTENT ══ */
.content { flex: 1; }
.sec { display: none; padding: 1.8rem; }
.sec.active { display: block; }

/* Section header */
.sh {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.sh h2 { font-family: var(--disp); font-size: 1.7rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.sh p  { font-size: .88rem; color: var(--text2); margin-top: .25rem; }

/* ══ STAT CARDS ══ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface); border-radius: var(--r2);
  padding: 1.3rem 1.4rem; box-shadow: var(--s1);
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--s2); transform: translateY(-2px); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-lt));
}
.sc-ic {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: .8rem;
}
.sc-lbl { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.sc-val { font-family: var(--disp); font-size: 1.45rem; font-weight: 800; margin-top: .2rem; }
.sc-sub { font-size: .72rem; color: var(--muted); margin-top: .2rem; }

/* ══ CARDS ══ */
.card { background: var(--surface); border-radius: var(--r2); box-shadow: var(--s1); border: 1px solid var(--border); overflow: hidden; }
.ch { padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ch h3 { font-family: var(--disp); font-size: .95rem; font-weight: 700; color: var(--navy); }
.cb { padding: 1rem 1.4rem; }

/* Dashboard 2-col */
.dg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:900px){ .dg2 { grid-template-columns: 1fr; } }

/* ══ HOST CARD (anfitrión onces) ══ */
.host-card {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-radius: var(--r2); padding: 1.2rem 1.6rem;
  display: flex; align-items: center; gap: 1.2rem;
  box-shadow: var(--s2); margin-bottom: 1rem; position: relative; overflow: hidden;
}
.host-card::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(220,38,38,.25), transparent);
  border-radius: 50%;
}
.host-av {
  width: 52px; height: 52px; border-radius: 50%; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1rem; font-weight: 700; color: white;
  flex-shrink: 0; border: 3px solid rgba(255,255,255,.2);
  background-size: cover; background-position: center;
}
.host-info { flex: 1; }
.host-label { font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }
.host-name  { font-family: var(--disp); font-size: 1.1rem; font-weight: 700; color: white; margin-top: .15rem; }
.host-sub   { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .2rem; }
.host-badge {
  background: rgba(220,38,38,.3); border: 1px solid rgba(220,38,38,.5);
  color: #fca5a5; font-size: .72rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 99px; white-space: nowrap;
}

/* ══ TOOLBAR ══ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.fil { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fil label { font-size: .78rem; font-weight: 700; color: var(--navy); }
.fil select {
  padding: .45rem .8rem; border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: .85rem; color: var(--text); background: var(--surface); outline: none;
  transition: border-color .2s;
}
.fil select:focus { border-color: var(--blue2); }

/* ══ BUTTONS ══ */
.btn-p {
  background: var(--navy); color: white; border: none;
  padding: .58rem 1.2rem; border-radius: var(--r);
  font-family: var(--font); font-size: .86rem; font-weight: 700;
  cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: .35rem;
}
.btn-p:hover { background: var(--blue); box-shadow: 0 4px 12px rgba(37,99,235,.3); }

.btn-s {
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); padding: .55rem 1.2rem; border-radius: var(--r);
  font-family: var(--font); font-size: .86rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-s:hover { border-color: var(--border2); background: var(--bg); }

.btn-sm {
  padding: .22rem .6rem; border: none; border-radius: 6px;
  font-family: var(--font); font-size: .73rem; font-weight: 700; cursor: pointer;
  transition: all .15s; display: inline-flex; align-items: center; gap: .2rem;
}
.btn-del  { background: #FEF2F2; color: var(--red2); }
.btn-del:hover  { background: #FCA5A5; color: white; }
.btn-edit { background: #EFF6FF; color: var(--blue); }
.btn-edit:hover { background: var(--blue2); color: white; }
.btn-foto { background: var(--amber-bg); color: var(--amber); border: 1px solid #FDE68A; }
.btn-foto:hover { background: var(--amber); color: white; }
.btn-warn { background: #FEF3C7; color: var(--amber); }
.btn-warn:hover { background: var(--amber); color: white; }

/* ══ DATA TABLE ══ */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
}
.data-table th {
  background: var(--bg); color: var(--navy); font-weight: 700;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .7rem 1rem; text-align: left; border-bottom: 2px solid var(--border);
  white-space: nowrap; position: sticky; top: 0;
}
.data-table td {
  padding: .65rem 1rem; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
.data-table tr:hover td { background: #F8FAFD; }
.data-table tfoot td {
  background: var(--bg); font-weight: 700; color: var(--navy);
  border-top: 2px solid var(--border); padding: .7rem 1rem;
}

/* ══ BADGES ══ */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .65rem; border-radius: 99px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.bg-green  { background: var(--green-bg); color: var(--green); }
.bg-red    { background: #FEF2F2; color: var(--red2); }
.bg-orange { background: var(--amber-bg); color: var(--amber); }
.bg-blue   { background: #EFF6FF; color: var(--blue); }
.bg-navy   { background: rgba(15,31,61,.08); color: var(--navy); }
.bg-purple { background: #F5F3FF; color: var(--purple); }
.bg-gray   { background: var(--bg2); color: var(--text2); }

/* ══ MOVIMIENTOS ══ */
.mov-item { display: flex; align-items: center; gap: .85rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.mov-item:last-child { border-bottom: none; }
.mov-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .92rem; flex-shrink: 0; }
.mov-ic.green { background: var(--green-bg); }
.mov-ic.blue  { background: #EFF6FF; }
.mov-ic.red   { background: #FEF2F2; }
.mov-info { flex: 1; min-width: 0; }
.mov-desc { font-size: .86rem; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mov-sub  { font-size: .74rem; color: var(--muted); }
.mov-val  { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.mov-val.pos { color: var(--green); }
.mov-val.neg { color: var(--red); }

/* Small avatar */
.av-sm {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .63rem; font-weight: 700; color: white;
  background-size: cover; background-position: center;
}

/* ══ MODAL ══ */
.modal-wrap {
  display: none; position: fixed; inset: 0;
  background: rgba(15,31,61,.6); z-index: 200;
  align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(4px);
}
.modal-wrap[style*="flex"] { display: flex !important; }

.modal {
  background: var(--surface); border-radius: var(--r2);
  max-width: 580px; width: 100%; box-shadow: var(--s3);
  overflow: hidden; animation: mIn .2s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes mIn { from { opacity:0; transform: translateY(-12px) scale(.97); } to { opacity:1; transform: none; } }

.mh {
  padding: 1.2rem 1.5rem; background: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 1;
}
.mh h3 { font-family: var(--disp); color: white; font-size: 1rem; font-weight: 700; }
.btn-cl { background: none; border: none; color: rgba(255,255,255,.6); font-size: 1.1rem; cursor: pointer; padding: .2rem; transition: color .15s; }
.btn-cl:hover { color: white; }
.mc { padding: 1.4rem 1.5rem; }
.mf { padding: .9rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .7rem; background: var(--bg); }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:520px){ .fr { grid-template-columns: 1fr; } }

/* ══ UPLOAD ZONE ══ */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; border: 2px dashed var(--border2); border-radius: var(--r);
  padding: 1rem; cursor: pointer; transition: all .2s; background: var(--bg);
}
.upload-zone:hover { border-color: var(--blue2); background: #EFF6FF; }
.upload-zone p { font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.4; }

/* ══ INFO BOX ══ */
.info-box { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: var(--r); padding: .85rem 1rem; margin-bottom: 1rem; font-size: .83rem; color: var(--blue); }

/* ══ EMPTY STATE ══ */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state div { font-size: 2rem; margin-bottom: .6rem; }
.empty-state p   { font-size: .88rem; }

/* ══ PROGRESS BAR ══ */
.progress-bar { background: var(--bg2); border-radius: 99px; height: 7px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--red), var(--red-lt)); transition: width .4s; }

/* ══ MEMBER CARDS ══ */
.mem-grid, .usr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem;
}
.member-card {
  background: var(--surface); border-radius: var(--r2); padding: 1.6rem 1.4rem;
  box-shadow: var(--s1); border: 1px solid var(--border);
  text-align: center; transition: all .2s; position: relative;
}
.member-card:hover { box-shadow: var(--s2); transform: translateY(-3px); }
.member-card-top-bar { height: 4px; background: linear-gradient(90deg, var(--red), var(--blue-lt)); margin: -1.6rem -1.4rem 1.4rem; }
.member-avatar {
  width: 70px; height: 70px; border-radius: 50%; margin: 0 auto .8rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.3rem; font-weight: 700; color: white;
  background-size: cover; background-position: center;
  border: 3px solid rgba(255,255,255,.6); box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.member-name  { font-family: var(--disp); font-size: 1rem; font-weight: 700; color: var(--navy); }
.member-role  { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }
.member-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1rem; }
.member-stat  { background: var(--bg); border-radius: var(--r); padding: .5rem .4rem; }
.member-stat-label { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.member-stat-value { font-family: var(--disp); font-size: .88rem; font-weight: 700; color: var(--navy); margin-top: .15rem; }
.inactive-banner {
  background: rgba(156,163,175,.15); border: 1px solid rgba(156,163,175,.3);
  color: var(--muted); border-radius: var(--r); padding: .3rem .7rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-top: .6rem; display: inline-block;
}

/* ══ PERFIL ══ */
.perfil-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; }
@media(max-width:800px){ .perfil-grid { grid-template-columns: 1fr; } }

.perfil-card {
  background: var(--surface); border-radius: var(--r2); box-shadow: var(--s1);
  border: 1px solid var(--border); overflow: hidden; text-align: center;
}
.perfil-card-banner {
  height: 80px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.perfil-card-body { padding: 0 1.5rem 1.5rem; }
.perfil-av-wrap { position: relative; display: inline-block; margin-top: -38px; margin-bottom: .8rem; }
.perfil-av {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.6rem; font-weight: 700; color: white;
  border: 4px solid var(--surface); box-shadow: var(--s1);
  background-size: cover; background-position: center;
}
.perfil-av-btn {
  position: absolute; bottom: 2px; right: 2px;
  background: var(--blue); color: white; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; cursor: pointer; border: 2px solid var(--surface);
  transition: background .15s;
}
.perfil-av-btn:hover { background: var(--navy); }
.perfil-name { font-family: var(--disp); font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.perfil-rol  { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--red); margin-top: .2rem; }
.perfil-user { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.perfil-resumen { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.2rem; }
.perfil-stat { background: var(--bg); border-radius: var(--r); padding: .6rem .5rem; }
.perfil-stat-label { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.perfil-stat-value { font-family: var(--disp); font-size: .95rem; font-weight: 700; color: var(--navy); margin-top: .15rem; }

.perfil-form {
  background: var(--surface); border-radius: var(--r2); box-shadow: var(--s1);
  border: 1px solid var(--border); padding: 1.5rem;
}
.perfil-form h3 { font-family: var(--disp); font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.2rem; }

/* ══ AHORRO TABLE ══ */
.ahorro-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.ahorro-table th {
  background: var(--bg); padding: .65rem .8rem; text-align: right;
  font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 2px solid var(--border); color: var(--navy);
}
.ahorro-table td { padding: .55rem .8rem; text-align: right; border-bottom: 1px solid var(--border); }
.ahorro-table tfoot td { background: var(--bg); font-weight: 700; border-top: 2px solid var(--border); color: var(--navy); }
.ahorro-table tr:hover td { background: #F8FAFD; }

/* ══ REPORTES ══ */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.rep-card {
  background: var(--surface); border-radius: var(--r2); padding: 1.5rem 1.3rem;
  box-shadow: var(--s1); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s; text-align: center;
}
.rep-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--s2); }
.rep-ic { font-size: 2rem; margin-bottom: .8rem; }
.rep-card h3 { font-family: var(--disp); font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: .45rem; }
.rep-card p  { font-size: .8rem; color: var(--text2); line-height: 1.5; margin-bottom: 1rem; }
.btn-rep { display: inline-block; padding: .4rem .9rem; background: var(--navy); color: white; border-radius: var(--r); font-size: .78rem; font-weight: 700; transition: background .15s; }
.rep-card:hover .btn-rep { background: var(--red); }

/* COLOR OPTS */
.color-opt { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; transition: transform .15s; border: 2px solid rgba(0,0,0,.1); }
.color-opt:hover { transform: scale(1.2); }

/* ══ PRINT / PDF ══ */
#rep-out { margin-top: 1rem; }
.print-area {
  background: white; border-radius: var(--r2); box-shadow: var(--s1);
  border: 1px solid var(--border); padding: 2.5rem;
}
.pr-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--navy);
}
.pr-logo { display: flex; align-items: center; gap: 1rem; }
.pr-logo-hex {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--red), #8B1A1F);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: .9rem; color: white; flex-shrink: 0;
}
.pr-logo-text h2 { font-family: var(--disp); font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.pr-logo-text p  { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.pr-meta { text-align: right; font-size: .8rem; color: var(--muted); }
.pr-meta strong { display: block; font-family: var(--disp); font-size: 1rem; color: var(--navy); font-weight: 700; }
.pr-section { margin-bottom: 2rem; }
.pr-section-title {
  font-family: var(--disp); font-size: 1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: .5rem;
}
.pr-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.pr-summary-box { background: var(--bg); border-radius: var(--r); padding: 1rem 1.2rem; }
.pr-summary-box strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .7rem; }
.pr-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.pr-table th { background: var(--navy); color: white; padding: .6rem .85rem; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.pr-table td { padding: .55rem .85rem; border-bottom: 1px solid var(--border); }
.pr-table tr:nth-child(even) td { background: var(--bg); }
.pr-table tfoot td { background: var(--bg2); font-weight: 700; color: var(--navy); border-top: 2px solid var(--border); }
.pr-footer {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: .75rem; color: var(--muted); display: flex; justify-content: space-between;
}
.pr-actions { display: flex; gap: .7rem; margin-top: 1.5rem; }

/* ══ VERIFY BADGE ══ */
/* ── VERIFY BADGES — Clean checkmark style ── */
.verify-wrap {
  position: relative; display: inline-flex; align-items: center; flex-shrink: 0;
  vertical-align: middle;
}
.verify-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  flex-shrink: 0; cursor: default;
  animation: verify-pop .4s cubic-bezier(.175,.885,.32,1.275) both;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  position: relative; z-index: 0;
}
.verify-badge svg { display: block; }
.verify-badge:hover { transform: scale(1.2); }
.verify-wrap:hover .verify-tooltip { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

/* Colors by role */
.verify-gold   .verify-badge { background: #D97706; }
.verify-red    .verify-badge { background: #DC2626; }
.verify-blue   .verify-badge { background: #2563EB; }
.verify-green  .verify-badge { background: #059669; }
.verify-gray   .verify-badge { background: #9CA3AF; }
.verify-purple .verify-badge { background: #7C3AED; }

/* Tooltip — posicionado con JS para no quedar cortado por overflow */
.verify-tooltip {
  display: none;
}

/* Tooltip global flotante (inyectado via JS) */
#verify-tooltip-global {
  position: fixed;
  background: #0F1F3D; color: white;
  padding: .5rem .85rem; border-radius: 10px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .18s;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: .15rem; min-width: 140px;
}
#verify-tooltip-global.visible { opacity: 1; }
#verify-tooltip-global::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #0F1F3D;
}
.verify-tooltip-role {
  font-size: .74rem; font-weight: 700; color: white; letter-spacing: .03em;
}
.verify-tooltip-desc {
  font-size: .68rem; color: rgba(255,255,255,.65); line-height: 1.4;
}
.verify-tooltip-contrib {
  font-size: .67rem; color: rgba(255,255,255,.5); margin-top: .1rem;
}

@keyframes verify-pop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.18); }
  100% { transform: scale(1); opacity: 1; }
}

/* Legacy color classes kept for compat */
.verify-gold  { color: #D97706; }
.verify-blue  { color: #2563EB; }
.verify-gray  { color: #9CA3AF; }

.member-name-row {
  display: flex; align-items: center; justify-content: center;
  gap: .35rem; margin-bottom: .1rem;
}

/* ══ TOPBAR ACTIONS & USER CHIP ══ */
.tb-actions {
  display: flex; align-items: center; gap: .5rem; margin-left: auto;
}
.tb-icon-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 1.1rem;
  transition: background .15s, color .15s;
}
.tb-icon-btn:hover { background: var(--bg); color: var(--navy); }

/* ── NOTIFICATION BELL ── */
.tb-bell-wrap { position: relative; }
.tb-bell-btn  { position: relative; }
.tb-bell-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; border-radius: 99px;
  background: var(--red); color: white;
  font-size: .6rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--surface);
  pointer-events: none; line-height: 1;
}
.tb-bell-btn.has-notif .ti-bell { animation: bell-ring .5s ease-in-out; }
@keyframes bell-ring {
  0%,100% { transform: rotate(0); }
  20% { transform: rotate(-20deg); }
  40% { transform: rotate(20deg); }
  60% { transform: rotate(-12deg); }
  80% { transform: rotate(12deg); }
}
.notif-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r2);
  box-shadow: var(--s3); z-index: 400; overflow: hidden;
  animation: mIn .18s cubic-bezier(.34,1.56,.64,1);
}
.notif-dropdown.open { display: block; }
.notif-dd-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--navy);
}
.notif-dd-clear {
  background: none; border: none; cursor: pointer;
  font-size: .72rem; color: var(--muted); font-weight: 600;
  transition: color .15s;
}
.notif-dd-clear:hover { color: var(--red); }
.notif-dd-list { max-height: 340px; overflow-y: auto; }
.notif-dd-empty {
  padding: 2rem 1rem; text-align: center;
  color: var(--muted); font-size: .8rem;
}
.notif-item {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #EFF6FF; }
.notif-item.unread:hover { background: #DBEAFE; }
.notif-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: white;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: .8rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
.notif-preview { font-size: .75rem; color: var(--text2); margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: .68rem; color: var(--muted); margin-top: .2rem; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue2); flex-shrink: 0; margin-top: 5px; }

.tb-user-chip {
  display: flex; align-items: center; gap: .55rem;
  padding: .35rem .7rem .35rem .35rem;
  border: 1.5px solid var(--border); border-radius: 99px;
  cursor: pointer; transition: all .15s; background: var(--surface);
  user-select: none;
}
.tb-user-chip:hover { border-color: var(--border2); background: var(--bg); }
.tb-user-chip span { display: inline-flex; align-items: center; gap: .25rem; font-size: .84rem; font-weight: 600; color: var(--navy); max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-chevron { font-size: .78rem; color: var(--muted); transition: transform .2s; }

/* ══ USER DROPDOWN ══ */
.user-dropdown {
  display: none; position: absolute; top: calc(var(--th) + 6px); right: 1.2rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r2); box-shadow: var(--s3);
  min-width: 220px; z-index: 300;
  animation: mIn .18s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.udd-header {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.1rem .9rem;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.udd-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,.3); }
.udd-info { flex: 1; min-width: 0; }
.udd-name-row { display: flex; align-items: center; gap: .35rem; }
.udd-name { font-size: .88rem; font-weight: 700; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.udd-verify { flex-shrink: 0; }
.udd-rol  { font-size: .72rem; color: rgba(255,255,255,.6); margin-top: .15rem; display: block; }
.udd-sep { height: 1px; background: var(--border); }
.udd-item { display: flex; align-items: center; gap: .65rem; padding: .72rem 1.1rem; font-size: .86rem; font-weight: 500; color: var(--text); cursor: pointer; transition: background .12s; }
.udd-item:hover { background: var(--bg); color: var(--navy); }
.udd-item i { font-size: 1rem; color: var(--muted); width: 18px; text-align: center; }
.udd-item:hover i { color: var(--navy); }
.udd-danger { color: var(--red2); }
.udd-danger:hover { background: #FEF2F2; color: var(--red2); }
.udd-danger i { color: var(--red2); }

/* ══ ONCES HERO ══ */
.onces-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3060 55%, #8B1A1F 100%);
  border-radius: var(--r2); padding: 1.6rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(15,31,61,.2);
  position: relative; overflow: hidden; flex-wrap: wrap;
}
.onces-hero::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(220,38,38,.2), transparent 70%);
  border-radius: 50%;
}
.onces-hero-left { display: flex; align-items: center; gap: 1.2rem; position: relative; z-index: 1; }
.onces-hero-badge {
  position: absolute; top: -1.6rem; left: 0;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: rgba(255,255,255,.55);
}
.onces-hero-av {
  width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.4rem; font-weight: 800; color: white;
  border: 3px solid rgba(255,255,255,.3);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.onces-hero-label { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .07em; }
.onces-hero-name  { font-family: var(--disp); font-size: 1.35rem; font-weight: 800; color: white; margin-top: .15rem; }
.onces-hero-rol   { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: .1rem; }

.onces-hero-right { display: flex; align-items: center; gap: 1.5rem; position: relative; z-index: 1; flex-wrap: wrap; }
.onces-hero-stat { text-align: center; }
.onces-hero-stat-val { display: block; font-family: var(--disp); font-size: 1.4rem; font-weight: 800; color: white; }
.onces-hero-stat-lbl { font-size: .7rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }

.onces-hero-members { display: flex; gap: .7rem; flex-wrap: wrap; }
.onces-hero-member { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.onces-hero-member-av {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: .7rem; font-weight: 700; color: white;
  transition: transform .15s;
}
.onces-hero-member.pagado .onces-hero-member-av { border: 2px solid #34d399; box-shadow: 0 0 8px rgba(52,211,153,.4); }
.onces-hero-member.pendiente .onces-hero-member-av { border: 2px solid rgba(255,255,255,.2); opacity: .6; }
.onces-hero-member-name { font-size: .65rem; color: rgba(255,255,255,.6); }
.onces-hero-member-status { display: flex; }

/* ══ ONCES TIMELINE ══ */
.onces-timeline-title {
  font-family: var(--disp); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: .8rem;
}
.onces-timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .65rem; margin-bottom: 1.5rem;
}
@media(max-width:900px){ .onces-timeline { grid-template-columns: repeat(4, 1fr); } }
@media(max-width:560px){ .onces-timeline { grid-template-columns: repeat(3, 1fr); } }

.onces-month-card {
  background: var(--surface); border-radius: var(--r2);
  border: 1.5px solid var(--border); padding: .85rem .7rem;
  text-align: center; transition: all .2s; cursor: default;
  position: relative; overflow: hidden;
}
.onces-month-card.actual {
  border-color: var(--blue2);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12), var(--s2);
}
.onces-month-card.completado { border-color: #6ee7b7; background: #F0FDF4; }
.onces-month-card.sin-pago   { opacity: .55; }
.onces-month-card:hover { transform: translateY(-2px); box-shadow: var(--s2); }

.omc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.omc-mes { font-size: .72rem; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; }
.omc-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.omc-status-dot.completado { background: #059669; box-shadow: 0 0 6px rgba(5,150,105,.5); }
.omc-status-dot.parcial    { background: #D97706; }
.omc-status-dot.en-curso   { background: #2563EB; box-shadow: 0 0 6px rgba(37,99,235,.5); animation: pulse 1.5s infinite; }
.omc-status-dot.pendiente  { background: var(--border2); }
.omc-status-dot.sin-pago   { background: #DC2626; }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

.omc-av {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto .4rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: .7rem; font-weight: 700; color: white;
}
.omc-name { font-size: .72rem; font-weight: 600; color: var(--navy); margin-bottom: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omc-miembros { display: flex; gap: 3px; justify-content: center; margin-bottom: .5rem; }
.omc-pip {
  width: 9px; height: 9px; border-radius: 50%;
  transition: transform .15s;
}
.omc-pip.ok { transform: scale(1.1); }

.omc-badge {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: .15rem .5rem; border-radius: 99px; display: inline-block;
}
.omc-badge.completado { background: #D1FAE5; color: #059669; }
.omc-badge.parcial    { background: var(--amber-bg); color: var(--amber); }
.omc-badge.en-curso   { background: #EFF6FF; color: var(--blue2); }
.omc-badge.pendiente  { background: var(--bg2); color: var(--muted); }
.omc-badge.sin-pago   { background: #FEF2F2; color: var(--red2); }

/* ══ TOAST ══ */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  background: var(--navy); color: white; padding: .8rem 1.4rem;
  border-radius: var(--r); font-size: .86rem; font-weight: 500;
  box-shadow: var(--s3); transform: translateY(80px) scale(.95); opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1); pointer-events: none;
  max-width: 340px;
}
.toast.show { transform: none; opacity: 1; }
.toast.error { background: var(--red2); }
.toast.success { background: var(--green); }

/* ══ RESPONSIVE ══ */
@media(max-width:960px){
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--s3); }
  .main { margin-left: 0; }
}
@media(min-width:961px){
  .menu-btn { display: flex; }
}
@media(max-width:640px){
  .sec { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .mem-grid, .usr-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .tb-date { display: none; }
  .sh h2 { font-size: 1.3rem; }
  .pr-summary-grid { grid-template-columns: 1fr; }
  .pr-header { flex-direction: column; gap: 1rem; }
  .pr-meta { text-align: left; }
}

/* ══ PRINT MEDIA ══ */
@media print {
  .sidebar, .topbar, .toolbar, .btn-p, .btn-s, .btn-sm,
  .rep-grid, .sh button, .pr-actions, .menu-btn { display: none !important; }
  .main { margin-left: 0 !important; }
  .sec { display: none !important; padding: 0; }
  .sec.active { display: none !important; }
  body { background: white !important; font-size: 11px; }
  .print-area { box-shadow: none; border: none; padding: 0; }
  .pr-header { break-inside: avoid; }
  .pr-section { break-inside: avoid; page-break-inside: avoid; }
  .pr-table { font-size: 10px; }
  #rep-out { display: block !important; }
  #s-reportes { display: block !important; padding: 0 !important; }
}

/* ═══════════════════════════════════════
   CHAT / MENSAJES
═══════════════════════════════════════ */

/* Nav badge */
.chat-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: white; font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 99px; padding: 0 4px;
  margin-left: auto; animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

/* Layout */
.chat-layout {
  display: flex; gap: 0; height: calc(100vh - var(--th) - 88px);
  background: var(--surface); border-radius: var(--r2); box-shadow: var(--s2);
  overflow: hidden; border: 1px solid var(--border);
}

/* ── SIDEBAR ── */
.chat-sidebar {
  width: 300px; min-width: 300px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; background: var(--surface);
}
.chat-sidebar-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
}
.chat-search-wrap {
  flex: 1; position: relative;
}
.chat-search-ic {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .95rem; pointer-events: none;
}
.chat-search {
  width: 100%; padding: .48rem .75rem .48rem 2rem;
  border: 1px solid var(--border); border-radius: 99px;
  background: var(--bg); font-size: .8rem; color: var(--text);
  outline: none; transition: border .2s;
}
.chat-search:focus { border-color: var(--blue2); }
.chat-new-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--blue2); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; transition: background .2s, transform .15s;
}
.chat-new-btn:hover { background: var(--blue); transform: scale(1.08); }

.chat-list { flex: 1; overflow-y: auto; }

.chat-list-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--border); position: relative;
}
.chat-list-item:hover { background: var(--bg); }
.chat-list-item.active { background: #EFF6FF; }
.chat-list-item.unread .cli-name { font-weight: 700; }
.chat-list-item.unread .cli-preview { color: var(--text); font-weight: 500; }

.cli-av {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: white;
}
.cli-body { flex: 1; min-width: 0; }
.cli-top { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.cli-name { font-size: .84rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-time { font-size: .7rem; color: var(--muted); flex-shrink: 0; }
.cli-preview { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.cli-tipo { font-size: .65rem; font-weight: 600; padding: .1rem .45rem; border-radius: 99px; background: var(--bg2); color: var(--text2); margin-top: .2rem; display: inline-block; }
.cli-unread-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue2);
  flex-shrink: 0; align-self: center;
}

/* ── PANEL ── */
.chat-panel {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: #F7F9FC;
}
.chat-empty-screen {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .75rem;
  color: var(--muted); padding: 2rem;
}
.chat-empty-ic { font-size: 3.5rem; color: var(--border2); }
.chat-empty-title { font-size: 1.05rem; font-weight: 600; color: var(--text2); }
.chat-empty-sub { font-size: .82rem; text-align: center; max-width: 260px; }

.chat-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1.2rem; background: var(--surface);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-back-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text2); font-size: 1.1rem; padding: .3rem;
  border-radius: var(--r); transition: background .15s;
}
.chat-back-btn:hover { background: var(--bg); }
.chat-header-av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: white;
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name { font-size: .92rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: .3rem; }
.chat-header-rol  { font-size: .75rem; color: var(--muted); }
.chat-header-topic {
  font-size: .72rem; font-weight: 600; padding: .25rem .65rem;
  border-radius: 99px; background: var(--bg2); color: var(--text2); flex-shrink: 0;
}

/* ── MESSAGES AREA ── */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.2rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.chat-day-sep {
  display: flex; align-items: center; gap: .75rem;
  font-size: .7rem; color: var(--muted); margin: .5rem 0;
}
.chat-day-sep::before, .chat-day-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Bubble */
.chat-bubble-wrap {
  display: flex; align-items: flex-end; gap: .5rem;
  max-width: 78%;
}
.chat-bubble-wrap.me { margin-left: auto; flex-direction: row-reverse; }
.chat-bubble-wrap.them { margin-right: auto; }

.bubble-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: white;
}
.bubble-av.me { display: none; }

.chat-bubble {
  padding: .55rem .85rem; border-radius: 16px; font-size: .84rem; line-height: 1.5;
  word-break: break-word; max-width: 100%; position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.chat-bubble-wrap.me .chat-bubble {
  background: var(--blue2); color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble-wrap.them .chat-bubble {
  background: var(--surface); color: var(--text);
  border-bottom-left-radius: 4px; border: 1px solid var(--border);
}
.bubble-time {
  font-size: .62rem; margin-top: .25rem; display: block; text-align: right;
}
.chat-bubble-wrap.me .bubble-time { color: rgba(255,255,255,.65); }
.chat-bubble-wrap.them .bubble-time { color: var(--muted); }

/* Media / file bubbles */
.bubble-img {
  max-width: 220px; max-height: 200px; border-radius: 10px;
  object-fit: cover; cursor: zoom-in; display: block; margin-bottom: .3rem;
}
.bubble-video {
  max-width: 240px; border-radius: 10px; display: block; margin-bottom: .3rem;
}
.bubble-file {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .75rem; background: rgba(0,0,0,.07);
  border-radius: 10px; margin-bottom: .3rem; cursor: pointer;
  text-decoration: none; color: inherit;
}
.bubble-file:hover { background: rgba(0,0,0,.12); }
.chat-bubble-wrap.them .bubble-file { background: var(--bg); }
.bubble-file-name { font-size: .78rem; font-weight: 600; }

/* Voice bubble */
.bubble-voice {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem .6rem;
}
.bubble-voice-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
  flex-shrink: 0; transition: transform .15s;
}
.chat-bubble-wrap.me .bubble-voice-btn { background: rgba(255,255,255,.25); color: white; }
.chat-bubble-wrap.them .bubble-voice-btn { background: var(--blue2); color: white; }
.bubble-voice-btn:hover { transform: scale(1.1); }
.bubble-voice-bar {
  flex: 1; height: 28px; display: flex; align-items: center; gap: 2px;
}
.bubble-voice-bar span {
  flex: 1; background: currentColor; opacity: .45; border-radius: 99px;
  animation: voice-bar-anim 1.2s ease-in-out infinite;
}
.bubble-voice-bar span:nth-child(2) { animation-delay: .1s; height: 60%; }
.bubble-voice-bar span:nth-child(3) { animation-delay: .2s; height: 80%; }
.bubble-voice-bar span:nth-child(4) { animation-delay: .05s; height: 50%; }
.bubble-voice-bar span:nth-child(5) { animation-delay: .15s; height: 95%; }
.bubble-voice-bar span:nth-child(6) { animation-delay: .3s; height: 65%; }
.bubble-voice-bar span:nth-child(7) { animation-delay: .08s; height: 40%; }
.bubble-voice-bar span:nth-child(8) { animation-delay: .22s; height: 75%; }
.bubble-voice-dur { font-size: .7rem; opacity: .75; flex-shrink: 0; }
@keyframes voice-bar-anim {
  0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); }
}

/* ── EMOJI PICKER ── */
.chat-emoji-picker {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: .65rem .9rem; flex-shrink: 0;
}
.chat-emoji-grid {
  display: flex; flex-wrap: wrap; gap: .2rem; max-height: 130px; overflow-y: auto;
}
.chat-emoji-grid span {
  font-size: 1.35rem; cursor: pointer; padding: .2rem .25rem; border-radius: 6px;
  transition: background .12s, transform .12s; line-height: 1;
}
.chat-emoji-grid span:hover { background: var(--bg2); transform: scale(1.2); }

/* ── INPUT BAR ── */
.chat-input-bar {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: .65rem 1rem; flex-shrink: 0;
}
.chat-attach-preview {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-bottom: .5rem; padding: .5rem .65rem;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--border);
}
.cap-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: .75rem; color: var(--text2);
}
.cap-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.cap-remove {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: .85rem; padding: .1rem; transition: color .15s;
}
.cap-remove:hover { color: var(--red); }

.chat-voice-preview {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .5rem; padding: .5rem .75rem;
  background: #EFF6FF; border-radius: var(--r); border: 1px solid #BFDBFE;
}
.chat-voice-wave {
  flex: 1; font-size: .78rem; color: var(--blue2); font-weight: 500;
  display: flex; align-items: center; gap: .4rem;
}
.chat-voice-play, .chat-voice-del {
  border: none; cursor: pointer; border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.chat-voice-play { background: var(--blue2); color: white; }
.chat-voice-del  { background: var(--bg2); color: var(--muted); }

.chat-input-row {
  display: flex; align-items: flex-end; gap: .4rem;
}
.chat-ic-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0; transition: color .15s, background .15s;
}
.chat-ic-btn:hover { color: var(--blue2); background: var(--bg2); }
.chat-voice-btn.recording { color: var(--red); animation: recording-pulse .6s ease-in-out infinite; }
@keyframes recording-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.chat-textarea {
  flex: 1; border: 1px solid var(--border); border-radius: 20px;
  padding: .55rem 1rem; font-size: .84rem; font-family: var(--font);
  resize: none; outline: none; line-height: 1.45; max-height: 120px;
  overflow-y: auto; background: var(--bg); transition: border .2s;
}
.chat-textarea:focus { border-color: var(--blue2); background: white; }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--blue2); color: white; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: background .2s, transform .15s;
}
.chat-send-btn:hover { background: var(--blue); transform: scale(1.05); }

/* ── NEW CHAT MODAL ── */
.newchat-user-list {
  display: flex; flex-direction: column; gap: .4rem; margin-top: .3rem;
}
.newchat-user-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; border-radius: var(--r); border: 2px solid var(--border);
  cursor: pointer; transition: border .15s, background .15s;
}
.newchat-user-item:hover { border-color: var(--blue2); background: #EFF6FF; }
.newchat-user-item.selected { border-color: var(--blue2); background: #EFF6FF; }
.newchat-user-av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: white;
}
.newchat-user-name { font-size: .84rem; font-weight: 600; }
.newchat-user-rol  { font-size: .73rem; color: var(--muted); }

/* ── RESPONSIVE ── */
@media(max-width:760px){
  .chat-layout { height: calc(100vh - var(--th) - 88px); }
  .chat-sidebar { width: 100%; min-width: 100%; position: absolute; z-index: 5; height: 100%; background: var(--surface); transition: transform .25s; }
  .chat-sidebar.hidden { transform: translateX(-100%); }
  .chat-back-btn { display: flex; }
  .chat-layout { position: relative; overflow: hidden; }
}

/* ═══ NUEVAS FUNCIONALIDADES v4 ═══ */

/* Label fecha registros */
.lbl-fecha-registros {
  font-size: .75rem;
  color: var(--muted);
  margin: .3rem 0 .6rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.lbl-fecha-registros::before {
  content: "📅";
  font-size: .85rem;
}

/* ─── MOMENTOS / POSTS ─── */
.momento-composer {
  display: flex;
  gap: .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--s1);
}
.momento-composer-av {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff;
  flex-shrink: 0; background-size: cover; background-position: center;
}
.momento-composer-body { flex: 1; }
.momento-empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.post-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem .6rem; position: relative;
}
.post-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
  flex-shrink: 0; background-size: cover; background-position: center;
}
.post-meta { flex: 1; }
.post-autor { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: .3rem; }
.post-fecha { font-size: .72rem; color: var(--muted); margin-top: .1rem; display: flex; align-items: center; gap: .2rem; }
.post-del-btn {
  position: absolute; right: .8rem; top: .8rem;
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: .3rem;
  border-radius: 50%; transition: background .15s, color .15s; font-size: 1rem;
}
.post-del-btn:hover { background: #FEF2F2; color: var(--red); }
.post-texto {
  font-size: .92rem; line-height: 1.55;
  padding: .3rem 1rem .6rem; white-space: pre-wrap;
}
.post-img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #0a0a0a;
  display: block;
}
.post-video {
  width: 100%;
  max-height: 480px;
  background: #000;
  display: block;
}
.post-actions {
  display: flex; gap: 0; padding: .3rem .5rem;
  border-top: 1px solid var(--border);
  margin: 0;
}
.post-btn-corazon, .post-btn-comentar {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: none; border: none;
  border-radius: 8px; padding: .55rem 1rem;
  font-size: .84rem; cursor: pointer;
  color: var(--text2); transition: all .15s; font-family: inherit; font-weight: 600;
}
.post-btn-corazon:hover { background: #FEF2F2; color: #E53E3E; }
.post-btn-corazon.activo { color: #E53E3E; font-weight: 700; }
.post-btn-comentar:hover { background: var(--bg); color: var(--blue2); }
.post-comments { padding: .5rem 1rem; display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--border); background: var(--bg); }
.post-comment { display: flex; align-items: flex-start; gap: .5rem; }
.post-comment-av {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.post-comment-body {
  background: var(--surface); border-radius: 14px;
  padding: .45rem .85rem; font-size: .83rem; line-height: 1.4;
  display: flex; flex-direction: column; gap: .08rem;
  border: 1px solid var(--border);
}
.post-comment-autor { font-weight: 700; font-size: .78rem; color: var(--navy); }
.post-comment-txt { color: var(--text); }
.post-comment-time { font-size: .66rem; color: var(--muted); }
.post-comment-box {
  padding: .6rem 1rem; display: flex;
  align-items: center; gap: .5rem; background: var(--bg);
}
.post-comment-input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 20px;
  padding: .42rem 1rem; font-size: .83rem; font-family: inherit;
  background: var(--surface); color: var(--text);
  outline: none; transition: border .15s;
}
.post-comment-input:focus { border-color: var(--blue2); }
.post-comment-send {
  background: var(--blue2); color: #fff; border: none;
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; font-size: .88rem;
}
.post-comment-send:hover { background: var(--navy); }

/* ─── ACTIVIDADES ─── */
.act-tipo-badge {
  background: var(--bg2); border-radius: 6px;
  padding: .15rem .5rem; font-size: .72rem; font-weight: 600;
}

/* ─── ONCES anfitrion pip ─── */
.onces-hero-member.anfitrion .onces-hero-member-av {
  box-shadow: 0 0 0 2px #F59E0B;
}
.omc-role-tag { text-align: center; margin-top: .1rem; }

/* ─── Bubble sender name ─── */
.bubble-sender-name {
  font-weight: 600; font-size: .68rem;
  color: var(--muted); margin-bottom: .12rem;
}

/* ─── Voice preview dur ─── */
.voice-preview-dur {
  font-size: .78rem; color: var(--muted); margin-left: auto;
}


/* ─── GASTOS DEL FONDO ─── */
#s-gastos .stat-card .sc-ic {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
#gastos-corte-lbl { margin: .5rem 0 .3rem; }

/* ─── DASHBOARD corte banner ─── */
#dash-corte-banner { margin: .6rem 0 .8rem; }

/* ─── EMOJI GRID: garantizar color rendering ─── */
.chat-emoji-grid {
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',
               'Twemoji Mozilla', 'EmojiOne Color', sans-serif !important;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: .4rem;
}
.chat-emoji-grid span {
  font-size: 1.35rem;
  cursor: pointer;
  padding: .18rem .22rem;
  border-radius: 6px;
  transition: background .1s, transform .1s;
  line-height: 1;
  user-select: none;
}
.chat-emoji-grid span:hover {
  background: var(--bg2);
  transform: scale(1.2);
}

/* ─── MOMENTOS: centrar y limitar ancho del feed ─── */
#s-momentos > .sh { max-width: 680px; margin-left: auto; margin-right: auto; }
.post-img {
  width: 100%;
  height: auto;
  max-height: none !important;
  object-fit: contain !important;
  border-radius: 12px;
  margin-bottom: .7rem;
  cursor: zoom-in;
  background: #000;
  display: block;
}
.post-img:hover { opacity: .95; }
.post-video {
  width: 100%; max-height: 420px;
  border-radius: 12px; margin-bottom: .7rem; background: #000;
}

/* ─── DISPONIBILIDAD FONDO CARD ─── */
#dash-disponibilidad .card { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════
   WOWONDER-STYLE ENHANCEMENTS
   Burbujas animadas, stat cards mejoradas, micro-detalles
═══════════════════════════════════════════════════ */

/* ── Burbujas animadas en fondo del login ── */
#pg-login .login-bubbles {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
#pg-login .login-bubbles span {
  position: absolute; bottom: -80px;
  border-radius: 50%;
  opacity: 0;
  animation: bubbleRise linear infinite;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
#pg-login .login-bubbles span:nth-child(1)  { width:60px; height:60px;  left:8%;  animation-duration:9s;  animation-delay:0s; }
#pg-login .login-bubbles span:nth-child(2)  { width:30px; height:30px;  left:18%; animation-duration:12s; animation-delay:2s; }
#pg-login .login-bubbles span:nth-child(3)  { width:90px; height:90px;  left:28%; animation-duration:10s; animation-delay:4s; }
#pg-login .login-bubbles span:nth-child(4)  { width:40px; height:40px;  left:42%; animation-duration:14s; animation-delay:1s; }
#pg-login .login-bubbles span:nth-child(5)  { width:70px; height:70px;  left:55%; animation-duration:11s; animation-delay:3s; }
#pg-login .login-bubbles span:nth-child(6)  { width:25px; height:25px;  left:65%; animation-duration:8s;  animation-delay:5s; }
#pg-login .login-bubbles span:nth-child(7)  { width:50px; height:50px;  left:75%; animation-duration:13s; animation-delay:0.5s; }
#pg-login .login-bubbles span:nth-child(8)  { width:80px; height:80px;  left:85%; animation-duration:10s; animation-delay:2.5s; }
#pg-login .login-bubbles span:nth-child(9)  { width:35px; height:35px;  left:92%; animation-duration:15s; animation-delay:1.5s; }
#pg-login .login-bubbles span:nth-child(10) { width:45px; height:45px;  left:3%;  animation-duration:9s;  animation-delay:6s; }

@keyframes bubbleRise {
  0%   { bottom: -80px; opacity: 0; transform: translateX(0) scale(.8); }
  10%  { opacity: 1; }
  80%  { opacity: .5; }
  100% { bottom: 110vh; opacity: 0; transform: translateX(40px) scale(1.1); }
}

/* ── Línea decorativa de color en la parte superior de la tarjeta ── */
.login-right::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--navy), var(--blue2));
  border-radius: 18px 18px 0 0;
}

/* ── Stat cards mejoradas estilo WoWonder ── */
.stat-card {
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent);
  pointer-events: none;
}
.stat-card .sc-ic {
  position: relative; z-index: 1;
}
.stat-card .sc-val {
  font-size: 1.5rem;
  position: relative; z-index: 1;
}

/* ── Efecto hover mejorado en stat-card ── */
.stat-card {
  transition: box-shadow .25s, transform .25s, border-color .25s;
  cursor: default;
}
.stat-card:hover {
  box-shadow: 0 8px 28px rgba(15,31,61,.14), 0 2px 8px rgba(15,31,61,.06);
  transform: translateY(-3px);
  border-color: var(--border2);
}

/* ── Top bar arcoiris en las stat cards ── */
.stat-card:nth-child(1)::before { background: linear-gradient(90deg,#2563EB,#60A5FA); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg,#059669,#34D399); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg,#DC2626,#F87171); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg,#D97706,#FCD34D); }

/* ── Gráficas con contenedor mejorado ── */
#dash-charts-row .card {
  overflow: hidden;
}
#dash-charts-row .ch {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}
#dash-charts-row .cb {
  padding: .6rem 1rem 1rem;
}

/* ── Tarjeta de préstamo activo en dashboard ── */
#dash-loans > div {
  padding: .6rem .8rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color .2s;
}
#dash-loans > div:hover {
  border-color: var(--border2);
}

/* ── Topbar con sombra sutil estilo WoWonder ── */
.topbar {
  box-shadow: 0 2px 12px rgba(15,31,61,.07);
}

/* ── Sidebar logo con glow ── */
.sb-logo-hex {
  box-shadow: 0 4px 14px rgba(220,38,38,.35);
}

/* ── Movimiento de entrada del sidebar ── */
@keyframes sbFadeIn { from { opacity:0; transform: translateX(-8px); } to { opacity:1; transform: none; } }
.sidebar { animation: sbFadeIn .35s ease; }

/* ── Progress bar con gradiente animado ── */
.progress-fill {
  background: linear-gradient(90deg, var(--red), #F87171, var(--red));
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}
@keyframes shimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }

/* ── Toast mejorado ── */
.toast {
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.18) !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}

/* ── Card header con icono de color ── */
.ch h3 { display: flex; align-items: center; gap: .4rem; }

/* ── Empty state con animación ── */
.empty-state {
  animation: fadeUp .4s ease;
}
@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }

/* ── Filas de tabla con transición suave ── */
.data-table tbody tr {
  transition: background .15s;
}

/* ── Modal con mejor animación ── */
@keyframes mIn {
  from { opacity:0; transform: translateY(-18px) scale(.96); }
  to   { opacity:1; transform: none; }
}

/* ── Card chart con gradiente sutil ── */
.card {
  transition: box-shadow .2s;
}

/* ── Nombre de sección en topbar con icono ── */
#tb-ttl {
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ── Mejora botones primarios ── */
.btn-p {
  position: relative; overflow: hidden;
}
.btn-p::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 100%);
  pointer-events: none;
}
.btn-p:hover { transform: translateY(-1px); }
.btn-p:active { transform: translateY(0); }

/* ── Banner de bienvenida en dashboard (nueva sección) ── */
.dash-welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3260 60%, #7a1218 100%);
  border-radius: var(--r2);
  padding: 1.2rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; margin-bottom: 1.2rem;
  position: relative; overflow: hidden;
  box-shadow: var(--s2);
}
.dash-welcome-banner::before {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.07), transparent);
  pointer-events: none;
}
.dash-welcome-banner::after {
  content: '';
  position: absolute; left: 30%; bottom: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,38,38,.15), transparent);
  pointer-events: none;
}
.dwb-text h3 {
  font-family: var(--disp); font-size: 1.1rem; font-weight: 800; color: white;
  margin-bottom: .2rem;
}
.dwb-text p { font-size: .8rem; color: rgba(255,255,255,.65); line-height: 1.5; }
.dwb-stats {
  display: flex; gap: 1.5rem; flex-shrink: 0;
}
.dwb-stat { text-align: center; }
.dwb-stat-val { font-family: var(--disp); font-size: 1.3rem; font-weight: 800; color: white; }
.dwb-stat-lbl { font-size: .68rem; color: rgba(255,255,255,.55); letter-spacing: .04em; text-transform: uppercase; }

@media(max-width:600px) { .dwb-stats { display: none; } }

/* ═══════════════════════════════════════════════════════
   NUEVAS MEJORAS: TEMAS, PERFIL SOCIAL, VERIFY AVANZADO
   ═══════════════════════════════════════════════════════ */

/* ══ SELECTOR DE TEMAS (Theme Switcher) ══ */
.theme-switcher-btn {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 1.05rem;
  transition: background .15s, transform .2s;
  position: relative;
}
.theme-switcher-btn:hover { background: var(--bg); transform: rotate(30deg); }

/* ── TEMA OSCURO ── */
body.theme-dark {
  --bg:      #0d1117;
  --bg2:     #161b22;
  --surface: #1c2128;
  --border:  #30363d;
  --border2: #444c56;
  --text:    #e6edf3;
  --text2:   #8b949e;
  --muted:   #6e7681;
  --navy:    #58a6ff;
  --blue:    #388bfd;
  --blue2:   #58a6ff;
  --s1: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --s2: 0 4px 16px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.3);
  --s3: 0 10px 40px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.4);
}
body.theme-dark .sidebar { background: #0d1117; border-right: 1px solid #30363d; }
body.theme-dark .topbar { background: #1c2128; border-bottom-color: #30363d; }
body.theme-dark .card, body.theme-dark .perfil-card, body.theme-dark .perfil-form,
body.theme-dark .modal, body.theme-dark .user-dropdown, body.theme-dark .notif-dropdown,
body.theme-dark .theme-panel { background: #1c2128; border-color: #30363d; }
body.theme-dark .theme-panel-header { background: #161b22; border-color: #30363d; }
body.theme-dark .theme-panel-title { color: #58a6ff; }
body.theme-dark .theme-opt { background: #0d1117; border-color: #30363d; color: #8b949e; }
body.theme-dark .theme-opt:hover { border-color: #58a6ff; color: #e6edf3; }
body.theme-dark .theme-opt.active { border-color: var(--red); color: #e6edf3; }

/* ── TEMA OCÉANO ── */
body.theme-ocean {
  --bg:      #f0f9ff;
  --bg2:     #e0f2fe;
  --surface: #ffffff;
  --border:  #bae6fd;
  --border2: #7dd3fc;
  --navy:    #0c4a6e;
  --blue:    #0284c7;
  --blue2:   #0ea5e9;
  --red:     #0ea5e9;
  --amber:   #0284c7;
}
body.theme-ocean .sidebar { background: #0c4a6e; }
body.theme-ocean .sb-logo-hex { background: #0ea5e9; }
body.theme-ocean .ni.active { background: rgba(14,165,233,.15); color: #0ea5e9; }
body.theme-ocean .ni.active .ni-ic { color: #0ea5e9; }

/* ── TEMA ROSA ── */
body.theme-rose {
  --bg:      #fff1f2;
  --bg2:     #ffe4e6;
  --surface: #ffffff;
  --border:  #fecdd3;
  --border2: #fda4af;
  --navy:    #881337;
  --blue:    #e11d48;
  --blue2:   #f43f5e;
  --red:     #f43f5e;
  --amber:   #e11d48;
}
body.theme-rose .sidebar { background: #881337; }
body.theme-rose .sb-logo-hex { background: #f43f5e; }
body.theme-rose .ni.active { background: rgba(244,63,94,.15); color: #f43f5e; }
body.theme-rose .ni.active .ni-ic { color: #f43f5e; }
body.theme-dark .tb-user-chip { background: #1c2128; border-color: #30363d; }
body.theme-dark .tb-user-chip span { color: #e6edf3; }
body.theme-dark .fg input, body.theme-dark .fg select, body.theme-dark .fg textarea
  { background: #0d1117; border-color: #30363d; color: #e6edf3; }
body.theme-dark .fg input:focus, body.theme-dark .fg select:focus { border-color: var(--red); background: #1c2128; }
body.theme-dark .data-table { border-color: #30363d; }
body.theme-dark .data-table thead th { background: #0d1117; color: #8b949e; border-color: #30363d; }
body.theme-dark .data-table tbody td { border-color: #30363d; color: #e6edf3; }
body.theme-dark .data-table tbody tr:hover { background: #21262d; }
body.theme-dark .sb-uinfo b { color: #e6edf3; }
body.theme-dark .mem-card { background: #1c2128; border-color: #30363d; }
body.theme-dark .chat-layout { background: #1c2128; border-color: #30363d; }
body.theme-dark .chat-panel { background: #0d1117; }
body.theme-dark .chat-sidebar { background: #1c2128; border-right-color: #30363d; }
body.theme-dark .chat-bubble-wrap.them .chat-bubble { background: #21262d; border-color: #30363d; color: #e6edf3; }
body.theme-dark .stat-card { background: #1c2128; border-color: #30363d; }
body.theme-dark .social-profile-cover { filter: brightness(.7); }
body.theme-dark .social-profile-card { background: #1c2128; border-color: #30363d; }
body.theme-dark .feed-composer, body.theme-dark .feed-post { background: #1c2128; border-color: #30363d; }
body.theme-dark .feed-post-actions { border-color: #30363d; }
body.theme-dark .feed-post-action { background: #0d1117; border-color: #30363d; color: #8b949e; }
body.theme-dark .feed-post-action:hover { background: #21262d; color: #e6edf3; }
body.theme-dark .perfil-stat { background: #0d1117; border-color: #30363d; }
body.theme-dark .social-tabs-bar { background: #1c2128; border-color: #30363d; }
body.theme-dark .social-tab-btn { color: #8b949e; }
body.theme-dark .social-tab-btn.active { color: #58a6ff; border-bottom-color: #58a6ff; }
body.theme-dark .omc-info { color: #e6edf3; }
body.theme-dark .onces-month-card { background: #1c2128; border-color: #30363d; }
body.theme-dark .onces-month-card.completado { background: #0d2117; border-color: #2ea043; }
body.theme-dark .tab-btns { background: #0d1117; border-color: #30363d; }
body.theme-dark .tab-btn { color: #8b949e; }
body.theme-dark .stat-card { border-color: #30363d; }

/* ── TEMA VERDE / NATURALEZA ── */
body.theme-green {
  --red:     #16a34a;
  --red2:    #15803d;
  --red-lt:  #4ade80;
  --navy:    #14532d;
  --blue:    #166534;
  --blue2:   #16a34a;
  --bg:      #f0fdf4;
  --bg2:     #dcfce7;
  --border:  #bbf7d0;
  --border2: #86efac;
}
body.theme-green .sidebar { background: #14532d; }
body.theme-green .ll-logo-hex, body.theme-green .sb-logo-hex, body.theme-green .login-right-logo-hex { background: linear-gradient(135deg, #16a34a, #14532d); box-shadow: 0 8px 28px rgba(22,163,74,.45); }
body.theme-green .btn-in, body.theme-green .btn-p, body.theme-green .chat-new-btn, body.theme-green .chat-send-btn { background: #16a34a; box-shadow: 0 4px 18px rgba(22,163,74,.35); }
body.theme-green .btn-in:hover, body.theme-green .btn-p:hover { background: #15803d; }
body.theme-green .tab-btn.active { background: #16a34a; box-shadow: 0 4px 14px rgba(22,163,74,.35); }
body.theme-green #pg-login { background: linear-gradient(135deg, #14532d 0%, #166534 40%, #064e3b 100%); }
body.theme-green .dash-welcome-banner { background: linear-gradient(135deg, #14532d 0%, #166534 60%, #065f46 100%); }
body.theme-green .social-profile-cover { background: linear-gradient(135deg, #14532d, #16a34a) !important; }
body.theme-green .ni.active { border-left-color: #4ade80; }

/* ── TEMA MORADO / PREMIUM ── */
body.theme-purple {
  --red:     #7c3aed;
  --red2:    #6d28d9;
  --red-lt:  #a78bfa;
  --navy:    #2e1065;
  --blue:    #4c1d95;
  --blue2:   #7c3aed;
  --bg:      #f5f3ff;
  --bg2:     #ede9fe;
  --border:  #ddd6fe;
  --border2: #c4b5fd;
}
body.theme-purple .sidebar { background: #2e1065; }
body.theme-purple .ll-logo-hex, body.theme-purple .sb-logo-hex, body.theme-purple .login-right-logo-hex { background: linear-gradient(135deg, #7c3aed, #2e1065); box-shadow: 0 8px 28px rgba(124,58,237,.45); }
body.theme-purple .btn-in, body.theme-purple .btn-p, body.theme-purple .chat-new-btn, body.theme-purple .chat-send-btn { background: #7c3aed; box-shadow: 0 4px 18px rgba(124,58,237,.35); }
body.theme-purple .btn-in:hover, body.theme-purple .btn-p:hover { background: #6d28d9; }
body.theme-purple .tab-btn.active { background: #7c3aed; box-shadow: 0 4px 14px rgba(124,58,237,.35); }
body.theme-purple #pg-login { background: linear-gradient(135deg, #2e1065 0%, #4c1d95 40%, #5b21b6 100%); }
body.theme-purple .dash-welcome-banner { background: linear-gradient(135deg, #2e1065 0%, #4c1d95 60%, #6d28d9 100%); }
body.theme-purple .social-profile-cover { background: linear-gradient(135deg, #2e1065, #7c3aed) !important; }
body.theme-purple .ni.active { border-left-color: #a78bfa; }

/* ═══════════════════════════════════════════════════
   PERFIL SOCIAL — ESTILO WOWONDER
   ═══════════════════════════════════════════════════ */

/* Overrides el grid previo de perfil */
.social-profile-layout { display: block; }

/* Cover banner grande */
.social-profile-cover {
  height: 220px; border-radius: var(--r2) var(--r2) 0 0;
  background: linear-gradient(135deg, var(--navy), var(--blue2));
  position: relative; overflow: hidden;
}
/* Wrapper around cover+card so overflow:visible works */
.social-profile-cover-wrap {
  position: relative;
}
.social-profile-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.06' stroke-width='1'%3E%3Ccircle cx='40' cy='40' r='30'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3C/g%3E%3C/svg%3E");
}
.social-cover-edit-btn {
  position: absolute; bottom: 12px; right: 14px;
  background: rgba(0,0,0,.45); color: white; border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: .35rem .85rem; font-size: .78rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: .35rem;
  backdrop-filter: blur(6px); transition: background .15s;
}
.social-cover-edit-btn:hover { background: rgba(0,0,0,.65); }

/* Tarjeta del perfil */
.social-profile-card {
  background: var(--surface); border-radius: 0 0 var(--r2) var(--r2);
  border: 1px solid var(--border); border-top: none;
  padding: 0 1.8rem 1.4rem;
  position: relative; margin-bottom: 1rem;
  overflow: visible;
}

/* Avatar grande con borde */
.social-profile-av-wrap {
  position: absolute; top: -52px; left: 1.8rem;
  display: inline-block;
  width: 104px; height: 104px;
}
.social-profile-av {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--red); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 2rem; font-weight: 800;
  border: 4px solid var(--surface); box-shadow: 0 4px 20px rgba(0,0,0,.18);
  background-size: cover; background-position: center;
  transition: box-shadow .2s;
}
.social-profile-av:hover { box-shadow: 0 6px 28px rgba(0,0,0,.25); }
.social-profile-av-cam {
  position: absolute; bottom: 2px; right: 2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; cursor: pointer;
  border: 2.5px solid var(--surface);
  transition: background .15s, transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.social-profile-av-cam:hover { background: var(--blue2); transform: scale(1.12); }

/* Barra de info de perfil (nombre, rol, acciones) */
.social-profile-info-bar {
  padding-top: 58px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.social-profile-meta { padding-left: 116px; flex: 1; min-width: 0; margin-top: -50px; }
.social-profile-name {
  font-family: var(--disp); font-size: 1.35rem; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  line-height: 1.2;
}
.social-profile-handle { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.social-profile-role-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .65rem; border-radius: 99px; font-size: .72rem; font-weight: 700;
  margin-top: .35rem; letter-spacing: .03em;
}
.role-badge-presidenta { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.role-badge-tesorera   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.role-badge-fiscal     { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.role-badge-secretaria { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.role-badge-admin      { background: #1E40AF; color: white; border: 1px solid #1E3A8A; }
.role-badge-miembro    { background: var(--bg2); color: var(--text2); border: 1px solid var(--border2); }
.role-badge-observador { background: #F3F4F6; color: #6B7280; border: 1px solid #D1D5DB; }

.social-profile-actions { display: flex; gap: .5rem; align-items: flex-start; padding-top: .6rem; flex-shrink: 0; }
.social-action-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .48rem 1rem; border-radius: 8px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .18s; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text2);
}
.social-action-btn:hover { border-color: var(--border2); background: var(--bg); color: var(--navy); }
.social-action-btn.primary { background: var(--red); color: white; border-color: var(--red); }
.social-action-btn.primary:hover { opacity: .9; }

/* Stats del perfil horizontal */
.social-profile-stats {
  display: flex; gap: 1.6rem; padding: .85rem 0 .3rem; flex-wrap: wrap;
}
.social-ps { text-align: center; }
.social-ps-val { font-family: var(--disp); font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.social-ps-lbl { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }

/* Tabs de perfil */
.social-tabs-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; gap: 0; padding: 0 1.8rem;
  position: sticky; top: var(--th); z-index: 10;
  margin-bottom: .8rem; border-radius: 0;
}
.social-tab-btn {
  padding: .9rem 1.1rem; font-size: .84rem; font-weight: 600; color: var(--muted);
  border: none; background: none; cursor: pointer; border-bottom: 2.5px solid transparent;
  transition: all .18s; white-space: nowrap; display: flex; align-items: center; gap: .35rem;
}
.social-tab-btn:hover { color: var(--navy); background: var(--bg); }
.social-tab-btn.active { color: var(--blue2); border-bottom-color: var(--blue2); }

.social-tab-pane { display: none; }
.social-tab-pane.active { display: block; }

/* Contenido de tabs en grid */
.social-content-grid {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 1rem; align-items: start;
}
@media(max-width:900px){ .social-content-grid { grid-template-columns: 1fr; } }

/* Sidebar derecho del perfil (About) */
.social-about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 1.2rem;
  position: sticky; top: calc(var(--th) + 56px);
}
.social-about-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .9rem; }
.social-about-item { display: flex; align-items: center; gap: .65rem; padding: .45rem 0; font-size: .84rem; color: var(--text2); border-bottom: 1px solid var(--border); }
.social-about-item:last-child { border-bottom: none; }
.social-about-item i { color: var(--muted); font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.social-about-item b { color: var(--navy); font-weight: 600; }

/* ═══════════════════════════════════════════════════
   FEED DE MOMENTOS — ESTILO WOWONDER
   ═══════════════════════════════════════════════════ */

.feed-composer {
  background: var(--surface); border-radius: var(--r2); border: 1px solid var(--border);
  padding: 1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--s1);
}
.feed-composer-top {
  display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem;
}
.feed-composer-av {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: white;
  background-size: cover; background-position: center;
}
.feed-composer-input {
  flex: 1; padding: .65rem 1rem; border: 1.5px solid var(--border);
  border-radius: 99px; font-family: var(--font); font-size: .88rem;
  color: var(--text); background: var(--bg); outline: none;
  cursor: pointer; transition: all .2s;
}
.feed-composer-input:focus { border-color: var(--red); background: var(--surface); border-radius: 12px; }
.feed-composer-actions {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding-top: .75rem; border-top: 1px solid var(--border);
}
.feed-composer-action {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border-radius: 8px; border: none;
  background: none; font-size: .8rem; font-weight: 600; cursor: pointer;
  color: var(--text2); transition: background .15s, color .15s;
}
.feed-composer-action:hover { background: var(--bg); color: var(--navy); }
.feed-composer-action i { font-size: 1rem; }
.feed-composer-expand {
  width: 100%; margin-top: .7rem; padding: .65rem 1rem;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-family: var(--font); font-size: .88rem; background: var(--bg);
  color: var(--text); resize: vertical; outline: none; transition: border .2s;
  min-height: 80px;
}
.feed-composer-expand:focus { border-color: var(--red); background: var(--surface); }
/* Publish button distinct style */
.feed-composer-publish {
  margin-left: auto;
  background: var(--red) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: .45rem 1.1rem !important;
  font-weight: 700 !important;
  transition: opacity .15s, transform .1s !important;
}
.feed-composer-publish:hover { opacity: .88 !important; transform: translateY(-1px) !important; background: var(--red) !important; color: white !important; }

/* Post card */
.feed-post {
  background: var(--surface); border-radius: var(--r2); border: 1px solid var(--border);
  box-shadow: var(--s1); margin-bottom: .9rem; overflow: hidden;
  animation: fadeUp .3s ease;
}

.feed-post-header {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.2rem .75rem;
}
.feed-post-av {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: white;
  background-size: cover; background-position: center;
  transition: transform .15s;
}
.feed-post-av:hover { transform: scale(1.06); cursor: pointer; }
.feed-post-meta { flex: 1; min-width: 0; }
.feed-post-author {
  font-size: .9rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  cursor: pointer;
}
.feed-post-author:hover { text-decoration: underline; }
.feed-post-time { font-size: .73rem; color: var(--muted); margin-top: .1rem; display: flex; align-items: center; gap: .3rem; }
.feed-post-time i { font-size: .75rem; }
.feed-post-menu {
  background: none; border: none; cursor: pointer; padding: .3rem;
  border-radius: 50%; color: var(--muted); font-size: 1rem;
  transition: background .15s; flex-shrink: 0;
}
.feed-post-menu:hover { background: var(--bg); color: var(--navy); }

.feed-post-text {
  padding: 0 1.2rem .9rem; font-size: .9rem; color: var(--text); line-height: 1.65;
  word-break: break-word;
}
.feed-post-media {
  width: 100%; max-height: 460px; object-fit: cover;
  display: block; cursor: zoom-in;
  transition: opacity .2s;
}
.feed-post-media:hover { opacity: .95; }
.feed-post-media-video { width: 100%; max-height: 420px; display: block; background: #000; }
.feed-post-media-wrap { position: relative; }
.feed-post-media-count {
  position: absolute; bottom: 10px; right: 12px;
  background: rgba(0,0,0,.6); color: white; font-size: .72rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 99px; backdrop-filter: blur(4px);
}

/* Reactions bar */
.feed-post-reactions {
  display: flex; align-items: center; gap: .35rem;
  padding: .5rem 1.2rem .4rem; font-size: .78rem; color: var(--muted);
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.feed-react-pile {
  display: flex; align-items: center; gap: .25rem; cursor: pointer;
  transition: transform .15s;
}
.feed-react-pile:hover { transform: scale(1.05); }
.feed-react-emoji { font-size: 1rem; }
.feed-react-count { font-size: .78rem; color: var(--text2); font-weight: 600; }
.feed-react-names { font-size: .73rem; color: var(--muted); margin-left: .1rem; }

/* Actions row */
.feed-post-actions {
  display: flex; gap: .3rem; padding: .4rem .7rem; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.feed-post-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem .5rem; border-radius: 8px; border: none; background: none;
  font-size: .82rem; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: background .15s, color .15s; min-width: 70px;
}
.feed-post-action:hover { background: var(--bg); color: var(--navy); }
.feed-post-action.reacted { color: var(--blue2); }
.feed-post-action i { font-size: 1rem; }

/* Quick reaction picker */
.feed-react-picker {
  position: relative; display: inline-flex;
}
.feed-react-options {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 99px; padding: .4rem .6rem;
  display: none; gap: .3rem; box-shadow: var(--s3); z-index: 200;
  animation: reactionPop .2s cubic-bezier(.34,1.56,.64,1);
}
.feed-react-options.open { display: flex; }
@keyframes reactionPop {
  from { transform: translateX(-50%) scale(.6) translateY(10px); opacity: 0; }
  to   { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
}
.react-opt {
  font-size: 1.3rem; cursor: pointer; border-radius: 50%;
  padding: .2rem; transition: transform .15s;
  display: flex; align-items: center;
}
.react-opt:hover { transform: scale(1.4); }

/* Comments section */
.feed-comments {
  padding: .5rem 1.2rem .9rem; border-top: 1px solid var(--border);
  display: none;
}
.feed-comments.open { display: block; }
.feed-comment-input-row {
  display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem;
}
.feed-comment-av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: white;
  background-size: cover; background-position: center;
}
.feed-comment-input {
  flex: 1; padding: .5rem .9rem; border-radius: 99px;
  border: 1.5px solid var(--border); background: var(--bg);
  font-family: var(--font); font-size: .83rem; outline: none; color: var(--text);
  transition: border .2s;
}
.feed-comment-input:focus { border-color: var(--red); }
.feed-comment-send {
  background: var(--red); color: white; border: none; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; flex-shrink: 0;
}
.feed-comment-send:hover { background: var(--red2); }

.feed-comment {
  display: flex; gap: .6rem; margin-bottom: .65rem; align-items: flex-start;
}
.feed-comment-bubble {
  background: var(--bg); border-radius: 12px 12px 12px 4px;
  padding: .5rem .85rem; flex: 1;
}
.feed-comment-author { font-size: .78rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: .25rem; }
.feed-comment-text { font-size: .82rem; color: var(--text2); margin-top: .15rem; line-height: 1.5; }
.feed-comment-time { font-size: .68rem; color: var(--muted); margin-top: .2rem; }
.feed-comment-del {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: .8rem; padding: .2rem; border-radius: 4px; opacity: 0;
  transition: opacity .15s, color .15s;
}
.feed-comment:hover .feed-comment-del { opacity: 1; }
.feed-comment-del:hover { color: var(--red); }

/* Empty feed */
.feed-empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted);
  background: var(--surface); border-radius: var(--r2); border: 1px dashed var(--border2);
}
.feed-empty-ic { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }
.feed-empty p { font-size: .88rem; margin-top: .3rem; }

/* verify badge overrides handled above */

/* ── SEGUIDORES / FOLLOWERS (Instagram-style) ── */
.social-ps-followers .social-ps-val {
  color: var(--red);
}
.social-ps { cursor: default; }
.social-ps:hover .social-ps-val { color: var(--blue2); }

/* ── PUBLIC PROFILE MODAL ── */
.pub-profile-overlay {
  position: fixed; inset: 0; background: rgba(10,20,40,.55);
  backdrop-filter: blur(4px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: mIn .22s ease;
}
.pub-profile-modal {
  background: var(--surface); border-radius: var(--r2);
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; overflow-x: visible; box-shadow: 0 20px 60px rgba(0,0,0,.28);
  position: relative;
}
.pub-profile-cover-sm {
  height: 130px; border-radius: var(--r2) var(--r2) 0 0;
  background: linear-gradient(135deg, var(--navy), var(--blue2));
  position: relative; overflow: visible;
}
.pub-profile-close {
  position: absolute; top: .6rem; right: .6rem;
  background: rgba(0,0,0,.4); color: white; border: none;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: background .15s; z-index: 1;
}
.pub-profile-close:hover { background: rgba(0,0,0,.65); }
.pub-profile-body { padding: 0 1.4rem 1.4rem; }
.pub-profile-av-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-top: .3rem; margin-top: -48px; margin-bottom: .8rem; position: relative; z-index: 1;
}
.pub-profile-av {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--surface); box-shadow: 0 4px 18px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.7rem; font-weight: 800; color: white;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.pub-profile-name-row {
  font-family: var(--disp); font-size: 1.15rem; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
}
.pub-profile-handle { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.pub-profile-stats {
  display: flex; gap: 1.4rem; padding: .75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: .8rem 0;
}
.pub-ps { text-align: center; }
.pub-ps-val { font-family: var(--disp); font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.pub-ps-lbl { font-size: .64rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }

/* ── WELCOME SPLASH PUPPY ── */
.ws-puppy-scene {
  position: relative; display: flex; flex-direction: column; align-items: center;
  animation: puppyEnter .6s cubic-bezier(.175,.885,.32,1.275) both;
}
@keyframes puppyEnter { from { transform: translateX(-80px) scale(.7); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }

.ws-puppy {
  animation: puppyRun 3s ease-in-out infinite, puppyBounce .35s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.35));
}
@keyframes puppyRun { 0%,100% { transform: translateX(0); } 30% { transform: translateX(18px); } 60% { transform: translateX(-12px); } }
@keyframes puppyBounce { from { transform: translateY(0); } to { transform: translateY(-6px); } }

.ws-puppy .ws-leg-f { animation: legSwingF .35s ease-in-out infinite alternate; transform-origin: 81px 62px; }
.ws-puppy .ws-leg-b { animation: legSwingB .35s ease-in-out infinite alternate; transform-origin: 47px 60px; }
@keyframes legSwingF { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes legSwingB { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }

.ws-puppy .ws-tail { animation: tailWag .2s ease-in-out infinite alternate; transform-origin: 34px 48px; }
@keyframes tailWag { from { transform: rotate(-25deg); } to { transform: rotate(25deg); } }

.ws-puppy .ws-ear { animation: earFlap .35s ease-in-out infinite alternate; transform-origin: 96px 19px; }
@keyframes earFlap { from { transform: rotate(10deg); } to { transform: rotate(35deg); } }

.ws-puppy .ws-tongue { animation: tonguePant .35s ease-in-out infinite alternate; transform-origin: 108px 41px; }
@keyframes tonguePant { from { transform: rotate(10deg) scaleY(.8); } to { transform: rotate(20deg) scaleY(1.1); } }

.ws-ground-line {
  width: 200px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.12); overflow: hidden; margin-top: 4px;
}
.ws-ground-dots {
  width: 200%; height: 100%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0px, rgba(255,255,255,.25) 8px, transparent 8px, transparent 20px);
  animation: groundScroll .4s linear infinite;
}
@keyframes groundScroll { from { transform: translateX(0); } to { transform: translateX(-28px); } }

/* ── WELCOME SPLASH ── */
.welcome-splash {
  position: fixed; inset: 0; z-index: 3000;
  background: linear-gradient(135deg, #0F1F3D 0%, #162847 50%, #0d1a30 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 2rem;
  animation: wsIn .4s ease;
}
@keyframes wsIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wsOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.04); } }
.welcome-splash.hiding { animation: wsOut .45s ease forwards; }

.ws-logo-hex {
  width: 80px; height: 80px; border-radius: 22px;
  background: linear-gradient(135deg, var(--red), #991111);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.9rem; font-weight: 900; color: white;
  box-shadow: 0 12px 40px rgba(220,38,38,.45);
  animation: wsLogoIn .6s cubic-bezier(.175,.885,.32,1.275) .15s both;
}
@keyframes wsLogoIn { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

.ws-greeting {
  text-align: center;
  animation: wsFadeUp .5s ease .3s both;
}
@keyframes wsFadeUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ws-greeting h2 {
  font-family: var(--disp); font-size: 1.6rem; font-weight: 800; color: white;
  line-height: 1.25; margin-bottom: .4rem;
}
.ws-greeting p { font-size: .88rem; color: rgba(255,255,255,.55); }

.ws-role-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1.2rem; border-radius: 99px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  animation: wsFadeUp .5s ease .5s both;
}
.ws-features {
  display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center;
  animation: wsFadeUp .5s ease .65s both;
}
.ws-feat {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: .35rem .85rem;
  font-size: .73rem; color: rgba(255,255,255,.7); font-weight: 500;
  display: flex; align-items: center; gap: .35rem;
}
.ws-member-note {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: .65rem 1.1rem;
  font-size: .78rem; color: rgba(255,255,255,.6); text-align: center;
  max-width: 360px; line-height: 1.5;
  animation: wsFadeUp .5s ease .75s both;
}
.ws-dots {
  display: flex; gap: .45rem; animation: wsFadeUp .5s ease .85s both;
}
.ws-dot { width: 8px; height: 8px; border-radius: 50%; animation: wsDotPulse 1.2s ease-in-out infinite; }
.ws-dot:nth-child(2) { animation-delay: .2s; }
.ws-dot:nth-child(3) { animation-delay: .4s; }
@keyframes wsDotPulse { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* ── PERFIL: edición en tabs ── */
.perfil-edit-section { padding: 1.2rem 0; }
.perfil-edit-section h4 { font-family: var(--disp); font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; display: flex; align-items: center; gap: .4rem; }

/* ── TOPBAR THEME ICON ── */
#theme-toggle-btn { margin-right: -.2rem; }

/* ── WoWonder-style Theme Customizer Panel ── */
.theme-panel {
  display: none; position: absolute; top: calc(var(--th) + 8px); right: 3.5rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r2); box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
  padding: 0; z-index: 400; min-width: 240px;
  animation: mIn .2s cubic-bezier(.34,1.4,.64,1);
  overflow: hidden;
}
.theme-panel.open { display: block; }
.theme-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem .6rem; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.theme-panel-title {
  font-size: .78rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: .4rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.theme-panel-title i { font-size: .9rem; }
.theme-panel-close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; transition: background .15s, color .15s;
}
.theme-panel-close:hover { background: var(--border); color: var(--text); }
.theme-panel-section-title {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); padding: .7rem 1rem .35rem;
}
.theme-options-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem;
  padding: 0 .9rem .8rem;
}
.theme-opt {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .5rem .3rem .4rem; border-radius: 10px; border: 2px solid var(--border);
  cursor: pointer; transition: all .18s; background: var(--bg);
  font-size: .65rem; font-weight: 600; color: var(--text2); text-align: center;
}
.theme-opt:hover { border-color: var(--navy); transform: translateY(-1px); }
.theme-opt.active { border-color: var(--red); background: var(--surface); color: var(--navy); box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.theme-opt-swatch {
  width: 36px; height: 36px; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
/* Accent dots row */
.theme-accent-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: 0 1rem 1rem;
}
.theme-accent-dot {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2.5px solid transparent; transition: transform .15s, border-color .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.theme-accent-dot:hover { transform: scale(1.25); }
.theme-accent-dot.active { border-color: white; box-shadow: 0 0 0 3px rgba(0,0,0,.2), 0 1px 4px rgba(0,0,0,.2); transform: scale(1.15); }


/* ── Ajustes para .sec del perfil sin padding-top extra ── */
#s-perfil { padding: 0 !important; }
#s-perfil .social-profile-layout { padding: 0; }
#s-perfil .social-tab-pane.active { padding: 1rem 1.4rem 1.4rem; }
@media(max-width:640px) {
  #s-perfil .social-tab-pane.active { padding: .8rem; }
  .social-profile-meta { padding-left: 0; margin-top: 3.5rem; }
  .social-profile-av-wrap { top: -44px; width: 84px; height: 84px; }
  .social-profile-av { width: 84px; height: 84px; }
  .social-profile-actions { flex-wrap: wrap; }
  .social-profile-stats { gap: .9rem; }
}

/* ── Mejorar la sección momentos ── */
#s-momentos .feed-composer { max-width: 680px; margin-left: auto; margin-right: auto; }

/* ── Sidebar tema oscuro fix ── */
body.theme-dark .sb-logo { border-bottom-color: rgba(255,255,255,.06); }
body.theme-dark .sb-section { color: rgba(255,255,255,.25); }
body.theme-dark .ni { color: rgba(255,255,255,.55); }
body.theme-dark .ni.active { background: rgba(255,255,255,.08); }
body.theme-dark .sb-uinfo small { color: rgba(255,255,255,.35); }
body.theme-dark .sb-out-btn { color: rgba(255,255,255,.3); }
body.theme-dark .sb-logout-btn { background: rgba(220,38,38,.1); color: rgba(255,255,255,.6); }
body.theme-dark .login-right { background: rgba(28,33,40,.98); }
body.theme-dark .login-right .tab-pane h3, body.theme-dark .tab-pane h3 { color: #e6edf3; }
body.theme-dark .fg label { color: #e6edf3; }

/* ── Theme panel responsive ── */
@media(max-width:640px) { .theme-panel { right: .5rem; min-width: 220px; } }


/* ═══════════════════════════════════════════
   SUGERIDOS / PARA SEGUIR — Estilo WoWonder
══════════════════════════════════════════ */
.suggest-section { padding: 0; }
.suggest-title {
  font-size: .74rem; font-weight: 800; color: var(--text2);
  text-transform: uppercase; letter-spacing: .07em;
  padding: .85rem 1rem .6rem; display: flex; align-items: center; gap: .4rem;
  border-bottom: 1px solid var(--border);
}
.suggest-title i { color: var(--blue2); }
.suggest-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; cursor: pointer;
  transition: background .14s;
  border-bottom: 1px solid var(--border);
}
.suggest-card:last-child { border-bottom: none; }
.suggest-card:hover { background: var(--bg); }
.suggest-av {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: .9rem; font-weight: 800; color: white;
  border: 2.5px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-name {
  font-size: .82rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-rol {
  font-size: .7rem; font-weight: 600; margin-top: .05rem;
}
.suggest-stats {
  font-size: .67rem; color: var(--muted); margin-top: .05rem;
}
.suggest-follow-btn {
  flex-shrink: 0;
  background: var(--blue2); color: white;
  border: none; border-radius: 20px; cursor: pointer;
  padding: .3rem .7rem; font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; gap: .3rem;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.suggest-follow-btn:hover { background: var(--navy); transform: scale(1.04); }

/* ══ TOOLTIP GLOBAL VERIFY ══ */
#verify-tooltip-global {
  position: fixed;
  background: #0F1F3D; color: white;
  padding: .5rem .85rem; border-radius: 10px;
  pointer-events: none;
  opacity: 0; transition: opacity .18s;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: .15rem; min-width: 140px;
}
#verify-tooltip-global.visible { opacity: 1; }
#verify-tooltip-global::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #0F1F3D;
}

/* ══ SUGERIDO DESTACADO (featured card estilo IG) ══ */
.suggest-featured {
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  transition: background .14s;
}
.suggest-featured:hover { background: var(--bg); }
.suggest-feat-cover {
  height: 72px;
  background: linear-gradient(135deg, var(--navy), var(--blue2));
}
.suggest-feat-body {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .7rem 1rem .9rem;
  position: relative;
}
.suggest-feat-body .suggest-av {
  margin-top: -28px;
  border: 3px solid var(--surface);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.suggest-feat-info { flex: 1; min-width: 0; padding-top: .1rem; }
.suggest-feat-name {
  font-size: .88rem; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
}
.suggest-feat-rol {
  font-size: .72rem; font-weight: 600; margin-top: .08rem;
}
.suggest-feat-stats {
  font-size: .68rem; color: var(--muted); margin-top: .2rem;
  display: flex; gap: .4rem;
}
.suggest-follow-featured {
  padding: .35rem .9rem !important;
  font-size: .74rem !important;
  align-self: flex-end;
}

/* ═══════════════════════════════════════════
   DASHBOARD 2-COLUMNAS TIPO WOWONDER/IG
═══════════════════════════════════════════ */
.dash-social-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.4rem;
  align-items: start;
}
.dash-main-col { min-width: 0; }
.dash-side-col {
  position: sticky;
  top: calc(var(--th) + 1rem);
}
@media(max-width: 1100px) {
  .dash-social-layout { grid-template-columns: 1fr; }
  .dash-side-col { position: static; }
}

/* ══ WIDGET DE SUGERIDOS ══ */
.suggest-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: var(--s1);
}
.suggest-widget .suggest-title {
  font-size: .72rem; font-weight: 800; color: var(--text2);
  text-transform: uppercase; letter-spacing: .08em;
  padding: .9rem 1rem .65rem;
  display: flex; align-items: center; gap: .4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.suggest-widget .suggest-title i { color: #D97706; font-size: .9rem; }

/* Card featured (primer usuario) */
.suggest-featured {
  cursor: pointer;
  transition: background .14s;
  border-bottom: 1px solid var(--border);
}
.suggest-featured:hover .suggest-feat-body { background: var(--bg); }
.suggest-feat-cover {
  height: 70px;
  background: linear-gradient(135deg, var(--navy), var(--blue2));
  position: relative;
}
.suggest-feat-body {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .65rem .9rem .85rem;
  transition: background .14s;
}
.suggest-feat-av {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  margin-top: -26px;
  border: 3px solid var(--surface);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; color: white;
  font-size: .95rem;
  background-size: cover; background-position: center;
}
.suggest-feat-info { flex: 1; min-width: 0; padding-top: .05rem; }
.suggest-feat-name {
  font-size: .85rem; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
  line-height: 1.3;
}
.suggest-feat-rol { font-size: .7rem; font-weight: 600; margin-top: .06rem; }
.suggest-feat-stats {
  display: flex; gap: .35rem; font-size: .66rem; color: var(--muted); margin-top: .2rem;
}
.suggest-feat-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: .4rem;
  padding-top: .05rem; flex-shrink: 0;
}
.suggest-btn-follow {
  background: var(--blue2); color: white; border: none;
  border-radius: 20px; padding: .32rem .8rem;
  font-size: .7rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap; transition: background .15s, transform .1s;
}
.suggest-btn-follow:hover { background: var(--navy); transform: scale(1.04); }
.suggest-btn-view {
  background: transparent; color: var(--blue2);
  border: 1.5px solid var(--blue2);
  border-radius: 20px; padding: .28rem .75rem;
  font-size: .68rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap; transition: all .15s;
}
.suggest-btn-view:hover { background: var(--blue2); color: white; }

/* Filas compactas */
.suggest-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
  transition: background .13s; cursor: pointer;
}
.suggest-row:last-child { border-bottom: none; }
.suggest-row:hover { background: var(--bg); }
.suggest-row-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; color: white;
  font-size: .78rem;
  background-size: cover; background-position: center;
}
.suggest-row-info { flex: 1; min-width: 0; }
.suggest-row-name {
  font-size: .8rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: .28rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-row-rol { font-size: .67rem; font-weight: 600; margin-top: .03rem; }
.suggest-row-stats { font-size: .63rem; color: var(--muted); margin-top: .02rem; }

/* ── BOTÓN SEGUIR en pub-profile-overlay ── */
.pub-follow-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--navy); color: white;
  border: none; border-radius: 22px;
  padding: .52rem 1.3rem; font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: all .18s; width: 100%;
  justify-content: center; margin-top: .3rem;
}
.pub-follow-btn:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(30,64,175,.22); }
.pub-follow-btn.following { background: #E5E7EB; color: var(--text); }
.pub-follow-btn.following:hover { background: #FEE2E2; color: #DC2626; }
.pub-admin-note { display:inline-flex;align-items:center;gap:.35rem;background:#FEF3C7;border:1px solid #FDE68A;border-radius:20px;padding:.25rem .75rem;font-size:.75rem;font-weight:600;color:#D97706;margin:.4rem 0; }

/* ── PERRITO BIENVENIDA ── */
.dog-welcome-wrap {
  display: flex; align-items: center; gap: .9rem;
  margin: .6rem 0 .2rem;
}
.dog-svg-wrap {
  flex-shrink: 0; width: 72px; height: 72px;
  animation: dogBounce 1.2s ease-in-out infinite alternate;
}
.dog-svg { width: 100%; height: 100%; }
@keyframes dogBounce {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-6px) rotate(3deg); }
}
/* Cola animada */
.dog-svg path[fill="#D97706"]:last-of-type {
  transform-origin: 88px 72px;
  animation: tailWag .5s ease-in-out infinite alternate;
}
@keyframes tailWag {
  0% { transform: rotate(-18deg); }
  100% { transform: rotate(18deg); }
}
.dog-speech { display: flex; align-items: center; gap: 0; }
.dog-speech-bubble {
  background: white; border: 1.5px solid var(--border2);
  border-radius: 14px 14px 14px 4px;
  padding: .5rem .85rem; box-shadow: 0 2px 10px rgba(0,0,0,.08);
  min-width: 150px;
}
.dog-speech-text { font-size: .9rem; font-weight: 700; color: var(--navy); }
.dog-speech-sub { font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.dog-speech-tip {
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid var(--border2);
  margin-left: -2px;
  order: -1;
}

/* ── MOMENTOS HOME LAYOUT ── */
.momentos-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .momentos-home-layout { grid-template-columns: 1fr; }
  .momentos-side-col { display: none; }
}
.momentos-main-col { min-width: 0; }
.momentos-side-col { position: sticky; top: 1rem; }

/* Cards del sidebar de momentos */
.momentos-info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--s1);
}
.mic-cover {
  height: 75px;
  background: linear-gradient(135deg, var(--navy) 0%, #1E40AF 60%, #DC2626 100%);
  display: flex; align-items: center; justify-content: center;
}
.mic-logo-hex {
  width: 44px; height: 44px; background: white; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 900; font-size: 1rem;
  color: var(--navy); box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.mic-body { padding: .75rem 1rem .9rem; }
.mic-title { font-weight: 800; color: var(--navy); font-size: .92rem; }
.mic-sub { font-size: .72rem; color: var(--muted); margin-bottom: .45rem; }
.mic-desc { font-size: .78rem; color: var(--text2); line-height: 1.5; margin-bottom: .65rem; }
.mic-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .3rem; margin-bottom: .65rem; }
.mic-stat { background: var(--bg); border-radius: 8px; padding: .45rem .3rem; text-align: center; border: 1px solid var(--border); }
.mic-stat-val { font-size: .88rem; font-weight: 800; color: var(--navy); }
.mic-stat-lbl { font-size: .6rem; color: var(--muted); font-weight: 600; }
.mic-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.mic-pill { display: inline-flex; align-items: center; gap: .28rem; background: var(--bg); border: 1px solid var(--border2); border-radius: 20px; padding: .22rem .62rem; font-size: .7rem; color: var(--text2); }
.mic-member-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; border-radius: 6px; padding-left:.2rem; }
.mic-member-row:last-child { border-bottom: none; }
.mic-member-row:hover { background: var(--bg); }
.mic-member-av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: .73rem; background-size: cover; background-position: center; }
.mic-member-info { flex: 1; min-width: 0; }
.mic-member-name { font-size: .8rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: .25rem; }
