:root {
    /* Colors */
    --clr-bg-dark: #0a0e17;
    --clr-primary-neon: #00ff88;
    --clr-primary-dark: #00b35e;
    --clr-accent-blue: #00f0ff;
    --clr-text-main: #ffffff;
    --clr-text-muted: #94a3b8;
    --clr-danger: #ff3366;
    --clr-warning: #ffcc00;
    
    /* Glassmorphism */
    --glass-bg: rgba(10, 15, 25, 0.5); /* Opacidad solicitada del 50% */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(0px); /* ABSOLUTAMENTE SIN BLUR */
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: var(--font-main);
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Image with Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e17 0%, #111827 100%); /* Fondo sÃ³lido ligero */
    z-index: -2;
}



.background-overlay::after {
    display: none; /* Desactivar gradiente radial extra para ahorrar CPU */
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: none !important; /* Quitar todas las transiciones para respuesta instantÃ¡nea */
}



/* Solo aplicar blur a la barra lateral si el navegador lo soporta bien */
.sidebar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


/* Desactivar blur en elementos pequeÃ±os para ahorrar ciclos de GPU */
.badge, .btn-icon, .quick-action-btn, .sidebar-link, .stat-card i, .glass-panel, .sidebar, .top-bar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}


/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr; /* Reducido un poco para 1366px */
    gap: 1rem;
    padding: 1rem;
    max-width: 100%;
    margin: 0;
    height: 100vh;
}


/* Sidebar */
.sidebar {
    padding: 2rem 1rem; /* Reducido para dar más espacio horizontal */
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    z-index: 10005; /* Asegurar que estÃ© por encima de la top-bar en mÃ³vil */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3.5rem;
    padding-left: 0; /* Asegurar que esté bien a la izquierda */
}

.logo i, .logo img {
    font-size: 2.8rem;
    width: 60px;
    height: 60px;
    color: var(--clr-primary-neon);
    /* filter: drop-shadow(0 0 15px var(--clr-primary-neon)); */ /* Desactivado para rendimiento */
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.logo h2 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 1rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--clr-text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: none !important;
    font-weight: 500;
}

.nav-links a:hover, .nav-links li.active a {
    background: rgba(0, 255, 136, 0.1);
    color: var(--clr-primary-neon);
    transform: translateX(5px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--clr-primary-neon);
}

.user-profile .name {
    font-weight: 600;
}
.user-profile .role {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

/* Main Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow: visible !important;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    position: sticky;
    top: 0;
    z-index: 10000 !important;
    background: var(--glass-bg);                       /* Sincronizado con slider de opacidad */
    backdrop-filter: var(--glass-blur);                /* Sincronizado con slider de blur */
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important; /* Sin sombras para mÃ¡ximo rendimiento */
    overflow: visible !important;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    width: 400px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.btn-icon:hover {
    background: var(--clr-primary-neon);
    color: black;
    box-shadow: 0 0 15px var(--clr-primary-neon);
}

.btn-eye-large {
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
}

/* =========================================================================
   HOME DASHBOARD â€” NEW LAYOUT
   ========================================================================= */

.home-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 0.5rem;
}

/* New Simple Stats Row */
.home-stats-simple-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.home-stat-card-simple {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    transition: all 0.3s;
}
.home-stat-card-simple:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}
.home-stat-card-simple i {
    font-size: 1.8rem;
    color: var(--clr-primary-neon);
}
.home-stat-card-simple .stat-info h4 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}
.home-stat-card-simple .stat-info span {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
@media (max-width: 768px) {
    .home-stats-simple-row { grid-template-columns: 1fr; }
}
.home-welcome-left h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--clr-primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.2rem 0 0;
}
.home-greeting {
    font-size: 0.85rem;
    color: var(--clr-primary-neon);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin: 0;
}
.home-welcome-right {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.home-stat-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0.9rem 1.3rem;
    min-width: 110px;
    transition: background 0.2s;
}
.home-stat-card:hover { background: rgba(255,255,255,0.08); }
.home-stat-card i { font-size: 1.3rem; }
.home-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}
.home-stat-label {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section wrapper */
.home-section { display: flex; flex-direction: column; gap: 1rem; }
.home-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clr-text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.home-section-title i { color: var(--clr-primary-neon); }

/* Quick action buttons grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 15, 25, 0.9);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.quick-action-btn i { font-size: 1.6rem; }
.quick-action-btn:hover { transform: translateY(-4px); }

/* Color variants */
.qa-green  { border-color: rgba(0,255,136,0.25); }
.qa-green i { color: var(--clr-primary-neon); }
.qa-green:hover { background: rgba(0,255,136,0.1); box-shadow: 0 8px 25px rgba(0,255,136,0.2); }

.qa-blue   { border-color: rgba(0,240,255,0.25); }
.qa-blue i { color: var(--clr-accent-blue); }
.qa-blue:hover { background: rgba(0,240,255,0.1); box-shadow: 0 8px 25px rgba(0,240,255,0.2); }

.qa-yellow { border-color: rgba(255,204,0,0.25); }
.qa-yellow i { color: var(--clr-warning); }
.qa-yellow:hover { background: rgba(255,204,0,0.1); box-shadow: 0 8px 25px rgba(255,204,0,0.2); }

.qa-purple { border-color: rgba(160,100,255,0.25); }
.qa-purple i { color: #a064ff; }
.qa-purple:hover { background: rgba(160,100,255,0.1); box-shadow: 0 8px 25px rgba(160,100,255,0.2); }

.qa-red    { border-color: rgba(255,51,102,0.25); }
.qa-red i  { color: var(--clr-danger); }
.qa-red:hover { background: rgba(255,51,102,0.1); box-shadow: 0 8px 25px rgba(255,51,102,0.2); }

.qa-teal   { border-color: rgba(100,220,200,0.25); }
.qa-teal i { color: #64dcc8; }
.qa-teal:hover { background: rgba(100,220,200,0.1); box-shadow: 0 8px 25px rgba(100,220,200,0.2); }

/* Home Procede stats row */
.home-stats-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Coming soon cards */
.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.coming-soon-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 1.3rem;
    position: relative;
    overflow: hidden;
    transition: background 0.2s, transform 0.2s;
}
.coming-soon-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.coming-soon-card h4 { font-size: 0.95rem; font-weight: 700; margin: 0; }
.coming-soon-card p { font-size: 0.8rem; color: var(--clr-text-muted); margin: 0; line-height: 1.5; }
.cs-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.cs-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--clr-text-muted);
    align-self: flex-start;
}

/* Mobile adjustments for new home */
@media (max-width: 600px) {
    .home-welcome { flex-direction: column; align-items: flex-start; }
    .home-welcome-left h1 { font-size: 1.7rem; }
    .quick-actions-grid { grid-template-columns: repeat(3, 1fr); }
    .coming-soon-grid { grid-template-columns: 1fr; }
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Welcome Card */
.welcome-card {
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, var(--clr-primary-neon), var(--clr-accent-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.welcome-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--clr-primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 15px;
}

.stat-item .value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--clr-accent-blue);
}

/* Quotas Panel */
.quotas-panel {
    padding: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge.warning {
    background: rgba(255, 204, 0, 0.2);
    color: var(--clr-warning);
    border: 1px solid var(--clr-warning);
}
.status-badge.inactive {
    background: rgba(255, 71, 87, 0.2);
    color: var(--clr-danger);
    border: 1px solid var(--clr-danger);
}

/* Role Badges */
.role-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.role-admin {
    background: rgba(0, 255, 136, 0.1);
    color: var(--clr-primary-neon);
    border: 1px solid var(--clr-primary-neon);
}
.role-tesorero {
    background: rgba(255, 204, 0, 0.1);
    color: var(--clr-warning);
    border: 1px solid var(--clr-warning);
}
.role-socio {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--clr-primary-neon);
    cursor: zoom-in;
}

.quota-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.quota-item:hover {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.quota-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 255, 136, 0.1);
    color: var(--clr-primary-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.due-date {
    font-size: 0.85rem;
    color: var(--clr-danger);
    margin-top: 0.2rem;
}

.quota-amount {
    text-align: right;
}
.quota-amount .total {
    font-size: 1.2rem;
    font-weight: 600;
}
.quota-amount .pending {
    font-size: 0.9rem;
    color: var(--clr-warning);
}

/* Buttons */
.btn-primary {
    background: var(--clr-primary-neon);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #00d672;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.btn-primary.glow {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--clr-text-main);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    width: 95%;
    max-width: 600px; /* Aumentado de 400px para que quepan mejor los forms */
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    margin: 5vh auto;
    transform: translateY(20px);
    transition: 0.3s ease;
    /* animation: modalSlideUp 0.3s ease-out; */ /* Desactivado para evitar lag al abrir formularios en PC lentas */
}


.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.close-btn:hover { color: white; }

/* Global Form Inputs */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    padding: 0.9rem 1.2rem !important;
    border-radius: 14px !important;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: none !important;
}

input:focus, select:focus, textarea:focus {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: var(--clr-primary-neon) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.15) !important;
}

.input-group {
    margin-bottom: 1.5rem;
}
.input-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.alert.success { background: rgba(0, 255, 136, 0.2); border: 1px solid var(--clr-primary-neon); color: var(--clr-primary-neon); }
.alert.error { background: rgba(255, 51, 102, 0.2); border: 1px solid var(--clr-danger); color: var(--clr-danger); }

/* Table Styles */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th {
    padding: 1.2rem 1rem;
    color: var(--clr-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}

.glass-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.active { background: rgba(0, 255, 136, 0.2); color: var(--clr-primary-neon); }
.status-badge.inactive { background: rgba(255, 51, 102, 0.2); color: var(--clr-danger); }
.status-badge.warning { background: rgba(255, 204, 0, 0.2); color: var(--clr-warning); }
.status-badge.info { background: rgba(0, 212, 255, 0.2); color: var(--clr-accent-blue); }

/* Switch Toggle (Toggle Button) */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute; content: "";
  height: 14px; width: 14px; left: 3px; bottom: 3px;
  background-color: white; transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--clr-primary-neon); }
input:checked + .slider:before { transform: translateX(20px); background-color: black; }

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2.5rem;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    z-index: 100;
}

.mobile-nav a {
    color: var(--clr-text-muted);
    font-size: 1.5rem;
    text-decoration: none;
    transition: 0.3s;
}

.mobile-nav a.active {
    color: var(--clr-primary-neon);
}

/* Responsive Improvements */
/* Estilos base de Login se mantienen */

/* --------------------
   LOGIN PAGE STYLES
   -------------------- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 360px; /* Reducido de 450px */
    padding: 1rem;
    z-index: 1;
}

.login-card {
    padding: 2rem 2rem; /* Reducido de 3rem 2.5rem */
    position: relative;
    border-radius: 24px; /* Bordes un poco mÃ¡s redondeados y modernos */
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Reducido de 2.5rem */
}

.logo-icon {
    font-size: 2.5rem; /* Reducido de 3.5rem */
    color: var(--clr-primary-neon);
    filter: drop-shadow(0 0 10px var(--clr-primary-neon));
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-size: 1.5rem; /* Reducido de 2rem */
    margin-bottom: 0.2rem;
}

.login-header p {
    color: var(--clr-text-muted);
    font-size: 0.85rem; /* Letra un poco mÃ¡s pequeÃ±a */
}

.login-form .input-group {
    margin-bottom: 1.5rem;
}

.login-form .input-group label {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.login-form .input-group label i {
    margin-right: 0.5rem;
    color: var(--clr-primary-neon);
}

.w-100 {
    width: 100%;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* --------------------
   MEMBER PROFILE MODAL
   -------------------- */
.profile-modal {
    max-width: 750px;
}
.profile-body {
    padding-top: 1rem;
}
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}
.profile-large-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--clr-primary-neon);
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}
.profile-titles h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}
.profile-age-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #0a0e17;
    color: var(--clr-primary-neon);
    border: 3px solid var(--clr-primary-neon);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transform: rotate(10deg);
    z-index: 5;
}
.profile-age-badge .age-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}
.profile-age-badge .age-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
}
.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.detail-item i {
    color: var(--clr-primary-neon);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}
.detail-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.2rem;
}
.detail-item p {
    font-weight: 500;
}
@media (max-width: 500px) {
    .profile-details {
        grid-template-columns: 1fr;
    }
    .profile-age-badge {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
        transform: rotate(0);
    }
    .profile-large-avatar {
        width: 140px;
        height: 140px;
    }
}

/* Settings View Styles */
.btn-settings {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: none !important;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.btn-settings.active {
    background: var(--clr-primary-neon);
    color: var(--clr-bg-dark);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.setting-form {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.background-overlay {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s ease-in-out;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111827;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    z-index: 99999;
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none; /* Las notificaciones no deben bloquear clics */
    transition: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.success { border-left: 5px solid var(--clr-primary-neon); }
.toast-notification.error { border-left: 5px solid var(--clr-danger); }
.toast-notification.info { border-left: 5px solid var(--clr-accent-blue); }

.toast-notification i {
    font-size: 1.4rem;
}
.toast-notification.success i { color: var(--clr-primary-neon); }
.toast-notification.error i { color: var(--clr-danger); }

/* Custom Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none; /* Evitar que bloquee la pantalla cuando estÃ¡ oculto */
    transition: opacity 0.3s ease;
}
.confirm-overlay.show { 
    opacity: 1; 
    pointer-events: all; 
}

.confirm-modal {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.confirm-overlay.show .confirm-modal { transform: scale(1); }

.confirm-modal i {
    font-size: 3rem;
    color: var(--clr-danger);
    margin-bottom: 1.5rem;
}
.confirm-modal h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.confirm-modal p {
    color: var(--clr-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}
.confirm-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.btn-confirm {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-confirm.yes {
    background: var(--clr-danger);
    color: white;
}
.btn-confirm.no {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.btn-confirm:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toast-notification.success i { color: var(--clr-primary-neon); }
.toast-notification.error i { color: var(--clr-danger); }
.toast-notification.warning i { color: var(--clr-warning); }

/* =========================================================================
   RESPONSIVE DESIGN SYSTEM (Desktop First)
   ========================================================================= */

@media (max-width: 1366px) {
    .app-container {
        grid-template-columns: 240px 1fr;
        gap: 1rem;
    }
}

@media (max-width: 1100px) {
    .app-container {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    .sidebar {
        position: fixed;
        left: -300px;
        z-index: 9999;
        transition: 0.3s ease;
    }
    
    .sidebar.active { left: 0; }
    
    .main-content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .top-bar {
        padding: 1rem !important;
        flex-direction: row !important;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .background-overlay {
        background: #0a0e17 !important; /* Solid background on mobile to avoid mess */
        filter: none !important;
    }

    .glass-panel {
        background: rgba(15, 20, 30, 0.98) !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .settings-container {
        display: block !important;
    }
    
    .settings-sidebar {
        width: 100% !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .home-stats-simple-row, .quick-actions-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Tables responsiveness - Mobile List Style */
    .glass-table thead { 
        display: none !important; 
    }
    
    .glass-table, .glass-table tbody, .glass-table tr, .glass-table td { 
        display: block !important; 
        width: 100% !important; 
    }

    .glass-table tr {
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        background: rgba(255,255,255,0.05) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
    }

    .glass-table td {
        text-align: left !important;
        padding: 0.6rem 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        white-space: normal !important;
    }

    .glass-table td:last-child {
        border-bottom: none !important;
        margin-top: 0.5rem !important;
        justify-content: center !important;
    }

    .glass-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--clr-primary-neon);
        opacity: 0.8;
        margin-right: 10px;
    }
    
    /* Specific labels for known tables if data-label is missing */
    #membersTableBody td:nth-child(1)::before { content: "Nombre"; }
    #membersTableBody td:nth-child(2)::before { content: "Apellido"; }
    #membersTableBody td:nth-child(3)::before { content: "C.I."; }
    #membersTableBody td:nth-child(4)::before { content: "Teléfono"; }
    #membersTableBody td:nth-child(5)::before { content: "Estado"; }
    
    #procedeTableBody td:nth-child(1)::before { content: "Socio"; }
    #procedeTableBody td:nth-child(2)::before { content: "Estado"; }
    #procedeTableBody td:nth-child(3)::before { content: "Deuda"; }
}

/* ANTI-LAG FOR OLD PCS (No-GPU optimizations) */
@media screen and (prefers-reduced-motion: reduce), screen and (min-width: 769px) and (max-width: 1200px) {
    .glass-panel {
        backdrop-filter: blur(5px); /* Reducir a un valor muy bajo */
        -webkit-backdrop-filter: blur(5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    
    .background-overlay {
        background-attachment: scroll !important; /* Fixed background kills old CPUs during scroll */
    }
}


/* =========================================================================
   NOTIFICATION SYSTEM
   ========================================================================= */

/* Bell wrapper â€” provides positioning context for the dropdown */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.notif-bell {
    position: relative;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.notif-bell:hover {
    transform: scale(1.15);
    color: var(--clr-primary-neon);
}
.notif-bell.has-unread {
    animation: bell-shake 2.5s ease-in-out infinite;
}
@keyframes bell-shake {
    0%, 85%, 100% { transform: rotate(0deg); }
    87% { transform: rotate(-12deg); }
    91% { transform: rotate(12deg); }
    95% { transform: rotate(-8deg); }
    98% { transform: rotate(5deg); }
}

/* Red badge counter */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--clr-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--clr-bg-dark);
    animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
@keyframes badge-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Dropdown panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 520px;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    z-index: 10001 !important;
    background: #111827; /* Fondo totalmente sÃ³lido para evitar transparencias raras */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 136, 0.1);
    /* Hidden by default */
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top right;
}

/* Fix for mobile positioning */
@media (max-width: 768px) {
    .notif-panel {
        position: fixed;
        top: 70px;
        left: 1rem;
        right: 1rem;
        width: calc(100vw - 2rem);
        max-height: 70vh;
        transform-origin: top center;
    }
}
.notif-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Panel header */
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.notif-panel-header h4 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.notif-mark-all {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.notif-mark-all:hover {
    background: rgba(255,255,255,0.08);
    color: var(--clr-primary-neon);
}

/* Scrollable list */
.notif-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.4rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* Individual notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.07); }
.notif-item.unread { background: rgba(0, 255, 136, 0.03); }
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: var(--clr-primary-neon);
    border-radius: 0 3px 3px 0;
}

/* Delete button inside notification */
.notif-delete-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--clr-text-muted);
    padding: 5px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.notif-item:hover .notif-delete-btn {
    opacity: 0.6;
}
.notif-delete-btn:hover {
    color: var(--clr-danger) !important;
    opacity: 1 !important;
}

/* Icon circle by type */
.notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.notif-icon.birthday   { background: rgba(255, 204, 0, 0.15); color: var(--clr-warning); }
.notif-icon.debt       { background: rgba(255, 51, 102, 0.15); color: var(--clr-danger); }
.notif-icon.inactive   { background: rgba(148, 163, 184, 0.15); color: var(--clr-text-muted); }
.notif-icon.info       { background: rgba(0, 240, 255, 0.12); color: var(--clr-accent-blue); }
.notif-icon.success    { background: rgba(0, 255, 136, 0.12); color: var(--clr-primary-neon); }

/* Notification text */
.notif-body { flex: 1; min-width: 0; }
.notif-body p {
    font-size: 0.83rem;
    line-height: 1.45;
    margin: 0 0 0.2rem;
    color: var(--clr-text-main);
}
.notif-body p strong { color: #fff; }
.notif-time {
    font-size: 0.7rem;
    color: var(--clr-text-muted);
}

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    opacity: 0.5;
    font-size: 0.85rem;
}
.notif-empty i { font-size: 2rem; }

/* Section label inside the list */
.notif-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-muted);
    padding: 0.6rem 1.2rem 0.2rem;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .notif-panel {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

/* Generic Dropdown Menu */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-item {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dropdown-item:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--clr-primary-neon);
}

.dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    padding: 0.5rem 1rem 0.2rem;
    font-weight: 700;
}

/* REVISIÓN MÓVIL FORZADA */
@media (max-width: 1100px) {
  .app-container { display: block !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .main-content { width: 100% !important; margin: 0 !important; padding: 0 !important; display: block !important; }
  .sidebar { position: fixed !important; left: -300px !important; }
}

@media (max-width: 768px) {
  .background-overlay { background: #0a0e17 !important; }
  .glass-panel { background: rgba(15, 20, 30, 0.98) !important; border-radius: 0 !important; }
  .settings-container { display: block !important; }
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.notif-mark-all:hover {
    background: rgba(255,255,255,0.08);
    color: var(--clr-primary-neon);
}

/* Scrollable list */
.notif-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.4rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* Individual notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.07); }
.notif-item.unread { background: rgba(0, 255, 136, 0.03); }
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: var(--clr-primary-neon);
    border-radius: 0 3px 3px 0;
}

/* Delete button inside notification */
.notif-delete-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--clr-text-muted);
    padding: 5px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.notif-item:hover .notif-delete-btn {
    opacity: 0.6;
}
.notif-delete-btn:hover {
    color: var(--clr-danger) !important;
    opacity: 1 !important;
}

/* Icon circle by type */
.notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.notif-icon.birthday   { background: rgba(255, 204, 0, 0.15); color: var(--clr-warning); }
.notif-icon.debt       { background: rgba(255, 51, 102, 0.15); color: var(--clr-danger); }
.notif-icon.inactive   { background: rgba(148, 163, 184, 0.15); color: var(--clr-text-muted); }
.notif-icon.info       { background: rgba(0, 240, 255, 0.12); color: var(--clr-accent-blue); }
.notif-icon.success    { background: rgba(0, 255, 136, 0.12); color: var(--clr-primary-neon); }

/* Notification text */
.notif-body { flex: 1; min-width: 0; }
.notif-body p {
    font-size: 0.83rem;
    line-height: 1.45;
    margin: 0 0 0.2rem;
    color: var(--clr-text-main);
}
.notif-body p strong { color: #fff; }
.notif-time {
    font-size: 0.7rem;
    color: var(--clr-text-muted);
}

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    opacity: 0.5;
    font-size: 0.85rem;
}
.notif-empty i { font-size: 2rem; }

/* Section label inside the list */
.notif-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-muted);
    padding: 0.6rem 1.2rem 0.2rem;
    font-weight: 600;
}

/* Mobile responsive */
/* Mobile responsive removed and consolidated above */


/* Generic Dropdown Menu */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-item {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dropdown-item:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--clr-primary-neon);
}

.dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    padding: 0.5rem 1rem 0.2rem;
    font-weight: 700;
}

/* =========================================================================
   SISTEMA RESPONSIVO UNIFICADO (FINAL)
   ========================================================================= */

@media (max-width: 800px) {
  .app-container { display: flex !important; flex-direction: column !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .main-content { width: 100% !important; margin: 0 !important; padding: 15px !important; position: static !important; }
  .sidebar { display: none !important; }
  .sidebar.active { display: flex !important; position: fixed !important; left: 0 !important; width: 280px !important; z-index: 100000 !important; }
  
  /* Modal de Permisos optimizado para Móvil */
  #permissionsModal .modal-content {
      width: 96vw !important;
      max-width: 96vw !important;
      margin: 2vw !important;
      height: 92vh !important;
  }
  
  #permissionsModal .modal-body {
      padding-bottom: 200px !important; /* Espacio masivo para asegurar visibilidad total */
  }

  #permissionsModal .scrollable-table {
      max-height: none !important;
      overflow: visible !important;
      padding-bottom: 50px !important;
  }

  #permissionsModal .modal-footer {
      position: sticky !important;
      bottom: 0 !important;
      left: 0 !important;
      width: 100% !important;
      background: #0d111a !important;
      padding: 1.2rem !important;
      border-top: 1px solid rgba(0, 255, 136, 0.4) !important;
      z-index: 100 !important;
      display: flex !important;
      flex-direction: row !important;
      gap: 10px !important;
      box-shadow: 0 -15px 30px rgba(0,0,0,0.9) !important;
  }

  #permissionsModal .modal-footer button { flex: 1 !important; margin: 0 !important; }
}

/* Modal de Permisos (Base / PC) */
#permissionsModal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}

#permissionsModal .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
}

#permissionsModal .modal-footer {
    flex-shrink: 0 !important;
    background: rgba(0,0,0,0.3) !important;
}

/* OVERLAY Y ESTADOS GLOBALES */
.sidebar-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 15000; display: none; opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block !important; opacity: 1 !important; }
