/* ════════════════════════════════════════════════════
   BABADITOS COLOMBIA — Design System v5
   Oscuro por defecto · [data-theme="light"] como alternativa
════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ════════════════════════════════════════════════════
   PALETA "GRAFITO + ÍNDIGO SUAVE" (neutral, oscuro por defecto)
   Fondos grafito gris-azulado · Acento índigo apagado · Glassmorphism
════════════════════════════════════════════════════ */
:root {
    /* ---- Primario índigo apagado (neutral) ---- */
    --primary:        #6E78C4;
    --primary-dark:   #565FA8;   /* parada profunda para gradientes */
    --primary-light:  #818BD4;   /* hover */
    --primary-dim:    rgba(110, 120, 196, 0.12);
    --primary-glow:   rgba(110, 120, 196, 0.28);
    --primary-border: rgba(110, 120, 196, 0.30);

    /* ---- Secundario / accent ---- */
    --secondary:      #565FA8;
    --secondary-hover:#818BD4;
    --accent-purple:  #8089C9;
    --icon:           #A6AEDB;

    /* Gradientes de marca (índigo sobrio) */
    --grad-brand:       linear-gradient(135deg, #6E78C4, #565FA8);
    --grad-brand-hover: linear-gradient(135deg, #818BD4, #6E78C4);
    --grad-brand-2:     linear-gradient(135deg, #6E78C4, #8089C9);
    --grad-hero:        linear-gradient(135deg, #6E78C4 0%, #565FA8 100%);

    --coral:          #6E78C4;
    --coral-dim:      rgba(110, 120, 196, 0.12);
    --golden:         #F59E0B;
    --golden-dim:     rgba(245, 158, 11, 0.14);

    /* ---- Superficies (grafito neutral) ---- */
    --bg-void:        #0A0C11;
    --bg-base:        #0F1218;   /* fondo principal */
    --bg-raised:      #161B23;   /* sidebars / secundario */
    --bg-card:        #1D232D;   /* cards / mensajes / modales */
    --bg-hover:       #252C38;
    --bg-input:       #141923;
    --bg-glass:       rgba(29, 35, 45, 0.66);

    /* ---- Estados ---- */
    --green:          #22C55E;
    --green-dim:      rgba(34, 197, 94, 0.14);
    --red:            #EF4444;
    --red-dim:        rgba(239, 68, 68, 0.14);
    --amber:          #F59E0B;
    --amber-dim:      rgba(245, 158, 11, 0.14);
    --blue:           #6E78C4;
    --violet:         #8089C9;
    --violet-dim:     rgba(128, 137, 201, 0.14);

    /* ---- Texto ---- */
    --text-primary:   #E7E9EF;
    --text-secondary: #9AA2B1;
    --text-muted:     #6B7280;   /* placeholders */

    /* ---- Bordes suaves (sombras > bordes) ---- */
    --border:         rgba(42, 49, 60, 0.85);
    --border-accent:  rgba(110, 120, 196, 0.30);

    --shadow-sm:      0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-md:      0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg:      0 24px 60px rgba(0, 0, 0, 0.55);
    --shadow-glow:    0 0 25px rgba(110, 120, 196, 0.12);
    --shadow-card:    0 8px 28px rgba(0, 0, 0, 0.40), inset 0 0 0 1px rgba(128, 137, 201, 0.06);

    --sidebar-w:      280px;
    --header-h:       60px;
    --navbar-h:       48px;
    --r-sm:           10px;
    --r:              14px;
    --r-lg:           16px;
    --r-xl:           22px;
    --r-pill:         50px;
    --font-display:   'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body:      'Inter', system-ui, sans-serif;
    --transition:     cubic-bezier(0.22, 1, 0.36, 1);

    /* Compat aliases — JS/old CSS may reference these */
    --accent:         var(--primary);
    --accent-dark:    var(--primary-dark);
    --accent-dim:     var(--primary-dim);
    --accent-glow:    var(--primary-glow);
    --accent-border:  var(--primary-border);
}

/* ════════ VARIANTE CLARA (toggle opcional) — lavanda premium, sin blanco puro ════════ */
[data-theme="light"] {
    --bg-void:        #E7DEF2;
    --bg-base:        #F1EBF8;
    --bg-raised:      #F8F4FC;
    --bg-card:        #FFFFFF;
    --bg-hover:       #EEE6F7;
    --bg-input:       #F3EDFA;
    --bg-glass:       rgba(248, 244, 252, 0.78);

    --text-primary:   #241433;
    --text-secondary: #6B5680;
    --text-muted:     #9683AB;

    --border:         rgba(110, 120, 196, 0.18);
    --border-accent:  rgba(110, 120, 196, 0.28);

    --shadow-sm:      0 2px 8px rgba(20, 28, 45, 0.08);
    --shadow-md:      0 10px 28px rgba(20, 28, 45, 0.12);
    --shadow-lg:      0 24px 56px rgba(20, 28, 45, 0.16);
    --shadow-glow:    0 0 25px rgba(110, 120, 196, 0.14);
    --shadow-card:    0 6px 22px rgba(20, 28, 45, 0.10), inset 0 0 0 1px rgba(110, 120, 196, 0.06);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-raised); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }
* { scrollbar-color: var(--primary) var(--bg-raised); scrollbar-width: thin; }

/* ═══════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════ */
.login-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 60% 50% at 18% 22%, rgba(110, 120, 196, 0.14), transparent 60%),
        radial-gradient(ellipse 55% 50% at 82% 78%, rgba(110, 120, 196, 0.16), transparent 60%),
        radial-gradient(ellipse 50% 45% at 60% 40%, rgba(128, 137, 201, 0.08), transparent 55%),
        #0F0715;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.login-bg-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .22;
}
.orb-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, #6E78C4 0%, transparent 70%);
    top: -220px; left: -180px;
    animation: drift1 24s ease-in-out infinite;
}
.orb-2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #565FA8 0%, transparent 70%);
    bottom: -160px; right: -120px;
    animation: drift2 28s ease-in-out infinite;
}
.orb-3 { display: none; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,30px) scale(1.05); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-35px,-45px) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(25px,-30px); } }

.login-grid-pattern {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,.08) 1px, transparent 0);
    background-size: 42px 42px;
    pointer-events: none; z-index: 0;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
}

.login-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    background: rgba(29, 35, 45, 0.66);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid rgba(128, 137, 201, 0.14);
    border-radius: var(--r-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 40px rgba(110, 120, 196, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}
[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(110, 120, 196, 0.18);
    box-shadow: 0 30px 70px rgba(20, 28, 45, 0.28), 0 10px 24px rgba(20, 28, 45, 0.14);
}
.login-card::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #6E78C4, #565FA8, #8089C9, #6E78C4);
    background-size: 300% 100%;
    animation: gradientSlide 6s linear infinite;
}
@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.login-card-inner { padding: 2.25rem; }

.login-header { text-align: center; margin-bottom: 2rem; }
.logo { display: flex; align-items: center; justify-content: center; gap: .85rem; margin-bottom: .6rem; }
.logo-icon {
    width: 54px; height: 54px;
    border-radius: var(--r-lg);
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
    box-shadow: 0 10px 30px rgba(110, 120, 196, .40);
    transform: rotate(-3deg);
    transition: transform .3s var(--transition);
}
.logo:hover .logo-icon { transform: rotate(0deg) scale(1.05); }
.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.75rem; font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}
.logo-accent { background: linear-gradient(135deg, var(--primary), var(--coral)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.tagline { color: var(--text-secondary); font-size: .85rem; margin-top: .4rem; font-weight: 500; }
.tagline-flags { font-size: 1.4rem; margin-top: .3rem; }

.login-ad {
    background: var(--bg-input);
    border: 1px dashed var(--border);
    border-radius: var(--r);
    padding: .6rem 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.ad-placeholder {
    display: flex; align-items: center; justify-content: center;
    gap: .4rem; color: var(--text-muted); font-size: .72rem;
}

/* Auth Forms */
.auth-form { display: none; animation: formIn .3s var(--transition); }
.auth-form.active { display: block; }
@keyframes formIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: .72rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: .4rem;
}
.input-container { position: relative; }
.input-container i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .82rem; pointer-events: none;
    transition: color .2s;
}
.input-container input {
    width: 100%; padding: .75rem 1rem .75rem 2.5rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r); color: var(--text-primary);
    font-family: var(--font-body); font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
}
.input-container input::placeholder { color: var(--text-muted); }
.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim), 0 0 20px rgba(110, 120, 196,.1);
}
.input-container input:focus + i,
.input-container input:focus ~ i { color: var(--primary); }

.btn-primary {
    width: 100%; padding: .8rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none; border-radius: var(--r);
    color: #fff; font-family: var(--font-body);
    font-size: .9rem; font-weight: 700;
    letter-spacing: .02em; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: transform .2s var(--transition), box-shadow .2s, filter .15s;
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .5s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(110, 120, 196,.4);
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:active { transform: translateY(0); }

.auth-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: 1.3rem 0 .8rem; color: var(--text-muted); font-size: .75rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.auth-links {
    display: flex; align-items: center; justify-content: center;
    gap: .5rem; margin-top: 1.1rem; font-size: .82rem;
    color: var(--text-secondary);
}
.auth-links a {
    color: var(--primary-light); text-decoration: none;
    font-weight: 500; transition: color .2s;
}
.auth-links a:hover { color: #fff; }
.auth-sep { color: var(--text-muted); }
.auth-messages { font-size: .8rem; color: var(--red); margin-bottom: .75rem; }

/* ═══════════════════════════════════════════════════
   CHAT CONTAINER
═══════════════════════════════════════════════════ */
.chat-container {
    display: flex; flex-direction: column;
    height: 100vh; /* fallback */
    height: 100dvh; /* móvil: descuenta la barra del navegador para que el input no quede oculto */
    background: var(--bg-base);
}

.chat-header {
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.25rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: relative; z-index: 100; flex-shrink: 0;
}
.chat-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-dark), var(--primary), var(--coral), transparent);
    opacity: .4;
}

.header-left { display: flex; align-items: center; gap: .85rem; min-width: 190px; }
.mobile-menu-btn {
    display: none; background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--text-secondary);
    font-size: 1rem; cursor: pointer; padding: .35rem .5rem;
    transition: all .2s;
}
.mobile-menu-btn:hover { border-color: var(--primary); color: var(--primary); }

.app-brand { display: flex; align-items: center; gap: .55rem; }
.brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .88rem;
    box-shadow: 0 4px 12px rgba(110, 120, 196,.3);
}
.brand-name {
    font-size: .88rem; color: var(--text-secondary);
    font-family: var(--font-display); font-weight: 600;
}
.brand-name strong { color: var(--primary-light); font-weight: 700; }

.header-center { flex: 1; display: flex; align-items: center; justify-content: center; }
.current-room {
    display: flex; align-items: center; gap: .4rem;
    padding: .35rem 1rem;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    border-radius: var(--r-pill);
    font-size: .8rem; font-weight: 600;
    color: var(--primary-light);
}
.current-room i { color: var(--primary); font-size: .72rem; }

.header-right { display: flex; align-items: center; gap: .45rem; min-width: 190px; justify-content: flex-end; }

.icon-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--r); color: var(--text-secondary);
    cursor: pointer; font-size: .82rem;
    transition: all .2s var(--transition);
}
.icon-btn:hover {
    border-color: var(--primary-border);
    color: var(--primary);
    background: var(--primary-dim);
    transform: translateY(-1px);
}
.logout-btn:hover {
    border-color: var(--red); color: var(--red);
    background: var(--red-dim);
}

.admin-panel-btn {
    display: flex; align-items: center; gap: .4rem;
    padding: .35rem .9rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none; border-radius: var(--r-pill);
    color: #fff; font-size: .75rem; font-weight: 700;
    letter-spacing: .03em; cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(110, 120, 196,.3);
}
.admin-panel-btn:hover {
    box-shadow: 0 6px 20px rgba(110, 120, 196,.45);
    transform: translateY(-1px);
}

.user-profile { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; color: #fff;
    border: 2px solid var(--bg-raised);
    box-shadow: 0 0 0 1px var(--primary-border);
    flex-shrink: 0;
    transition: box-shadow .2s;
}
.user-profile:hover .user-avatar { box-shadow: 0 0 0 2px var(--primary); }
.user-details { display: flex; align-items: center; gap: .4rem; }
.username { font-size: .82rem; font-weight: 600; }
.user-status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); flex-shrink: 0;
    box-shadow: 0 0 8px var(--green);
    animation: pulse-status 2s ease-in-out infinite;
}
@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 4px var(--green); }
    50% { box-shadow: 0 0 12px var(--green); }
}
/* Variantes de estado del punto del usuario (arriba a la derecha) */
.user-status-dot.away { background: var(--amber, #f59e0b); box-shadow: 0 0 8px var(--amber, #f59e0b); animation: none; }
.user-status-dot.busy { background: var(--red, #ef4444); box-shadow: 0 0 8px var(--red, #ef4444); animation: none; }
.user-status-dot.invisible { background: var(--gray-500, #9ca3af); box-shadow: none; animation: none; }

/* ═══════════════════════════════════════════════════
   ROOMS NAVBAR
═══════════════════════════════════════════════════ */
.rooms-navbar {
    display: none;
    height: var(--navbar-h);
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; flex-shrink: 0;
}
.rooms-navbar::-webkit-scrollbar { display: none; }
.navbar-content {
    display: flex; align-items: center; gap: .4rem;
    padding: 0 1.1rem; height: 100%; min-width: max-content;
}

.main-room-tag, .room-tag, .private-chat-tag {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .85rem;
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: var(--r-pill);
    cursor: pointer; font-size: .78rem; font-weight: 500;
    color: var(--text-secondary); white-space: nowrap;
    transition: all .2s var(--transition); user-select: none;
}
.main-room-tag:hover, .room-tag:hover, .private-chat-tag:hover {
    border-color: var(--primary-border);
    color: var(--text-primary);
    background: var(--bg-hover);
}
.main-room-tag.active, .room-tag.active {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary-light);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(110, 120, 196,.15);
}
.main-room-tag i { color: var(--golden); font-size: .65rem; }

.room-tag-close, .private-chat-close {
    background: none; border: none; color: inherit;
    cursor: pointer; font-size: .62rem;
    width: 16px; height: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all .18s; margin-left: .15rem;
}
.room-tag-close:hover { background: var(--red-dim); color: var(--red); }

.add-rooms-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .85rem;
    background: none; border: 1px dashed var(--text-muted);
    border-radius: var(--r-pill);
    color: var(--text-muted); font-size: .78rem;
    cursor: pointer; transition: all .2s; white-space: nowrap;
}
.add-rooms-btn:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-dim); border-style: solid;
}

/* ═══════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════ */
.chat-main { display: flex; flex: 1; overflow: hidden; }

/* ── Icon navigation strip ── */
.icon-nav-strip {
    width: 60px;
    background: var(--bg-raised);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .75rem 0;
    gap: .25rem;
    flex-shrink: 0;
}
.icon-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    width: 48px;
    padding: .55rem 0;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--r);
    transition: all .2s var(--transition);
    position: relative;
}
.icon-nav-btn i {
    font-size: 1.1rem;
    transition: color .2s;
}
.icon-nav-btn span {
    font: 600 .58rem var(--font-body);
    letter-spacing: .02em;
    transition: color .2s;
}
.icon-nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.icon-nav-btn.active {
    color: var(--primary);
    background: var(--primary-dim);
}
.icon-nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-raised);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
.right-sidebar { border-right: none; border-left: 1px solid var(--border); transition: width .28s var(--transition), opacity .2s ease; }

/* Sidebar de conectados retráctil (escritorio): se colapsa con el botón del header */
body.users-collapsed .right-sidebar {
    width: 0; min-width: 0; opacity: 0; overflow: hidden; pointer-events: none; border-left: none;
}
#toggleUsersBtn.active { color: var(--primary); background: var(--primary-dim); }
/* El botón "cerrar" (X) del sidebar de conectados también sirve para colapsarlo en escritorio */
@media (min-width: 901px) { .right-sidebar .close-sidebar { display: flex; } }

.sidebar-header {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.sidebar-header h3 {
    font-family: var(--font-display);
    font-size: .72rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted);
    display: flex; align-items: center; gap: .4rem;
}
.sidebar-header h3 i { color: var(--primary); }

.close-sidebar {
    width: 26px; height: 26px;
    display: none; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--text-muted);
    cursor: pointer; font-size: .7rem; transition: all .18s;
}
.close-sidebar:hover { border-color: var(--red); color: var(--red); background: var(--red-dim); }

.sidebar-content {
    flex: 1; overflow-y: auto;
    padding: .75rem; display: flex; flex-direction: column; gap: .4rem;
}
.search-box { position: relative; margin-bottom: .5rem; }
.search-box i {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .72rem; pointer-events: none;
}
.search-box input {
    width: 100%; padding: .5rem .7rem .5rem 2rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: .78rem; transition: border-color .18s;
}
.search-box input:focus { outline: none; border-color: var(--primary); }

.private-chats-list, .users-list {
    display: flex; flex-direction: column; gap: .35rem;
}
.private-chat-item, .user-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .7rem;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--r);
    cursor: pointer;
    transition: all .2s var(--transition);
}
.private-chat-item:hover, .user-item:hover {
    border-color: var(--primary-border);
    background: var(--bg-hover);
    transform: translateX(2px);
}
.private-chat-item.active {
    border-color: var(--primary);
    background: var(--primary-dim);
    box-shadow: 0 2px 8px rgba(110, 120, 196,.1);
}
.private-chat-avatar, .user-item-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; color: #fff; flex-shrink: 0;
}
.private-chat-info { flex: 1; min-width: 0; }
.private-chat-name {
    font-weight: 600; font-size: .82rem; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.private-chat-preview {
    font-size: .7rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-item-name { flex: 1; font-size: .82rem; font-weight: 500; }
.user-item-status {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green); flex-shrink: 0;
}
.user-item-status.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.user-item-status.away { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.user-item-status.busy { background: var(--red); box-shadow: 0 0 6px var(--red); }

.empty-state {
    display: flex; flex-direction: column; align-items: center;
    gap: .4rem; padding: 2.5rem 1rem; text-align: center;
    color: var(--text-muted);
}
.empty-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary-dim);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--primary);
    margin-bottom: .3rem;
}
.empty-state p { font-size: .82rem; font-weight: 500; }
.empty-state small { font-size: .72rem; }

.ad-container.sidebar-ad { display: none; }

/* ── New sidebar sections ── */
.sidebar-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.sidebar-rooms-section {
    flex-shrink: 0;
    max-height: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sidebar-private-section {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}
.sidebar-private-section .private-chats-list {
    flex: 1;
    overflow-y: auto;
    padding: .5rem .75rem;
}
.left-sidebar {
    display: flex;
    flex-direction: column;
}
.left-sidebar .sidebar-header { display: none; }
.sidebar-section-header {
    padding: .7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.sidebar-section-header h3 {
    font-family: var(--font-display);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.sidebar-section-header h3 i { color: var(--primary); font-size: .72rem; }
.sidebar-add-btn {
    display: flex;
    align-items: center;
    gap: .3rem;
    background: none;
    border: none;
    color: var(--primary);
    font: 600 .72rem var(--font-body);
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: var(--r-sm);
    transition: background .2s;
}
.sidebar-add-btn:hover { background: var(--primary-dim); }

/* Rooms list in sidebar */
.sidebar-rooms-list {
    overflow-y: auto;
    padding: 0 .75rem .5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-room-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .7rem;
    border-radius: var(--r);
    cursor: pointer;
    transition: all .2s var(--transition);
    border: 1px solid transparent;
    overflow: hidden;
}
.sidebar-room-item:hover {
    background: var(--bg-hover);
}
/* Badge de mensajes no vistos (sala en la lista pero no activa). */
.sidebar-room-unread {
    flex-shrink: 0;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red, #ef4444);
    color: #fff; font-size: .7rem; font-weight: 800;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(239,68,68,.45);
    z-index: 2;
}
/* Si hay badge, la X de cerrar (que aparece al hover) no lo tapa. */
.sidebar-room-item:hover .sidebar-room-unread { display: none; }
.sidebar-room-item.active {
    background: var(--primary-dim);
    border-color: var(--primary-border);
}
.sidebar-room-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .8rem;
    flex-shrink: 0;
}
/* Foto de perfil de la sala como icono */
.sidebar-room-icon.has-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
/* Portada (banner) de la sala como fondo de la card */
.sidebar-room-item.has-banner > * { position: relative; z-index: 1; }
.sidebar-room-item.has-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--room-banner);
    background-size: cover;
    background-position: center;
    opacity: .32;
    z-index: 0;
}
.sidebar-room-item.has-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 55%, transparent) 55%, color-mix(in srgb, var(--bg-card) 18%, transparent) 100%);
    z-index: 0;
}
.sidebar-room-item.has-banner .sidebar-room-name { text-shadow: 0 1px 4px rgba(0,0,0,.65); }
.sidebar-room-item.has-banner.active { background: transparent; }
.sidebar-room-item.has-banner.active::after {
    background: linear-gradient(90deg, var(--primary-dim) 0%, color-mix(in srgb, var(--primary-dim) 60%, transparent) 70%, transparent 100%);
}
.sidebar-room-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-room-name {
    font: 600 .85rem var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-room-count {
    font: 400 .7rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.sidebar-room-count i { font-size: .6rem; }
.sidebar-room-close {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    flex-shrink: 0;
    opacity: 0;
    transition: all .2s;
}
.sidebar-room-item:hover .sidebar-room-close { opacity: 1; }
.sidebar-room-close:hover {
    background: rgba(239, 68, 68, .15);
    color: var(--red);
}

/* Sidebar user footer */
.sidebar-user-footer {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-card);
}
.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
}
.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.sidebar-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-user-name {
    font: 600 .82rem var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-status {
    font: 400 .7rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.sidebar-user-status .user-status-dot {
    width: 6px;
    height: 6px;
    animation: none;
    box-shadow: none;
}
.sidebar-settings-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    transition: all .2s;
}
.sidebar-settings-btn:hover {
    border-color: var(--primary-border);
    color: var(--primary);
    background: var(--primary-dim);
}

/* Right sidebar ad section */
.sidebar-ad-section {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
}
.sidebar-ad-content {
    padding: .75rem;
}
.ad-placeholder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 2rem 1rem;
    background: var(--primary-dim);
    border: 1px dashed var(--primary-border);
    border-radius: var(--r);
    color: var(--text-muted);
    font: 500 .78rem var(--font-body);
}
.ad-placeholder-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Right sidebar sections */
.right-sidebar {
    display: flex;
    flex-direction: column;
}
.right-sidebar > .sidebar-section:first-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.right-sidebar > .sidebar-section:first-child > .sidebar-content {
    flex: 1;
    overflow-y: auto;
}
.ad-content i { font-size: 1.1rem; color: var(--primary); opacity: .3; }

/* ── Private rooms & Ads sidebar sections ── */
.sidebar-pvrooms-section,
.sidebar-anuncios-section {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}
.sidebar-pvrooms-content,
.sidebar-anuncios-content {
    flex: 1;
    overflow-y: auto;
    padding: .5rem .75rem;
}
.ads-list-container {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

/* Ad tabs */
.sidebar-ad-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: .5rem;
    background: var(--bg-card);
    border-radius: var(--r);
    padding: 2px;
}
.ad-tab-btn {
    flex: 1;
    padding: .4rem .5rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font: 600 .72rem var(--font-body);
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
}
.ad-tab-btn:hover { color: var(--text-primary); }
.ad-tab-btn.active {
    background: var(--primary-dim);
    color: var(--primary);
}

/* ── Banner Ads (sidebar) ── */
.banner-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: .78rem;
}
.banner-empty-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary-dim);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--primary);
}
.banner-add-btn {
    display: flex; align-items: center; justify-content: center;
    gap: .4rem; width: 100%; padding: .5rem;
    margin-top: .5rem;
    background: var(--primary-dim);
    border: 1px dashed var(--primary-border);
    border-radius: var(--r-sm);
    color: var(--primary);
    font: 600 .75rem var(--font-body);
    cursor: pointer;
    transition: all .2s;
}
.banner-add-btn:hover {
    background: var(--primary);
    color: #fff;
    border-style: solid;
}
.banner-carousel {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--bg-input);
}
.banner-slides { position: relative; min-height: 120px; }
.banner-slide {
    display: none;
    animation: bannerFade .4s ease;
}
.banner-slide.active { display: block; }
@keyframes bannerFade { from { opacity: 0 } to { opacity: 1 } }
.banner-slide img {
    width: 100%; height: 140px;
    object-fit: cover; display: block;
}
.banner-slide-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: .3rem .5rem;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff; font-size: .7rem; font-weight: 600;
}
.banner-link { display: block; position: relative; text-decoration: none; }
.banner-nav {
    display: flex; align-items: center; justify-content: center;
    gap: .5rem; padding: .3rem;
    background: var(--bg-card);
}
.banner-nav-btn {
    width: 24px; height: 24px; border: none;
    background: var(--primary-dim); border-radius: 50%;
    color: var(--primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; transition: all .2s;
}
.banner-nav-btn:hover { background: var(--primary); color: #fff; }
.banner-counter { font-size: .7rem; color: var(--text-muted); }

/* ── Carrusel de banners (reutilizable: sidebar + login) ── */
.banner-carousel-host { position: relative; }
.banner-carousel:hover .banner-arrow { opacity: 1; }
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border: none; z-index: 3;
    background: rgba(0,0,0,.45); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: .72rem; opacity: 0;
    transition: opacity .25s, background .2s;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.banner-arrow:hover { background: var(--primary); }
.banner-arrow-prev { left: 8px; }
.banner-arrow-next { right: 8px; }
.banner-dots {
    position: absolute; bottom: 8px; left: 0; right: 0; z-index: 3;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.banner-dot {
    width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
    background: rgba(255,255,255,.55); cursor: pointer;
    transition: all .25s; box-shadow: 0 0 2px rgba(0,0,0,.5);
}
.banner-dot:hover { background: rgba(255,255,255,.85); }
.banner-dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* Variante para la pantalla de inicio / login */
.banner-carousel-login { border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.banner-carousel-login .banner-slides { min-height: 0; }
.banner-carousel-login .banner-slide img { height: 92px; }

/* Carrusel siempre visible en pantallas táctiles (sin hover) */
@media (hover: none) {
    .banner-arrow { opacity: 1; background: rgba(0,0,0,.35); }
}

/* ── Banner create modal ── */
.banner-upload-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .3rem; padding: 2rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--r);
    cursor: pointer; color: var(--text-muted);
    transition: border-color .2s;
}
.banner-upload-zone:hover { border-color: var(--primary); }
.banner-upload-zone i { font-size: 1.5rem; color: var(--primary); }
.banner-upload-zone p { margin: 0; font-size: .85rem; }
.banner-upload-zone small { font-size: .7rem; opacity: .7; }

.banner-plans { display: flex; flex-direction: column; gap: .4rem; }
.banner-plan-option {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer; transition: all .2s;
}
.banner-plan-option:hover,
.banner-plan-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-dim);
}
.banner-plan-option.popular {
    border-color: var(--amber);
    background: rgba(245, 158, 11,.05);
}
.banner-plan-option input[type="radio"] { accent-color: var(--primary); flex-shrink: 0; }
.banner-plan-info { display: flex; flex-direction: column; gap: .1rem; }
.banner-plan-name { font: 600 .82rem var(--font-body); color: var(--text-primary); }
.banner-plan-price { font: 700 .9rem var(--font-body); color: var(--primary); }
.banner-plan-badge {
    font-size: .6rem; font-weight: 700;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff; padding: 1px 6px; border-radius: 4px;
    width: fit-content;
}

/* ── Announcements Bar ── */
.announcements-bar {
    flex-shrink: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    z-index: 5;
}
.announcement-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .75rem;
}
.announcement-item i { font-size: .9rem; flex-shrink: 0; }
.announcement-content {
    flex: 1; display: flex; align-items: center; gap: .4rem;
    font-size: .78rem; color: var(--text-secondary);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.announcement-content strong { color: var(--text-primary); flex-shrink: 0; }
.announcement-dismiss {
    flex-shrink: 0; width: 24px; height: 24px;
    border: none; background: none;
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all .2s;
}
.announcement-dismiss:hover { background: var(--bg-input); color: var(--text-primary); }

.announcement-ticker {
    flex: 1; overflow: hidden; padding: .45rem 0;
}
.announcement-ticker-track {
    display: inline-flex; gap: 2rem;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}
.announcement-ticker-item {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; color: var(--text-secondary);
}
.announcement-ticker-item strong { color: var(--text-primary); }
.announcement-separator { color: var(--border); margin: 0 .5rem; }

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Ad card */
.ad-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .2s;
}
.ad-card:hover { border-color: var(--primary-border); }
.ad-card.premium { border-color: var(--amber); }
.ad-card.basic { border-color: var(--primary-border); }
.ad-card-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
}
.ad-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-card-body { padding: .6rem; }
.ad-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .3rem;
}
.ad-badge {
    font: 600 .62rem var(--font-body);
    padding: .15rem .4rem;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.ad-badge.premium { background: rgba(245, 158, 11,.15); color: var(--amber); }
.ad-badge.basic { background: var(--primary-dim); color: var(--primary); }
.ad-card-time { font: 400 .68rem var(--font-body); color: var(--text-muted); display: flex; align-items: center; gap: .2rem; }
.ad-card-title {
    font: 600 .82rem var(--font-body);
    color: var(--text-primary);
    margin: 0 0 .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-card-desc {
    font: 400 .72rem var(--font-body);
    color: var(--text-secondary);
    margin: 0 0 .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ad-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ad-card-author {
    font: 400 .68rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
}
.ad-card-actions { display: flex; gap: .3rem; }
.ad-contact-btn {
    padding: .3rem .6rem;
    border: none;
    background: var(--primary-dim);
    color: var(--primary);
    font: 600 .7rem var(--font-body);
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .25rem;
    transition: all .2s;
}
.ad-contact-btn:hover { background: var(--primary); color: #fff; }
.ad-delete-btn {
    padding: .3rem .5rem;
    border: none;
    background: rgba(239, 68, 68,.1);
    color: var(--red);
    font-size: .7rem;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all .2s;
}
.ad-delete-btn:hover { background: var(--red); color: #fff; }

/* Private room card */
.pvroom-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: .6rem;
    transition: border-color .2s;
}
.pvroom-card:hover { border-color: var(--primary-border); }
.pvroom-card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .3rem;
}
.pvroom-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
    flex-shrink: 0;
}
.pvroom-card-info { flex: 1; min-width: 0; }
.pvroom-card-name {
    font: 600 .82rem var(--font-body);
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pvroom-card-meta {
    font: 400 .68rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.pvroom-card-desc {
    font: 400 .72rem var(--font-body);
    color: var(--text-secondary);
    margin: 0 0 .3rem;
}
.pvroom-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pvroom-card-creator {
    font: 400 .68rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
}
.pvroom-card-actions { display: flex; gap: .3rem; }

/* ========== PRIVATE ROOMS PRO REDESIGN ========== */
.pvroom-card-pro {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, var(--border));
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.pvroom-card-pro:hover {
    border-color: var(--primary-border, var(--primary));
    box-shadow: 0 2px 12px rgba(110, 120, 196,0.1);
}

.pvroom-own {
    border-left: 3px solid var(--primary, var(--primary));
}

.pvroom-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pvroom-card-icon-pro {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary, var(--primary)), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pvroom-card-title-area {
    flex: 1;
    min-width: 0;
}

.pvroom-card-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pvroom-card-name-pro {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary, var(--text-primary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pvroom-plan-badge {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.pvroom-card-creator-pro {
    font-size: 0.72rem;
    color: var(--text-muted, var(--text-muted));
    display: flex;
    align-items: center;
    gap: 4px;
}

.pvroom-card-desc-pro {
    font-size: 0.78rem;
    color: var(--text-secondary, var(--text-secondary));
    margin: 0 0 8px;
    line-height: 1.4;
}

.pvroom-time-section {
    margin-bottom: 10px;
}

.pvroom-time-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-hover, #e9ecef);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pvroom-time-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pvroom-time-label {
    font-size: 0.68rem;
    color: var(--text-muted, var(--text-muted));
}

.pvroom-card-actions-pro {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.pvroom-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.pvroom-join-btn {
    background: var(--primary, var(--primary));
    color: #fff;
}

.pvroom-join-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.pvroom-settings-btn {
    background: var(--bg-hover, var(--bg-input));
    color: var(--text-secondary, var(--text-secondary));
}

.pvroom-settings-btn:hover {
    background: var(--bg-active, var(--border));
}

.pvroom-delete-btn {
    background: rgba(239, 68, 68,0.1);
    color: var(--red);
}

.pvroom-delete-btn:hover {
    background: var(--red);
    color: #fff;
}

.pvroom-register-btn {
    background: linear-gradient(135deg, var(--secondary), var(--accent-purple));
    color: #fff;
}

.pvroom-register-btn:hover {
    filter: brightness(1.1);
}

.pvroom-empty-state {
    text-align: center;
    padding: 30px 16px;
}

.pvroom-empty-icon {
    font-size: 2.5rem;
    color: var(--text-muted, var(--border));
    margin-bottom: 12px;
}

.pvroom-empty-state h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary, var(--text-primary));
}

.pvroom-empty-state p {
    font-size: 0.8rem;
    color: var(--text-secondary, var(--text-secondary));
    margin-bottom: 16px;
}

.pvroom-btn-create,
.pvroom-btn-register {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.pvroom-btn-create {
    background: var(--primary, var(--primary));
    color: #fff;
}

.pvroom-btn-create:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.pvroom-btn-register {
    background: linear-gradient(135deg, var(--secondary), var(--accent-purple));
    color: #fff;
}

.pvroom-btn-register:hover {
    filter: brightness(1.1);
}

/* Password modal */
.pvroom-password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.pvroom-password-modal {
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pvroom-password-modal h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.pvroom-password-modal p {
    font-size: 0.82rem;
    color: var(--text-secondary, var(--text-secondary));
    margin-bottom: 16px;
}

.pvroom-password-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border, var(--border));
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 14px;
    background: var(--bg-secondary, #f9f9f9);
    color: var(--text-primary, var(--text-primary));
    text-align: center;
    box-sizing: border-box;
}

.pvroom-password-input:focus {
    border-color: var(--primary, var(--primary));
    outline: none;
}

.pvroom-password-actions {
    display: flex;
    gap: 8px;
}

.pvroom-btn-join {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: var(--primary, var(--primary));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
}

.pvroom-btn-cancel {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border, var(--border));
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, var(--text-secondary));
    cursor: pointer;
    font-size: 0.85rem;
}

/* Settings modal toggles */
.pvroom-setting-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border, var(--border));
}

.pvroom-setting-item:last-child {
    border-bottom: none;
}

.pvroom-setting-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.85rem;
}

.pvroom-setting-label span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pvroom-setting-label span i {
    color: var(--primary, var(--primary));
    width: 18px;
    text-align: center;
}

.pvroom-setting-label-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.pvroom-setting-label-block span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pvroom-setting-label-block span i {
    color: var(--primary, var(--primary));
    width: 18px;
    text-align: center;
}

.pvroom-setting-number {
    width: 70px;
    padding: 4px 8px;
    border: 1px solid var(--border, var(--border));
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    background: var(--bg-secondary, #f9f9f9);
    color: var(--text-primary, var(--text-primary));
}

/* Dark mode for private rooms */
[data-theme="dark"] .pvroom-password-modal {
    background: var(--bg-primary, var(--bg-base));
}

[data-theme="dark"] .pvroom-password-input {
    background: var(--bg-secondary, var(--bg-raised));
    border-color: var(--border, var(--text-primary));
    color: var(--border);
}

[data-theme="dark"] .pvroom-setting-number {
    background: var(--bg-secondary, var(--bg-raised));
    border-color: var(--border, var(--text-primary));
    color: var(--border);
}

/* Ad chat messages */
.ad-chat-msg {
    display: flex;
    max-width: 82%;
    gap: 6px;
}
.ad-chat-msg.own { align-self: flex-end; flex-direction: column; align-items: flex-end; }
.ad-chat-msg.other { align-self: flex-start; flex-direction: row; align-items: flex-end; }
.ad-chat-msg-col { display: flex; flex-direction: column; min-width: 0; }
.ad-chat-msg.other .ad-chat-msg-col { align-items: flex-start; }
/* Foto de la persona con la que chateas, junto a sus mensajes. */
.ad-chat-msg-av { width: 28px !important; height: 28px !important; flex-shrink: 0; font-size: .8rem !important; }
.ad-chat-msg-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ad-chat-msg-bubble {
    padding: .45rem .7rem;
    border-radius: var(--r);
    font: 400 .82rem var(--font-body);
    word-break: break-word;
}
.ad-chat-msg.own .ad-chat-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ad-chat-msg.other .ad-chat-msg-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
.ad-chat-msg-time {
    font: 400 .62rem var(--font-body);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Ad chat history items */
.ad-chat-history-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .6rem;
    border-radius: var(--r);
    cursor: pointer;
    transition: background .2s;
}
.ad-chat-history-item:hover { background: var(--bg-hover); }
.ad-chat-history-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: .8rem;
    flex-shrink: 0;
}
.ad-chat-history-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.ad-chat-history-title {
    font: 600 .8rem var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-chat-history-user {
    font: 400 .7rem var(--font-body);
    color: var(--text-muted);
}
.ad-chat-history-last {
    font: 400 .68rem var(--font-body);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================================================
   Mensajería de anuncios estilo WhatsApp (ventana completa, no modal)
   - Escritorio: lista de conversaciones (izq.) + panel de chat (der.)
   - Móvil: pantalla completa; lista -> tocar -> chat con botón "atrás"
   =================================================================== */
.wa-messenger {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    background: var(--bg-base, var(--bg-card, #0f1320));
}
@keyframes waFade { from { opacity: 0; } to { opacity: 1; } }

.wa-sidebar {
    width: 360px;
    max-width: 38%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
}
.wa-sidebar-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-raised, var(--bg-card));
}
.wa-sidebar-header h2 {
    flex: 1;
    margin: 0;
    font: 700 1rem var(--font-body);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.wa-sidebar-header h2 i { color: var(--primary); }
.wa-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.wa-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.wa-search { padding: .55rem .75rem; border-bottom: 1px solid var(--border); }
.wa-search input {
    width: 100%;
    padding: .5rem .85rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
    font: 400 .82rem var(--font-body);
    outline: none;
}
.wa-search input:focus { border-color: var(--primary); }

.wa-list { flex: 1; overflow-y: auto; }

.wa-conv {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.wa-conv:hover { background: var(--bg-hover); }
.wa-conv.active { background: var(--primary-dim); }
.wa-conv-menu-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s;
}
.wa-conv:hover .wa-conv-menu-btn { opacity: 1; }
.wa-conv-menu-btn:hover { background: var(--bg-card); color: var(--text-primary); }
/* En pantallas táctiles el botón siempre visible (no hay hover) */
@media (hover: none) {
    .wa-conv-menu-btn { opacity: .7; }
}
.wa-conv-avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 1.15rem var(--font-body);
    text-transform: uppercase;
}
.wa-conv-body { flex: 1; min-width: 0; }
.wa-conv-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
}
.wa-conv-name {
    font: 600 .88rem var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-conv-time { font: 400 .66rem var(--font-body); color: var(--text-muted); flex-shrink: 0; }
.wa-conv-ad {
    display: block;
    font: 500 .7rem var(--font-body);
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-conv-last {
    display: block;
    font: 400 .76rem var(--font-body);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary, var(--bg-hover));
}
.wa-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}
.wa-chat-empty i { font-size: 3rem; opacity: .35; }
.wa-chat-empty p { margin: 0; font: 400 .9rem var(--font-body); }

.wa-chat-header {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-raised, var(--bg-card));
}
.wa-back {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .2rem .4rem;
}
.wa-chat-header .wa-conv-avatar { width: 40px; height: 40px; font-size: 1rem; }
.wa-chat-htext { flex: 1; min-width: 0; }
.wa-chat-hname { font: 600 .92rem var(--font-body); color: var(--text-primary); }
.wa-chat-hsub {
    font: 400 .72rem var(--font-body);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-hsub i { color: var(--primary); }

.wa-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.wa-composer {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--bg-raised, var(--bg-card));
}
.wa-composer input {
    flex: 1;
    padding: .6rem .95rem;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
    font: 400 .85rem var(--font-body);
    outline: none;
}
.wa-composer input:focus { border-color: var(--primary); }
.wa-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    transition: filter .15s;
}
.wa-send:hover { filter: brightness(1.1); }

/* Foto de perfil dentro del avatar circular */
.wa-conv-avatar { overflow: hidden; }
.wa-conv-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Zona del otro usuario en el encabezado: clicable para abrir acciones */
.wa-chat-peer {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: .2rem .4rem;
    border-radius: var(--r);
    transition: background .15s;
}
.wa-chat-peer:hover { background: var(--bg-hover); }
.wa-chevron { font-size: .6rem; color: var(--text-muted); margin-left: .2rem; }

/* Vista previa del anuncio sobre el que se conversa */
.wa-adcard {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .55rem .75rem;
    padding: .5rem .6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--r);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.wa-adcard:hover { background: var(--bg-hover); border-color: var(--primary); }
.wa-adcard-img {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.wa-adcard-img img { width: 100%; height: 100%; object-fit: cover; }
.wa-adcard-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wa-adcard-label {
    font: 600 .62rem var(--font-body);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.wa-adcard-title {
    font: 600 .82rem var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-adcard-sub { font: 500 .74rem var(--font-body); color: var(--text-secondary); }
.wa-adcard-arrow { color: var(--text-muted); font-size: .8rem; flex-shrink: 0; }

/* Móvil: una sola vista a pantalla completa, como WhatsApp en celular */
@media (max-width: 768px) {
    /* Altura dinámica: con inset:0 el composer quedaba bajo la barra del
       navegador/teclado. Se ancla arriba y se mide con dvh. */
    .wa-messenger { bottom: auto; height: 100vh; height: 100dvh; }
    .wa-sidebar { width: 100%; max-width: 100%; }
    .wa-chat { display: none; }
    .wa-messenger[data-view="chat"] .wa-sidebar { display: none; }
    .wa-messenger[data-view="chat"] .wa-chat { display: flex; }
    .wa-back { display: inline-flex; }
    /* El composer respeta la barra de inicio (home indicator) del teléfono. */
    .wa-composer { padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
}

/* ═══════════════════════════════════════════════════
   ANUNCIOS FULL PAGE
═══════════════════════════════════════════════════ */
.anuncios-page {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.anuncios-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    height: 56px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.anuncios-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.anuncios-back-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: all .2s;
}
.anuncios-back-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
.anuncios-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font: 600 1rem var(--font-display);
    color: var(--text-primary);
    white-space: nowrap;
}
.anuncios-brand i { color: var(--primary); font-size: 1.1rem; }
.anuncios-header-center { flex: 1; display: flex; justify-content: center; padding: 0 1rem; }
.anuncios-search-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 0 1rem;
    width: 100%;
    max-width: 500px;
    height: 38px;
    transition: border-color .2s;
}
.anuncios-search-box:focus-within { border-color: var(--primary); }
.anuncios-search-box i { color: var(--text-muted); font-size: .85rem; }
.anuncios-search-box input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    font: 400 .85rem var(--font-body);
    outline: none;
}
.anuncios-header-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.anuncios-my-btn {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .45rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: none;
    color: var(--text-secondary);
    font: 500 .78rem var(--font-body);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.anuncios-my-btn:hover { border-color: var(--primary); color: var(--primary); }
.anuncios-my-btn.highlight { border-color: var(--amber); color: var(--amber); }
.anuncios-my-btn.highlight:hover { background: rgba(245, 158, 11,.1); }
.anuncios-my-btn.danger { border-color: var(--red); color: var(--red); }
.anuncios-my-btn.danger:hover { background: rgba(239, 68, 68,.1); }
.anuncios-publish-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    border: none;
    border-radius: var(--r);
    background: var(--primary);
    color: #fff;
    font: 600 .82rem var(--font-body);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.anuncios-publish-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Categories bar */
.anuncios-categories {
    display: flex;
    gap: .35rem;
    padding: .65rem 1.5rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.anuncios-categories::-webkit-scrollbar { display: none; }
.anuncios-cat-btn {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .85rem;
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    background: none;
    color: var(--text-muted);
    font: 500 .78rem var(--font-body);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.anuncios-cat-btn:hover { border-color: var(--primary-border); color: var(--text-primary); }
.anuncios-cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.anuncios-cat-btn i { font-size: .75rem; }

/* Anuncios body */
.anuncios-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}
.anuncios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.anuncios-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: .9rem;
}
.anuncios-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}
.anuncios-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
}
.anuncios-empty h3 { font-size: 1.1rem; color: var(--text-primary); margin: 0; }
.anuncios-empty p { font-size: .85rem; margin: 0; }

/* Anuncio card */
.anuncio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all .25s var(--transition);
}
.anuncio-card:hover { border-color: var(--primary-border); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.anuncio-card.premium { border-color: rgba(245, 158, 11,.3); }
.anuncio-card.premium:hover { border-color: var(--amber); box-shadow: 0 8px 24px rgba(245, 158, 11,.1); }
.anuncio-card.basic { border-color: rgba(var(--primary-rgb, 99,102,241), .2); }
.anuncio-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}
.anuncio-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.anuncio-card:hover .anuncio-card-img img { transform: scale(1.05); }
.anuncio-card-noimg {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dim);
    color: var(--primary);
    font-size: 2rem;
    position: relative;
}
.anuncio-vis-badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    padding: .2rem .5rem;
    border-radius: var(--r-sm);
    font: 700 .6rem var(--font-body);
    letter-spacing: .05em;
    display: flex;
    align-items: center;
    gap: .2rem;
}
.anuncio-vis-badge.premium { background: rgba(245, 158, 11,.9); color: var(--bg-base); }
.anuncio-vis-badge.basic { background: var(--primary); color: #fff; }
.anuncio-card-body { padding: .75rem .85rem; }
.anuncio-card-cat {
    font: 500 .68rem var(--font-body);
    color: var(--primary);
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.anuncio-card-title {
    font: 600 .92rem var(--font-body);
    color: var(--text-primary);
    margin: 0 0 .25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.anuncio-card-desc {
    font: 400 .75rem var(--font-body);
    color: var(--text-secondary);
    margin: 0 0 .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.anuncio-card-price {
    font: 700 1.05rem var(--font-body);
    color: var(--primary);
    margin-bottom: .3rem;
}
.anuncio-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .35rem;
}
.anuncio-card-meta span {
    font: 400 .68rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .2rem;
}
.anuncio-card-stats {
    display: flex;
    gap: .6rem;
    padding-top: .35rem;
    border-top: 1px solid var(--border);
}
.anuncio-card-stats span {
    font: 400 .65rem var(--font-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .2rem;
}
.anuncio-card-exp { margin-left: auto; }

/* Anuncio detail modal */
.anuncio-detail-modal { max-width: 600px; }
.anuncio-detail-img {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    position: relative;
}
.anuncio-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.anuncio-detail-body { padding: 1.25rem; }
.anuncio-detail-cat {
    font: 500 .75rem var(--font-body);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .5rem;
}
.anuncio-detail-title {
    font: 700 1.25rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 .5rem;
    line-height: 1.3;
}
.anuncio-detail-price {
    font: 700 1.3rem var(--font-body);
    color: var(--primary);
    margin-bottom: .75rem;
}
.anuncio-detail-desc {
    font: 400 .88rem var(--font-body);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
}
.anuncio-detail-info {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .75rem;
    background: var(--bg-primary);
    border-radius: var(--r);
}
.anuncio-detail-info-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font: 400 .82rem var(--font-body);
    color: var(--text-secondary);
}
.anuncio-detail-info-item i { color: var(--primary); width: 16px; text-align: center; font-size: .8rem; }
.anuncio-detail-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Pagination */
.anuncios-pagination {
    display: flex;
    justify-content: center;
    gap: .3rem;
    padding: 1.5rem 0;
}
.anuncios-page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: none;
    color: var(--text-secondary);
    font: 500 .82rem var(--font-body);
    cursor: pointer;
    transition: all .2s;
}
.anuncios-page-btn:hover { border-color: var(--primary); color: var(--primary); }
.anuncios-page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Upgrade plan cards */
.upgrade-plans { display: flex; flex-direction: column; gap: .4rem; }
.upgrade-plan-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition: all .2s;
}
.upgrade-plan-card:hover { border-color: var(--primary-border); background: var(--bg-hover); }
.upgrade-plan-card:has(input:checked) { border-color: var(--primary); background: var(--primary-dim); }
.upgrade-plan-card.popular { border-color: var(--amber); }
.upgrade-plan-card input[type="radio"] { accent-color: var(--primary); }
.upgrade-plan-info { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.upgrade-plan-badge {
    font: 700 .55rem var(--font-body);
    color: var(--amber);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.upgrade-plan-name {
    font: 600 .85rem var(--font-body);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.upgrade-plan-price {
    font: 700 .95rem var(--font-body);
    color: var(--primary);
}
.upgrade-plan-desc {
    font: 400 .72rem var(--font-body);
    color: var(--text-muted);
}

/* Ad form styles */
.ad-form-input {
    width: 100%;
    padding: .55rem .75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text-primary);
    font: 400 .85rem var(--font-body);
    outline: none;
    transition: border-color .2s;
}
.ad-form-input:focus { border-color: var(--primary); }
textarea.ad-form-input { resize: vertical; min-height: 80px; }
.ad-form-row { display: flex; gap: .75rem; }
.ad-form-note {
    padding: .6rem;
    background: var(--primary-dim);
    border-radius: var(--r);
    font-size: .78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: .4rem;
}
.ad-form-note i { color: var(--primary); margin-top: 2px; }
.ad-form-img-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--r);
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    font-size: .8rem;
}
.ad-form-img-picker:hover { border-color: var(--primary); color: var(--primary); }
.ad-form-img-picker i { font-size: 1.5rem; }


/* ═══════════════════════════════════════════════════
   CHAT AREA
═══════════════════════════════════════════════════ */
.chat-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.messages-container {
    flex: 1; overflow-y: auto;
    padding: 1.2rem;
    display: flex; flex-direction: column; gap: .6rem;
}
.welcome-message {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .8rem; padding: 3rem 2rem;
    text-align: center; flex: 1; color: var(--text-muted);
    position: relative; z-index: 1;
}
.welcome-icon { font-size: 3.5rem; line-height: 1; }
.welcome-message h3 {
    font-family: var(--font-display);
    font-size: 1.4rem; color: var(--text-primary);
    font-weight: 700; letter-spacing: -0.02em;
}
.welcome-message p { font-size: .88rem; color: var(--text-secondary); }

/* Messages */
.message {
    max-width: 72%;
    animation: msgIn .2s var(--transition);
    word-break: break-word; overflow-wrap: break-word;
    position: relative;
    z-index: 1;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.message.own {
    align-self: flex-end;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-left: 2px solid var(--primary);
    border-radius: var(--r-lg) var(--r-lg) 4px var(--r-lg);
    padding: .65rem .95rem;
    box-shadow: var(--shadow-sm);
}
.message.other {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px;
    padding: .65rem .95rem;
    box-shadow: var(--shadow-sm);
}
.message-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: .4rem; font-size: .68rem; margin-bottom: .2rem; opacity: .7;
}
.message.own .message-header { color: var(--text-secondary); }
.message-sender { font-weight: 700; }
.message-time { font-size: .63rem; white-space: nowrap; }
.message-content { font-size: .88rem; line-height: 1.55; overflow-wrap: break-word; word-break: break-word; }
.message.deleted { opacity: .45; }
.deleted-message { font-style: italic; font-size: .78rem; }
.admin-deleted-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .58rem;
    background: var(--red-dim); color: var(--red);
    padding: .1rem .4rem; border-radius: 4px;
}
.delete-reason { margin-top: .25rem; font-size: .68rem; opacity: .6; font-style: italic; }

/* Message context menu */
.msg-menu-trigger {
    position: absolute; top: .45rem; right: .45rem;
    width: 1.7rem; height: 1.7rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted); font-size: .6rem; cursor: pointer;
    opacity: 0; transition: all .2s var(--transition); z-index: 2;
    backdrop-filter: blur(8px);
}
.msg-menu-trigger:hover {
    background: var(--primary-dim); border-color: var(--primary);
    color: var(--primary); transform: scale(1.1);
}
.message:hover .msg-menu-trigger, .msg-menu-trigger.visible { opacity: 1; }
.message.own .msg-menu-trigger {
    right: auto; left: .45rem;
    background: var(--bg-card); border-color: var(--border);
    color: var(--text-muted);
}
.message.own .msg-menu-trigger:hover {
    background: var(--primary-dim); border-color: var(--primary);
    color: var(--primary);
}
.msg-context-menu {
    position: fixed; min-width: 210px;
    background: var(--bg-card);
    border: 1px solid var(--primary-border);
    border-radius: var(--r-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(110, 120, 196,.06);
    z-index: 9999; overflow: hidden;
    animation: ctxMenuIn .15s var(--transition);
    backdrop-filter: blur(20px);
}
@keyframes ctxMenuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.msg-context-menu button {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    padding: .6rem 1rem; background: none; border: none;
    color: var(--text-primary); font-size: .8rem; font-family: var(--font-body);
    cursor: pointer; text-align: left; transition: all .12s; position: relative;
}
.msg-context-menu button:hover { background: var(--primary-dim); color: var(--primary); }
.msg-context-menu button:active { background: var(--bg-hover); }
.msg-context-menu button i {
    width: 1.15rem; text-align: center; font-size: .72rem;
    color: var(--text-muted); transition: color .12s;
}
.msg-context-menu button:hover i { color: var(--primary); }
.msg-context-menu button.danger { color: var(--red); }
.msg-context-menu button.danger i { color: var(--red); }
.msg-context-menu button.danger:hover { background: var(--red-dim); color: var(--red); }
.msg-context-menu button.danger:hover i { color: var(--red); }
.msg-context-menu .menu-divider { height: 1px; background: var(--border); margin: .25rem .6rem; }
/* En celular se oculta la flechita: el menú se abre tocando el nombre. */
@media(max-width:768px) {
    .msg-menu-trigger { display: none !important; }
    .message .message-sender { cursor: pointer; -webkit-tap-highlight-color: transparent; }
}

.system-message {
    align-self: center;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    padding: .35rem 1rem; border-radius: var(--r-pill);
    font-size: .72rem; color: var(--primary-light);
    position: relative; z-index: 1;
    max-width: 80%; text-align: center;
}

/* Message Input */
.message-input-container {
    padding: .85rem 1.2rem;
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    flex-shrink: 0; position: relative;
}
.input-wrapper {
    display: flex; align-items: center; gap: .4rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: .25rem .25rem .25rem .5rem;
    transition: border-color .2s, box-shadow .2s;
}
.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim), 0 4px 16px rgba(110, 120, 196,.08);
}
.action-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    border-radius: var(--r-sm); font-size: .9rem;
    transition: color .18s, background .18s;
}
.action-btn:hover { color: var(--primary); background: var(--primary-dim); }
.input-wrapper input {
    flex: 1; background: none; border: none;
    padding: .55rem .4rem; color: var(--text-primary);
    font-family: var(--font-body); font-size: .88rem;
}
.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper input:focus { outline: none; }
.send-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none; color: #fff; cursor: pointer;
    font-size: .8rem; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform .2s var(--transition), box-shadow .2s;
}
.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(110, 120, 196,.45);
}
.send-btn:disabled { opacity: .25; cursor: not-allowed; }
.input-footer { display: flex; justify-content: flex-end; margin-top: .3rem; }
.char-counter { font-size: .65rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .7);
    display: none; align-items: center; justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
}
.modal-container {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--r-xl);
    max-width: 620px; width: 100%;
    max-height: 88vh; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: modalIn .25s var(--transition);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-container::before {
    content: ''; display: block; height: 2px; flex-shrink: 0;
    background: linear-gradient(90deg, var(--primary), var(--coral), var(--golden));
}
.modal-header {
    padding: 1rem 1.3rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; gap: .5rem;
}
.modal-header h2 i { color: var(--primary); }
.close-modal {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-hover); border: none;
    border-radius: 50%; color: var(--text-muted);
    cursor: pointer; font-size: .75rem; transition: all .2s;
}
.close-modal:hover { background: var(--red-dim); color: var(--red); }
.modal-content { padding: 1.2rem; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: .85rem 1.3rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.selected-info { font-size: .78rem; color: var(--text-muted); }
.selected-info span { color: var(--primary); font-weight: 700; }

.search-container { position: relative; margin-bottom: 1rem; }
.search-container i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .78rem; pointer-events: none;
}
.search-container input {
    width: 100%; padding: .6rem 1rem .6rem 2.3rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: .85rem; transition: border-color .18s;
}
.search-container input:focus { outline: none; border-color: var(--primary); }

/* Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .75rem;
}
.room-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1rem; cursor: pointer;
    transition: all .2s var(--transition);
}
.room-card:hover {
    border-color: var(--primary-border);
    background: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.room-card.active {
    border-color: var(--primary);
    background: var(--primary-dim);
    box-shadow: 0 4px 20px var(--primary-glow);
}
.room-card-icon { font-size: 1.6rem; margin-bottom: .4rem; }
.room-card-name { font-weight: 700; font-size: .88rem; margin-bottom: .2rem; font-family: var(--font-display); }
.room-card-description { font-size: .72rem; color: var(--text-muted); line-height: 1.35; }
.room-card-stats {
    display: flex; justify-content: space-between;
    margin-top: .55rem; font-size: .65rem; color: var(--text-muted);
}
.room-card-users.full { color: var(--red); }
.room-card-users.almost-full { color: var(--amber); }
.room-full-badge {
    display: inline-block; margin-top: .4rem;
    padding: .15rem .5rem;
    background: var(--red-dim); border: 1px solid var(--red);
    border-radius: 4px; font-size: .6rem; color: var(--red);
    font-weight: 700; letter-spacing: .06em;
}

/* ════════ Modal de perfil de usuario (rediseño profesional) ════════ */
.profile-modal {
    max-width: 380px; border-radius: 20px; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border);
    box-shadow: 0 25px 60px rgba(0,0,0,.35); position: relative;
    animation: profileModalIn .28s cubic-bezier(.16,1,.3,1);
}
@keyframes profileModalIn { from { opacity: 0; transform: scale(.92) translateY(16px); } }

.profile-close-btn {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,.3); backdrop-filter: blur(6px); border: none;
    color: #fff; font-size: .85rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.profile-close-btn:hover { background: rgba(0,0,0,.5); transform: scale(1.1); }

.profile-card-header {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 24px 20px; text-align: center;
    background: var(--grad-hero, linear-gradient(135deg, var(--primary), var(--coral)));
    position: relative; overflow: hidden;
}
.profile-card-header::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 70% -20%, rgba(255,255,255,.2), transparent 60%);
    pointer-events: none;
}

.profile-avatar {
    width: 82px; height: 82px; border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: #fff;
    border: 3px solid rgba(255,255,255,.4); flex-shrink: 0; overflow: hidden;
    position: relative; z-index: 1; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.profile-display-name {
    font-size: 1.35rem; font-weight: 800; color: #fff;
    margin: 12px 0 4px; font-family: var(--font-display);
    word-break: break-word; position: relative; z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.profile-status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.9);
    padding: 4px 14px; border-radius: 999px;
    background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
    position: relative; z-index: 1;
}
.profile-status-badge i { font-size: .5rem; }
.profile-status-badge .status-online, .profile-status-badge .status-online i { color: #86efac; }
.profile-status-badge .status-offline, .profile-status-badge .status-offline i { color: rgba(255,255,255,.5); }
.profile-status-badge .status-away, .profile-status-badge .status-away i { color: #fde68a; }
.profile-status-badge .status-busy, .profile-status-badge .status-busy i { color: #fca5a5; }

.profile-card-body {
    padding: 16px 20px 8px; max-height: 260px; overflow-y: auto;
}
.profile-card-body::-webkit-scrollbar { width: 4px; }
.profile-card-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.profile-bio-section {
    margin-bottom: 12px; padding: 10px 14px;
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: 12px; font-size: .85rem; line-height: 1.5; color: var(--text-primary);
}
.profile-bio-section:empty { display: none; }

.profile-ban-section { margin-bottom: 12px; }

.profile-section-label {
    display: flex; align-items: center; gap: 6px;
    font-size: .7rem; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.profile-section-label i { color: var(--primary); font-size: .7rem; }

.active-rooms-list { display: flex; flex-direction: column; gap: 5px; }
.active-room-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: 10px; font-size: .83rem; font-weight: 600; color: var(--text-primary);
    transition: all .15s;
}
.active-room-item i { color: var(--primary); font-size: .75rem; }
.active-room-item.current { border-color: var(--primary-border); background: var(--primary-dim); }
.active-room-item .room-name { flex: 1; }
.active-room-item .room-status.current {
    font-size: .65rem; font-weight: 700; color: var(--primary);
    background: var(--bg-card); padding: 2px 8px; border-radius: 999px;
}
.no-active-rooms, .loading-rooms {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; color: var(--text-muted); font-size: .8rem;
}

.profile-rooms-section { margin-bottom: 10px; }

.profile-admin-actions {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
    padding-top: 12px; border-top: 1px solid var(--border);
}
.profile-admin-actions .btn-action { flex: 1 1 calc(50% - 3px); font-size: .76rem; padding: 8px 6px; }

.profile-card-footer {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    padding: 10px 16px 16px; border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.profile-btn {
    padding: 10px 8px; border: 1px solid transparent; border-radius: 10px;
    font-weight: 700; font-size: .78rem; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all .18s ease; white-space: nowrap; font-family: inherit;
}
.profile-btn-secondary { background: var(--bg-raised); border-color: var(--border); color: var(--text-primary); }
.profile-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.profile-btn-primary { background: var(--grad-brand, linear-gradient(135deg, var(--primary-dark), var(--primary))); color: #fff; }
.profile-btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.profile-btn-warn { background: var(--amber-dim); border-color: var(--amber); color: #b45309; }
[data-theme="dark"] .profile-btn-warn { color: var(--amber); }
.profile-btn-warn:hover { background: rgba(245,158,11,.25); }
.profile-btn-danger { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.profile-btn-danger:hover { background: var(--red); color: #fff; }
.profile-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* btn-action legacy (admin actions in profile modal) */
.btn-action {
    padding: 9px 10px; border: 1px solid transparent; border-radius: 10px;
    font-weight: 700; font-size: .78rem; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all .18s ease; white-space: nowrap; font-family: inherit;
}
.btn-action.accent { background: var(--bg-raised); border-color: var(--border); color: var(--text-primary); }
.btn-action.accent:hover { border-color: var(--primary); color: var(--primary); }
.btn-action.primary { background: var(--grad-brand, linear-gradient(135deg, var(--primary-dark), var(--primary))); color: #fff; }
.btn-action.primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-action.warning { background: var(--amber-dim); border-color: var(--amber); color: #b45309; }
[data-theme="dark"] .btn-action.warning { color: var(--amber); }
.btn-action.warning:hover { background: rgba(245,158,11,.22); }
.btn-action.danger { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.btn-action.danger:hover { background: var(--red); color: #fff; }
.btn-action.block { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.btn-action.unblock { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.btn-action:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Role tag badges en modal de perfil */
.profile-role-tag {
    display: inline-block; font-size: .65rem; font-weight: 800;
    padding: 3px 10px; border-radius: 999px; margin-top: 4px;
    letter-spacing: .03em; text-transform: uppercase;
    position: relative; z-index: 1;
}
.profile-role-tag.role-superadmin {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff; box-shadow: 0 2px 10px rgba(245,158,11,.4);
}
.profile-role-tag.role-admin {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff; box-shadow: 0 2px 10px rgba(59,130,246,.4);
}
.profile-role-tag.role-moderator {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #fff; box-shadow: 0 2px 10px rgba(16,185,129,.4);
}

/* Nombre arcoíris animado (moderadores/admins) */
.name-rainbow {
    background-image: linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe600, #2ecc71, #3b82f6, #8b5cf6, #ff3b3b);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent !important;
    font-weight: 800; animation: nameRainbow 3s linear infinite;
}
.profile-display-name.name-rainbow {
    text-shadow: none !important;
    -webkit-text-fill-color: transparent;
}
@keyframes nameRainbow { to { background-position: 220% center; } }

/* ═══════════════════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════════════════ */
.admin-panel-overlay {
    position: fixed; inset: 0; z-index: 3000;
    display: none; background: var(--bg-void);
}
.admin-panel-container {
    width: 100%; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; overflow: hidden;
}
.admin-panel-header {
    height: 64px; flex-shrink: 0;
    padding: 0 1.75rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
}
.admin-panel-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--coral), var(--golden));
    opacity: .5;
}
.admin-panel-header h1 {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 700;
    display: flex; align-items: center; gap: .65rem;
    letter-spacing: -0.02em;
}
.admin-panel-header h1 i { color: var(--primary); font-size: 1rem; }
.admin-panel-actions { display: flex; gap: .5rem; }

.admin-live-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .7rem; margin-left: .6rem;
    background: var(--green-dim);
    border: 1px solid rgba(34, 197, 94,.35);
    border-radius: var(--r-pill);
    font-size: .65rem; font-weight: 700;
    letter-spacing: .08em; color: var(--green);
    font-family: var(--font-body);
}
.admin-live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    animation: pulse-green 1.4s ease-in-out infinite;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94,.5); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94,0); }
}

/* Admin Tabs (hidden, kept for compat) */
.admin-tabs {
    display: flex; background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem; flex-shrink: 0;
}
.admin-tab {
    padding: .7rem 1.1rem; background: none; border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted); font-family: var(--font-body);
    font-size: .82rem; font-weight: 500; cursor: pointer;
    transition: all .18s; display: flex; align-items: center;
    gap: .4rem; white-space: nowrap;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Admin Body */
.admin-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }

.admin-nav {
    width: 215px; flex-shrink: 0;
    background: var(--bg-raised);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 1rem 0; overflow-y: auto;
}
.admin-nav-section { margin-bottom: .5rem; }
.admin-nav-label {
    padding: .5rem 1.1rem .3rem;
    font-size: .62rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-muted);
}
.admin-nav-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .65rem 1.1rem;
    color: var(--text-secondary); font-size: .84rem;
    font-weight: 500; cursor: pointer;
    border-left: 3px solid transparent;
    transition: all .18s var(--transition);
    user-select: none; position: relative;
}
.admin-nav-item i { width: 16px; text-align: center; font-size: .82rem; flex-shrink: 0; }
.admin-nav-item span { flex: 1; }
.admin-nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.admin-nav-item.active {
    color: var(--primary);
    background: var(--primary-dim);
    border-left-color: var(--primary);
    font-weight: 600;
}
.admin-nav-divider { height: 1px; background: var(--border); margin: .5rem .75rem; }
.nav-count {
    margin-left: auto; flex-shrink: 0;
    font-size: .65rem; font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: .1rem .4rem; border-radius: var(--r-pill);
    min-width: 22px; text-align: center;
}
.nav-count.has-items { background: var(--red-dim); color: var(--red); }

.admin-main {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; min-width: 0;
}
.admin-section {
    display: none; flex-direction: column;
    flex: 1; overflow: hidden; min-height: 0;
}
.admin-section.active { display: flex; }
.admin-main-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem; flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-raised); gap: 1rem; flex-wrap: wrap;
}
.admin-main-title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 700;
    display: flex; align-items: center; gap: .55rem;
    letter-spacing: -0.02em;
}
.admin-main-title i { color: var(--primary); font-size: .9rem; }
.admin-main-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.admin-sections { flex: 1; overflow-y: auto; padding: 1.5rem; min-height: 0; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 1.35rem;
    position: relative; overflow: hidden;
    transition: all .2s var(--transition);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--coral));
    opacity: 0; transition: opacity .2s;
}
.stat-card:hover { border-color: var(--primary-border); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.stat-card:hover::before { opacity: 1; }
.stat-card h3 {
    font-size: .7rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: .35rem;
}
.stat-numbers .stat-main {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 800;
    color: var(--text-primary); line-height: 1;
}
.stat-card .stat-icon { font-size: 1.5rem; line-height: 1; margin-bottom: .75rem; }
.stat-card .stat-info h3 {
    font-size: .68rem; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: .35rem;
}
.stat-card .stat-sub { display: block; font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }
.stat-card.warning .stat-main { color: var(--amber); }
.stat-card.success .stat-main { color: var(--green); }
.stat-card.danger .stat-main { color: var(--red); }

/* Admin search */
.admin-search { position: relative; margin-bottom: 1.1rem; }
.admin-search i {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .8rem; pointer-events: none;
}
.admin-search input {
    width: 100%; padding: .65rem 1rem .65rem 2.5rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: .85rem; transition: border-color .18s;
}
.admin-search input:focus { outline: none; border-color: var(--primary); }

/* Admin toolbar */
.admin-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.admin-filter-group { display: flex; gap: .35rem; flex-wrap: wrap; }
.admin-filter-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .85rem; background: var(--bg-hover);
    border: 1px solid var(--border); border-radius: var(--r-pill);
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: .75rem; font-weight: 500; cursor: pointer;
    transition: all .18s; white-space: nowrap;
}
.admin-filter-btn:hover { border-color: var(--primary-border); color: var(--text-primary); }
.admin-filter-btn.active {
    background: var(--primary-dim); border-color: var(--primary);
    color: var(--primary); font-weight: 600;
}
.admin-sort-select {
    padding: .35rem .85rem; background: var(--bg-hover);
    border: 1px solid var(--border); border-radius: var(--r-pill);
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: .75rem; cursor: pointer;
}

/* Admin cards */
.admin-users-list, .admin-reports-list { display: flex; flex-direction: column; gap: .65rem; }
.admin-user-card, .admin-report-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 1.1rem;
    transition: all .2s var(--transition);
}
.admin-user-card:hover, .admin-report-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}
.admin-user-header, .admin-report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: .85rem; flex-wrap: wrap; gap: .5rem;
}
.admin-user-info { display: flex; align-items: center; gap: .75rem; }
.admin-user-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: #fff;
    position: relative; flex-shrink: 0;
}
.admin-user-avatar .status-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.admin-user-avatar .status-dot.online { background: var(--green); }
.admin-user-details .admin-user-name { font-weight: 700; font-size: .88rem; margin-bottom: .2rem; }
.admin-user-meta { display: flex; gap: .5rem; font-size: .7rem; color: var(--text-muted); flex-wrap: wrap; }
.admin-user-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.admin-user-actions .btn-admin { padding: .25rem .65rem; font-size: .72rem; }

/* Admin buttons */
.btn-admin {
    padding: .45rem .9rem; border: none; border-radius: var(--r);
    font-family: var(--font-body); font-weight: 600;
    font-size: .78rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: all .2s var(--transition);
}
.btn-admin.primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.btn-admin.primary:hover { box-shadow: 0 4px 16px rgba(110, 120, 196,.35); transform: translateY(-1px); }
.btn-admin.secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border); }
.btn-admin.secondary:hover { border-color: var(--primary-border); }
.btn-admin.danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.btn-admin.danger:hover { background: rgba(239, 68, 68,.22); }
.btn-admin.warning { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber); }
.btn-admin.warning:hover { background: rgba(245, 158, 11,.22); }
.btn-admin.success { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }
.btn-admin.success:hover { background: rgba(34, 197, 94,.2); }
.btn-admin.btn-info { background: rgba(110, 120, 196,.12); color: var(--blue); border: 1px solid var(--blue); }
.btn-admin.btn-info:hover { background: rgba(110, 120, 196,.22); }
.btn-admin.btn-disabled {
    background: var(--bg-hover); color: var(--text-muted);
    border: 1px solid var(--border); cursor: not-allowed; opacity: .6;
}

/* Admin reports */
.admin-report-reason {
    margin: .5rem 0; padding: .5rem .8rem;
    background: var(--bg-raised); border-radius: var(--r-sm);
    font-size: .82rem; border-left: 3px solid var(--primary);
}
.admin-report-actions { display: flex; gap: .4rem; margin-top: .5rem; }
.admin-report-info { display: flex; align-items: center; gap: .7rem; flex: 1; }
.admin-report-details { flex: 1; }
.admin-report-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.admin-report-meta { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .7rem; color: var(--text-muted); }
.admin-report-time { margin-left: auto; }
.admin-report-status {
    font-size: .6rem; font-weight: 700; padding: .12rem .5rem;
    border-radius: 4px; text-transform: uppercase; letter-spacing: .06em;
}
.admin-report-status.pending { background: var(--amber-dim); color: var(--amber); }
.admin-report-status.resolved { background: var(--green-dim); color: var(--green); }
.admin-report-status.dismissed { background: var(--bg-hover); color: var(--text-muted); }
.admin-report-room {
    margin: .3rem 0; font-size: .75rem; color: var(--text-muted);
    display: flex; align-items: center; gap: .35rem;
}

/* Admin modals */
.admin-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
}
.admin-modal {
    background: var(--bg-card);
    border: 1px solid var(--primary-border);
    border-radius: var(--r-xl);
    width: 90%; max-width: 950px; max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Roles */
.registered-badge { color: var(--primary); margin-left: .3rem; font-size: .78rem; }
.guest-badge { color: var(--amber); margin-left: .3rem; font-size: .78rem; }
.admin-user-status.online { color: var(--green); }
.admin-user-status.offline { color: var(--text-muted); }
.admin-user-role {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600;
    padding: .12rem .5rem; border-radius: 4px;
}
.admin-user-role.superadmin { background: rgba(128, 137, 201,.15); color: var(--violet); }
.admin-user-role.admin { background: var(--primary-dim); color: var(--primary); }
.admin-user-role.moderator { background: var(--amber-dim); color: var(--amber); }
.admin-user-role.user { background: var(--bg-hover); color: var(--text-muted); }
.admin-user-email { color: var(--text-muted); font-size: .7rem; }
.admin-user-stats { margin-top: .35rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-user-stats small { font-size: .65rem; color: var(--text-muted); }

/* Users subtabs */
.users-subtabs {
    display: flex; gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}
.users-subtab {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .65rem 1.2rem; background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: .82rem; font-weight: 500; cursor: pointer;
    transition: all .18s; white-space: nowrap;
}
.users-subtab:hover { color: var(--text-primary); background: var(--bg-hover); }
.users-subtab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.subtab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem;
    background: var(--bg-hover); border-radius: var(--r-pill);
    font-size: .65rem; font-weight: 700; color: var(--text-muted);
}
.users-subtab.active .subtab-count { background: var(--primary-dim); color: var(--primary); }
.users-subtab-content { display: none; }
.users-subtab-content.active { display: block; }

/* Pagination */
.admin-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: .4rem; padding: .85rem 0; margin-top: .5rem;
}
.admin-pagination button {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.1rem; height: 2.1rem; padding: 0 .55rem;
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: var(--r); color: var(--text-secondary);
    font-size: .75rem; font-weight: 500; cursor: pointer;
    transition: all .18s;
}
.admin-pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.admin-pagination button.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: var(--primary); color: #fff; font-weight: 700;
}
.admin-pagination button:disabled { opacity: .4; cursor: default; }
.admin-pagination .page-info { font-size: .7rem; color: var(--text-muted); padding: 0 .5rem; }

/* Dashboard panels */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem; margin-top: 1.25rem;
}
.admin-panel-widget {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 1.1rem; overflow: hidden;
}
.widget-title {
    font-size: .7rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: .85rem;
    display: flex; align-items: center; gap: .4rem;
}
.widget-title i { color: var(--primary); }

/* FAB */
.mobile-fab {
    display: none; position: fixed;
    bottom: 1.5rem; right: 1.2rem;
    gap: .6rem; flex-direction: column; align-items: flex-end;
    z-index: 1000;
}
.fab-btn {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none; color: #fff; font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(110, 120, 196,.4);
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s var(--transition), box-shadow .2s;
}
.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(110, 120, 196,.55);
}

/* ═══════════════════════════════════════════════════
   BADGES & NOTIFICATIONS
═══════════════════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .15rem .5rem; border-radius: 4px;
    font-size: .62rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
}
.badge-admin { background: var(--primary-dim); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-mod { background: var(--violet-dim); color: var(--violet); border: 1px solid rgba(128, 137, 201,.3); }
.badge-user { background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border); }
.badge-banned { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }

.temp-alert, .temp-notification {
    position: fixed; top: 1.2rem; right: 1.2rem;
    padding: .75rem 1.2rem; border-radius: var(--r);
    z-index: 9999; font-size: .82rem; font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: 1px solid transparent;
    display: flex; align-items: center; gap: .5rem;
    animation: slideIn .3s var(--transition);
    color: #fff;
    backdrop-filter: blur(10px);
}
.temp-alert.success, .temp-notification.success { background: rgba(34, 197, 94,.92); border-color: var(--green); }
.temp-alert.error { background: rgba(239, 68, 68,.92); border-color: var(--red); }
.temp-alert.info, .temp-notification.info { background: rgba(110, 120, 196,.9); border-color: var(--primary); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* Notification bell */
.notification-bell-wrapper { position: relative; }
.notification-bell-btn { position: relative; }
.notification-badge {
    position: absolute; top: -3px; right: -5px;
    min-width: 1rem; height: 1rem; padding: 0 .25rem;
    background: var(--coral); color: #fff;
    border-radius: var(--r-pill);
    font-size: .6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.notification-panel {
    display: none; position: absolute; top: calc(100% + .6rem); right: 0;
    width: 350px; max-height: 420px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200; overflow: hidden;
}
.notification-panel.open { display: flex; flex-direction: column; animation: modalIn .18s ease; }
.notification-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .7rem .9rem; border-bottom: 1px solid var(--border);
    font-size: .82rem; font-weight: 600;
}
.notification-panel-header h4 { margin: 0; font-size: .82rem; display: flex; align-items: center; gap: .35rem; }
.notification-clear-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: .75rem; padding: .2rem .4rem;
    border-radius: var(--r-sm); transition: color .15s;
}
.notification-clear-btn:hover { color: var(--red); }
.notification-panel-list { overflow-y: auto; flex: 1; max-height: 350px; }
.notification-empty {
    display: flex; flex-direction: column; align-items: center;
    gap: .4rem; padding: 2rem 1rem;
    color: var(--text-muted); font-size: .78rem;
}
.notification-empty i { font-size: 1.5rem; opacity: .4; }
.notification-item {
    display: flex; gap: .6rem; padding: .65rem .9rem;
    border-bottom: 1px solid var(--border);
    transition: background .12s; cursor: default;
}
.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread { background: var(--primary-dim); }
.notification-item-icon {
    width: 2.1rem; height: 2.1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: .75rem; flex-shrink: 0;
}
.notification-item-icon.warn { background: var(--amber-dim); color: var(--amber); }
.notification-item-icon.ban { background: var(--red-dim); color: var(--red); }
.notification-item-icon.report { background: rgba(128, 137, 201,.15); color: var(--violet); }
.notification-item-icon.kick { background: rgba(110, 120, 196,.15); color: #818BD4; }
.notification-item-icon.delete { background: rgba(239, 68, 68,.15); color: var(--red); }
.notification-item-icon.resolve { background: rgba(34, 197, 94,.15); color: var(--green); }
.notification-item-icon.pm { background: var(--primary-dim); color: var(--primary); }
.notification-item-icon.follower { background: rgba(34, 197, 94,.15); color: var(--green); }
.notification-item-icon.reaction { background: rgba(239, 68, 68,.15); color: var(--red); }
.notification-item-icon.comment { background: rgba(110, 120, 196,.15); color: var(--secondary); }
.notification-item-icon.room-join { background: rgba(110, 120, 196,.15); color: #818BD4; }
.notification-item-icon.ad-inquiry { background: rgba(245, 158, 11,.15); color: var(--amber); }
.notification-item-icon.default { background: var(--primary-dim); color: var(--primary); }
@keyframes bellRing {
    0% { transform: rotate(0); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    100% { transform: rotate(0); }
}
.notification-bell-btn.bell-ring i { animation: bellRing .6s ease; }
.notification-item[data-action] { cursor: pointer; }
.notification-item-body { flex: 1; min-width: 0; }
.notification-item-text { font-size: .75rem; color: var(--text-primary); line-height: 1.35; }
.notification-item-time { font-size: .63rem; color: var(--text-muted); margin-top: .15rem; }
/* Panel "flotante": cuando se abre se mueve al <body> (escapa del stacking
   context del header) y se muestra FIJO sobre cualquier vista (chat, anuncios,
   salas...). Posición tipo dropdown en desktop; hoja a pantalla en móvil. */
.notification-panel.notif-panel-floating {
    position: fixed; top: 60px; right: 14px; left: auto;
    width: 360px; max-height: 70vh; z-index: 99999;
}
.notification-panel.notif-panel-floating .notification-panel-list { max-height: none; }
@media(max-width:768px) {
    .notification-panel { width: calc(100vw - 2rem); right: -1rem; }
    .notification-panel.notif-panel-floating {
        top: 56px; left: 8px; right: 8px; width: auto; max-height: 76vh;
    }
}

/* ═══════════════════════════════════════════════════
   ADVANCED ADMIN COMPONENTS
═══════════════════════════════════════════════════ */

/* User info modal */
.user-info-modal-expanded, .private-chat-modal-expanded {
    width: 95%; max-width: 980px; max-height: 90vh;
    overflow: hidden; display: flex; flex-direction: column;
}
.user-info-content { flex: 1; overflow: hidden; position: relative; min-height: 0; }

.user-info-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 1rem; background: var(--bg-card);
    position: sticky; top: 0; z-index: 10;
}
.user-tab {
    padding: .7rem 1.05rem; background: none; border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted); font-family: var(--font-body);
    font-weight: 500; font-size: .82rem; cursor: pointer;
    transition: all .18s; display: flex; align-items: center; gap: .35rem;
}
.user-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.user-tab-content { display: none; padding: 1.25rem; }
.user-tab-content.active { display: block; }
.user-tab-content { height: 100%; overflow-y: auto; padding: 1.25rem; }

/* Tags */
.tag {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .65rem; border-radius: var(--r-pill);
    font-size: .72rem; font-weight: 500;
}
.tag.online { background: var(--green-dim); color: var(--green); }
.tag.offline { background: rgba(107,114,128,.1); color: var(--text-muted); }
.tag.role { background: var(--primary-dim); color: var(--primary); }
.tag.banned { background: var(--red-dim); color: var(--red); }

/* Info cards */
.user-avatar-large {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.85rem; font-weight: 700; color: #fff;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary-border);
    flex-shrink: 0;
}
.info-card {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .75rem .9rem; font-size: .82rem;
}
.info-card strong {
    color: var(--text-muted); font-size: .68rem;
    letter-spacing: .06em; text-transform: uppercase;
    display: block; margin-bottom: .2rem;
}
.info-card code {
    background: var(--bg-input); padding: .15rem .45rem;
    border-radius: 4px; font-size: .78rem; font-family: monospace;
}

/* Stats mini */
.stats-grid-mini {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: .7rem; margin-top: .7rem;
}
.stat-mini-card {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .85rem; text-align: center;
}
.stat-mini-number {
    font-family: var(--font-display);
    font-size: 1.7rem; font-weight: 800; color: var(--primary);
}
.stat-mini-label { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; }

/* Rooms/chat list items */
.rooms-list { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.room-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .75rem;
    background: var(--bg-raised); border-radius: var(--r-sm);
    border-left: 3px solid var(--primary);
}
.room-status { margin-left: auto; font-size: .62rem; padding: .12rem .5rem; border-radius: 4px; }
.room-status.live { background: var(--green-dim); color: var(--green); }
.room-status.offline { background: rgba(107,114,128,.1); color: var(--text-muted); }

.private-chats-list-simple { display: flex; flex-direction: column; gap: .55rem; }
.private-chat-item-simple {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-raised); border-radius: var(--r);
    padding: .65rem; flex-wrap: wrap; gap: .4rem;
}

/* Chat viewer */
.chat-stats-bar { background: var(--bg-raised); padding: .85rem; border-radius: var(--r); margin-bottom: .7rem; }
.stat-item {
    display: flex; align-items: center; gap: .35rem;
    background: var(--bg-card); padding: .35rem .8rem;
    border-radius: var(--r-pill);
}
.stat-item i { color: var(--primary); font-size: .95rem; }
.stat-value { font-weight: 700; font-size: .85rem; }
.stat-label { font-size: .68rem; color: var(--text-muted); }
.chat-controls-bar {
    display: flex; justify-content: space-between; align-items: center;
    gap: .7rem; margin-bottom: .7rem; flex-wrap: wrap;
}
.controls-right { display: flex; gap: .35rem; }
.btn-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); cursor: pointer;
    color: var(--text-primary); font-size: .78rem;
    transition: all .18s;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

.private-chat-container { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.chat-messages-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .65rem .9rem; background: var(--bg-raised);
    border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .4rem;
}
.messages-count { font-weight: 500; font-size: .82rem; }
.messages-filter { display: flex; gap: .2rem; }
.filter-btn {
    background: none; border: none; padding: .2rem .65rem;
    border-radius: var(--r-pill); cursor: pointer;
    color: var(--text-muted); font-size: .72rem; transition: all .18s;
}
.filter-btn.active { background: var(--primary-dim); color: var(--primary); }
.chat-messages-scroll {
    max-height: 380px; overflow-y: auto;
    padding: .9rem; display: flex; flex-direction: column; gap: .8rem;
}
.chat-message { display: flex; gap: .6rem; animation: msgIn .18s ease; }
.chat-message.user2 { justify-content: flex-end; }
.message-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .72rem; color: #fff; flex-shrink: 0;
}
.message-content-wrapper {
    max-width: 65%;
    background: var(--bg-raised);
    border-radius: var(--r); padding: .5rem .85rem;
}
.chat-message.user2 .message-content-wrapper {
    background: var(--primary-dim); border: 1px solid var(--primary-border);
}
.sender-name { font-weight: 600; color: var(--text-primary); }
.message-body { word-break: break-word; font-size: .82rem; }
.message-body.deleted-content { font-style: italic; color: var(--text-muted); }
.message-actions { display: flex; gap: .25rem; margin-top: .25rem; opacity: 0; transition: opacity .18s; }
.chat-message:hover .message-actions { opacity: 1; }
.message-actions .btn-action { font-size: .62rem; padding: .12rem .45rem; border-radius: 4px; cursor: pointer; }
.message-actions .btn-action.delete { color: var(--red); background: none; border: 1px solid var(--red); }
.message-actions .btn-action.delete:hover { background: var(--red); color: white; }
.message-actions .btn-action.warn { color: var(--amber); background: none; border: 1px solid var(--amber); }
.message-actions .btn-action.warn:hover { background: var(--amber); color: var(--bg-void); }
.chat-global-actions {
    display: flex; justify-content: flex-end; gap: .6rem;
    padding: .85rem; border-top: 1px solid var(--border);
}

/* Role options */
.role-options { display: flex; flex-direction: column; gap: .7rem; margin: 1.1rem 0; }
.role-option {
    display: flex; align-items: center; gap: .8rem;
    padding: .85rem; border: 1px solid var(--border);
    border-radius: var(--r); cursor: pointer; transition: all .2s;
}
.role-option:hover { border-color: var(--primary); background: var(--primary-dim); }
.role-option input[type="radio"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.role-icon { font-size: 1.3rem; }
.role-info strong { display: block; margin-bottom: .2rem; font-size: .85rem; }
.role-info small { font-size: .72rem; color: var(--text-muted); }

/* Form elements */
.form-group textarea, .form-group select {
    width: 100%; padding: .65rem .85rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r); color: var(--text-primary);
    font-family: var(--font-body); font-size: .85rem;
    transition: border-color .18s;
}
.form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-group input[type="checkbox"] { margin-right: .4rem; accent-color: var(--primary); }
.warning-box {
    background: var(--red-dim); border-left: 3px solid var(--red);
    padding: .85rem; border-radius: var(--r-sm); margin-bottom: .85rem;
    font-size: .82rem;
}
.modal-actions {
    display: flex; justify-content: flex-end; gap: .6rem;
    margin-top: 1.1rem; padding-top: .9rem;
    border-top: 1px solid var(--border);
}

/* Monitor */
.monitor-controls {
    display: flex; flex-direction: column; gap: .6rem;
    padding: 1rem; background: var(--bg-raised);
    border: 1px solid var(--border); border-radius: var(--r);
    margin-bottom: .75rem;
}
.monitor-controls select {
    width: 100%; padding: .55rem .8rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r); color: var(--text-primary);
    font-family: var(--font-body); font-size: .85rem; transition: border-color .18s;
}
.monitor-controls select:focus { outline: none; border-color: var(--primary); }
.monitor-controls select optgroup { color: var(--text-muted); font-size: .75rem; }
.monitor-control-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.monitor-status-bar {
    display: none; align-items: center; gap: .75rem;
    padding: .5rem .85rem; background: var(--green-dim);
    border: 1px solid var(--green); border-radius: var(--r);
    font-size: .78rem; color: var(--green);
}
.monitor-status-bar .status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); animation: pulse-green 1.5s infinite;
}
.monitor-chat-container {
    border: 1px solid var(--border); border-radius: var(--r);
    overflow: hidden; min-height: 280px;
    display: flex; flex-direction: column;
}
.monitor-placeholder, .monitor-loading, .error-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 2.5rem 1rem;
    text-align: center; color: var(--text-muted); flex: 1;
}
.monitor-placeholder i, .monitor-loading i, .error-state i { font-size: 2rem; margin-bottom: .6rem; opacity: .5; }
.monitor-placeholder p, .monitor-loading p, .error-state p { font-size: .85rem; margin-bottom: .25rem; }
.monitor-placeholder small, .monitor-loading small, .error-state small { font-size: .72rem; }
.monitor-messages-list {
    flex: 1; overflow-y: auto; padding: .9rem;
    display: flex; flex-direction: column; gap: .65rem; max-height: 380px;
}
.monitor-message {
    display: flex; flex-direction: column; gap: .25rem;
    padding: .7rem .9rem; border-radius: var(--r);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: border-color .18s;
}
.monitor-message:hover { border-color: var(--primary-border); }
.monitor-message.target-user { background: var(--primary-dim); border-color: var(--primary-border); }
.monitor-message.deleted { opacity: .55; }
.monitor-message .message-header { display: flex; align-items: center; gap: .5rem; font-size: .68rem; }
.monitor-message .message-sender { font-weight: 700; font-size: .78rem; }
.monitor-message .message-sender.target { color: var(--primary); }
.monitor-message .message-content { font-size: .85rem; line-height: 1.45; word-break: break-word; }
.monitor-message .message-content.deleted-content { color: var(--text-muted); font-style: italic; font-size: .78rem; }
.monitor-message .message-actions { display: flex; gap: .3rem; margin-top: .2rem; opacity: 0; transition: opacity .18s; }
.monitor-message:hover .message-actions { opacity: 1; }
.monitor-message .message-status.deleted {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .62rem; background: var(--red-dim); color: var(--red);
    padding: .08rem .35rem; border-radius: 3px;
}

/* Chat modal */
.chat-modal-expanded { max-width: 960px; }
.chat-summary-bar {
    display: flex; gap: 1.5rem; padding: .7rem 1.2rem;
    background: var(--bg-raised); border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.summary-item { display: flex; align-items: center; gap: .35rem; font-size: .78rem; }
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 700; color: var(--text-primary); }
.chat-tabs {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--border);
}
.chat-tabs::-webkit-scrollbar { display: none; }
.chat-tab {
    display: flex; align-items: center; gap: .35rem;
    padding: .65rem 1rem; background: none; border: none;
    border-bottom: 2px solid transparent; color: var(--text-muted);
    font-family: var(--font-body); font-size: .78rem; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: all .18s;
}
.chat-tab:hover { color: var(--text-primary); }
.chat-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-badge {
    background: var(--bg-hover); border-radius: var(--r-pill);
    padding: .1rem .45rem; font-size: .65rem; font-weight: 700;
}
.chat-content-container { flex: 1; overflow: hidden; }
.chat-room-content { display: none; height: 100%; }
.chat-room-content.active { display: flex; flex-direction: column; }
.chat-room-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .65rem 1rem; background: var(--bg-raised);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-room-header h4 { font-size: .85rem; font-weight: 600; }
.chat-room-header small { font-size: .7rem; color: var(--text-muted); }
.chat-messages-list {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: .85rem; max-height: 400px;
}
.chat-message.user-a .message-content-wrapper {
    background: var(--primary-dim); border: 1px solid var(--primary-border);
}
.chat-message.user-b { justify-content: flex-end; }
.chat-message.deleted { opacity: .5; }
.message-date-header { text-align: center; margin: .4rem 0; }
.message-date-header span {
    background: var(--bg-raised); padding: .2rem .75rem;
    border-radius: var(--r-pill); font-size: .68rem; color: var(--text-muted);
}
.message-status.deleted {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .6rem; background: var(--red-dim); color: var(--red);
    padding: .08rem .4rem; border-radius: 4px; margin-left: .4rem;
}
.highlight-search { outline: 2px solid var(--amber); border-radius: var(--r); }

/* Debug */
.debug-summary { margin-bottom: 1.25rem; }
.debug-summary h4, .debug-messages-section h4, .debug-chats-section h4 {
    font-size: .78rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .07em; margin-bottom: .6rem;
}
.stat-box {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .8rem; text-align: center;
}
.stat-box.success { border-color: var(--green); background: var(--green-dim); }
.stat-box.danger { border-color: var(--red); background: var(--red-dim); }
.stat-box .stat-number { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-box .stat-label { font-size: .7rem; color: var(--text-muted); margin-top: .12rem; }

.messages-table { overflow-x: auto; margin-top: .75rem; }
.messages-table table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.messages-table th {
    padding: .55rem .75rem; background: var(--bg-raised);
    border-bottom: 1px solid var(--border); text-align: left;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
.messages-table td {
    padding: .55rem .75rem; border-bottom: 1px solid var(--border);
    vertical-align: top; max-width: 220px; word-break: break-word;
}
.messages-table tr.deleted-row { opacity: .55; background: var(--red-dim); }
.messages-table tr:hover td { background: var(--bg-hover); }
.message-preview { color: var(--text-secondary); font-size: .75rem; }
.status-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .12rem .45rem; border-radius: 4px; font-size: .65rem; font-weight: 600;
}
.status-badge.deleted { background: var(--red-dim); color: var(--red); }
.status-badge.visible { background: var(--green-dim); color: var(--green); }

/* Debug cards */
.chat-debug-card {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .9rem; margin-bottom: .6rem;
}
.chat-debug-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .35rem;
}
.chat-debug-header h5 { font-size: .85rem; font-weight: 600; }
.chat-count { font-size: .7rem; color: var(--primary); font-weight: 600; }
.chat-debug-details { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .72rem; color: var(--text-muted); }
.sample-messages { margin-top: .6rem; }
.sample-messages h6 {
    font-size: .68rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem;
}
.sample-message {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-sm); padding: .55rem .7rem;
    margin-bottom: .3rem; font-size: .75rem;
}
.sample-message.deleted { opacity: .5; }
.sample-header { display: flex; justify-content: space-between; margin-bottom: .2rem; }
.sample-from-to { font-weight: 600; }
.sample-time { font-size: .65rem; color: var(--text-muted); }
.sample-content { color: var(--text-secondary); font-style: italic; }
.debug-message {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .7rem; margin-bottom: .4rem;
}
.debug-message.deleted { opacity: .5; border-color: var(--red-dim); }
.debug-message-header { display: flex; gap: .5rem; margin-bottom: .25rem; font-size: .72rem; }
.debug-message-header .sender { font-weight: 600; color: var(--primary); }
.debug-message-header .recipient { color: var(--text-muted); }
.debug-message-header .time { margin-left: auto; color: var(--text-muted); }
.debug-message-content { font-size: .78rem; color: var(--text-secondary); }
.debug-message-meta { display: flex; gap: .5rem; margin-top: .3rem; }
.meta-item { font-size: .65rem; color: var(--text-muted); background: var(--bg-card); padding: .08rem .4rem; border-radius: 4px; }

/* Info grid */
.info-grid { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .75rem; }
.info-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .45rem .65rem; background: var(--bg-raised);
    border-radius: var(--r-sm); font-size: .78rem;
}
.info-label { color: var(--text-muted); font-weight: 600; min-width: 140px; font-size: .72rem; }
.info-value { color: var(--text-primary); }
.info-value.success { color: var(--green); }

/* Chat debug items */
.chat-debug-item {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r); padding: .8rem; margin-bottom: .4rem;
}
.chat-debug-item.user-not-found { border-color: var(--amber); }
.chat-debug-details { font-size: .75rem; color: var(--text-muted); display: flex; flex-direction: column; gap: .15rem; }
.last-message-preview { font-style: italic; color: var(--text-secondary); margin-top: .25rem; }
.chat-status { font-size: .68rem; font-weight: 600; padding: .12rem .45rem; border-radius: 4px; }
.chat-status.exists { background: var(--green-dim); color: var(--green); }
.chat-status.not-found { background: var(--red-dim); color: var(--red); }

/* Code blocks */
.code-block { margin-bottom: 1rem; }
.code-block h5 { font-size: .78rem; color: var(--text-muted); margin-bottom: .35rem; font-weight: 600; }
.code-block pre {
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r); padding: .85rem; overflow-x: auto;
}
.code-block code { font-family: monospace; font-size: .78rem; color: var(--primary); }

/* Room selector */
.rooms-list-selector { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.room-selector-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem .9rem; background: var(--bg-raised);
    border: 1px solid var(--border); border-radius: var(--r);
    transition: border-color .18s;
}
.room-selector-item:hover { border-color: var(--primary-border); }
.room-selector-item .room-info { flex: 1; }
.room-selector-item .room-name { font-weight: 600; font-size: .85rem; display: block; }
.room-selector-item small { font-size: .7rem; color: var(--text-muted); }
.users-pair { display: flex; align-items: center; gap: .75rem; margin: .75rem 0; justify-content: center; }
.user-badge {
    display: inline-flex; padding: .35rem .8rem;
    background: var(--primary-dim); border: 1px solid var(--primary-border);
    border-radius: var(--r-pill); color: var(--primary);
    font-weight: 600; font-size: .85rem;
}

/* Private chat in admin modal */
.private-chat-item {
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: .9rem; margin-bottom: .6rem;
}
.private-chat-item.user-not-found { border-color: var(--amber); }
.private-chat-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: .5rem; flex-wrap: wrap; gap: .4rem;
}
.private-chat-user-info { display: flex; align-items: center; gap: .6rem; }
.private-chat-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; color: #fff; flex-shrink: 0;
}
.private-chat-avatar.online { box-shadow: 0 0 0 2px var(--green); }
.private-chat-avatar.unknown { background: var(--bg-hover); color: var(--text-muted); }
.private-chat-user-details .private-chat-username { font-weight: 600; font-size: .85rem; display: block; margin-bottom: .2rem; }
.private-chat-user-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.private-chat-role { font-size: .65rem; padding: .1rem .4rem; border-radius: 4px; }
.private-chat-status.online { color: var(--green); font-size: .7rem; }
.private-chat-status.offline { color: var(--text-muted); font-size: .7rem; }
.user-not-found-tag { font-size: .65rem; color: var(--amber); }
.private-chat-time { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.private-chat-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0; }
.private-chat-preview {
    display: flex; align-items: flex-start; gap: .4rem;
    padding: .45rem .65rem; background: var(--bg-input);
    border-radius: var(--r-sm); margin: .4rem 0;
    font-size: .78rem; color: var(--text-secondary);
}
.private-chat-preview.empty { color: var(--text-muted); font-style: italic; }
.preview-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-sender { font-size: .68rem; color: var(--text-muted); white-space: nowrap; }
.private-chat-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* Loading modal */
.admin-modal-overlay.loading .admin-modal { max-width: 300px; text-align: center; }
.loading-content { padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.loading-content i { font-size: 2rem; color: var(--primary); }
.loading-content p { font-size: .85rem; color: var(--text-secondary); }

/* Admin notification */
.admin-notification {
    position: fixed; bottom: 1.3rem; right: 1.3rem;
    padding: .75rem 1.2rem; border-radius: var(--r);
    z-index: 99999; font-size: .82rem; font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: .5rem;
    animation: slideIn .3s var(--transition);
    border: 1px solid transparent;
    color: #fff; max-width: 340px; word-break: break-word;
    backdrop-filter: blur(10px);
}
.admin-notification.success { background: rgba(34, 197, 94,.92); border-color: var(--green); }
.admin-notification.error { background: rgba(239, 68, 68,.92); border-color: var(--red); }
.admin-notification.info { background: rgba(110, 120, 196,.9); border-color: var(--primary); }
.admin-notification.warning { background: rgba(245, 158, 11,.92); border-color: var(--amber); color: var(--bg-void); }

/* Empty/error states */
.empty-debug {
    display: flex; flex-direction: column; align-items: center;
    padding: 2.5rem 1rem; text-align: center; color: var(--text-muted);
}
.empty-debug i { font-size: 2.5rem; margin-bottom: .75rem; opacity: .4; }
.empty-debug h4 { font-size: .95rem; margin-bottom: .5rem; color: var(--text-secondary); }
.empty-debug p { font-size: .82rem; }
.empty-debug ul { margin-top: .5rem; text-align: left; font-size: .78rem; }
.empty-debug li { margin-bottom: .2rem; }

/* Conversation blocks */
.conversation-block { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.conversation-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem .9rem; background: var(--bg-raised);
    font-size: .75rem; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.conversation-room { font-weight: 600; }
.conversation-messages { padding: .65rem; display: flex; flex-direction: column; gap: .5rem; }
.conversation-message {
    display: flex; flex-direction: column; gap: .2rem;
    padding: .6rem .75rem; border-radius: var(--r-sm);
    background: var(--bg-card); border: 1px solid var(--border);
}
.conversation-message.user-a { border-left: 3px solid var(--primary); }
.conversation-message.user-b { border-right: 3px solid var(--coral); margin-left: auto; max-width: 85%; }
.message-deleted-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .6rem; background: var(--red-dim); color: var(--red);
    padding: .1rem .4rem; border-radius: 4px;
}
.conversation-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: .95rem; margin-bottom: .5rem;
    transition: all .2s;
}
.conversation-item:hover { border-color: var(--primary-border); }
.conversation-header strong { font-size: .9rem; }
.conversation-preview { display: flex; justify-content: space-between; margin: .4rem 0; font-size: .75rem; color: var(--text-muted); }
.conversation-actions { display: flex; gap: .4rem; }
.btn-view, .btn-delete {
    padding: .35rem .75rem; border: none; border-radius: var(--r-sm);
    font-size: .75rem; font-weight: 600; cursor: pointer;
    transition: all .2s; display: flex; align-items: center; gap: .3rem;
}
.btn-view { background: var(--primary-dim); color: var(--primary); border: 1px solid var(--primary-border); }
.btn-view:hover { box-shadow: 0 2px 8px rgba(110, 120, 196,.2); }
.btn-delete { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.btn-delete:hover { background: rgba(239, 68, 68,.22); }
.inspect-chat-btn { flex-shrink: 0; padding: .35rem .75rem; font-size: .72rem; }
.chat-simple-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; color: #fff; flex-shrink: 0;
}

/* Responsive admin */
@media (max-width: 768px) {
    .admin-body { flex-direction: column; }
    .admin-nav {
        width: 100%; flex-direction: row; padding: .35rem .5rem;
        border-right: none; border-bottom: 1px solid var(--border);
        overflow-x: auto; overflow-y: hidden; gap: .15rem;
    }
    .admin-nav-section { display: flex; align-items: center; gap: .15rem; margin-bottom: 0; }
    .admin-nav-label { display: none; }
    .admin-nav-item {
        padding: .45rem .75rem; border-left: none;
        border-bottom: 2px solid transparent; flex-direction: row;
        white-space: nowrap; border-radius: var(--r-sm); font-size: .75rem;
    }
    .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--primary); }
    .admin-nav-divider { display: none; }
    .admin-nav-section:last-child .admin-nav-item { margin-left: auto; }
    .admin-main-header { padding: .75rem 1rem; }
    .admin-sections { padding: 1rem; }
    .admin-panel-header {
        padding: 0 1rem; height: auto; min-height: 56px;
        flex-wrap: wrap; gap: .5rem;
        padding-top: .65rem; padding-bottom: .65rem;
    }
    .admin-panel-header h1 { font-size: 1rem; }
    .user-info-modal-expanded, .private-chat-modal-expanded { max-width: 100%; height: 95vh; }
    .chat-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .chat-messages-list { max-height: 300px; }
    .monitor-messages-list { max-height: 260px; }
    .info-grid { flex-direction: column; }
    .admin-user-card { padding: .8rem; }
    .admin-report-card { padding: .8rem; }
}

/* ═══════════════════════════════════════════════════
   VERIFICATION / RESET FORMS
═══════════════════════════════════════════════════ */
.input-group {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-input);
    border-radius: var(--r); padding: 0 14px;
    margin-bottom: 16px; border: 1px solid var(--border);
    transition: all 0.2s;
}
.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}
.input-group i { color: var(--primary); font-size: 1.1rem; }
.input-group input {
    flex: 1; background: transparent; border: none;
    padding: 14px 0; color: var(--text-primary);
    font-size: 0.95rem;
}
.input-group input:focus { outline: none; }
.btn-secondary {
    background: var(--bg-hover); border: 1px solid var(--border);
    color: var(--text-secondary); font-weight: 600; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
.btn-warning {
    background: var(--amber-dim); border: 1px solid var(--amber);
    color: var(--amber); font-weight: 600;
}
.btn-warning:hover { background: rgba(245, 158, 11,0.22); }
.auth-message {
    padding: 10px; border-radius: var(--r);
    margin: 10px 0; font-size: 0.85rem;
    display: flex; align-items: center; gap: 8px;
}
.auth-message.error { background: var(--red-dim); border-left: 3px solid var(--red); color: var(--red); }
.auth-message.success { background: var(--green-dim); border-left: 3px solid var(--green); color: var(--green); }
.auth-form { display: none; }
.auth-form.active { display: block; }
@media (max-width: 768px) {
    .input-group { padding: 0 8px; }
    .input-group input { padding: 12px 0; font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════
   IMAGES IN PRIVATE CHAT
═══════════════════════════════════════════════════ */
.chat-image-container { max-width: 280px; border-radius: var(--r); overflow: hidden; margin: 4px 0; }
.chat-image { width: 100%; max-height: 320px; object-fit: cover; cursor: pointer; border-radius: var(--r); transition: opacity .2s; }
.chat-image:hover { opacity: .9; }
.view-once-image { max-width: 240px; margin: 4px 0; }
.view-once-placeholder {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary-dim), var(--violet-dim));
    border: 1px dashed var(--primary-border);
    border-radius: var(--r); cursor: pointer;
    color: var(--primary); font-size: .88rem; transition: background .2s;
}
.view-once-placeholder:hover { background: linear-gradient(135deg, rgba(110, 120, 196,.18), rgba(128, 137, 201,.18)); }
.view-once-placeholder i { font-size: 1.2rem; }
.view-once-expired {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-muted); font-style: italic;
    font-size: .82rem; padding: 8px 0;
}
.image-preview-overlay, .view-once-overlay, .fullscreen-image-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s;
}
.image-preview-modal {
    background: var(--bg-card); border-radius: var(--r-lg);
    max-width: 480px; width: 90%; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--border);
}
.image-preview-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.image-preview-header h3 { margin: 0; font-size: .95rem; color: var(--text-primary); }
.close-preview-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.4rem; cursor: pointer; padding: 0 4px; }
.close-preview-btn:hover { color: var(--text-primary); }
.image-preview-body { padding: 16px; display: flex; justify-content: center; overflow: auto; max-height: 50vh; }
.image-preview-img { max-width: 100%; max-height: 48vh; object-fit: contain; border-radius: var(--r-sm); }
.image-preview-footer {
    padding: 12px 16px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.view-once-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .85rem; color: var(--text-secondary); }
.view-once-toggle input[type="checkbox"] { accent-color: var(--primary); }
.view-once-label { display: flex; align-items: center; gap: 4px; }
.image-preview-actions { display: flex; gap: 8px; }
.btn-cancel-img, .btn-send-img {
    padding: 8px 16px; border-radius: var(--r-sm);
    border: none; cursor: pointer; font-size: .85rem; font-weight: 600;
}
.btn-cancel-img { background: var(--bg-hover); color: var(--text-secondary); }
.btn-cancel-img:hover { background: var(--bg-input); }
.btn-send-img { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.btn-send-img:hover { box-shadow: 0 4px 12px rgba(110, 120, 196,.35); }
.view-once-viewer {
    position: relative; max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center;
}
.view-once-header {
    color: var(--text-secondary); font-size: .85rem;
    padding: 8px 16px; display: flex; align-items: center; gap: 12px;
    background: rgba(0,0,0,.5); border-radius: var(--r-sm); margin-bottom: 12px;
}
.close-view-once { background: none; border: none; color: var(--text-secondary); font-size: 1.4rem; cursor: pointer; margin-left: auto; }
.close-view-once:hover { color: #fff; }
.view-once-full-img {
    max-width: 90vw; max-height: 80vh; object-fit: contain;
    border-radius: var(--r-sm); user-select: none;
    -webkit-user-select: none; pointer-events: none;
}
.fullscreen-image-container { position: relative; max-width: 95vw; max-height: 95vh; }
.close-fullscreen-img {
    position: absolute; top: -12px; right: -12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; z-index: 1;
}
.close-fullscreen-img:hover { background: var(--red); color: #fff; }
.fullscreen-img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: var(--r-sm); }
#imageUploadBtn { color: var(--text-muted); font-size: .92rem; }
#imageUploadBtn:hover { color: var(--primary); }

/* ═══════════════════════════════════════════════════
   PROFILE PANEL SYSTEM
═══════════════════════════════════════════════════ */
.pp-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 270px; background: var(--bg-card);
    border: 1px solid var(--primary-border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    z-index: 9999; animation: ppSlideIn .18s var(--transition);
}
@keyframes ppSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.pp-dd-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.pp-dd-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: #fff; flex-shrink: 0;
}
.pp-dd-info { display: flex; flex-direction: column; min-width: 0; }
.pp-dd-name {
    font-weight: 600; color: var(--text-primary); font-size: .9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-dd-role {
    font-size: .72rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .5px;
}
.pp-dd-status { padding: 10px 16px; }
.pp-dd-status-label {
    font-size: .72rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 6px; display: block;
}
.pp-dd-status-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pp-status-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 8px; border: none; background: transparent;
    color: var(--text-secondary); font-size: .78rem;
    border-radius: var(--r-sm); cursor: pointer;
    font-family: var(--font-body); transition: .15s;
}
.pp-status-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.pp-status-btn.active { background: var(--primary-dim); color: var(--primary); }
.pp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pp-dot-online { background: var(--green); }
.pp-dot-away { background: var(--amber); }
.pp-dot-busy { background: var(--red); }
.pp-dot-invisible { background: var(--text-muted); }
.pp-dd-divider { height: 1px; background: var(--border); margin: 2px 12px; }
.pp-dd-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 16px; border: none; background: none;
    color: var(--text-secondary); font-size: .84rem; cursor: pointer;
    font-family: var(--font-body); transition: .15s; text-align: left;
}
.pp-dd-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.pp-dd-item i { width: 16px; text-align: center; font-size: .82rem; }
.pp-dd-danger { color: var(--red); }
.pp-dd-danger:hover { background: var(--red-dim); color: var(--red); }

/* Profile Modal */
.pp-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.7); z-index: 10000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(6px); animation: fadeIn .2s;
}
.pp-modal {
    display: flex; width: 840px; max-width: 95vw;
    height: 580px; max-height: 90vh;
    background: var(--bg-base); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.pp-sidebar {
    width: 225px; background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
.pp-sidebar-header {
    padding: 24px 20px 16px; text-align: center;
    border-bottom: 1px solid var(--border);
}
.pp-avatar-large {
    width: 76px; height: 76px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; font-weight: 700; color: #fff;
    margin: 0 auto 10px; overflow: hidden;
}
.pp-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.pp-sidebar-header h3 {
    color: var(--text-primary); font-size: .95rem; margin: 0 0 4px;
    font-family: var(--font-display); font-weight: 600;
}
.pp-role-badge {
    font-size: .68rem; padding: 2px 10px; border-radius: var(--r-pill);
    text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}
.pp-role-superadmin { background: var(--red-dim); color: var(--red); }
.pp-role-admin { background: var(--amber-dim); color: var(--amber); }
.pp-role-moderator { background: var(--violet-dim); color: var(--violet); }
.pp-role-user { background: var(--primary-dim); color: var(--primary); }
.pp-role-guest { background: rgba(148,163,184,.15); color: #94a3b8; }
.pp-tabs {
    padding: 8px; display: flex; flex-direction: column;
    gap: 2px; flex: 1; overflow-y: auto;
}
.pp-tab {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border: none; background: none;
    color: var(--text-secondary); font-size: .84rem; cursor: pointer;
    border-radius: var(--r-sm); font-family: var(--font-body);
    transition: .15s; text-align: left; width: 100%;
}
.pp-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.pp-tab.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
.pp-tab i { width: 16px; text-align: center; font-size: .82rem; }

.pp-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pp-content-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.pp-content-header h2 {
    font-size: 1.1rem; font-weight: 600; color: var(--text-primary);
    margin: 0; font-family: var(--font-display);
}
.pp-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: var(--bg-hover);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: .18s; font-size: .9rem;
}
.pp-close:hover { background: var(--red-dim); color: var(--red); }
.pp-content-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* Profile form elements */
.pp-section { margin-bottom: 20px; }
.pp-label {
    display: block; font-size: .78rem; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: .5px; margin-bottom: 8px;
}
.pp-label-sm { margin-top: 10px; }
.pp-label .pp-counter { float: right; font-weight: 400; font-size: .72rem; color: var(--text-muted); }
.pp-input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--text-primary);
    font-size: .88rem; font-family: var(--font-body);
    outline: none; transition: .2s; margin-bottom: 6px; box-sizing: border-box;
}
.pp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.pp-textarea {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--r-sm); color: var(--text-primary);
    font-size: .88rem; font-family: var(--font-body);
    outline: none; transition: .2s; resize: vertical; min-height: 60px; box-sizing: border-box;
}
.pp-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.pp-hint { font-size: .72rem; color: var(--text-muted); }
.pp-inline { display: flex; gap: 8px; align-items: flex-start; }
.pp-inline .pp-input { flex: 1; }
.pp-divider { height: 1px; background: var(--border); margin: 20px 0; }

.pp-avatar-edit { display: flex; align-items: center; gap: 16px; }
.pp-avatar-preview {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--coral));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: #fff;
    flex-shrink: 0; overflow: hidden;
}
.pp-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.pp-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.pp-color-pick { display: flex; align-items: center; gap: 12px; }
.pp-color-pick input[type="color"] {
    width: 40px; height: 40px; border: none;
    border-radius: var(--r-sm); cursor: pointer; background: none; padding: 0;
}
.pp-color-preview { font-weight: 600; font-size: 1rem; }

/* Profile buttons */
.pp-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: none; border-radius: var(--r-sm);
    font-size: .84rem; font-family: var(--font-body);
    font-weight: 500; cursor: pointer; transition: .2s;
}
.pp-btn-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.pp-btn-primary:hover { box-shadow: 0 4px 12px rgba(110, 120, 196,.35); }
.pp-btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border); }
.pp-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.pp-btn-danger { background: var(--red-dim); color: var(--red); }
.pp-btn-danger:hover { background: var(--red); color: #fff; }
.pp-btn-ghost { background: none; color: var(--text-muted); padding: 6px 10px; }
.pp-btn-ghost:hover { color: var(--text-primary); }
.pp-btn-sm { padding: 6px 12px; font-size: .8rem; }
.pp-btn-full { width: 100%; justify-content: center; padding: 12px; }
.pp-actions { margin-top: 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* Toggle switch */
.pp-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.pp-toggle-row span { color: var(--text-primary); font-size: .88rem; }
.pp-switch { position: relative; width: 44px; height: 24px; display: inline-block; }
.pp-switch input { opacity: 0; width: 0; height: 0; }
.pp-slider {
    position: absolute; inset: 0;
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer; transition: .2s;
}
.pp-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 2px; top: 2px;
    background: var(--text-muted); border-radius: 50%; transition: .2s;
}
.pp-switch input:checked + .pp-slider { background: var(--primary-dim); border-color: var(--primary); }
.pp-switch input:checked + .pp-slider::before { transform: translateX(20px); background: var(--primary); }

.pp-theme-options { display: flex; gap: 8px; }
.pp-theme-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px;
    border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text-secondary); border-radius: var(--r-sm);
    cursor: pointer; font-family: var(--font-body);
    font-size: .86rem; transition: .18s;
}
.pp-theme-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.pp-theme-btn.active { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); }

.pp-radio-group { display: flex; flex-direction: column; gap: 8px; }
.pp-radio {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: var(--r-sm);
    cursor: pointer; color: var(--text-primary);
    font-size: .88rem; transition: .15s;
}
.pp-radio:hover { background: var(--bg-hover); }
.pp-radio input { display: none; }
.pp-radio-mark {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative; flex-shrink: 0; transition: .2s;
}
.pp-radio input:checked ~ .pp-radio-mark { border-color: var(--primary); }
.pp-radio input:checked ~ .pp-radio-mark::after {
    content: ''; position: absolute;
    width: 10px; height: 10px;
    background: var(--primary); border-radius: 50%;
    top: 2px; left: 2px;
}

/* Privacidad (rediseño) */
.pp-priv { display: flex; flex-direction: column; gap: 12px; }
.pp-priv-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 6px 14px;
}
.pp-priv-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.pp-priv-row.no-border { border: none; }
.pp-priv-ic {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-dim); color: var(--primary); font-size: 1rem;
}
.pp-priv-ic.danger { background: rgba(239,68,68,.12); color: #ef4444; }
.pp-priv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-priv-txt strong { font-size: .9rem; color: var(--text-primary); }
.pp-priv-txt span { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.pp-priv-clickable { cursor: pointer; border-radius: var(--r-sm); transition: background .15s; }
.pp-priv-clickable:hover { background: var(--bg-hover); }
.pp-priv-arrow { color: var(--text-muted); }
.pp-radio-text { display: flex; flex-direction: column; gap: 1px; }
.pp-radio-text b { font-size: .88rem; }
.pp-radio-text small { font-size: .74rem; color: var(--text-muted); }
.pp-tag { display: inline-block; font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.pp-tag-temp { background: var(--golden-dim, rgba(245,158,11,.16)); color: #d97706; }

.pp-blocked-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.pp-blocked-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: var(--bg-input);
    border-radius: var(--r-sm); border: 1px solid var(--border);
}
.pp-blocked-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--bg-hover); display: flex; align-items: center;
    justify-content: center; font-size: .78rem; font-weight: 600;
    color: var(--text-secondary); flex-shrink: 0;
}
.pp-blocked-name { flex: 1; color: var(--text-primary); font-size: .86rem; }
.pp-empty { color: var(--text-muted); font-size: .84rem; padding: 20px; text-align: center; }

.pp-session-info {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--r-sm);
}
.pp-session-info > i { font-size: 1.4rem; color: var(--primary); }
.pp-session-info div { flex: 1; }
.pp-session-info strong { color: var(--text-primary); font-size: .9rem; }
.pp-session-info p { margin: 2px 0 0; font-size: .78rem; }
.pp-session-active {
    color: var(--green); font-size: .76rem;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.pp-session-active i { font-size: .5rem; }
.pp-text-muted { color: var(--text-muted); }

.pp-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card); border: 1px solid var(--green);
    color: var(--green); padding: 10px 20px;
    border-radius: var(--r); font-size: .86rem;
    font-family: var(--font-body);
    display: flex; align-items: center; gap: 8px;
    z-index: 99999; opacity: 0; transition: .3s;
    box-shadow: var(--shadow-md);
}
.pp-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════
   EMOJI PICKER & FORMAT BAR
═══════════════════════════════════════════════════ */
.ct-emoji-picker {
    position: absolute; bottom: 100%; left: 0;
    width: 320px; max-height: 280px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    z-index: 1000; display: flex; flex-direction: column; margin-bottom: 6px;
}
.ct-emoji-header {
    display: flex; gap: 2px; padding: 6px 8px;
    border-bottom: 1px solid var(--border); overflow-x: auto;
}
.ct-cat-btn {
    background: none; border: none; color: var(--text-muted);
    font-size: .72rem; padding: 4px 8px;
    border-radius: var(--r-sm); cursor: pointer;
    white-space: nowrap; font-family: var(--font-body);
}
.ct-cat-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ct-cat-btn.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
.ct-emoji-grid {
    display: grid; grid-template-columns: repeat(10, 1fr);
    gap: 2px; padding: 8px; overflow-y: auto; flex: 1;
}
.ct-emoji-btn {
    background: none; border: none; font-size: 1.25rem;
    padding: 4px; border-radius: var(--r-sm);
    cursor: pointer; transition: .1s; line-height: 1;
}
.ct-emoji-btn:hover { background: var(--bg-hover); transform: scale(1.2); }
.ct-format-bar {
    position: absolute; bottom: 100%; left: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-lg);
    z-index: 1000; display: flex; align-items: center;
    gap: 4px; padding: 6px 10px; margin-bottom: 6px;
}
.ct-fmt-btn {
    background: none; border: 1px solid transparent;
    color: var(--text-secondary); width: 30px; height: 30px;
    border-radius: var(--r-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; transition: .15s;
}
.ct-fmt-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ct-fmt-btn.active { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }
.ct-fmt-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.ct-fmt-colors { display: flex; gap: 4px; align-items: center; }
.ct-color-btn {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border); cursor: pointer; transition: .15s;
}
.ct-color-btn:hover { transform: scale(1.15); }
.ct-color-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-dim); }
.status-away i { color: var(--amber) !important; }
.status-busy i { color: var(--red) !important; }

/* Profile modal responsive */
@media(max-width:700px) {
    .pp-modal { flex-direction: column; height: 95vh; width: 95vw; }
    .pp-sidebar {
        width: 100%; flex-direction: row;
        border-right: none; border-bottom: 1px solid var(--border);
        overflow: hidden;
    }
    .pp-sidebar-header { display: none; }
    .pp-tabs { flex-direction: row; padding: 4px 8px; gap: 0; overflow-x: auto; }
    .pp-tab { padding: 8px 12px; white-space: nowrap; font-size: .78rem; }
    .pp-dropdown { width: 250px; }
}

/* ═══════════════════════════════════════════
   PROFILE PAGE — Instagram/Facebook Style
═══════════════════════════════════════════ */

/* ── Root & Animations ── */
.pfp-root {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--bg-void);
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .32s var(--transition), transform .32s var(--transition);
}
.pfp-root.pfp-enter {
    opacity: 1;
    transform: translateY(0);
}
.pfp-root.pfp-exit {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

/* ── Top Nav ── */
.pfp-topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--bg-topnav, rgba(13, 17, 23, 0.85));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.pfp-nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-primary);
    font: 500 .88rem var(--font-body);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    transition: background .2s, color .2s;
}
.pfp-nav-back:hover {
    background: var(--bg-hover);
    color: var(--primary-light);
}
.pfp-nav-brand {
    font: 700 1.05rem var(--font-display);
    color: var(--text-secondary);
    white-space: nowrap;
}
.pfp-nav-brand strong {
    color: var(--primary);
}

/* ── Barra superior estilo red social (BabaditosProfile) ── */
.pfp-nav-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.pfp-nav-center { display: flex; align-items: center; gap: 6px; }
.pfp-nav-right { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }

.pfp-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 280px; flex: 1;
    background: var(--bg-hover, rgba(255,255,255,.07)); border: 1px solid var(--border);
    border-radius: var(--r-pill, 22px); padding: 7px 14px; }
.pfp-search > i { color: var(--text-muted); font-size: .85rem; }
.pfp-search input { flex: 1; min-width: 0; border: none; background: none; outline: none;
    color: var(--text-primary); font-size: .85rem; }
.pfp-search-results {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,.3); overflow: hidden; z-index: 30; max-height: 340px; overflow-y: auto;
}
.pfp-search-results.open { display: block; }
.pfp-search-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px;
    background: none; border: none; cursor: pointer; color: var(--text-primary); font-size: .86rem; text-align: left; }
.pfp-search-item:hover { background: var(--bg-hover); }
.pfp-search-av { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; overflow: hidden;
    background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.pfp-search-av img { width: 100%; height: 100%; object-fit: cover; }
.pfp-search-name { font-weight: 600; }
.pfp-search-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: .82rem; }

.pfp-nav-ico {
    width: 42px; height: 42px; border-radius: 50%;
    border: none; background: var(--bg-hover, rgba(255,255,255,.07));
    color: var(--text-primary); cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.pfp-nav-ico:hover { background: var(--primary); color: #fff; }
.pfp-nav-ico.active { background: var(--primary); color: #fff; }

/* Botones de navegación del centro con nombre (Chat / Salas / Anuncios) */
.pfp-nav-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border: none; border-radius: var(--r-pill, 22px);
    background: var(--bg-hover, rgba(255,255,255,.07)); color: var(--text-secondary);
    cursor: pointer; font-size: .86rem; font-weight: 600; white-space: nowrap;
    transition: background .15s, color .15s;
}
.pfp-nav-tab i { font-size: .95rem; }
.pfp-nav-tab:hover { color: var(--primary); }
.pfp-nav-tab.active { background: var(--primary); color: #fff; }
@media (max-width: 1100px) {
    .pfp-nav-tab span { display: none; }
    .pfp-nav-tab { padding: 9px 12px; }
}
#pfpNavAdmin, .app-topbar [data-nav="admin"] { color: var(--primary); }
#pfpNavAdmin:hover, .app-topbar [data-nav="admin"]:hover { background: var(--primary); color: #fff; }

/* Botones de acción de sección (Crear sala / Publicar / etc.) en la barra */
.pfp-nav-action {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--r-pill, 22px);
    border: 1px solid var(--border); background: var(--bg-hover, rgba(255,255,255,.07));
    color: var(--text-primary); cursor: pointer; font-size: .84rem; font-weight: 600;
    white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.pfp-nav-action:hover { border-color: var(--primary); color: var(--primary); }
.pfp-nav-action.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.pfp-nav-action.primary:hover { filter: brightness(1.08); color: #fff; }
@media (max-width: 1000px) { .pfp-nav-action span { display: none; } .pfp-nav-action { padding: 9px 11px; } }

.pfp-nav-avatar-wrap { position: relative; }
.pfp-nav-avatar {
    display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px;
    border: 1px solid var(--border); background: var(--bg-hover, rgba(255,255,255,.07));
    border-radius: var(--r-pill, 22px); cursor: pointer; color: var(--text-secondary);
}
.pfp-nav-avatar > img, .pfp-nav-avatar > span:not(.pfp-nav-caret) {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-weight: 700; font-size: .82rem;
}
.pfp-nav-caret { font-size: .65rem; color: var(--text-muted); }
.pfp-nav-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,.3); overflow: hidden; z-index: 30; padding: 6px;
}
.pfp-nav-menu.open { display: block; }
.pfp-nav-menu button {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px;
    background: none; border: none; border-radius: 8px; cursor: pointer;
    color: var(--text-primary); font-size: .86rem; text-align: left;
}
.pfp-nav-menu button:hover { background: var(--bg-hover); }
.pfp-nav-menu button i { width: 18px; text-align: center; color: var(--text-secondary); }
.pfp-nav-menu-danger { color: var(--red, #ef4444) !important; }
.pfp-nav-menu-danger i { color: var(--red, #ef4444) !important; }

@media (max-width: 880px) {
    .pfp-nav-center { gap: 2px; }
    .pfp-nav-ico { width: 38px; height: 38px; font-size: .92rem; }
    .pfp-search { max-width: 160px; }
    .pfp-nav-brand { display: none; }
    .pfp-nav-menu button span, .pfp-nav-avatar .pfp-nav-caret { }
}
@media (max-width: 600px) {
    .pfp-search { display: none; }
    .pfp-topnav { padding: 0 10px; gap: 6px; }
}

/* ── Body ── */
.pfp-body {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* ── Cover Photo ── */
.pfp-cover {
    position: relative;
    width: 100%;
    height: 350px;
    background: linear-gradient(120deg, #4338ca 0%, #6d28d9 28%, #2563eb 58%, #0ea5e9 100%);
    background-size: 200% 200%;
    background-position: center;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    overflow: hidden;
    animation: pfpCoverShift 18s ease infinite;
}
/* Si hay foto de portada cargada inline, no aplicar el degradado animado */
.pfp-cover[style*="background-image"] { animation: none; background-size: cover; }
.pfp-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 18% 22%, rgba(255,255,255,.18), transparent 42%),
      radial-gradient(circle at 82% 78%, rgba(255,255,255,.12), transparent 46%);
    pointer-events: none;
}
@keyframes pfpCoverShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.pfp-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,17,23,0.7) 0%, transparent 50%);
    pointer-events: none;
}
.pfp-cover-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-sm);
    color: #fff;
    font: 500 .82rem var(--font-body);
    cursor: pointer;
    transition: background .2s;
}
.pfp-cover-btn:hover {
    background: rgba(0,0,0,0.75);
}
/* Menú flotante al tocar la portada (Ver foto / Cambiar portada). */
.pfp-cover-menu {
    position: fixed;
    z-index: 10001;
    min-width: 190px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px) scale(.97);
    transition: opacity .15s, transform .15s;
}
.pfp-cover-menu.show { opacity: 1; transform: translateY(0) scale(1); }
.pfp-cover-menu button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 13px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font: 600 .9rem var(--font-body);
    text-align: left;
}
.pfp-cover-menu button:hover { background: var(--bg-hover, rgba(99,102,241,.1)); }
.pfp-cover-menu button i { width: 18px; color: var(--primary); text-align: center; }

/* ── Profile Header ── */
.pfp-profile-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 40px 24px;
    /* Hero overlay: sube TODO el header (avatar + nombre + botones) sobre la
       portada; este mismo margen tira de las pestañas hacia arriba, así no queda
       espacio en blanco entre portada y contenido. */
    margin-top: -210px;
    background: transparent;
    flex-wrap: wrap;
    gap: 16px;
}
.pfp-header-left {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}
.pfp-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    padding-top: 78px;
}
.pfp-verified {
    color: #1DA1F2;
    font-size: 1.3rem;
    margin-left: 6px;
    vertical-align: middle;
}
.pfp-avatar-area {
    position: relative;
    z-index: 2;
}
.pfp-avatar-lg {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid var(--bg-void);
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 4px rgba(99,102,241,.25);
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.pfp-avatar-area:hover .pfp-avatar-lg {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 5px rgba(99,102,241,.45);
}
.pfp-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pfp-avatar-lg span {
    font: 700 3.8rem var(--font-display);
    color: var(--primary-light);
}
.pfp-avatar-status {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid var(--bg-void);
    z-index: 3;
}
.pfp-avatar-edit-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 4;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--bg-void);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    cursor: pointer;
    transition: background .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.pfp-avatar-edit-btn:hover {
    background: var(--primary-dark);
}

/* Status dots */
.pfp-dot-online, .pfp-dot-sm.pfp-dot-online { background: var(--green); }
.pfp-dot-away, .pfp-dot-sm.pfp-dot-away { background: var(--amber); }
.pfp-dot-busy, .pfp-dot-sm.pfp-dot-busy { background: var(--red); }
.pfp-dot-invisible, .pfp-dot-offline,
.pfp-dot-sm.pfp-dot-invisible, .pfp-dot-sm.pfp-dot-offline { background: var(--text-muted); }
.pfp-dot-inline {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ── Header Info ── */
.pfp-header-info {
    text-align: left;
    padding-bottom: 8px;
}
.pfp-display-name {
    font: 800 2rem var(--font-display);
    color: var(--text-primary);
    margin: 0;
}
.pfp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font: 700 .78rem var(--font-body);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 6px;
}
.pfp-badge-moderator { background: var(--green-dim); color: var(--green); }
.pfp-badge-admin { background: var(--coral-dim); color: var(--coral); }
.pfp-badge-superadmin { background: var(--golden-dim); color: var(--golden); }
.pfp-bio-text {
    color: var(--text-secondary);
    font: italic 400 1rem var(--font-body);
    margin: 8px 0 0;
}
.pfp-status-label {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 6px;
}

/* ── Meta chips (tipo de cuenta, fecha de registro, país) ── */
.pfp-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.pfp-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    font: 600 .76rem var(--font-body);
    color: var(--text-secondary);
}
.pfp-meta-chip i { color: var(--primary-light); font-size: .8rem; }

/* ── Stats Row ── */
.pfp-stats-row {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0;
}
.pfp-stat-item {
    text-align: center;
    cursor: pointer;
    transition: transform .2s;
}
.pfp-stat-item:hover {
    transform: scale(1.05);
}
.pfp-stat-num {
    display: block;
    font: 700 1.5rem var(--font-display);
    color: var(--text-primary);
}
.pfp-stat-label {
    display: block;
    font: 400 .78rem var(--font-body);
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ── Stats como tarjetas modernas (6 métricas) ── */
.pfp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    gap: 10px;
    justify-content: stretch;
}
.pfp-stats-grid .pfp-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.pfp-stats-grid .pfp-stat-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.pfp-stat-ico {
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: 2px;
}
.pfp-stats-grid .pfp-stat-num { font-size: 1.3rem; }
.pfp-stats-grid .pfp-stat-label { font-size: .72rem; }

/* ── Action Buttons (junto a la info en desktop; a lo ancho debajo en móvil) ── */
.pfp-action-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 0;
    padding-bottom: 8px;
    flex-wrap: wrap;
}
.pfp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font: 600 .88rem var(--font-body);
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.pfp-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.pfp-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    background: var(--bg-raised);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font: 600 .88rem var(--font-body);
    cursor: pointer;
    transition: background .2s;
}
.pfp-btn-secondary:hover {
    background: var(--bg-hover);
}
.pfp-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--r-sm);
    font: 600 .88rem var(--font-body);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.pfp-btn-outline:hover {
    background: var(--primary-dim);
}
.pfp-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-raised);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.pfp-btn-icon:hover {
    background: var(--bg-hover);
}
.pfp-btn-danger-icon:hover {
    background: var(--red-dim);
    color: var(--red);
    border-color: rgba(239, 68, 68,0.3);
}
.pfp-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--r-sm);
    font: 500 .82rem var(--font-body);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.pfp-btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.pfp-btn-sm {
    padding: 7px 14px !important;
    font-size: .82rem !important;
}
.pfp-btn-block {
    width: 100%;
    justify-content: center;
}
.pfp-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font: 600 .88rem var(--font-body);
    cursor: pointer;
    transition: background .2s;
}
.pfp-btn-danger:hover {
    background: var(--red);
}
.pfp-following-btn {
    color: var(--green);
    border-color: var(--green);
}
.pfp-following-btn:hover {
    background: var(--green-dim);
}

/* ── Tabs Bar ── */
.pfp-tabs-bar {
    position: sticky;
    top: 56px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-topnav, rgba(13, 17, 23, 0.9));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pfp-tabs-bar::-webkit-scrollbar { display: none; }
.pfp-tab-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    margin: 6px 2px;
    border-radius: var(--r-sm);
    background: none;
    border: none;
    color: var(--text-secondary);
    font: 500 .85rem var(--font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, background .2s;
}
.pfp-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}
.pfp-tab-btn.active {
    color: var(--primary);
    font-weight: 700;
}
.pfp-tab-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light, #818cf8));
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px var(--primary);
    transition: left .3s var(--transition), width .3s var(--transition);
}

/* ── Content Area ── */
.pfp-content-area {
    width: 100%;
    padding: 24px 40px;
    min-height: 300px;
    transition: opacity .15s ease, transform .15s ease;
    box-sizing: border-box;
}
.pfp-tab-fade-out {
    opacity: 0;
    transform: translateY(6px);
}
.pfp-tab-fade-in {
    animation: pfpFadeIn .3s ease forwards;
}
@keyframes pfpFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Posts Grid (Instagram style) ── */
.pfp-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.pfp-post-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-card);
}
.pfp-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.pfp-post-thumb:hover img {
    transform: scale(1.05);
}
.pfp-post-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity .25s;
}
.pfp-post-thumb:hover .pfp-post-overlay {
    opacity: 1;
}
.pfp-post-overlay span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font: 600 .92rem var(--font-body);
}

/* ── Empty State ── */
.pfp-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}
.pfp-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.pfp-empty-state h3 {
    font: 600 1.1rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 8px;
}
.pfp-empty-state p {
    color: var(--text-secondary);
    font-size: .88rem;
    margin: 0;
}

/* ── About Grid ── */
.pfp-about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.pfp-about-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-raised);
    border-radius: var(--r);
    border: 1px solid var(--border);
    transition: border-color .2s, transform .2s;
}
.pfp-about-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-2px);
}
.pfp-about-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--primary-dim);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.pfp-about-card-body h4 {
    font: 600 .82rem var(--font-body);
    color: var(--text-secondary);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.pfp-about-card-body p {
    font: 400 .92rem var(--font-body);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

/* ── Photos Section ── */
.pfp-photos-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pfp-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--r);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--bg-raised);
}
.pfp-upload-zone:hover,
.pfp-upload-zone.dragging {
    border-color: var(--primary);
    background: var(--primary-dim);
}
.pfp-upload-inner i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 12px;
    display: block;
}
.pfp-upload-inner p {
    color: var(--text-primary);
    font-size: .92rem;
    margin: 0 0 4px;
}
.pfp-upload-inner span {
    color: var(--text-muted);
    font-size: .78rem;
}
.pfp-photo-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.pfp-photo-card {
    background: var(--bg-raised);
    border-radius: var(--r);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.pfp-photo-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-card);
}
.pfp-photo-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-card);
}
.pfp-photo-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform .3s;
}
.pfp-photo-img-wrap:hover img {
    transform: scale(1.03);
}
.pfp-photo-del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
}
.pfp-photo-card:hover .pfp-photo-del {
    opacity: 1;
}
.pfp-photo-caption {
    padding: 10px 14px 0;
    color: var(--text-secondary);
    font-size: .85rem;
    margin: 0;
}
.pfp-photo-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}
.pfp-react-btn,
.pfp-react-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: 500 .85rem var(--font-body);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: color .2s, background .2s;
}
.pfp-react-btn:hover {
    background: var(--red-dim);
    color: var(--red);
}
.pfp-react-btn.active {
    color: var(--red);
}
.pfp-react-btn.active .fa-heart {
    animation: pfpHeartPop .35s ease;
}
@keyframes pfpHeartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.pfp-comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: 500 .85rem var(--font-body);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: color .2s, background .2s;
}
.pfp-comment-toggle:hover {
    background: var(--primary-dim);
    color: var(--primary-light);
}

/* ── Comments Panel ── */
.pfp-comments-panel {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.pfp-comments-empty {
    color: var(--text-muted);
    font-size: .82rem;
    text-align: center;
    padding: 8px 0;
    margin: 0;
}
.pfp-comment-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
}
.pfp-comment-row + .pfp-comment-row {
    border-top: 1px solid rgba(255,255,255,0.04);
}
.pfp-comment-left {
    flex: 1;
    min-width: 0;
    font-size: .85rem;
    line-height: 1.4;
}
.pfp-comment-author {
    color: var(--primary-light);
    cursor: pointer;
    margin-right: 6px;
    font-weight: 600;
}
.pfp-comment-author:hover {
    text-decoration: underline;
}
.pfp-comment-body {
    color: var(--text-primary);
}
.pfp-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pfp-comment-ago {
    color: var(--text-muted);
    font-size: .75rem;
}
.pfp-comment-like,
.pfp-comment-like-count {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .2s;
}
.pfp-comment-like:hover { color: var(--red); }
.pfp-comment-like.active { color: var(--red); }
.pfp-comment-del {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .72rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .2s;
}
.pfp-comment-del:hover { color: var(--red); }
.pfp-comment-write {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.pfp-comment-field {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    color: var(--text-primary);
    font: 400 .85rem var(--font-body);
    outline: none;
    transition: border-color .2s;
}
.pfp-comment-field:focus {
    border-color: var(--primary);
}
.pfp-comment-post {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}
.pfp-comment-post:hover {
    background: var(--primary-dark);
}

/* ═══════ Fase 5: selector de reacciones, subcomentarios y compartir ═══════ */
.pfp-react-wrap { position: relative; display: inline-flex; }
.pfp-react-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 6px;
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: var(--bg-card, #1f2430);
    border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: var(--r-pill, 999px);
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(.92);
    transform-origin: bottom left;
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 60;
}
.pfp-react-wrap:hover .pfp-react-picker,
.pfp-react-wrap.show-picker .pfp-react-picker,
.pfp-react-picker.show-picker {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.pfp-react-opt {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 2px;
    border-radius: 50%;
    transition: transform .12s;
}
.pfp-react-opt:hover { transform: scale(1.35) translateY(-3px); }
.pfp-react-emoji { font-size: 1em; line-height: 1; }
.pfp-react-main.active { color: var(--primary); font-weight: 600; }
.pfp-react-wrap-sm .pfp-react-picker { padding: 4px 6px; }
.pfp-react-wrap-sm .pfp-react-opt { font-size: 1.05rem; }

/* Subcomentarios (respuestas) */
.pfp-comment-block { margin-bottom: 6px; }
.pfp-replies {
    margin: 4px 0 4px 18px;
    padding-left: 10px;
    border-left: 2px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pfp-reply-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: .82rem;
}
.pfp-comment-reply-btn,
.pfp-reply-del,
.pfp-reply-like {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .72rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color .2s;
}
.pfp-comment-reply-btn:hover { color: var(--primary); }
.pfp-reply-like:hover, .pfp-reply-like.active { color: var(--red); }
.pfp-reply-del:hover { color: var(--red); }
.pfp-reply-write {
    display: flex;
    gap: 6px;
    margin: 4px 0 6px 18px;
}

/* Menú de compartir perfil */
.pfp-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}
.pfp-share-sheet {
    background: var(--bg-card, #1f2430);
    border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: 16px;
    padding: 22px;
    width: min(92vw, 380px);
    text-align: center;
    box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.pfp-share-sheet h4 { margin: 0 0 14px; font-size: 1.05rem; }
.pfp-share-url {
    background: var(--bg-input, rgba(255,255,255,.05));
    border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .78rem;
    word-break: break-all;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.pfp-share-btns { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pfp-share-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255,255,255,.1));
    background: var(--bg-input, rgba(255,255,255,.04));
    color: var(--text-primary);
    font-size: .88rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}
.pfp-share-act:hover { border-color: var(--primary); background: rgba(110,120,196,.12); }
.pfp-share-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .85rem;
    padding: 6px 14px;
}

/* Fase 6: verificación de cambio de correo */
.pfp-email-verify {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: 10px;
    background: rgba(110,120,196,.06);
}
.pfp-hint-sm { font-size: .78rem; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.4; }
.pfp-email-verify #ppEmailCode { letter-spacing: .35em; text-align: center; font-size: 1.1rem; }

/* ═══════ Fase 7: portada de inicio (login) ═══════ */
.home-stats-panel {
    position: relative;
    z-index: 3;
    width: min(92vw, 360px);
    margin: 18px auto 0;
    padding: 16px;
    border-radius: 16px;
    background: rgba(20, 22, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    color: #e9ecf5;
}
.home-stats-loading { text-align: center; padding: 18px; color: #9aa; }
.home-stats-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.home-online-badge { font-size: .92rem; display: inline-flex; align-items: center; gap: 7px; }
.home-online-badge strong { color: #4ade80; font-size: 1.05rem; }
.home-stats-sub { font-size: .74rem; color: #9aa3b5; }
.home-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; box-shadow: 0 0 0 rgba(74,222,128,.6); animation: homePulse 1.8s infinite; }
.home-dot-lg { width: 9px; height: 9px; }
@keyframes homePulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.5); } 70% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.home-stats-about { display: flex; gap: 9px; align-items: flex-start; font-size: .78rem; color: #aab2c5; line-height: 1.4; padding: 10px; background: rgba(255,255,255,.04); border-radius: 10px; margin-bottom: 12px; }
.home-stats-about i { color: #8b93e0; margin-top: 2px; }
.home-stats-section-title { font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #d6dbea; }
.home-stats-section-title i { color: #f59e0b; }
.home-rooms-list { display: flex; flex-direction: column; gap: 6px; }
.home-room-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.home-room-ico { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#6E78C4,#8b5cf6); color: #fff; font-size: .85rem; flex-shrink: 0; }
.home-room-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-room-name { font-size: .85rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-room-desc { font-size: .72rem; color: #8b93a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-room-count { font-size: .8rem; font-weight: 700; color: #4ade80; display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.home-room-empty { font-size: .78rem; color: #8b93a8; text-align: center; padding: 10px; }
@media (max-width: 480px) { .home-stats-panel { margin-top: 14px; } }

/* Consentimiento legal dentro del formulario de acceso (Fase 7) */
.auth-consent {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: .76rem;
    line-height: 1.45;
    color: var(--text-secondary, #9aa3b5);
    margin: 4px 0 14px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.auth-consent input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--primary, #6E78C4);
    cursor: pointer;
}
.auth-consent a {
    color: var(--primary, #8b93e0);
    text-decoration: underline;
    cursor: pointer;
}
.auth-consent a:hover { color: var(--primary-light, #a5acf0); }
.auth-consent-error {
    border-color: var(--red, #ef4444);
    background: rgba(239, 68, 68, 0.08);
    animation: consentShake .4s;
}
@keyframes consentShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ── People Grid ── */
.pfp-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.pfp-person-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-raised);
    border-radius: var(--r);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.pfp-person-card:hover {
    border-color: var(--primary-border);
    background: var(--bg-card);
}
.pfp-person-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pfp-person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pfp-person-avatar span {
    font: 600 1.1rem var(--font-display);
    color: var(--primary-light);
}
.pfp-dot-sm {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-raised);
}
.pfp-person-info {
    flex: 1;
    min-width: 0;
}
.pfp-person-info strong {
    display: block;
    font: 600 .92rem var(--font-body);
    color: var(--text-primary);
}
.pfp-person-info p {
    color: var(--text-secondary);
    font-size: .8rem;
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pfp-btn-sm[data-view] {
    flex-shrink: 0;
}

/* ── Edit Cards ── */
.pfp-edit-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-raised);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 28px;
}
.pfp-edit-card h3 {
    font: 600 1.05rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pfp-edit-card h3 i {
    color: var(--primary);
}
.pfp-field {
    margin-bottom: 18px;
}
.pfp-field label {
    display: block;
    font: 500 .82rem var(--font-body);
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.pfp-label-sm {
    font-size: .78rem !important;
    text-transform: none !important;
    margin-top: 10px !important;
}
.pfp-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font: 400 .88rem var(--font-body);
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.pfp-input:focus {
    border-color: var(--primary);
}
.pfp-input + .pfp-input {
    margin-top: 8px;
}
.pfp-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font: 400 .88rem var(--font-body);
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color .2s;
    box-sizing: border-box;
}
.pfp-textarea:focus {
    border-color: var(--primary);
}
.pfp-hint {
    display: block;
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
/* Indicador de disponibilidad de nombre en tiempo real (perfil y panel) */
.pfp-username-status, .pp-username-status {
    display: block;
    min-height: 1em;
    font-size: .76rem;
    font-weight: 600;
    margin-top: 5px;
    transition: color .2s;
}
.pfp-username-status.is-checking, .pp-username-status.is-checking { color: var(--text-muted); font-weight: 500; }
.pfp-username-status.is-good, .pp-username-status.is-good { color: #16a34a; }
.pfp-username-status.is-bad, .pp-username-status.is-bad { color: #dc2626; }
.pfp-counter {
    float: right;
    font-size: .75rem;
    color: var(--text-muted);
}
.pfp-muted {
    color: var(--text-muted);
    font-style: italic;
}
.pfp-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* Avatar edit row */
.pfp-avatar-edit-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.pfp-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 1.5rem var(--font-display);
    color: var(--primary-light);
    flex-shrink: 0;
}
.pfp-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pfp-avatar-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Color picker */
.pfp-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pfp-color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    background: transparent;
    padding: 0;
}
.pfp-color-demo {
    font: 600 1rem var(--font-body);
}

/* Inline row */
.pfp-inline-row {
    display: flex;
    gap: 8px;
}
.pfp-inline-row .pfp-input {
    flex: 1;
}

/* Blocked users */
.pfp-blocked-grid {
    margin-top: 16px;
}
.pfp-blocked-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    background: var(--bg-card);
}
.pfp-blocked-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: .88rem;
}
.pfp-blocked-name i { color: var(--red); }

/* Toggle switch */
.pfp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}
.pfp-toggle-row span {
    color: var(--text-primary);
    font-size: .88rem;
}
.pfp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.pfp-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.pfp-switch-track {
    position: absolute;
    inset: 0;
    background: var(--bg-hover);
    border-radius: 24px;
    transition: background .2s;
}
.pfp-switch-track::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform .2s;
}
.pfp-switch input:checked + .pfp-switch-track {
    background: var(--primary);
}
.pfp-switch input:checked + .pfp-switch-track::before {
    transform: translateX(20px);
}

/* Theme buttons */
.pfp-theme-row {
    display: flex;
    gap: 10px;
}
.pfp-theme-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font: 500 .88rem var(--font-body);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.pfp-theme-opt.active {
    border-color: var(--primary);
    color: var(--primary);
}

/* Radio buttons */
.pfp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pfp-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: .88rem;
}
.pfp-radio input { display: none; }
.pfp-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: border-color .2s;
    flex-shrink: 0;
}
.pfp-radio-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    transform: translate(-50%, -50%) scale(0);
    transition: transform .2s;
}
.pfp-radio input:checked ~ .pfp-radio-dot {
    border-color: var(--primary);
}
.pfp-radio input:checked ~ .pfp-radio-dot::after {
    transform: translate(-50%, -50%) scale(1);
}
/* Override: `.pfp-field label` (display:block + uppercase) tiene más
   especificidad y rompía el flex de los radios (el círculo salía como una
   barra y el texto en mayúsculas). Restauramos su estilo correcto. */
.pfp-radio-group .pfp-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font: 500 .88rem var(--font-body);
    color: var(--text-primary);
}
.pfp-radio-group .pfp-radio-dot { box-sizing: border-box; display: block; }

/* ── Cropper ── */
.pfp-cropper-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pfp-cropper-box {
    background: var(--bg-raised);
    border-radius: var(--r-lg);
    padding: 28px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.pfp-cropper-box h3 {
    font: 600 1.05rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 16px;
}
.pfp-cropper-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    border: 2px solid var(--primary);
    background: var(--bg-card);
}
.pfp-cropper-circle img {
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
}
.pfp-cropper-zoom {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
    color: var(--text-secondary);
}
.pfp-cropper-zoom input[type="range"] {
    flex: 1;
    max-width: 200px;
    accent-color: var(--primary);
}
.pfp-cropper-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

/* ── Lightbox ── */
.pfp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
}
.pfp-lightbox.active {
    opacity: 1;
}
.pfp-lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
}
.pfp-lightbox-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.pfp-lightbox-wrap img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--r-sm);
    object-fit: contain;
}
.pfp-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.pfp-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ── Notification Toast ── */
.pfp-notif {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 11000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--bg-raised);
    border: 1px solid var(--primary-border);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font: 500 .88rem var(--font-body);
    transform: translateY(20px);
    opacity: 0;
    transition: transform .35s var(--transition), opacity .35s;
    cursor: pointer;
}
.pfp-notif.show {
    transform: translateY(0);
    opacity: 1;
}
.pfp-notif i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ── Loading & Error ── */
.pfp-loading-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 12px;
    color: var(--text-secondary);
}
.pfp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: pfpSpin .8s linear infinite;
}
@keyframes pfpSpin {
    to { transform: rotate(360deg); }
}
.pfp-error-page {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}
.pfp-error-page i {
    font-size: 2.5rem;
    color: var(--amber);
    margin-bottom: 16px;
}
.pfp-error-page h2 {
    font: 600 1.2rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 8px;
}
.pfp-error-page p {
    margin: 0 0 20px;
    font-size: .88rem;
}

/* ── Skeleton Loading ── */
.pfp-skeleton-pulse {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
    border-radius: inherit;
}
@keyframes pfpShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.pfp-skeleton-cover {
    height: 350px;
    background: var(--bg-card);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    overflow: hidden;
}
.pfp-skeleton-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 6px solid var(--bg-void);
    overflow: hidden;
    margin-top: -70px;
}
.pfp-skeleton-line {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
    margin: 10px auto;
}
.pfp-skeleton-w60 { width: 60%; }
.pfp-skeleton-w40 { width: 40%; }
.pfp-skeleton-stat {
    width: 60px;
    height: 40px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
}
.pfp-skeleton-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}
.pfp-skeleton-btn {
    width: 120px;
    height: 38px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
}
.pfp-skeleton-tab {
    width: 80px;
    height: 40px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
    margin: 8px;
}
.pfp-skeleton-card {
    width: 100%;
    height: 200px;
    border-radius: var(--r);
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pfpShimmer 1.5s ease infinite;
    margin-top: 16px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .pfp-two-col { flex-direction: column; }
    .pfp-sidebar-col { width: 100%; position: static; }
    .pfp-content-area { padding: 16px 20px; }
}

@media (max-width: 768px) {
    .pfp-cover { height: 220px; }
    .pfp-cover-btn { bottom: 10px; right: 10px; padding: 6px 12px; font-size: .78rem; }
    .pfp-avatar-lg { width: 130px; height: 130px; }
    .pfp-avatar-lg span { font-size: 2.8rem; }
    .pfp-avatar-edit-btn { width: 36px; height: 36px; font-size: .82rem; bottom: 6px; right: 6px; border-width: 3px; }
    .pfp-avatar-status { width: 20px; height: 20px; bottom: 10px; right: 10px; border-width: 3px; }
    .pfp-skeleton-circle { width: 130px; height: 130px; margin-top: -55px; }
    .pfp-profile-header { margin-top: -55px; flex-direction: column; align-items: center; padding: 0 16px 20px; }
    .pfp-header-left { flex-direction: column; align-items: center; }
    .pfp-header-info { text-align: center; }
    .pfp-header-right { align-items: center; padding-top: 0; width: 100%; }
    .pfp-stats-row { justify-content: center; gap: 20px; }
    .pfp-meta-chips { justify-content: center; }
    .pfp-stats-grid { width: 100%; gap: 8px; }
    .pfp-action-btns { justify-content: center; flex-wrap: wrap; }
    .pfp-display-name { font-size: 1.5rem; }
    .pfp-stat-num { font-size: 1.1rem; }
    .pfp-tab-btn { padding: 12px 14px; font-size: .8rem; }
    .pfp-tab-btn i { font-size: .85rem; }
    .pfp-tab-btn span { display: none; }
    .pfp-posts-grid { gap: 2px; }
    .pfp-about-grid { grid-template-columns: 1fr; }
    .pfp-photo-masonry { grid-template-columns: 1fr; }
    .pfp-people-grid { grid-template-columns: 1fr; }
    .pfp-edit-card { padding: 20px; }
    .pfp-body { padding-bottom: 40px; }
    .pfp-content-area { padding: 12px 12px; }
    .pfp-create-post { padding: 12px; }
    .pfp-create-post-options { flex-wrap: wrap; gap: 6px; }
    .pfp-create-post-actions { flex-wrap: wrap; gap: 8px; }
    .pfp-feed-card { border-radius: var(--r-sm); }
    .pfp-feed-header { padding: 12px; gap: 10px; }
    .pfp-feed-text { padding: 0 12px 10px; font-size: .9rem; }
    .pfp-feed-stats { padding: 6px 12px; }
    .pfp-feed-actions { padding: 2px 4px; }
    .pfp-feed-action-btn { padding: 8px 4px; font-size: .82rem; gap: 4px; }
    .pfp-intro-card { padding: 16px; }
    .pfp-intro-card h3 { font-size: 1.05rem; }
    .pfp-edit-post-modal { padding: 20px; width: 95%; }
    .pfp-visibility-select { font-size: .78rem; padding: 5px 8px; }
}

@media (max-width: 480px) {
    .pfp-topnav { padding: 0 10px; }
    .pfp-nav-back { font-size: .82rem; gap: 6px; }
    .pfp-nav-brand { font-size: .85rem; }
    .pfp-cover { height: 160px; border-radius: 0; }
    .pfp-cover-btn { bottom: 8px; right: 8px; padding: 5px 10px; font-size: .75rem; }
    .pfp-avatar-lg { width: 100px; height: 100px; border-width: 4px; }
    .pfp-avatar-lg span { font-size: 2.2rem; }
    .pfp-avatar-edit-btn { width: 32px; height: 32px; font-size: .75rem; bottom: 4px; right: 4px; border-width: 2px; }
    .pfp-avatar-status { width: 18px; height: 18px; bottom: 6px; right: 6px; border-width: 2px; }
    .pfp-skeleton-circle { width: 100px; height: 100px; margin-top: -40px; }
    .pfp-profile-header { margin-top: -40px; padding: 0 10px 14px; gap: 10px; }
    .pfp-display-name { font-size: 1.2rem; }
    .pfp-bio-text { font-size: .88rem; }
    .pfp-status-label { font-size: .8rem; }
    .pfp-badge { font-size: .7rem; padding: 3px 8px; }
    .pfp-stats-row { gap: 14px; padding: 10px 0; }
    .pfp-stat-num { font-size: 1rem; }
    .pfp-stat-label { font-size: .72rem; }
    .pfp-action-btns { gap: 6px; }
    .pfp-btn-primary, .pfp-btn-secondary, .pfp-btn-outline { padding: 7px 14px; font-size: .8rem; }
    .pfp-btn-icon { width: 34px; height: 34px; font-size: .8rem; }
    .pfp-tab-btn { padding: 10px 10px; font-size: .75rem; }
    .pfp-content-area { padding: 8px 8px; }
    .pfp-create-post { padding: 10px; margin-bottom: 12px; }
    .pfp-create-post-avatar { width: 36px; height: 36px; }
    .pfp-create-post-input { padding: 8px 12px; font-size: .85rem; min-height: 38px; }
    .pfp-create-post-options { flex-direction: column; align-items: stretch; }
    .pfp-create-post-media { justify-content: center; }
    .pfp-create-post-actions { flex-direction: column; gap: 8px; }
    .pfp-feed-avatar { width: 36px; height: 36px; }
    .pfp-feed-author { font-size: .85rem; }
    .pfp-feed-time { font-size: .72rem; }
    .pfp-feed-action-btn { font-size: .78rem; padding: 7px 2px; }
    .pfp-feed-action-btn span { display: none; }
    .pfp-notif { right: 8px; bottom: 8px; left: 8px; font-size: .85rem; }
    .pfp-cropper-circle { width: 220px; height: 220px; }
    .pfp-cropper-box { padding: 20px; }
    .pfp-edit-post-modal { padding: 16px; }
    .pfp-edit-post-modal h3 { font-size: 1rem; }
    .pfp-lightbox-wrap img { max-width: 95vw; max-height: 80vh; }
    .pfp-intro-card { padding: 12px; }
    .pfp-intro-items { gap: 10px; }
    .pfp-intro-item { font-size: .85rem; }
    .pfp-people-grid { gap: 8px; }
    .pfp-person-card { padding: 12px; }
}

/* ═══════════════════════════════════════════
   FACEBOOK-STYLE FEED CARDS
═══════════════════════════════════════════ */

/* ── Create Post ── */
.pfp-create-post {
    max-width: 680px;
    margin: 0 auto 20px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
}
.pfp-create-post-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.pfp-create-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pfp-create-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-create-post-avatar span { font: 600 1rem var(--font-display); color: var(--primary-light); }
.pfp-create-post-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 10px 16px;
    color: var(--text-primary);
    font: 400 .92rem var(--font-body);
    resize: none;
    outline: none;
    transition: border-color .2s;
    min-height: 44px;
}
.pfp-create-post-input:focus { border-color: var(--primary); }
.pfp-create-post-preview {
    position: relative;
    margin: 12px 0 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    max-height: 300px;
}
.pfp-create-post-preview img { width: 100%; max-height: 400px; object-fit: contain; display: block; border-radius: var(--r-sm); background: var(--bg-void); }
.pfp-create-post-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
}
.pfp-create-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.pfp-create-post-media {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--green);
    font: 500 .88rem var(--font-body);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--r-sm);
    transition: background .2s;
}
.pfp-create-post-media:hover { background: var(--green-dim); }

/* ── Feed ── */
.pfp-feed {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pfp-feed-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: box-shadow .2s;
}
.pfp-feed-card:hover { box-shadow: var(--shadow-card); }
.pfp-feed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.pfp-feed-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pfp-feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-feed-avatar span { font: 600 1rem var(--font-display); color: var(--primary-light); }
.pfp-feed-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pfp-feed-author {
    font: 600 .92rem var(--font-body);
    color: var(--text-primary);
}
.pfp-feed-time {
    font: 400 .78rem var(--font-body);
    color: var(--text-muted);
}
.pfp-feed-menu {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
}
.pfp-feed-menu:hover { color: var(--text-primary); background: var(--bg-hover); }
.pfp-feed-text {
    padding: 0 16px 12px;
    color: var(--text-primary);
    font: 400 .95rem var(--font-body);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.pfp-feed-image {
    width: 100%;
    background: var(--bg-void);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pfp-feed-image img {
    width: 100%;
    display: block;
    max-height: 500px;
    object-fit: contain;
}
.pfp-feed-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    font: 400 .82rem var(--font-body);
    color: var(--text-secondary);
}
.pfp-feed-stats:empty { display: none; }
.pfp-feed-likes-count, .pfp-feed-cmt-count {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pfp-feed-actions {
    display: flex;
    border-top: 1px solid var(--border);
    padding: 4px 8px;
}
.pfp-feed-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: 500 .88rem var(--font-body);
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background .2s, color .2s;
}
.pfp-feed-action-btn:hover { background: var(--bg-hover); }
.pfp-feed-action-btn.active { color: var(--primary); }
.pfp-feed-action-btn.active i { animation: pfpHeartPop .35s ease; }

/* ── Two Column Layout ── */
.pfp-two-col {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.pfp-sidebar-col {
    width: 420px;
    flex-shrink: 0;
    position: sticky;
    top: 120px;
}
.pfp-main-col {
    flex: 1;
    min-width: 0;
}
.pfp-main-col .pfp-create-post,
.pfp-main-col .pfp-feed {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ── Intro Card ── */
.pfp-intro-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
}
.pfp-intro-card h3 {
    font: 700 1.2rem var(--font-display);
    color: var(--text-primary);
    margin: 0 0 16px;
}
.pfp-intro-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pfp-intro-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    font-size: .92rem;
    line-height: 1.4;
}
.pfp-intro-item i {
    color: var(--text-muted);
    width: 20px;
    text-align: center;
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.pfp-intro-item strong {
    color: var(--text-primary);
}

/* ── Create Post Options ── */
.pfp-create-post-options {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pfp-create-post-option {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: 500 .88rem var(--font-body);
    cursor: default;
    padding: 6px 12px;
    border-radius: var(--r-sm);
    transition: background .2s;
}
.pfp-create-post-option:hover { background: var(--bg-hover); }
.pfp-create-post-option .fa-user-tag { color: var(--primary); }
.pfp-create-post-option .fa-smile { color: var(--golden); }

/* ── Feed Share Button ── */
.pfp-feed-share-btn { cursor: default; }

/* ── Visibility Selector ── */
.pfp-visibility-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font: 500 .82rem var(--font-body);
    padding: 6px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.pfp-visibility-select:focus { border-color: var(--primary); }

/* ── Feed Edit Button ── */
.pfp-feed-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
    font-size: .82rem;
}
.pfp-feed-edit-btn:hover { color: var(--primary); background: var(--primary-dim); }

/* ── Edit Post Modal ── */
.pfp-edit-post-modal {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 24px;
    width: 90%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pfp-edit-post-modal h3 {
    font: 700 1.1rem var(--font-display);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pfp-edit-post-img {
    border-radius: var(--r-sm);
    overflow: hidden;
    max-height: 200px;
}
.pfp-edit-post-img img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

/* ── Photo Detail Modal (Facebook-style) ── */
.pfp-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    background: rgba(0,0,0,0.92);
    animation: pfpFadeIn .2s ease;
}
.pfp-photo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.pfp-photo-modal-close:hover { background: rgba(255,255,255,0.2); }
.pfp-photo-modal-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 20px;
    background: var(--bg-void);
}
.pfp-photo-modal-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
/* La foto de perfil se muestra circular y acotada dentro del visor. */
.pfp-photo-modal-img.is-avatar img {
    width: 320px; height: 320px; max-width: 80%;
    object-fit: cover; border-radius: 50%;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.pfp-photo-modal-sidebar {
    width: 380px;
    flex-shrink: 0;
    background: var(--bg-raised);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    overflow: hidden;
}
.pfp-photo-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.pfp-photo-modal-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pfp-photo-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-photo-modal-avatar span { font: 600 1rem var(--font-display); color: var(--primary-light); }
.pfp-photo-modal-meta { flex: 1; }
.pfp-photo-modal-meta strong {
    display: block;
    font: 600 .92rem var(--font-body);
    color: var(--text-primary);
}
.pfp-photo-modal-meta span {
    font: 400 .78rem var(--font-body);
    color: var(--text-muted);
}
.pfp-photo-modal-caption {
    padding: 16px;
    color: var(--text-primary);
    font: 400 .92rem var(--font-body);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    border-bottom: 1px solid var(--border);
}
.pfp-photo-modal-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    font: 400 .82rem var(--font-body);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.pfp-photo-modal-actions {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 4px 8px;
}
.pfp-photo-modal-actions .pfp-feed-action-btn { flex: 1; }
.pfp-photo-modal-comments {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.pfp-photo-modal-comment-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    align-items: center;
}
.pfp-photo-modal-comment-input input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 8px 16px;
    color: var(--text-primary);
    font: 400 .88rem var(--font-body);
    outline: none;
}
.pfp-photo-modal-comment-input input:focus { border-color: var(--primary); }
.pfp-photo-modal-comment-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background .2s;
}
.pfp-photo-modal-comment-input button:hover { background: var(--primary-dark); }

@media (max-width: 768px) {
    .pfp-photo-modal { flex-direction: column; }
    .pfp-photo-modal-img { flex: none; height: 45vh; padding: 10px; }
    .pfp-photo-modal-sidebar { width: 100%; flex: 1; min-height: 0; }
    .pfp-photo-modal-close { top: 8px; right: 8px; width: 34px; height: 34px; }
}
@media (max-width: 480px) {
    .pfp-photo-modal-img { height: 35vh; }
    .pfp-photo-modal-header { padding: 12px; }
    .pfp-photo-modal-caption { padding: 10px 12px; font-size: .85rem; }
    .pfp-photo-modal-comment-input { padding: 8px 12px; }
}

/* ═══════════════════════════════════════════
   LIGHT THEME
═══════════════════════════════════════════ */
[data-theme="light"] {
    --bg-void:        #E6E9EF;
    --bg-base:        #F2F4F8;
    --bg-raised:      #FBFCFD;
    --bg-card:        #FFFFFF;
    --bg-hover:       #E9ECF2;
    --bg-input:       #EFF2F6;
    --bg-glass:       rgba(251, 252, 253, 0.85);
    --bg-topnav:      rgba(251, 252, 253, 0.92);
    --text-primary:   #1B2026;
    --text-secondary: #5A6473;
    --text-muted:     #8B95A3;
    --border:         rgba(20, 30, 45, 0.10);
    --border-accent:  rgba(110, 120, 196, 0.30);
    --shadow-sm:      0 1px 3px rgba(20, 28, 45, 0.08);
    --shadow-md:      0 4px 12px rgba(20, 28, 45, 0.10);
    --shadow-lg:      0 8px 24px rgba(20, 28, 45, 0.12);
    --shadow-glow:    0 0 20px rgba(110, 120, 196, 0.10);
    --shadow-card:    0 1px 3px rgba(20, 28, 45, 0.10), 0 0 0 1px rgba(20,30,45,0.04);
    --primary-dim:    rgba(110, 120, 196, 0.10);
    --primary-glow:   rgba(110, 120, 196, 0.16);
    --primary-border: rgba(110, 120, 196, 0.25);
    --coral-dim:      rgba(110, 120, 196, 0.10);
    --golden-dim:     rgba(245, 158, 11, 0.12);
    --green-dim:      rgba(34, 197, 94, 0.12);
    --red-dim:        rgba(239, 68, 68, 0.12);
    --amber-dim:      rgba(245, 158, 11, 0.12);
    --violet-dim:     rgba(128, 137, 201, 0.12);
}
[data-theme="light"] .pfp-root { background: var(--bg-void); }
[data-theme="light"] .pfp-avatar-lg { border-color: #fff; }
[data-theme="light"] .pfp-avatar-status { border-color: #fff; }
[data-theme="light"] .pfp-avatar-edit-btn { border-color: #fff; }
[data-theme="light"] .pfp-skeleton-circle { border-color: var(--bg-void); }
[data-theme="light"] .pfp-dot-sm { border-color: #fff; }
[data-theme="light"] .pfp-cover-gradient { background: linear-gradient(to top, rgba(240,242,245,0.6) 0%, transparent 50%); }
[data-theme="light"] .pfp-comment-field { background: var(--bg-void); }
[data-theme="light"] .pfp-switch-track { background: var(--border); }
[data-theme="light"] .pfp-switch-track::before { background: var(--text-primary); }
[data-theme="light"] .pfp-cropper-overlay { background: rgba(0,0,0,0.5); }
[data-theme="light"] .pfp-lightbox-bg { background: rgba(255,255,255,0.95); }
[data-theme="light"] .pfp-lightbox-close { background: rgba(0,0,0,0.1); color: var(--text-primary); }
[data-theme="light"] .pfp-lightbox-close:hover { background: rgba(0,0,0,0.2); }
[data-theme="light"] .pfp-photo-del { background: rgba(255,255,255,0.8); }
[data-theme="light"] .pfp-cover-btn { background: rgba(255,255,255,0.7); color: var(--text-primary); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .pfp-cover-btn:hover { background: rgba(255,255,255,0.9); }
[data-theme="light"] body { background: var(--bg-void); color: var(--text-primary); }
[data-theme="light"] .pfp-notif { background: #fff; border-color: rgba(110, 120, 196,0.2); }
[data-theme="light"] .pfp-color-picker { background: var(--bg-void); }
[data-theme="light"] .pfp-create-post-remove { background: rgba(0,0,0,0.5); }

/* Light theme for main chat components */
[data-theme="light"] #chatScreen { background: var(--bg-void); }
[data-theme="light"] .chat-header { background: var(--bg-base); }
[data-theme="light"] .sidebar { background: var(--bg-base); }
[data-theme="light"] .messages-container { background: var(--bg-void); }
[data-theme="light"] .message-input-container { background: var(--bg-base); }
[data-theme="light"] #messageInput { background: var(--bg-input); color: var(--text-primary); }
[data-theme="light"] .room-item { background: var(--bg-raised); }
[data-theme="light"] .room-item:hover { background: var(--bg-hover); }
[data-theme="light"] .user-item { background: var(--bg-raised); }
[data-theme="light"] .modal-content, [data-theme="light"] .auth-modal { background: var(--bg-base); }
[data-theme="light"] .pp-modal { background: var(--bg-base); }
[data-theme="light"] .pp-sidebar { background: var(--bg-raised); }

@media (max-width: 768px) {
    .pfp-feed, .pfp-create-post { margin-left: 8px; margin-right: 8px; }
}
@media (max-width: 480px) {
    .pfp-create-post-actions { flex-direction: column; gap: 8px; align-items: stretch; }
    .pfp-create-post-actions .pfp-btn-sm { width: 100%; justify-content: center; }
    .pfp-create-post-options { width: 100%; justify-content: space-around; }
}


/* ========== BOTONES DE LOGIN MEJORADOS ========== */

/* Contenedor de botones de autenticación */
.auth-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botón elegante estilo glassmorphism */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 130px;
    border: none;
}

/* Botón secundario (Volver) */
.auth-btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.auth-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.auth-btn-secondary:hover::before {
    left: 100%;
}

.auth-btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--primary-border);
    background: var(--primary-dim);
    box-shadow: 0 8px 20px rgba(110, 120, 196, 0.15);
}

/* Botón primario (Registrarse, Iniciar) */
.auth-btn-primary {
    background: var(--grad-brand);
    color: white;
    box-shadow: 0 6px 20px rgba(110, 120, 196, 0.30);
    border: none;
}
.auth-btn-primary:hover { background: var(--grad-brand-hover); }

.auth-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-btn-primary:hover::before {
    left: 100%;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(110, 120, 196, 0.42);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

/* Botón de acción (Entrar al chat) — CTA principal con gradiente de marca */
.auth-btn-action {
    background: var(--grad-brand);
    background-size: 150% 150%;
    color: white;
    font-size: 1rem;
    padding: 14px 28px;
    box-shadow: 0 8px 26px rgba(110, 120, 196, 0.40);
    width: 100%;
    animation: ctaShift 6s ease infinite;
}
@keyframes ctaShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.auth-btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(110, 120, 196, 0.5);
}

/* Botón outline (alternativo) */
.auth-btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.auth-btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(110, 120, 196, 0.3);
}

/* Botón de texto (links) */
.auth-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-link:hover {
    color: var(--primary);
    transform: translateX(2px);
}

/* Separador elegante */
.auth-divider-modern {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.auth-divider-modern::before,
.auth-divider-modern::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Grupo de botones en fila */
.auth-button-group {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 20px;
}

.auth-button-group .auth-btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-btn {
        padding: 10px 18px;
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .auth-button-group {
        gap: 10px;
    }
    
    .auth-btn-action {
        padding: 12px 20px;
    }
}

/* Tema oscuro mejorado */
[data-theme="dark"] .auth-btn-secondary {
    background: rgba(30, 30, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .auth-btn-secondary:hover {
    border-color: rgba(110, 120, 196, 0.6);
}

/* Animación de entrada para botones */
.auth-btn {
    animation: fadeInUp 0.4s ease backwards;
}

.auth-btn:nth-child(1) { animation-delay: 0.1s; }
.auth-btn:nth-child(2) { animation-delay: 0.2s; }
.auth-btn:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== TOAST NOTIFICATIONS PROFESIONALES ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    transform: translateX(400px);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: toastProgress 4s linear forwards;
}

.toast.toast-success::before {
    background: var(--green);
}

.toast.toast-error::before {
    background: var(--red);
}

.toast.toast-warning::before {
    background: var(--amber);
}

.toast.toast-info::before {
    background: var(--secondary);
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(400px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(400px);
    }
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
}

.toast-info .toast-icon {
    background: rgba(110, 120, 196, 0.15);
    color: var(--secondary);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
    
    .toast {
        max-width: none;
        width: 100%;
    }
}

/* Tema oscuro */
[data-theme="dark"] .toast {
    background: var(--bg-raised);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ══════════ Panel de categorías (admin superadmin) ══════════ */
.cat-loading { padding: 20px; color: var(--text-secondary); text-align: center; }
.cat-create {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 18px;
}
.cat-create h4 { margin: 0 0 12px; font-size: .95rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.cat-create-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-input {
    flex: 1; min-width: 140px;
    padding: 9px 12px;
    background: var(--bg-input, var(--bg-void));
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-size: .85rem;
}
.cat-input:focus { outline: none; border-color: var(--primary); }
.cat-input-icon { flex: 1.2; }
.cat-input-emoji { flex: 0 0 60px; min-width: 0; text-align: center; font-size: 1.15rem; }
.cat-input-order { flex: 0 0 84px; min-width: 0; }
.cat-hint { margin: 10px 0 0; font-size: .76rem; color: var(--text-muted); }

/* Selector rápido de emojis para categorías */
.cat-emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cat-emoji-opt {
    width: 38px; height: 38px; border: 1px solid var(--border);
    background: var(--bg-void); border-radius: 9px; cursor: pointer;
    font-size: 1.15rem; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: border-color .15s, transform .1s;
}
.cat-emoji-opt:hover { border-color: var(--primary); transform: translateY(-1px); }
.cat-emoji-opt.sel { border-color: var(--primary); background: var(--primary-dim); }
.cat-row-icon .cat-emoji { font-size: 1.2rem; }
/* Emoji en los chips de categoría de clasificados */
.cls-cat-emoji { font-size: 1.25rem; line-height: 1; display: inline-flex; }

.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: border-color .2s;
}
.cat-row:hover { border-color: var(--primary); }
.cat-row.cat-inactive { opacity: .5; }
.cat-row-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary-dim); color: var(--primary); }
.cat-row-name { font-weight: 600; color: var(--text-primary); min-width: 120px; }
.cat-row-slug { font-size: .78rem; color: var(--text-muted); font-family: monospace; }
.cat-row-order { font-size: .75rem; color: var(--text-secondary); margin-left: auto; }
.cat-row-subs { font-size: .75rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; }
.cat-row-subs i { color: var(--primary); }
.cat-row-actions { display: flex; gap: 6px; }
.cat-btn.cat-subs-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Editor de subcategorías (modal) */
.cat-subs-add { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-subs-add .cat-input { flex: 1; min-width: 0; }
.cat-subs-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cat-sub-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 8px 6px 12px;
    background: var(--primary-dim); color: var(--text-primary);
    border: 1px solid var(--primary-border); border-radius: var(--r-pill);
    font-size: .82rem; font-weight: 600;
}
.cat-sub-rm {
    width: 18px; height: 18px; border: none; cursor: pointer;
    background: rgba(0,0,0,.08); color: var(--text-secondary);
    border-radius: 50%; line-height: 1; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.cat-sub-rm:hover { background: var(--red); color: #fff; }

/* ════════ Panel de Categorías rediseñado (catx-*) ════════ */
.catx-create {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r); padding: 18px 18px 16px; margin-bottom: 18px;
}
.catx-create-head { display: flex; align-items: center; gap: 9px; font-size: .98rem; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.catx-create-head i { color: var(--primary); }
.catx-create-grid { display: grid; grid-template-columns: 90px 1fr 110px; gap: 12px; }
.catx-field { display: flex; flex-direction: column; gap: 6px; }
.catx-field label { font-size: .74rem; font-weight: 700; color: var(--text-secondary); }
.catx-field-subs { margin-top: 14px; }
.catx-input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--r-sm); background: var(--bg-void); color: var(--text-primary);
    font-size: .88rem; font-family: inherit; transition: border-color .15s;
}
.catx-input:focus { outline: none; border-color: var(--primary); }
.catx-emoji { text-align: center; font-size: 1.2rem; }
.catx-emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.catx-subadd { display: flex; gap: 8px; }
.catx-subadd .catx-input { flex: 1; }
.catx-subadd .btn-admin { white-space: nowrap; flex-shrink: 0; }
.catx-subchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.catx-subchip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 6px 5px 11px; border-radius: var(--r-pill);
    background: var(--primary-dim); color: var(--text-primary);
    border: 1px solid var(--primary-border); font-size: .8rem; font-weight: 600;
}
.catx-subchip-rm, .catx-newsub-rm {
    width: 18px; height: 18px; border: none; cursor: pointer; line-height: 1; font-size: .9rem;
    background: rgba(127,127,160,.18); color: var(--text-secondary); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.catx-subchip-rm:hover, .catx-newsub-rm:hover { background: var(--red); color: #fff; }
.catx-create-actions { margin-top: 14px; }
.catx-create-actions .btn-admin { width: 100%; justify-content: center; }

.catx-list { display: flex; flex-direction: column; gap: 12px; }
.catx-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r); overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.catx-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); }
.catx-card.is-inactive { opacity: .62; }
.catx-card-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px; }
.catx-card-ic { width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 1.3rem; background: var(--primary-dim); color: var(--primary); }
.catx-card-meta { flex: 1; min-width: 0; }
.catx-card-name { font-weight: 700; font-size: .95rem; color: var(--text-primary); }
.catx-card-slug { font-family: monospace; font-size: .76rem; color: var(--text-muted); font-weight: 500; }
.catx-card-info { font-size: .76rem; color: var(--text-secondary); margin-top: 2px; }
.catx-card-info i { color: var(--primary); }
.catx-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.catx-iconbtn { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--bg-void); border-radius: 9px; cursor: pointer; color: var(--text-secondary); font-size: .82rem; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.catx-iconbtn:hover { color: var(--primary); border-color: var(--primary); }
.catx-iconbtn.danger:hover { color: #fff; background: var(--red); border-color: var(--red); }
.catx-card-subs { padding: 0 15px 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.catx-subs-empty { font-size: .8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.catx-subs-empty i { opacity: .6; }
.catx-card-subs .catx-subadd { margin-top: 12px; }
.catx-subinput { background: var(--bg-input); }
@media (max-width: 620px) {
    .catx-create-grid { grid-template-columns: 70px 1fr; }
    .catx-field-order { grid-column: 1 / -1; }
    .catx-card-head { flex-wrap: wrap; }
}

.cat-btn {
    width: 30px; height: 30px; border: 1px solid var(--border);
    background: var(--bg-void); border-radius: 7px; cursor: pointer;
    color: var(--text-secondary); transition: all .2s;
    display: flex; align-items: center; justify-content: center; font-size: .78rem;
}
.cat-btn:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.cat-btn.cat-del:hover { background: var(--red, #dc2626); border-color: var(--red, #dc2626); }

/* ════════════════════════════════════════════════════════════
   REDISEÑO PREMIUM — PERFIL (Facebook/IG/Discord 2026)
   ════════════════════════════════════════════════════════════ */
/* Portada más baja y elegante con overlay y brillo difuso */
.pfp-cover { height: 380px !important; }
.pfp-cover::before { content: ''; position: absolute; left: -10%; right: -10%; top: -40%; height: 140%; background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent 70%); filter: blur(30px); pointer-events: none; }
/* La foto de portada debe cubrir TODA la sección: solo un leve oscurecido al pie
   (para el avatar), sin la franja gris que tapaba la mitad inferior. */
.pfp-cover-gradient { background: linear-gradient(to top, rgba(2,6,23,.45) 0%, transparent 22%) !important; }
[data-theme="light"] .pfp-cover-gradient { background: linear-gradient(to top, rgba(0,0,0,.28) 0%, transparent 22%) !important; }

/* Avatar premium */
.pfp-avatar-lg { width: 168px; height: 168px; border-width: 5px; box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 4px rgba(99,102,241,.30); }
.pfp-avatar-status { width: 26px; height: 26px; box-shadow: 0 0 0 3px var(--bg-void); }
.pfp-avatar-status.pfp-dot-online { animation: pfpOnlinePulse 2s infinite; }
@keyframes pfpOnlinePulse { 0% { box-shadow: 0 0 0 3px var(--bg-void), 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 3px var(--bg-void), 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 3px var(--bg-void), 0 0 0 0 rgba(34,197,94,0); } }

/* Estadísticas: tarjetas glassmorphism */
.pfp-stats-grid { gap: 12px; }
.pfp-stats-grid .pfp-stat-item {
    background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.10);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
[data-theme="light"] .pfp-stats-grid .pfp-stat-item { background: linear-gradient(135deg, rgba(99,102,241,.06), rgba(255,255,255,.5)); border-color: rgba(15,23,42,.08); }
.pfp-stats-grid .pfp-stat-item:hover { border-color: var(--primary); box-shadow: 0 10px 26px rgba(99,102,241,.22); }
.pfp-stat-ico { background: linear-gradient(135deg, var(--primary), #8b5cf6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Botones de acción con efecto press/ripple */
.pfp-btn-primary, .pfp-btn-secondary, .pfp-btn-outline { position: relative; overflow: hidden; transition: transform .15s, box-shadow .2s, background .2s; }
.pfp-btn-primary { box-shadow: 0 6px 18px rgba(99,102,241,.35); }
.pfp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(99,102,241,.5); }
.pfp-btn-primary:active, .pfp-btn-secondary:active, .pfp-btn-outline:active { transform: scale(.96); }
.pfp-btn-primary::after, .pfp-btn-secondary::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.5) 10%, transparent 11%); background-position: center; background-repeat: no-repeat; opacity: 0; transform: scale(8); transition: transform .5s, opacity .8s; }
.pfp-btn-primary:active::after, .pfp-btn-secondary:active::after { transform: scale(0); opacity: .35; transition: 0s; }

/* Tarjeta Intro (sidebar izquierda) premium */
.pfp-intro-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.pfp-intro-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 14px; color: var(--text-primary); }
.pfp-intro-items { display: flex; flex-direction: column; gap: 12px; }
.pfp-intro-item { display: flex; align-items: flex-start; gap: 11px; font-size: .88rem; color: var(--text-secondary); line-height: 1.45; }
.pfp-intro-item i { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--primary-dim, rgba(99,102,241,.14)); color: var(--primary); font-size: .85rem; }

/* Creador de publicaciones (Facebook-style) */
.pfp-create-post { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.pfp-create-post-top { display: flex; gap: 12px; align-items: flex-start; }
.pfp-create-post-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); font-weight: 700; }
.pfp-create-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-create-post-input { flex: 1; border: none; resize: none; background: var(--bg-input, var(--bg-void)); color: var(--text-primary); border-radius: 22px; padding: 12px 16px; font-size: .95rem; outline: none; font-family: inherit; transition: box-shadow .2s; }
.pfp-create-post-input:focus { box-shadow: 0 0 0 2px var(--primary-dim); }
.pfp-create-post-preview { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; max-width: 220px; }
.pfp-create-post-preview img { width: 100%; display: block; }
.pfp-create-post-remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.pfp-composer-divider { height: 1px; background: var(--border); margin: 14px 0; }
.pfp-composer-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.pfp-composer-tool { flex: 1; min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; background: none; border: none; border-radius: 10px; color: var(--text-secondary); font-weight: 600; font-size: .85rem; cursor: pointer; transition: background .15s; }
.pfp-composer-tool:hover { background: var(--bg-input, rgba(255,255,255,.05)); }
.pfp-composer-tool i { font-size: 1.05rem; }
.pfp-composer-submit { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.pfp-visibility-select { background: var(--bg-input, var(--bg-void)); color: var(--text-primary); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: .82rem; cursor: pointer; }

/* Tarjetas de publicación premium */
.pfp-feed { display: flex; flex-direction: column; gap: 18px; }
.pfp-feed-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.08); animation: pfpFeedIn .35s both; transition: box-shadow .2s; }
.pfp-feed-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.14); }
@keyframes pfpFeedIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pfp-feed-header { display: flex; align-items: center; gap: 11px; }
.pfp-feed-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); font-weight: 700; }
.pfp-feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pfp-feed-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pfp-feed-author { color: var(--text-primary); font-size: .92rem; font-weight: 700; }
.pfp-feed-time { font-size: .74rem; color: var(--text-muted); }
.pfp-feed-edit-btn, .pfp-feed-menu { width: 32px; height: 32px; border: none; background: none; color: var(--text-muted); border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.pfp-feed-edit-btn:hover { background: var(--bg-input); color: var(--primary); }
.pfp-feed-menu:hover { background: var(--bg-input); color: var(--red, #dc2626); }
.pfp-feed-text { margin: 12px 0; color: var(--text-primary); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.pfp-feed-image { margin: 12px -16px 0; }
.pfp-feed-image img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.pfp-feed-stats { display: flex; align-items: center; gap: 14px; padding: 10px 2px; font-size: .78rem; color: var(--text-muted); }
.pfp-feed-cmt-count { margin-left: auto; }
.pfp-feed-actions { display: flex; gap: 4px; padding-top: 6px; border-top: 1px solid var(--border); }
.pfp-feed-action-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; background: none; border: none; border-radius: 8px; color: var(--text-secondary); font-weight: 600; font-size: .85rem; cursor: pointer; transition: background .15s; }
.pfp-feed-action-btn:hover { background: var(--bg-input, rgba(255,255,255,.05)); }
.pfp-feed-action-btn.active { color: var(--primary); }

/* Estado vacío del perfil */
.pfp-empty-state { text-align: center; padding: 46px 20px; color: var(--text-muted); }
.pfp-empty-icon { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); background: var(--primary-dim, rgba(99,102,241,.14)); }
.pfp-empty-state h3 { color: var(--text-primary); margin: 0 0 6px; }

/* Layout 2 columnas del tab Publicaciones */
.pfp-two-col { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.pfp-sidebar-col { position: sticky; top: 84px; }
@media (max-width: 880px) {
    .pfp-two-col { grid-template-columns: 1fr; }
    .pfp-sidebar-col { position: static; }
    .pfp-cover { height: 200px !important; }
    .pfp-avatar-lg { width: 130px; height: 130px; }
    .pfp-composer-tool span { }
}

/* ===== Layout 3 columnas del perfil (Acerca de mí | Feed | Estadísticas) ===== */
.pfp-three-col {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    align-items: start;
}
.pfp-col-left, .pfp-col-right {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.pfp-col-mid { min-width: 0; }

/* Tablet: 2 columnas (izquierda + feed); estadísticas pasan abajo */
@media (max-width: 1100px) {
    .pfp-three-col { grid-template-columns: 280px 1fr; }
    .pfp-col-right { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; }
    .pfp-col-right > .pfp-intro-card { flex: 1; min-width: 260px; }
}
/* Móvil: una sola columna. Orden: Información básica/Acerca → Estadísticas →
   Feed (el usuario quiere la info y las estadísticas ARRIBA). */
@media (max-width: 760px) {
    .pfp-three-col { grid-template-columns: 1fr; }
    .pfp-col-left, .pfp-col-right { position: static; flex-direction: column; }
    .pfp-col-right > .pfp-intro-card { min-width: 0; }
    .pfp-col-left { order: 0; }
    .pfp-col-right { order: 1; }
    .pfp-col-mid { order: 2; }
}

/* Tarjeta "Información básica" (filas clave → valor) */
.pfp-basic-list { display: flex; flex-direction: column; }
.pfp-basic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}
.pfp-basic-row:last-child { border-bottom: none; }
.pfp-basic-key { color: var(--text-secondary); display: flex; align-items: center; gap: 9px; }
.pfp-basic-key i { color: var(--primary); width: 16px; text-align: center; }
.pfp-basic-val { color: var(--text-primary); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pfp-basic-val .fa-chevron-right { color: var(--text-muted); font-size: .7rem; }

/* Tarjeta "Acciones rápidas" */
.pfp-quick-list { display: flex; flex-direction: column; gap: 4px; }
.pfp-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: .88rem;
    font-weight: 500;
    text-align: left;
    transition: background .15s;
}
.pfp-quick-item:hover { background: var(--bg-hover, rgba(99,102,241,.08)); }
.pfp-quick-item > i:first-child {
    width: 34px; height: 34px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--primary-dim, rgba(99,102,241,.14));
    color: var(--primary);
    font-size: .9rem;
}
.pfp-quick-item > span { flex: 1; }
.pfp-quick-arrow { color: var(--text-muted); font-size: .72rem; }

/* ===== Portada "hero": la cabecera (avatar + nombre) va SOBRE la portada ===== */
/* Portada LIMPIA de altura fija: ahora el header (avatar+info) va DEBAJO como
   hermano, estilo Facebook (avatar solapa el borde inferior de la portada). */
.pfp-cover-hero {
    height: 380px !important;
    min-height: 0 !important;
    display: block !important;
}
/* Degradado oscuro abajo para que el texto blanco del header (superpuesto sobre
   la portada) sea legible. */
.pfp-cover-hero .pfp-cover-gradient {
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.32) 28%, transparent 60%) !important;
}
/* El header va SUPERPUESTO sobre la portada (sibling, subido con margin-top
   negativo). Texto blanco legible. Selectores directos (antes usaban
   `.pfp-cover-hero .pfp-...` que quedaban inertes al no ser ya descendientes). */
.pfp-profile-header .pfp-display-name { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.pfp-profile-header .pfp-status-label { color: #f1f5f9; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.pfp-profile-header .pfp-bio-text { color: #e8edf3; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.pfp-cover-hero .pfp-meta-chip {
    background: rgba(255,255,255,.16) !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    color: #fff !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.pfp-cover-hero .pfp-meta-chip i { color: #fff !important; }

@media (max-width: 880px) {
    .pfp-cover-hero { min-height: 340px; }
    .pfp-cover-hero .pfp-profile-header { flex-direction: column; align-items: center; text-align: center; padding: 0 16px 18px; gap: 10px; }
    .pfp-cover-hero .pfp-header-left { flex-direction: column; align-items: center; gap: 10px; }
    .pfp-cover-hero .pfp-meta-chips { justify-content: center; }
    .pfp-cover-hero .pfp-header-right { align-items: center; width: 100%; }
}
/* Resaltado del item advertido al llegar desde la campana (notificacion de moderacion) */
.mod-edit-highlight{animation:modEditPulse 1.1s ease-out 3;border-radius:14px;}
@keyframes modEditPulse{0%{box-shadow:0 0 0 0 rgba(245,158,11,.55);}70%{box-shadow:0 0 0 12px rgba(245,158,11,0);}100%{box-shadow:0 0 0 0 rgba(245,158,11,0);}}

/* Browser de salas por paises (paises -> ciudades) */
.room-country-card{position:relative;cursor:pointer;text-align:center;}
.room-country-card.is-mine{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-dim,rgba(99,102,241,.25));}
.room-country-badge{position:absolute;top:8px;right:8px;background:var(--primary);color:#fff;font-size:.6rem;font-weight:700;padding:.12rem .4rem;border-radius:999px;}
.room-country-flag{font-size:2.2rem;line-height:1;margin-bottom:.4rem;}
.room-general-card .room-card-icon{color:#f59e0b;}
.room-browse-breadcrumb{grid-column:1/-1;display:flex;align-items:center;gap:.6rem;margin-bottom:.2rem;}
.room-browse-back{display:inline-flex;align-items:center;gap:.4rem;background:var(--bg-hover,rgba(127,127,160,.12));border:1px solid var(--border,rgba(120,120,160,.25));color:var(--text);border-radius:999px;padding:.35rem .7rem;font-size:.8rem;cursor:pointer;}
.room-browse-back:hover{background:var(--primary);color:#fff;}
.room-browse-here{font-weight:700;font-size:.95rem;}
.room-card-icon.has-img{background-size:cover;background-position:center;}

/* ===== Sistema de ubicacion: selector de ciudad + perfil ===== */
.loc-picker-overlay{position:fixed;inset:0;z-index:10001;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px;}
.loc-picker{width:min(460px,96vw);max-height:85vh;display:flex;flex-direction:column;background:var(--bg-secondary,#fff);color:var(--text);border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.4);}
.loc-picker-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border,rgba(120,120,160,.2));}
.loc-picker-head h3{margin:0;font-size:1rem;display:flex;align-items:center;gap:.5rem;}
.loc-picker-x{border:none;background:transparent;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--text-secondary,#888);}
.loc-picker-body{padding:14px 16px;overflow-y:auto;}
.loc-picker-input{width:100%;box-sizing:border-box;padding:.7rem .9rem;border:1px solid var(--border,#ddd);border-radius:10px;font-size:1rem;background:var(--bg-input,#fff);color:var(--text);}
.loc-picker-results{margin-top:.6rem;display:flex;flex-direction:column;gap:.3rem;}
.loc-picker-item{display:flex;align-items:center;gap:.6rem;text-align:left;width:100%;border:1px solid var(--border,rgba(120,120,160,.18));background:var(--bg-hover,rgba(127,127,160,.06));border-radius:10px;padding:.55rem .7rem;cursor:pointer;color:var(--text);font-size:.9rem;}
.loc-picker-item:hover{background:var(--primary);color:#fff;}
.loc-picker-item i{color:var(--primary);}
.loc-picker-item:hover i{color:#fff;}
.loc-picker-item span{display:flex;flex-direction:column;line-height:1.25;}
.loc-picker-item small{opacity:.7;font-size:.72rem;}
.loc-picker-loading,.loc-picker-empty{padding:.8rem;text-align:center;color:var(--text-muted,#8a93a8);font-size:.85rem;}
.loc-picker-hint{margin:.6rem 0 0;font-size:.72rem;color:var(--text-muted,#8a93a8);}
.pfp-loc-edit{border:none;background:transparent;color:var(--primary);cursor:pointer;font-size:.82rem;font-weight:600;padding:0;display:inline-flex;align-items:center;gap:.35rem;}
.pfp-loc-edit:hover{text-decoration:underline;}
.pfp-loc-empty{opacity:.7;}

/* Selector de ubicacion con mapa (Fase 2) */
.loc-picker-wide{width:min(560px,96vw);}
.loc-picker-map{height:280px;width:100%;margin-top:.7rem;border-radius:12px;overflow:hidden;border:1px solid var(--border,rgba(120,120,160,.2));z-index:0;}
.loc-picker-map .leaflet-pane{z-index:1;}
.loc-picker-foot{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-top:.7rem;}
.loc-picker-sel{flex:1;min-width:0;font-size:.85rem;color:var(--text-secondary,#6b7280);overflow:hidden;text-overflow:ellipsis;}
.loc-picker-confirm{flex:0 0 auto;display:inline-flex;align-items:center;gap:.4rem;border:none;cursor:pointer;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;font-weight:700;font-size:.85rem;padding:.55rem .9rem;border-radius:10px;}
.loc-picker-confirm:disabled{opacity:.5;cursor:default;filter:grayscale(.4);}

/* Boton GPS dentro del selector de ubicacion */
.loc-picker-gps{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;margin-bottom:.7rem;border:1px solid var(--primary,#6366f1);background:var(--primary,#6366f1);color:#fff;font-weight:700;font-size:.9rem;padding:.7rem;border-radius:11px;cursor:pointer;transition:filter .15s,transform .15s;}
.loc-picker-gps:hover{filter:brightness(1.08);transform:translateY(-1px);}

/* ===== Chats privados del sidebar (rediseño compacto y limpio) =====
   Scoped a .private-chats-list para NO heredar los estilos del monitor admin. */
.private-chats-list .private-chat-item{
  display:flex;align-items:center;gap:.6rem;padding:.55rem .6rem;margin:0;
  background:transparent;border:1px solid transparent;border-radius:12px;
  cursor:pointer;transition:background .15s,border-color .15s;position:relative;
}
.private-chats-list .private-chat-item:hover{background:var(--bg-hover);transform:none;}
.private-chats-list .private-chat-item.active{background:var(--primary-dim);border-color:var(--primary);}
.private-chats-list .private-chat-item.unread{background:color-mix(in srgb,var(--primary) 8%,transparent);}
.private-chats-list .private-chat-avatar{
  width:42px;height:42px;border-radius:50%;flex-shrink:0;position:relative;
  background:linear-gradient(135deg,var(--primary),var(--coral,#f0667a));
  display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.95rem;box-shadow:none;
}
.private-chats-list .private-chat-avatar .unread-dot{position:absolute;top:-1px;right:-1px;width:11px;height:11px;border-radius:50%;background:var(--primary);border:2px solid var(--bg-card,#fff);}
.private-chats-list .private-chat-info{flex:1;min-width:0;}
.private-chats-list .private-chat-header{display:flex;align-items:center;justify-content:space-between;gap:.4rem;margin:0 0 2px;flex-wrap:nowrap;}
.private-chats-list .private-chat-name{font-weight:700;font-size:.86rem;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.private-chats-list .private-chat-time{font-size:.66rem;color:var(--text-muted);white-space:nowrap;flex-shrink:0;}
.private-chats-list .private-chat-preview{display:block;padding:0;margin:0;background:none;border:none;font-size:.76rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.private-chats-list .private-chat-item.unread .private-chat-preview{color:var(--text-secondary);font-weight:600;}
.private-chats-list .private-chat-actions{display:flex;flex-direction:column;align-items:center;gap:.3rem;justify-content:center;flex-shrink:0;}
.private-chats-list .unread-count-badge{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--primary);color:#fff;font-size:.66rem;font-weight:800;display:flex;align-items:center;justify-content:center;}
.private-chats-list .private-chat-close-btn{border:none;background:transparent;color:var(--text-muted);cursor:pointer;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.72rem;opacity:0;transition:opacity .15s,background .15s,color .15s;}
.private-chats-list .private-chat-item:hover .private-chat-close-btn{opacity:1;}
.private-chats-list .private-chat-close-btn:hover{background:rgba(239,68,68,.15);color:#ef4444;}
