/* =====================================================
   Skycan - Hoja de estilos principal
   Paleta de colores, tipografía, layout y componentes
   ===================================================== */

/* ---- Variables CSS globales ---- */
:root {
    /* Colores principales */
    --primary:       #FF6B35;   /* Naranja principal */
    --primary-dark:  #e55a25;   /* Naranja oscuro (hover) */
    --primary-light: #ff8f63;   /* Naranja claro */
    --secondary:     #4ECDC4;   /* Verde azulado */
    --accent:        #FFE66D;   /* Amarillo acento */
    --dark:          #1A1A2E;   /* Fondo oscuro */
    --dark-2:        #16213E;   /* Fondo oscuro alternativo */

    /* Colores de texto */
    --text:          #1F2937;   /* Texto principal */
    --text-muted:    #6B7280;   /* Texto secundario */
    --text-light:    #9CA3AF;   /* Texto desactivado */

    /* Fondos y bordes */
    --bg:            #F9FAFB;   /* Fondo de página */
    --bg-card:       #FFFFFF;   /* Fondo de tarjetas */
    --border:        #E5E7EB;   /* Borde estándar */
    --border-light:  #F3F4F6;   /* Borde suave */

    /* Sombras */
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow:        0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.14);

    /* Bordes redondeados */
    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     20px;
    --radius-full:   9999px;    /* Circular / píldora */

    /* Transiciones y dimensiones */
    --transition:    all .2s ease;
    --navbar-height: 68px;      /* Altura de la barra de navegación */
    --font:          'Poppins', sans-serif;
}

/* ---- Reseteo base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ---- Tipografía ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); margin-bottom: .75rem; }
.text-muted    { color: var(--text-muted) !important; }
.text-primary  { color: var(--primary) !important; }
.text-success  { color: #10B981 !important; }
.text-danger   { color: #EF4444 !important; }
.text-warning  { color: #F59E0B !important; }
.text-center   { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ---- Estructura y layout ---- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}
.main-content { min-height: calc(100vh - var(--navbar-height) - 200px); }
body.page-home .main-content { min-height: 0; padding-bottom: 0 !important; }
body.page-home .footer { margin-top: 0 !important; }

/* Chat page: full viewport, no footer, no scrollbars */
/* Chat page layout overrides are in chat/index.php <style> block */

.section { padding: 60px 0; }
.section-sm { padding: 32px 0; }

/* ---- Sistema de rejilla (grid) ---- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.full-width { grid-column: 1 / -1; }

/* ---- Barra de navegación ---- */
.navbar {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    min-height: var(--navbar-height);
}
.navbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--navbar-height);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-icon {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1rem;
}
.brand-icon-sm { width: 28px; height: 28px; font-size: .8rem; }
.brand-text { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.brand-text strong { color: var(--primary); }
.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: var(--transition);
    text-decoration: none;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(255,107,53,.08);
}
.navbar-search { flex: 1; max-width: 340px; }
.search-wrapper { position: relative; }
.search-input {
    width: 100%;
    padding: 9px 40px 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: .875rem;
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}
.search-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.search-icon {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: .85rem;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}
.search-dropdown.open { display: block; }
.search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    font-size: .875rem;
    border-bottom: 1px solid var(--border-light);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg); }
.search-item-avatar { flex-shrink: 0; }
.search-section-title {
    padding: 8px 14px 4px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg);
}
.navbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.btn-icon {
    width: 38px; height: 38px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}
.btn-icon:hover { background: var(--border-light); color: var(--text); }

/* Campana de notificaciones */
.notif-wrapper { position: relative; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 17px; height: 17px;
    background: var(--primary);
    color: white;
    font-size: .65rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: none;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: .875rem;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(255,107,53,.04); }
.notif-item-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    background: rgba(255,107,53,.1);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .8rem;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-body p { font-size: .8rem; color: var(--text); margin: 0; }
.notif-item-body span { font-size: .72rem; color: var(--text-muted); }
.notif-empty { padding: 32px; text-align: center; color: var(--text-muted); }
.notif-empty i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .5; }
.notif-section-title {
    padding: 8px 16px 4px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.notif-count-badge {
    background: var(--primary); color: white;
    font-size: .65rem; font-weight: 700;
    padding: 2px 6px; border-radius: 999px;
    flex-shrink: 0;
}

/* Desplegable de usuario */
.user-dropdown-wrapper { position: relative; }
.user-avatar-btn {
    display: flex; align-items: center; gap: 6px;
    background: transparent; border: none;
    padding: 4px 8px; border-radius: var(--radius-full);
    transition: var(--transition);
}
.user-avatar-btn:hover { background: var(--border-light); }
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow: hidden;
    display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px;
}
.user-dropdown-header strong { font-size: .9rem; }
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: .875rem;
    transition: var(--transition);
    text-decoration: none;
    border: none; background: none; width: 100%; cursor: pointer;
}
.dropdown-item i { width: 16px; text-align: center; color: var(--text-light); }
.dropdown-item:hover { background: var(--bg); color: var(--primary); }
.dropdown-item:hover i { color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); }

/* Menú hamburguesa (móvil) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.mobile-menu {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 899;
    padding: 8px 0 16px;
}
.mobile-menu.open { display: block; }
.mobile-nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    color: var(--text);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.mobile-nav-link:hover,
.mobile-nav-link:active { color: var(--primary); background: rgba(255,107,53,.06); border-left-color: var(--primary); }
.mobile-nav-link i { width: 20px; text-align: center; color: var(--text-muted); }
.mobile-nav-link:hover i { color: var(--primary); }

/* ---- Botones ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: .875rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    font-family: var(--font);
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
    background: var(--primary); color: white; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-secondary {
    background: var(--secondary); color: white; border-color: var(--secondary);
}
.btn-secondary:hover { background: #3db8b0; border-color: #3db8b0; color: white; }
.btn-outline {
    background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-muted {
    background: transparent; color: var(--text-muted); border-color: var(--border);
}
.btn-outline-muted:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
    background: transparent; color: var(--text); border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: #EF4444; color: white; border-color: #EF4444; }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; color: white; }
.btn-dark { background: var(--dark); color: white; border-color: var(--dark); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); font-size: .8rem; padding: 0; }
.btn-link:hover { color: var(--primary-dark); }

/* ---- Insignias / badges ---- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-primary  { background: rgba(255,107,53,.12);  color: var(--primary); }
.badge-secondary{ background: rgba(78,205,196,.12);  color: var(--secondary); }
.badge-success  { background: rgba(16,185,129,.12);  color: #10B981; }
.badge-warning  { background: rgba(245,158,11,.12);  color: #F59E0B; }
.badge-danger   { background: rgba(239,68,68,.12);   color: #EF4444; }
.badge-dark     { background: rgba(26,26,46,.1);     color: var(--dark); }
.badge-info     { background: rgba(59,130,246,.12);  color: #3B82F6; }
.role-badge { font-size: .68rem; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 600; }
.role-superadmin { background: rgba(239,68,68,.1); color: #EF4444; }
.role-admin      { background: rgba(245,158,11,.1); color: #F59E0B; }
.role-user       { background: rgba(78,205,196,.1); color: var(--secondary); }

/* ---- Alertas / notificaciones flash ---- */
.alerts-container {
    position: fixed;
    top: calc(var(--navbar-height) + 12px);
    right: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight .3s ease;
    border-left: 4px solid;
}
.alert i:first-child { flex-shrink: 0; margin-top: 2px; }
.alert span { flex: 1; }
.alert-success { background: #F0FDF4; border-color: #10B981; color: #065F46; }
.alert-success i:first-child { color: #10B981; }
.alert-danger  { background: #FEF2F2; border-color: #EF4444; color: #991B1B; }
.alert-danger i:first-child  { color: #EF4444; }
.alert-warning { background: #FFFBEB; border-color: #F59E0B; color: #92400E; }
.alert-warning i:first-child { color: #F59E0B; }
.alert-info    { background: #EFF6FF; border-color: #3B82F6; color: #1E40AF; }
.alert-info i:first-child    { color: #3B82F6; }
.alert-close {
    background: none; border: none; color: inherit; opacity: .6;
    margin-left: auto; flex-shrink: 0; font-size: .8rem; padding: 0;
}
.alert-close:hover { opacity: 1; }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ---- Tarjetas ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3, .card-header h4 { margin: 0; font-size: 1rem; }
.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* Tarjetas de grupos y eventos */
.group-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.group-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,107,53,.3);
}
.group-card-img {
    height: 160px;
    object-fit: cover;
    width: 100%;
}
.group-card-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 2.5rem;
}
.group-card-body {
    padding: 16px;
    flex: 1;
    display: flex; flex-direction: column;
}
.group-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.group-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.group-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .78rem;
    color: var(--text-muted);
}
.group-card-meta i { margin-right: 4px; color: var(--primary); }

.event-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex; gap: 16px;
    transition: var(--transition);
}
.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.event-date-box {
    flex-shrink: 0;
    width: 56px; height: 60px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: white;
}
.event-date-day   { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.event-date-month { font-size: .62rem; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.event-card-body { flex: 1; min-width: 0; }
.event-card-title { font-weight: 700; font-size: .95rem; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-card-info  { font-size: .78rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 10px; }
.event-card-info i { margin-right: 3px; color: var(--primary); }

/* Tarjetas de usuario */
.user-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.user-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(255,107,53,.3);
}
.user-card-avatar { margin: 0 auto 12px; }
.user-card-name { font-weight: 700; font-size: .95rem; }
.user-card-meta { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* ---- Avatares ---- */
.avatar {
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.avatar-initials {
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Formularios ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: #EF4444; margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: var(--font);
    color: var(--text);
    background: white;
    transition: var(--transition);
    outline: none;
    appearance: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.form-control::placeholder { color: var(--text-light); }
.form-control:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .78rem; color: #EF4444; margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-light); }
.form-section:last-child { border-bottom: none; }
.form-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.form-section-title i { color: var(--primary); }
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }

/* Subida de imágenes */
.img-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}
.img-upload-area:hover { border-color: var(--primary); background: rgba(255,107,53,.03); }
.img-upload-area i { font-size: 2rem; color: var(--text-light); margin-bottom: 8px; }
.img-upload-area p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.img-preview { max-width: 200px; max-height: 200px; border-radius: var(--radius); margin: 12px auto 0; display: none; }

/* ---- Tablas ---- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { background: var(--bg); padding: 12px 16px; font-weight: 600; text-align: left; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,.015); }

/* ---- Paginación ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
    min-width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 600;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: white;
    cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Barra de filtros ---- */
.filters-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filters-bar .form-group { margin-bottom: 0; min-width: 160px; flex: 1; }
.filters-bar .form-label { font-size: .78rem; margin-bottom: 4px; }
.filters-bar .form-control { padding: 8px 12px; font-size: .82rem; }
.filter-btn { flex-shrink: 0; align-self: flex-end; }

/* ---- Layout con barra lateral ---- */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}
.layout-sidebar.reverse { grid-template-columns: 320px 1fr; }
.sidebar-sticky { position: sticky; top: calc(var(--navbar-height) + 20px); }

/* ---- Cabeceras de sección ---- */
.section-header { margin-bottom: 28px; }
.section-header h2 { margin-bottom: 6px; }
.section-header p { margin: 0; }
.section-header-flex { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header-flex h2, .section-header-flex h3 { margin: 0; }

/* ---- Sección hero (portada principal) ---- */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 60%, #0F3460 100%);
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,107,53,.15);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: .8rem; font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255,107,53,.25);
}
.hero h1 { color: white; margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p { color: rgba(255,255,255,.7); font-size: 1.1rem; max-width: 560px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    display: flex; justify-content: center; gap: 40px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 2rem; font-weight: 800; color: white; }
.hero-stat-label { font-size: .82rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; }

/* ---- Chat (estilo WhatsApp) ---- */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
    position: relative;
}
.chat-sidebar {
    background: white;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.chat-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: white;
}
.chat-empty-tab {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.chat-empty-tab i { font-size: 2rem; opacity: .3; }
.chat-empty-tab p { margin: 0; font-size: .82rem; }
.chat-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.chat-tab-btn {
    flex: 1; padding: 10px 8px;
    border: none; background: none;
    font-size: .8rem; font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}
.chat-tab-btn.active, .chat-tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none; color: var(--text);
    position: relative;
}
.chat-list-item:hover, .chat-list-item.active { background: rgba(255,107,53,.06); }
.chat-list-item.active { border-left: 3px solid var(--primary); }
.chat-list-item-body { flex: 1; min-width: 0; }
.chat-list-item-name { font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item-preview { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.unread-badge {
    min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--primary); color: white;
    border-radius: var(--radius-full); font-size: .68rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* Área principal del chat */
.chat-main {
    display: flex; flex-direction: column;
    background: #f0f2f5;
    position: relative;
    overflow: hidden;
    min-width: 0; /* prevent grid blowout */
}
.chat-header {
    background: var(--dark);
    color: white;
    padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 1;
    flex-shrink: 0;
}
.chat-header .btn-icon { color: rgba(255,255,255,.8); }
.chat-header .btn-icon:hover { color: white; background: rgba(255,255,255,.1); }
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-info h4 { margin: 0; font-size: .95rem; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header-info span { font-size: .72rem; color: rgba(255,255,255,.7); }
.chat-header .btn-outline-muted { border-color: rgba(255,255,255,.3); color: white; }
.chat-header .btn-outline-muted:hover { background: rgba(255,255,255,.15); border-color: white; color: white; }
.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 16px;
    display: flex; flex-direction: column; gap: 4px;
    background: #f0f2f5;
}
/* Burbujas de mensaje */
.msg-bubble-wrap {
    display: flex; gap: 8px; align-items: flex-end;
    margin-bottom: 4px;
    position: relative;
}
/* hover rule is in .msg-actions block above */
.msg-bubble-wrap.own { flex-direction: row-reverse; }
.msg-content-wrap {
    display: flex; flex-direction: column;
    max-width: 65%;
    position: relative;
}
.msg-bubble-wrap.own .msg-content-wrap { align-items: flex-end; }
.msg-username {
    font-weight: 700; font-size: .72rem;
    margin-bottom: 3px; color: var(--primary);
    text-decoration: none;
    display: block;
}
.msg-bubble-wrap.own .msg-username { display: none; }
.msg-reply-quote {
    background: rgba(0,0,0,.08);
    border-left: 3px solid var(--primary);
    border-radius: 6px 6px 0 0;
    padding: 5px 10px;
    font-size: .75rem;
    margin-bottom: -4px;
    max-width: 100%;
    overflow: hidden;
}
.msg-reply-author { font-weight: 700; color: var(--primary); display: block; font-size: .72rem; }
.msg-reply-text { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.msg-bubble {
    background: white;
    border-radius: 16px 16px 16px 4px;
    padding: 8px 12px 6px;
    font-size: .875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    word-break: break-word;
    line-height: 1.5;
    position: relative;
    border: 1px solid var(--border-light);
}
.msg-bubble-wrap.own .msg-bubble {
    background: var(--primary);
    color: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 1px 3px rgba(255,107,53,.2);
    border: none;
}
.msg-bubble-wrap.own .msg-meta { color: rgba(255,255,255,.65); }
.msg-bubble-wrap.own .msg-reply-quote {
    background: rgba(255,255,255,.15);
    border-left-color: rgba(255,255,255,.5);
}
.msg-bubble-wrap.own .msg-reply-author { color: rgba(255,255,255,.85); }
.msg-bubble-wrap.own .msg-reply-text { color: rgba(255,255,255,.6); }
.msg-bubble-img {
    max-width: 260px; max-height: 240px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px; cursor: pointer;
    display: block; object-fit: cover;
}
.msg-text { display: block; }
.msg-meta {
    font-size: .65rem; color: #999;
    text-align: right; margin-top: 3px;
    display: flex; align-items: center; justify-content: flex-end; gap: 3px;
}
/* Acciones de mensaje (reaccionar, responder, eliminar) */
.msg-actions {
    display: flex; gap: 4px; align-items: center;
    opacity: 0; transition: opacity .15s;
    position: absolute; top: -14px; right: 4px;
    background: white; border-radius: 20px;
    padding: 3px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 10;
}
.msg-bubble-wrap.own .msg-actions { right: auto; left: 4px; }
.msg-bubble-wrap:hover .msg-actions,
.msg-bubble-wrap.actions-open .msg-actions { opacity: 1; }
.msg-action-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: white; color: var(--text-muted);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    cursor: pointer; font-size: .7rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.msg-action-btn:hover { background: var(--primary); color: white; }
.msg-action-btn.danger:hover { background: #EF4444; color: white; }
/* Separador de fecha entre mensajes */
.msg-date-sep {
    display: flex; align-items: center; justify-content: center;
    margin: 12px 0 8px;
}
.msg-date-sep span {
    background: rgba(225,221,216,.9);
    color: #54656F;
    font-size: .72rem; font-weight: 600;
    padding: 4px 12px; border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.chat-no-messages {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.chat-no-messages i { font-size: 2.5rem; opacity: .25; }
.chat-no-messages p { margin: 0; font-size: .875rem; }
/* Barra de entrada de texto */
.chat-input-bar {
    background: #F0F0F0;
    padding: 10px 12px;
    display: flex; align-items: flex-end; gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.chat-input {
    width: 100%;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: .875rem; font-family: var(--font);
    outline: none; transition: var(--transition);
    resize: none; min-height: 42px; max-height: 120px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    line-height: 1.5;
    box-sizing: border-box;
}
.chat-send-btn {
    width: 44px; height: 44px; flex-shrink: 0;
    background: var(--primary); color: white;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: var(--transition);
    box-shadow: 0 2px 8px rgba(255,107,53,.3);
}
.chat-send-btn:hover { background: var(--primary-dark); }
.chat-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-muted); gap: 12px;
    padding: 40px; text-align: center;
    background: #f0f2f5;
}
.chat-empty h3 { color: var(--text); }
.chat-empty p { font-size: .875rem; }

/* ---- Perfil de usuario ---- */
.profile-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 48px 0 80px;
}
.profile-header-inner {
    display: flex; gap: 24px; align-items: flex-end;
}
.profile-avatar-wrapper { position: relative; }
.profile-avatar {
    width: 120px; height: 120px;
    border-radius: var(--radius-full);
    border: 4px solid white;
    object-fit: cover;
}
.profile-avatar-placeholder {
    width: 120px; height: 120px;
    border-radius: var(--radius-full);
    border: 4px solid white;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 2.5rem; font-weight: 800;
}
.profile-info { flex: 1; }
.profile-name { color: white; font-size: 1.8rem; margin-bottom: 4px; }
.profile-meta { color: rgba(255,255,255,.65); font-size: .875rem; display: flex; gap: 16px; flex-wrap: wrap; }
.profile-meta i { color: var(--primary); margin-right: 4px; }
.profile-body {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}
.dog-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.dog-card-img { width: 100%; height: 200px; object-fit: cover; }
.dog-card-img-placeholder {
    width: 100%; height: 180px;
    background: linear-gradient(135deg, #f0e6ff 0%, #e8f4fd 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.dog-card-body { padding: 16px; }
.dog-name { font-size: 1.2rem; font-weight: 700; }
.dog-breed { font-size: .85rem; color: var(--text-muted); }
.dog-attrs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dog-attr {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: .75rem;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
}
.dog-attr i { color: var(--primary); font-size: .7rem; }

/* ---- Contenedor de mapa ---- */
.map-container {
    height: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 1;
}
.map-container-lg { height: 480px; }

/* ---- Tarjetas de redes sociales ---- */
.ad-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none; color: var(--text);
    display: flex; flex-direction: column;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ad-card-img { width: 100%; height: 160px; object-fit: cover; }
.ad-card-img-placeholder {
    height: 160px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.ad-card-body { padding: 14px; flex: 1; }
.ad-card-platform {
    display: flex; align-items: center; gap: 6px;
    font-size: .75rem; font-weight: 600;
    margin-bottom: 6px;
}
.ad-card-title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-card-desc { font-size: .78rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Pie de página ---- */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 60px 0 0;
    margin-top: 0;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
}
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: white;
    font-weight: 800; font-size: 1.2rem;
    margin-bottom: 14px;
}
.footer-tagline { font-size: .85rem; line-height: 1.6; margin-bottom: 20px; }
.footer-social { display: flex; gap: 8px; }
.social-link {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); font-size: .875rem;
    transition: var(--transition);
    text-decoration: none;
}
.social-link:hover { background: var(--sc, var(--primary)); color: white; }
.footer-heading { color: white; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    font-size: .85rem; color: rgba(255,255,255,.6);
    text-decoration: none; transition: var(--transition);
    display: flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: var(--primary); }
.footer-links a i { font-size: .78rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: .82rem; color: rgba(255,255,255,.4);
}
.footer-version { font-size: .72rem; }

/* ---- Estados vacíos ---- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; opacity: .3; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: .875rem; margin-bottom: 20px; }

/* ---- Indicador de carga (spinner) ---- */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Group show ---- */
.group-hero {
    height: 220px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative; overflow: hidden;
}
.group-hero img { width: 100%; height: 100%; object-fit: cover; }
.group-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
}
.group-hero-info {
    position: absolute; bottom: 20px; left: 24px; right: 24px;
    color: white;
    display: flex; align-items: flex-end; justify-content: space-between;
}
.group-hero-title { font-size: 1.6rem; font-weight: 800; }
.group-hero-meta { font-size: .85rem; opacity: .85; display: flex; gap: 16px; flex-wrap: wrap; }
.group-hero-meta i { margin-right: 4px; color: var(--primary-light); }
.member-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.member-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 14px 6px 6px;
    text-decoration: none; color: var(--text);
    transition: var(--transition);
    font-size: .82rem;
}
.member-item:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Social links ---- */
.social-links-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: .8rem; font-weight: 600;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    opacity: .9;
}
.social-pill:hover { opacity: 1; transform: translateY(-1px); color: white; }

/* ---- Stats widgets ---- */
.stat-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px 24px;
    display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon-primary { background: rgba(255,107,53,.1); color: var(--primary); }
.stat-icon-secondary { background: rgba(78,205,196,.1); color: var(--secondary); }
.stat-icon-success { background: rgba(16,185,129,.1); color: #10B981; }
.stat-icon-warning { background: rgba(245,158,11,.1); color: #F59E0B; }
.stat-icon-danger  { background: rgba(239,68,68,.1);  color: #EF4444; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

/* ---- Poll messages ---- */
.msg-poll-bubble { min-width: min(260px, 80vw); width: min(320px, 80vw); }
.msg-bubble-wrap .msg-content-wrap:has(.msg-poll-bubble) { max-width: min(340px, 85vw); }
.poll-header { font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; display:flex; align-items:center; }
.poll-question { font-weight: 700; font-size: .9rem; margin-bottom: 12px; line-height: 1.4; }
.poll-option-btn {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 9px 12px;
    background: rgba(0,0,0,.04); border: 1.5px solid var(--border);
    border-radius: 8px; cursor: pointer; margin-bottom: 6px;
    font-size: .82rem; font-family: var(--font);
    transition: border-color .15s, background .15s;
    text-align: left; gap: 8px;
    min-height: 38px;
}
.poll-option-btn:active { transform: scale(.98); }
.poll-option-btn:hover { border-color: var(--primary); }
.poll-option-btn.voted { border-color: var(--primary); font-weight: 600; }
.poll-option-bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: rgba(255,107,53,.18);
    transition: width .5s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    border-radius: 6px;
    z-index: 0;
}
.poll-option-text { position: relative; z-index: 1; flex: 1; }
.poll-option-pct { position: relative; z-index: 1; font-size: .75rem; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.poll-footer { font-size: .72rem; color: var(--text-muted); margin-top: 8px; }
.msg-bubble-wrap.own .poll-option-btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); }
.msg-bubble-wrap.own .poll-option-bar { background: rgba(255,255,255,.25); }
.msg-bubble-wrap.own .poll-option-btn.voted { border-color: white; background: rgba(255,255,255,.15); }
.msg-bubble-wrap.own .poll-option-text { color: white; }
.msg-bubble-wrap.own .poll-option-pct { color: rgba(255,255,255,.8); }
.msg-bubble-wrap.own .poll-header { color: white; }
.msg-bubble-wrap.own .poll-header i { color: white !important; }
.msg-bubble-wrap.own .poll-question { color: white; }
.msg-bubble-wrap.own .poll-footer { color: rgba(255,255,255,.7); }

/* ---- Reactions ---- */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; max-width: 100%; }
.reaction-chip {
    display: inline-flex; align-items: center; gap: 3px;
    background: white; border: 1.5px solid var(--border);
    border-radius: 999px; padding: 2px 6px; font-size: .78rem;
    cursor: pointer; transition: var(--transition); user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    flex-shrink: 0;
}
.reaction-chip:hover, .reaction-chip:active { border-color: var(--primary); background: rgba(255,107,53,.05); }
.reaction-chip small { font-size: .7rem; color: var(--text-muted); font-weight: 700; }
.reaction-picker {
    position: fixed; z-index: 9999;
    background: white; border: 1px solid var(--border);
    border-radius: 16px; padding: 8px 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
    display: flex; gap: 2px;
    transform: translateY(-8px);
}
.reaction-picker button {
    font-size: 1.5rem; background: none; border: none;
    cursor: pointer; padding: 6px 8px; border-radius: 10px;
    transition: background .1s, transform .1s;
    line-height: 1;
}
.reaction-picker button:hover, .reaction-picker button:active { background: var(--bg); transform: scale(1.25); }
.msg-content-wrap { position: relative; }

/* ---- Unread badge in sidebar ---- */
.chat-unread-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0;
}

/* ---- Tips / features ---- */
.feature-card {
    background: white; border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius);
    background: rgba(255,107,53,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: var(--primary);
    margin: 0 auto 16px;
}
.feature-card h4 { margin-bottom: 8px; }
.feature-card p { font-size: .85rem; margin: 0; }

/* ---- Services section ---- */
.services-section { background: var(--bg); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.service-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px 24px;
    transition: var(--transition);
    display: flex; flex-direction: column; gap: 8px;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.service-title { font-size: 1rem; font-weight: 700; margin: 0; color: var(--text); }
.service-desc { font-size: .83rem; color: var(--text-muted); margin: 0; flex: 1; }
.service-link { font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.service-link:hover { gap: 8px; }

/* ---- Breeds CTA banner ---- */
.breeds-cta-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 40px 0;
}
.breeds-cta-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
}
.breeds-cta-text h3 { color: white; margin-bottom: 6px; font-size: 1.3rem; }
.breeds-cta-text p  { color: rgba(255,255,255,.65); margin: 0; font-size: .9rem; max-width: 500px; }

/* ---- Report Modal ---- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    align-items: center; justify-content: center;
    padding: 20px;
    display: none;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: white;
    border-radius: var(--radius);
    width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale .2s ease;
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h4 { margin: 0; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
}
@keyframes fadeInScale {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ---- Utilidades y miscelánea ---- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: .75rem;
    color: var(--text-muted);
}
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-muted);
}
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: rgba(255,107,53,.06); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; } .p-20 { padding: 20px; } .p-24 { padding: 24px; }

/* ---- Páginas de autenticación (login/registro) ---- */
.auth-page {
    min-height: calc(100vh - var(--navbar-height));
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7ff 0%, #fff0eb 100%);
}
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%; max-width: 460px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-title { text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: .875rem; margin-bottom: 28px; }
.auth-divider { position: relative; text-align: center; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: white; padding: 0 12px; position: relative; font-size: .8rem; color: var(--text-muted); }
.auth-footer { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--text-muted); }

/* ---- Panel de administración ---- */
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.admin-table-actions { display: flex; gap: 6px; }
.admin-search-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.admin-search-bar .search-wrapper { max-width: 300px; flex: 1; }
.social-row { flex-wrap: wrap; }
.page-header { margin-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-header h1 { font-size: 1.5rem; margin: 0 0 4px; }
.page-header p { margin: 0; font-size: .875rem; }

/* ============================================================
   RESPONSIVE - Adaptación móvil y tablets
   ============================================================ */

/* --- Barra de búsqueda móvil (visible cuando se oculta la de escritorio) --- */
.busqueda-movil {
    display: none;
    padding: 8px 16px 12px;
    background: white;
    border-bottom: 1px solid var(--border);
}
.busqueda-movil .search-wrapper { max-width: 100%; }

/* --- Tablet grande (≤1100px) --- */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .layout-sidebar { grid-template-columns: 1fr; }
    .layout-sidebar.reverse { grid-template-columns: 1fr; }
    .sidebar-sticky { position: static; }
}

/* --- Tablet / Móvil grande (≤900px) --- */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    /* Navegación: ocultar enlaces y búsqueda de escritorio, mostrar hamburguesa */
    .navbar-search { display: none; }
    .navbar-links { display: none; }
    .hamburger { display: flex; }

    /* Búsqueda móvil dentro del menú hamburguesa */
    .busqueda-movil { display: block; }

    /* Chat móvil: sidebar como panel flotante a pantalla completa */
    .chat-layout { grid-template-columns: 1fr; }
    .chat-sidebar {
        display: none;
        position: fixed; inset: 0; z-index: 500;
        background: white;
    }
    .chat-sidebar.mobile-open { display: flex; flex-direction: column; }
    /* When no conversation is active, show sidebar by default on mobile */
    .chat-layout.no-active-chat .chat-sidebar {
        display: flex; flex-direction: column;
        position: relative; inset: auto; z-index: auto;
    }
    .chat-layout.no-active-chat .chat-main { display: none; }

    /* Botón de volver en la cabecera del chat */
    .chat-back-btn { display: flex !important; }
    .hide-mobile { display: none !important; }

    /* Acciones de mensaje: reposicionar debajo de la burbuja */
    .msg-actions {
        top: auto; right: 4px; bottom: -32px;
        left: auto;
    }
    .msg-bubble-wrap.own .msg-actions { right: auto; left: 4px; }

    /* Burbujas más anchas en tablet */
    .msg-content-wrap { max-width: 82vw; }

    /* Tarjetas de evento: apilamiento vertical */
    .event-card { flex-direction: column; gap: 12px; }
    .event-date-box { width: 100%; height: auto; flex-direction: row; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); }
    .event-date-day { font-size: 1.1rem; }
    .event-date-month { font-size: .7rem; }
}

/* --- Móvil (≤640px) --- */
@media (max-width: 640px) {
    /* Contenedor con menos padding lateral */
    .container { padding: 0 14px; }

    /* Grids a una columna */
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .grid-auto { grid-template-columns: 1fr; }

    /* Hero */
    .hero { padding: 32px 0 48px; }
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: .9rem; }
    .hero-stats { flex-wrap: wrap; gap: 20px; justify-content: center; }
    .hero-stat-value { font-size: 1.5rem; }
    .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-actions .btn { text-align: center; }

    /* Footer */
    .footer { margin-top: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    /* Autenticación */
    .auth-card { padding: 24px 16px; }

    /* Perfil: apilar cabecera en vertical */
    .profile-header { padding: 32px 0 60px; }
    .profile-header-inner { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar, .profile-avatar-placeholder { width: 90px; height: 90px; font-size: 2rem; }
    .profile-info { align-items: center; }
    .profile-meta { justify-content: center; }
    .profile-name { font-size: 1.4rem; }

    /* Admin */
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    /* full-width: on mobile single-column grids, reset to auto */
    .full-width { grid-column: auto; }

    /* Admin search bar: stack vertically on mobile */
    .admin-search-bar { flex-direction: column; align-items: stretch; }
    .admin-search-bar .search-wrapper { max-width: 100%; }
    .admin-search-bar select { max-width: 100% !important; }
    .admin-table-actions { flex-wrap: wrap; }

    /* Social link rows: stack on mobile */
    .social-row select { max-width: 100% !important; flex: 1 1 100% !important; }
    .social-row input[type="url"] { flex: 1 1 100% !important; }

    /* Ad cards: stack image and text */
    .ad-card-flex { flex-direction: column; }
    .ad-card-flex img { width: 100% !important; height: 120px !important; }

    /* Barra de filtros */
    .filters-bar { flex-direction: column; }
    .filters-bar .form-group { min-width: 100% !important; flex: 1 1 100% !important; }
    .filters-bar .filter-btn { width: 100%; }
    .filters-bar .filter-btn .btn { width: 100%; }

    /* CTA y servicios */
    .breeds-cta-inner { flex-direction: column; text-align: center; }
    .services-grid { grid-template-columns: 1fr 1fr; }

    /* Secciones con menos padding */
    .section { padding: 32px 0; }
    .section-sm { padding: 20px 0; }

    /* Cabecera de sección: apilar en vertical */
    .section-header-flex { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Tarjetas */
    .card { border-radius: var(--radius-sm); }

    /* Cabecera de página */
    .page-header { flex-direction: column; gap: 10px; }

    /* Botones: mínimo táctil de 44px (accesibilidad) */
    .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

    /* Formularios: inputs más grandes para móvil */
    .form-control, select.form-control { min-height: 44px; font-size: 1rem; }

    /* Chat: burbujas más anchas */
    .msg-content-wrap { max-width: 86vw; }
    .msg-poll-bubble, .msg-bubble-wrap .msg-content-wrap:has(.msg-poll-bubble) { width: 86vw; max-width: 86vw; }

    /* Barra de entrada del chat */
    .chat-input-bar { padding: 8px; gap: 6px; }
    .chat-send-btn { width: 44px; height: 44px; font-size: .9rem; }
    .chat-input { min-height: 44px; font-size: 1rem; }

    /* Dropdown de notificaciones centrado */
    .notif-dropdown {
        position: fixed;
        top: calc(var(--navbar-height) + 8px);
        left: 50%; right: auto;
        transform: translateX(-50%);
        width: 92vw; max-width: 360px;
    }

    /* Dropdown de usuario */
    .user-dropdown {
        position: fixed;
        top: calc(var(--navbar-height) + 8px);
        right: 12px;
        width: calc(100vw - 24px); max-width: 260px;
    }

    /* Picker de reacciones como hoja inferior */
    .reaction-picker {
        position: fixed;
        bottom: 80px; left: 50%; transform: translateX(-50%);
        width: auto; min-width: 280px;
        border-radius: 20px;
        padding: 12px 16px;
        justify-content: center;
    }
    .reaction-picker button { font-size: 1.8rem; padding: 8px 10px; }

    /* Acciones de mensaje siempre ligeramente visibles */
    .msg-actions { opacity: .7; }

    /* Tarjetas de evento restaurar horizontal en móvil pequeño */
    .event-card { flex-direction: row; gap: 12px; }
    .event-date-box { width: 52px; height: 56px; flex-direction: column; gap: 0; padding: 0; border-radius: var(--radius-sm); }

    /* Menú móvil con scroll si hay muchos items */
    .mobile-menu { max-height: calc(100vh - var(--navbar-height)); overflow-y: auto; }

    /* Stat cards apilados */
    .stat-card { padding: 16px; gap: 12px; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .stat-value { font-size: 1.4rem; }
}

/* --- Móvil muy pequeño (≤400px) --- */
@media (max-width: 400px) {
    .container { padding: 0 10px; }
    .services-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 16px; }
    .hero h1 { font-size: 1.5rem; }
    .msg-content-wrap { max-width: 92vw; }
    .map-container { height: 220px; }
    .map-container-lg { height: 260px; }
    .card-body { padding: 12px; }
    .btn-lg { padding: 10px 20px; font-size: .95rem; }
    .navbar-brand .brand-text { font-size: 1rem; }
    .profile-header { padding: 24px 0 48px; }
    .auth-card { padding: 20px 12px; }
    /* Grupo hero más compacto */
    .group-hero { height: 160px; }
    .group-hero-title { font-size: 1.2rem; }
}

/* --- Dispositivos táctiles: acciones de mensaje por tap --- */
@media (hover: none) {
    .msg-actions { opacity: .75; }
    .msg-bubble-wrap:not(.actions-open) .msg-actions { opacity: 0; }
    .msg-bubble-wrap.actions-open .msg-actions { opacity: 1; }
}

/* --- Barra de navegación inferior móvil (bottom nav) --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 950;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: 56px;
    max-width: 480px;
    margin: 0 auto;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    text-decoration: none;
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 600;
    transition: color .15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i { font-size: 1.15rem; }
.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--primary); }
.bottom-nav-item .bottom-nav-badge {
    position: absolute;
    top: 4px; right: calc(50% - 18px);
    min-width: 16px; height: 16px;
    background: var(--primary);
    color: white;
    font-size: .6rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

@media (max-width: 900px) {
    .bottom-nav { display: block; }
    /* Añadir espacio para que el contenido no quede oculto detrás del bottom nav */
    .main-content { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }
    body.page-home .main-content { padding-bottom: 0 !important; }
    .footer { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }
    /* En chat, el bottom nav se oculta */
    body.page-chat .bottom-nav { display: none; }
    body.page-chat .main-content { padding-bottom: 0; }
}

/* --- Soporte para pantallas con muesca (notch / isla dinámica) --- */
@supports (padding: env(safe-area-inset-top)) {
    .navbar { padding-top: env(safe-area-inset-top); }
    .chat-input-bar { padding-bottom: env(safe-area-inset-bottom); }
    .mobile-menu { padding-bottom: env(safe-area-inset-bottom); }
    .footer-bottom { padding-bottom: env(safe-area-inset-bottom); }
}

/* --- Banner de cookies (GDPR) --- */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--dark);
    color: rgba(255,255,255,.9);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: .85rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    animation: cookieSlideUp .3s ease;
}
@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.cookie-banner p { color: rgba(255,255,255,.8); margin: 0; flex: 1; }
.cookie-banner a { color: var(--accent); text-decoration: underline; }
.cookie-banner .btn-cookie {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.cookie-banner .btn-cookie:hover { background: var(--primary-dark); }
@media (max-width: 640px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }
}

/* --- Contenido de páginas CMS (legal, about) --- */
.card-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.card-body table th,
.card-body table td {
    padding: 10px 12px;
    font-size: .85rem;
    text-align: left;
}
.card-body table thead tr { background: var(--bg); }
.card-body table th { border-bottom: 2px solid var(--border); font-weight: 600; }
.card-body table td { border-bottom: 1px solid var(--border-light); }
.card-body ul { padding-left: 24px; margin-bottom: 16px; }
.card-body ul li { margin-bottom: 6px; font-size: .9rem; color: var(--text-muted); list-style: disc; }
.card-body h2 { margin-top: 32px; margin-bottom: 12px; font-size: 1.2rem; }
.card-body h3 { margin-top: 20px; margin-bottom: 8px; font-size: 1.05rem; }

@media (max-width: 640px) {
    .card-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: .8rem; }
    .card-body table th,
    .card-body table td { padding: 8px; white-space: nowrap; }
}

/* =====================================================
   Clases utilitarias reutilizables
   Extraídas de estilos inline repetidos en las vistas
   ===================================================== */

/* --- Botón mostrar/ocultar contraseña --- */
.btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* --- Contenedor relativo para campos de contraseña --- */
.input-pass-wrapper { position: relative; }
.input-pass-wrapper .form-control { padding-right: 42px; }

/* --- Enlace de lista (grupos, eventos en sidebar) --- */
.list-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.list-link:hover { background: var(--bg); }

/* --- Miniatura cuadrada para listas --- */
.list-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.list-thumb-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: .8rem;
    flex-shrink: 0;
}

/* --- Caja de fecha compacta (mini calendario) --- */
.date-box {
    width: 38px;
    height: 42px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}
.date-box-day { font-size: .95rem; font-weight: 800; line-height: 1; }
.date-box-month { font-size: .55rem; text-transform: uppercase; }

/* --- Contenido de lista (título + subtítulo) --- */
.list-content { flex: 1; min-width: 0; }
.list-title {
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-subtitle { font-size: .75rem; color: var(--text-muted); }

/* --- Fila de estadísticas --- */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-label {
    font-size: .85rem;
    color: var(--text-muted);
}
.stat-label i { margin-right: 6px; }

/* --- Chip/pill de grupo en perfil --- */
.group-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    transition: var(--transition);
}
.group-chip:hover { border-color: var(--primary); }
.group-chip-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.group-chip-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: .6rem;
}
