html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100% !important;
}

:root {
    --primary-color: #2A3484;
    --accent-red: #CF202F;
    --secondary-color: #343a40;
    --bg-light: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #333;
    --text-muted: #666;
    --sidebar-bg: #0a0a0a;
    --sidebar-text: #adb5bd;
    --header-bg: #ffffff;
    --sidebar-width: 260px;
    --transition: 0.3s ease;
    --white: #ffffff;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --theme-accent: #2A3484;
    --theme-hover: rgba(42, 52, 132, 0.05);
    --sidebar-accent: #CF202F;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-main: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --text-dynamic: var(--theme-accent);
}

:root.dark-mode {
    color-scheme: dark;
    --bg-light: #121212;
    --card-bg: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --sidebar-bg: #0a0a0a;
    --header-bg: #1a1a1a;
    --theme-accent: #CF202F;
    --theme-hover: rgba(207, 32, 47, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-main: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
    --input-bg: #2a2a2a;
    --card-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    --text-dynamic: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.dark-mode {
    color: var(--text-main);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    transition: background-color 0.3s;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--white);
    position: fixed;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    transition: var(--transition);
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Ocultar barra de scroll en WebKit (Chrome, Safari, etc.) */
.sidebar::-webkit-scrollbar {
    width: 0;
    display: none;
}

.sidebar .brand {
    padding: 15px 10px;
    background-color: #2A3484;
    /* Color azul CCN */
    color: #fff;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px;
    box-sizing: border-box;
}

.sidebar .brand img {
    max-width: 95%;
    height: auto;
    max-height: 70px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar .brand img:hover {
    transform: scale(1.05);
}

/* Logo según estado del sidebar */
.logo-expanded {
    display: block !important;
}

.logo-collapsed {
    display: none !important;
}

.sidebar-collapsed .logo-expanded {
    display: none !important;
}

.sidebar-collapsed .logo-collapsed {
    display: block !important;
    max-width: 100%;
    max-height: 55px;
}


.sidebar nav {
    flex-grow: 1;
    padding-top: 15px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    color: rgba(255, 255, 255, 0.6);
    /* Color neutro y discreto */
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    color: #fff;
    background-color: #1a1a1a !important;
    /* Forzar fondo en item activo */
    border-left-color: var(--sidebar-accent);
}

.sidebar nav a i {
    margin-right: 12px;
    width: 20px;
    font-size: 1.1rem;
}

.theme-toggle {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition);
}

.theme-toggle i {
    margin-right: 12px;
    width: 20px;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    color: #fff;
    background-color: #1a1a1a;
}

/* Custom Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Botón cerrar móvil */
.mobile-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-close {
        display: block;
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

header {
    height: 60px;
    background-color: var(--header-bg);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

header h1 {
    font-size: 1.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    margin-right: 12px;
    background: transparent;
}

.dark-mode .menu-toggle {
    color: #fff;
}

.menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 30px;
    transition: var(--transition);
}

.user-info:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dark-mode .user-info:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.user-name {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.user-name span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.user-name small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-avatar {
    font-size: 2rem;
    color: var(--theme-accent);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

/* Círculo blanco 1px más pequeño que el ícono, anclado detrás */
.user-avatar::before {
    content: '';
    position: absolute;
    width: calc(1em - 2px);
    height: calc(1em - 2px);
    background: #ffffff;
    border-radius: 50%;
    z-index: 0;
}

.user-avatar i {
    position: relative;
    z-index: 1;
    line-height: 1;
    display: block;
}

.dark-mode .user-avatar,
.dark-mode .user-avatar i {
    color: var(--sidebar-accent) !important;
}


.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--card-bg);
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    padding: 10px 0;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .dropdown-menu {
    border-color: rgba(255, 255, 255, 0.05);
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-menu a {
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--theme-accent);
}

.dark-mode .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.05);
    margin: 5px 0;
}

.dark-mode .dropdown-divider {
    background-color: rgba(255, 255, 255, 0.05);
}

.notif-dropdown {
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.logout-link {
    color: var(--theme-accent) !important;
}

@media (max-width: 480px) {
    .notif-dropdown {
        width: calc(100vw - 40px);
        right: -60px;
        /* Offset to stay within screen */
    }
}

.notif-header {
    padding: 12px 20px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--theme-accent);
}

.notif-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.notif-item.unread {
    background-color: rgba(var(--cal-accent-rgb), 0.05);
}

.notif-item p {
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-item small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notif-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Sidebar Toggle State */
.sidebar-collapsed .sidebar {
    width: 70px;
}

.sidebar-collapsed .sidebar .brand img {
    max-width: 40px;
    max-height: 40px;
}

.sidebar-collapsed .sidebar nav a span,
.sidebar-collapsed .sidebar .theme-toggle span {
    display: none;
}

.sidebar-collapsed .sidebar nav a i,
.sidebar-collapsed .sidebar .theme-toggle i {
    margin-right: 0 !important;
    margin-left: 0 !important;
    width: auto !important;
    display: block !important;
}

.sidebar-collapsed .sidebar nav a,
.sidebar-collapsed .sidebar .theme-toggle {
    padding: 15px 0 !important;
    justify-content: center !important;
    display: flex !important;
    width: 100% !important;
}

.sidebar-collapsed .sidebar .theme-toggle {
    padding: 15px 0 !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
}

.sidebar-collapsed .sidebar .theme-toggle i {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.sidebar-collapsed .main-content {
    margin-left: 70px;
}

.container {
    padding: 30px;
    width: 100%;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.page-header-info {
    flex: 1;
    min-width: 200px;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 580px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .btn-group {
        width: 100%;
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 15px !important;
    }

    /* Mostrar texto en botones cuando se apilan */
    .btn-group .hide-mobile {
        display: inline !important;
    }
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 8px solid var(--theme-accent);
    transition: var(--transition);
    min-height: 160px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card .icon {
    font-size: 3.5rem;
    color: var(--theme-accent);
    opacity: 0.9;
}

.dark-mode .card .icon {
    color: #ffffff;
    opacity: 1;
}

.card-info h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-info p {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

/* Tables */
.table-container {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-main);
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Indicador de scroll para tablas en móvil */
.table-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.dark-mode .table-container::after {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05));
}

@media (max-width: 768px) {
    .table-container {
        padding: 15px 5px;
    }

    .table-container::after {
        display: none;
    }

    table th,
    table td {
        padding: 10px 4px;
        font-size: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        padding: 0;
    }
}

.table-container h2 {
    margin-bottom: 25px;
    font-size: 1.3rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-main);
}

.dark-mode select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}

.dark-mode .form-container,
.dark-mode .search-container,
.dark-mode .form-area,
.dark-mode .form-inline {
    background-color: var(--card-bg) !important;
}

.dark-mode table th,
.dark-mode table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table th {
    background-color: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

body.dark-mode table th {
    background-color: transparent;
}

table tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.dark-mode table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.text-center {
    text-align: center !important;
}

.text-center .sort-link {
    justify-content: center;
}

table th.text-center,
table td.text-center,
table th.comp-col,
table td.comp-col {
    text-align: center;
}

table th.comp-col .sort-link {
    justify-content: center;
}

table th.actions-cell,
table td.actions-cell {
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--theme-accent);
    color: white !important;
    box-shadow: 0 3px 8px rgba(var(--theme-accent-rgb, 207, 32, 47), 0.15);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 15px rgba(var(--theme-accent-rgb, 207, 32, 47), 0.3);
}

/* Global Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background: transparent !important;
    padding: 0;
    border: none !important;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: none !important;
    outline: none !important;
    pointer-events: auto;
}

.close,
.modal-close,
.modal-close-btn {
    position: absolute !important;
    right: 15px !important;
    top: 15px !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    /* Estilo translúcido de la imagen */
    color: #fff !important;
    /* Blanco puro para la X */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    /* Proporción 1:2.3 aprox */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 2000 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.close i,
.modal-close i,
.modal-close-btn i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    width: 1em !important;
    height: 1em !important;
}

.dark-mode .close,
.dark-mode .modal-close,
.dark-mode .modal-close-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.close:hover,
.modal-close:hover,
.modal-close-btn:hover {
    background: var(--theme-accent) !important;
    color: #fff !important;
    transform: scale(1.1) !important;
}

/* Modal Action Buttons */
.btn-modal-save {
    background-color: #2A3484 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-modal-save:hover {
    background-color: #1e2663 !important;
    transform: translateY(-2px);
}

.btn-modal-cancel {
    background-color: #CF202F !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-modal-cancel:hover {
    background-color: #a81a26 !important;
    transform: translateY(-2px);
}

/* Premium Profile/Detail Card Styles */
.profile-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-avatar {
    width: 160px;
    height: 160px;
    background: var(--theme-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    color: var(--text-main);
    font-weight: 700;
}

.profile-info .role-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--theme-accent);
    color: white;
    border-radius: 25px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-item p {
    font-weight: 500;
    color: var(--text-main);
    font-size: 1.1rem;
}

/* Visibility Utilities */
.hide-mobile {
    display: table-cell;
}

.show-mobile-inline {
    display: none;
}

.hide-tablet {
    display: table-cell;
}

@media (max-width: 768px) {
    .modal {
        align-items: flex-start;
        padding-top: 10px;
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile-inline {
        display: inline !important;
    }

    .close {
        top: 15px;
        right: 15px;
        font-size: 32px;
        color: var(--theme-accent) !important;
        background: transparent !important;
        width: auto;
        height: auto;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 0;
        box-shadow: none;
        text-shadow: none !important;
        opacity: 1 !important;
    }

    body.dark-mode .close {
        color: #fff !important;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
    }

    table th,
    table td {
        padding: 9px 3px;
        /* Reducido de 6px para evitar scroll */
        font-size: 0.72rem;
    }

    /* Distribución equilibrada sin desbordamiento */
    .comp-col {
        width: 1%;
        white-space: nowrap;
        text-align: center;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    /* Columna de Miembro: Aumentar fuente del nombre notablemente */
    table td:first-child strong {
        font-size: 0.88rem;
        display: block;
        line-height: 1.1;
        margin-bottom: 1px;
        letter-spacing: -0.2px;
    }

    table td:first-child span {
        font-size: 0.65rem;
        opacity: 0.8;
    }

    .actions-cell {
        width: 1%;
        white-space: nowrap;
        padding: 9px 2px !important;
        /* Mínimo padding para acciones */
        text-align: right;
    }

    .actions-cell a {
        padding: 4px !important;
        margin: 0 !important;
    }

    .badge {
        font-size: 0.62rem;
        padding: 1px 6px;
    }
}

@media (max-width: 1100px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Responsiveness */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .header-left {
        gap: 10px;
    }

    .sidebar {
        transform: translateX(-100%);
        left: 0;
        z-index: 3000;
        box-shadow: none !important;
        visibility: hidden;
        /* Ocultar para evitar ruidos de layout */
        transition: transform var(--transition), visibility var(--transition);
        overflow-x: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
        visibility: visible;
    }

    .main-content {
        margin-left: 0 !important;
        overflow-x: hidden;
    }

    .menu-toggle {
        display: flex;
        /* Mostrar solo en móvil */
        z-index: 1001;
    }

    body.sidebar-open {
        overflow: hidden;
        /* Bloquear scroll al abrir menú */
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1500;
    }

    header {
        padding: 0 15px;
        height: 60px;
        /* Reducido de 70px */
    }

    .container {
        padding: 20px;
        /* Más espacio a los lados en móvil para que no se vea tan apretado */
    }

    .card {
        padding: 25px 20px;
        min-height: 140px;
    }

    .card .icon {
        font-size: 2.5rem;
    }

    .card-info h3 {
        font-size: 0.9rem;
    }

    .card-info p {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        padding: 0;
        gap: 15px;
        /* Más compacto */
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    .profile-avatar {
        width: 110px;
        height: 110px;
        font-size: 3rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .profile-info h2 {
        font-size: 1.6rem;
    }
}