/* ==========================================================================
   STYLE.CSS - Diseño Premium y Moderno para el Portal de Procesos (Glassmorphism)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores Premium */
    --bg-primary: #090d16;
    --bg-gradient: linear-gradient(135deg, #070a13 0%, #0f1626 50%, #171d33 100%);
    --panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    /* Colores de Acento */
    --accent-primary: #6366f1; /* Indigo */
    --accent-primary-glow: rgba(99, 102, 241, 0.4);
    --accent-secondary: #06b6d4; /* Cian */
    --accent-secondary-glow: rgba(6, 182, 212, 0.3);
    
    /* Estados y Feedback */
    --color-success: #10b981; /* Esmeralda */
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-error: #ef4444; /* Rojo */
    --color-error-bg: rgba(239, 68, 68, 0.15);
    --color-warning: #f59e0b; /* Ámbar */
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-info: #3b82f6; /* Azul */
    --color-info-bg: rgba(59, 130, 246, 0.15);
    
    /* Textos */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    /* Cristales y Sombras */
    --glass-bg: rgba(17, 25, 40, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(99, 102, 241, 0.5);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    
    /* Bordes y Transiciones */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Estilos Base y Normalización
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* ==========================================================================
   Contenedores Premium de Animación
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rotateGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   Diseño de Login (Index.php)
   ========================================================================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Decoraciones de Fondo */
.bg-glow-1 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
    top: 15%;
    left: 20%;
    z-index: 0;
    pointer-events: none;
}

.bg-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-secondary-glow) 0%, transparent 70%);
    bottom: 15%;
    right: 20%;
    z-index: 0;
    pointer-events: none;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    z-index: 10;
    animation: fadeIn var(--transition-normal);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc 0%, var(--accent-primary) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    display: inline-block;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Control de Pestañas (Tabs) */
.tabs-control {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 25px;
    position: relative;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 4px);
    transition: var(--transition-fast);
    z-index: 2;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Formularios Premium */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px 14px 45px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-normal);
}

.form-input:focus {
    border-color: var(--glass-border-focus);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.form-input:focus + .input-icon {
    color: var(--accent-primary);
}

/* Botones Premium */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #4f46e5 100%);
    color: var(--text-main);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: var(--transition-normal);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f46e5 0%, var(--accent-primary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   Alertas y Toasts
   ========================================================================== */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    animation: slideDown var(--transition-fast);
}

.alert-error {
    background: var(--color-error-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--color-success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.alert-warning {
    background: var(--color-warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.alert-info {
    background: var(--color-info-bg);
    border-color: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

/* Banner de Simulación (Modo Espejo) */
.mirror-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   Diseño de Dashboard (Dashboard.php)
   ========================================================================== */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Barra de Navegación */
.navbar {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-icon {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.user-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
    border-color: #ef4444;
}

/* Área de Contenido Principal */
.dashboard-main {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn var(--transition-normal);
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 20px;
    overflow-x: auto;
    transition: var(--transition-normal);
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 2.2rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-desc {
    color: var(--text-muted);
}

/* Grid de Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 45px;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--card-shadow);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.metric-icon {
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.metric-value {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-bottom: 5px;
}

.metric-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.metric-change.positive { color: var(--color-success); }
.metric-change.negative { color: var(--color-error); }

/* Grid de Procesos Activos */
.processes-section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.processes-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.processes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.process-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.process-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-focus);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
}

.process-body {
    padding: 25px;
    flex: 1;
}

.process-status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.status-active { background: var(--color-success-bg); color: var(--color-success); }
.status-paused { background: var(--color-warning-bg); color: var(--color-warning); }
.status-stopped { background: var(--color-error-bg); color: var(--color-error); }

/* Etiquetas de Privacidad Dinámicas (Explorador de Grupos) */
.badge-privacidad {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}
.priv-publico {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.priv-privado {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.priv-otro {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.process-name {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.process-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    height: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.process-footer {
    padding: 15px 25px;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-process {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-process:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    padding: 25px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* ==========================================================================
   Responsividad (Soporte Móvil)
   ========================================================================== */
@media (max-width: 768px) {
    .login-card {
        padding: 25px;
    }
    
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   DISEÑO DE MENÚ LATERAL (SIDEBAR) PREMIUM Y RESPONSIVO COMPACTO (80px)
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 80px;
    background: rgba(8, 12, 24, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    height: 100vh;
    z-index: 200;
    transition: var(--transition-normal);
    padding: 30px 10px;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.sidebar-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    width: 100%;
}

.sidebar-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-item a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.sidebar-item.active a {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #4f46e5 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.user-badge-collapsed {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: default;
    transition: var(--transition-fast);
}

.user-badge-collapsed:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-secondary);
}

.btn-logout-collapsed {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-logout-collapsed:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
    border-color: #ef4444;
    transform: translateY(-2px);
}

.main-content {
    flex: 1;
    margin-left: 80px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition-normal);
}

/* ==========================================================================
   TOOLTIPS EN CSS PURO (Glow-Effect a la Derecha)
   ========================================================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Cabecera Móvil y Toggles */
.mobile-header {
    display: none;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 20px;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 150;
}

.menu-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-secondary);
}

/* Modificaciones Responsivas */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0,0,0,0.6);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    .mobile-header {
        display: flex;
        width: 100%;
    }
    [data-tooltip]::after {
        left: 75px;
    }
    .processes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .dashboard-main {
        padding: 15px;
    }
    .glass-panel {
        padding: 15px;
    }
    .welcome-title {
        font-size: 1.6rem;
    }
    .processes-section-title {
        font-size: 1.3rem;
    }
    
    /* Adaptación Ultra-Responsive de la Tabla del Explorador de Grupos */
    #stored-groups-table th.th-miembros {
        display: none !important;
    }
    #stored-groups-table th.th-privacidad-enlace {
        display: none !important;
    }
    #stored-groups-table th.th-nombre {
        width: 45% !important;
        font-size: 0.75rem !important;
        padding: 10px 8px !important;
    }
    #stored-groups-table th.th-estado {
        width: 20% !important;
        font-size: 0.75rem !important;
        padding: 10px 8px !important;
        text-align: center !important;
    }
    #stored-groups-table td.col-privacidad-enlace {
        display: none !important;
    }
    #stored-groups-table td.col-nombre {
        width: 45% !important;
        font-size: 0.85rem !important;
        padding: 12px 8px !important;
        white-space: normal;
        word-break: break-word;
    }
    #stored-groups-table td.col-miembros {
        width: 35% !important;
        padding: 12px 8px !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        border-bottom: none !important;
    }
    #stored-groups-table td.col-estado {
        width: 20% !important;
        padding: 12px 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-bottom: none !important;
    }
    #stored-groups-table td.col-miembros .mobile-extra-meta {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
    }
    #stored-groups-table td.col-miembros .badge-privacidad {
        font-size: 0.7rem !important;
        padding: 2px 8px !important;
    }
    #stored-groups-table td.col-miembros .mobile-link-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        background: rgba(6, 182, 212, 0.15);
        color: var(--accent-secondary);
        border-radius: 50%;
        transition: var(--transition-fast);
    }
    #stored-groups-table td.col-miembros .mobile-link-icon:hover {
        background: var(--accent-secondary);
        color: #fff;
        transform: scale(1.1);
    }
    .badge-miembros {
        padding: 3px 8px !important;
        font-size: 0.75rem !important;
    }
    .mobile-sort-bar-container {
        display: flex !important;
        margin-bottom: 15px;
        width: 100%;
    }
    .btn-mobile-sort {
        background: rgba(6, 182, 212, 0.15);
        color: var(--accent-secondary);
        border: 1px solid rgba(6, 182, 212, 0.25);
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: var(--transition-fast);
        outline: none;
    }
    .btn-mobile-sort:active {
        background: var(--accent-secondary);
        color: #fff;
        transform: scale(0.98);
    }
}

/* Ocultar barra de ordenamiento móvil en versión de escritorio */
.mobile-sort-bar-container {
    display: none;
}

/* ==========================================================================
   INTERRUPTOR (SWITCH TOGGLE) Y FILAS DE GRUPOS PROHIBIDOS
   ========================================================================== */

/* Fila de grupo prohibido: fondo rojo translúcido y borde izquierdo brillante */
.group-row.row-prohibido {
    background: rgba(239, 68, 68, 0.12) !important;
    border-left: 4px solid var(--color-error) !important;
}

.group-row.row-prohibido:hover {
    background: rgba(239, 68, 68, 0.22) !important;
}

/* Switch Toggle Premium Glassmorphic */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    vertical-align: middle;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    transition: var(--transition-normal);
    border-radius: 30px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: var(--transition-normal);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Estado Activo: Prohibido (Rojo brillante) */
.switch-toggle input:checked + .slider-toggle {
    background-color: var(--color-error-bg);
    border-color: var(--color-error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.switch-toggle input:checked + .slider-toggle:before {
    transform: translateX(22px);
    background-color: var(--color-error);
}

/* Deshabilitado durante la carga de red */
.switch-toggle input:disabled + .slider-toggle {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   INSIGNIAS DE CUENTAS DE FACEBOOK (BADGES) Y TOOLTIPS
   ========================================================================== */
.account-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(6, 182, 212, 0.15); /* Cian traslúcido satinado */
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    transition: var(--transition-fast);
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.account-badge:hover {
    background: rgba(6, 182, 212, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.2);
}




