:root {
    /* Color Palette */
    --primary-bg: #0f172a; /* Slate 900 */
    --secondary-bg: #1e293b; /* Slate 800 */
    --accent-color: #3b82f6; /* Blue 500 */
    --accent-hover: #2563eb; /* Blue 600 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    --success: #10b981; /* Emerald 500 */
    --danger: #ef4444; /* Red 500 */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--primary-bg);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.2) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.2) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.4s ease;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-card-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1rem;
    min-height: calc(100vh - 75px);
    width: 100%;
}

.login-card {
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.4s ease;
    margin: auto;
}

.login-overlay.hidden .login-card {
    transform: translateY(-20px);
}

/* ========================================================
   Barra de Navegación Jartdev Tech (réplica del navbar del index)
   Mismos colores, tipografías, tamaños y comportamiento que
   el navbar Bootstrap del sitio principal (css/style.css).
   ======================================================== */
.jt-navbar {
    --jt-primary: #1363C6;
    --jt-dark: #14183E;
    --jt-light: #F4F7FE;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    background: var(--jt-primary);
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    transition: .5s;
}

.jt-navbar,
.jt-navbar * {
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}

.jt-container {
    width: 100%;
    padding-right: .75rem;
    padding-left: .75rem;
    margin-right: auto;
    margin-left: auto;
}
@media (min-width: 576px)  { .jt-container { max-width: 540px; } }
@media (min-width: 768px)  { .jt-container { max-width: 720px; } }
@media (min-width: 992px)  { .jt-container { max-width: 960px; } }
@media (min-width: 1200px) { .jt-container { max-width: 1140px; } }
@media (min-width: 1400px) { .jt-container { max-width: 1320px; } }

.jt-nav {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    padding: 11px 0;
}

/* Marca: mismo h1 "Jartdev.Tech" del index */
.jt-brand {
    padding: .3125rem 0;
    margin-right: 1rem;
    white-space: nowrap;
    text-decoration: none;
}
.jt-brand h1 {
    margin: 0 0 .5rem 0;
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    line-height: 1.2;
    font-size: calc(1.375rem + 1.5vw);
    color: #fff;
}
@media (min-width: 1200px) { .jt-brand h1 { font-size: 2.5rem; } }
.jt-brand h1 .jt-brand-dot {
    font-family: inherit;
    color: var(--jt-dark);
}

/* Botón hamburguesa (navbar-toggler navbar-dark) */
.jt-toggler {
    display: none;
    margin-left: auto;
    padding: .25rem .75rem;
    font-size: 1.25rem;
    line-height: 1;
    color: rgba(255, 255, 255, .55);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow .15s ease-in-out;
}
.jt-toggler:focus-visible { outline: 0; box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .25); }
.jt-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background: no-repeat center / 100% url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.jt-collapse {
    display: flex;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
}

.jt-nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    padding: 0;
    list-style: none;
}

.jt-nav-item { position: relative; }

.jt-nav-link {
    display: block;
    margin-right: 35px;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    outline: none;
    white-space: nowrap;
    transition: color .15s ease-in-out;
}
.jt-nav-link:hover,
.jt-nav-link:focus-visible,
.jt-nav-link.active,
.jt-dropdown.open > .jt-nav-link {
    color: #fff;
}

/* Flecha de los desplegables (igual a Font Awesome \f107 del index) */
.jt-dropdown-toggle::after {
    display: inline-block;
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* Menú desplegable (dropdown-menu bg-light mt-2) */
.jt-dropdown-menu {
    position: absolute;
    left: 0;
    z-index: 1000;
    min-width: 10rem;
    margin-top: .5rem;
    padding: .5rem 0;
    text-align: left;
    background: var(--jt-light);
    border: none;
    border-radius: 10px;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.jt-dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
}
.jt-dropdown-item:hover,
.jt-dropdown-item:focus {
    color: #1e2125;
    background: #e9ecef;
}
.jt-dropdown-item:active {
    color: #fff;
    background: var(--jt-primary);
}

/* Mismo espaciado compacto que el index entre 1200px y 1399px */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .jt-nav-link { margin-right: 18px; }
}

/* Escritorio: aparece al pasar el mouse con la misma animación del index */
@media (min-width: 1200px) {
    .jt-nav { flex-wrap: nowrap; }
    .jt-dropdown-menu {
        display: block;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }
    /* puente invisible para no perder el hover en el espacio de margen */
    .jt-dropdown-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -.75rem;
        height: .75rem;
    }
    .jt-dropdown:hover > .jt-dropdown-menu,
    .jt-dropdown:focus-within > .jt-dropdown-menu,
    .jt-dropdown.open > .jt-dropdown-menu {
        top: 100%;
        opacity: 1;
        visibility: visible;
    }
}

/* Móvil / tablet: menú colapsable con fondo azul, como el index */
@media (max-width: 1199.98px) {
    .jt-toggler { display: inline-block; }

    .jt-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 75px);
        overflow-y: auto;
    }
    .jt-collapse.show { display: block; }

    .jt-nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 0 15px;
        background: var(--jt-primary);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .25);
    }

    .jt-nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .jt-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
    }
    .jt-dropdown.open > .jt-dropdown-menu {
        display: block;
        margin-bottom: .5rem;
    }
    .jt-dropdown-item { white-space: normal; }
}

.login-card .brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.login-card h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 1rem;
    min-height: 1.2rem;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    transition: opacity 0.5s ease;
}

.dashboard-container.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Sidebar */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    margin: 1rem;
    border-radius: 20px;
    position: fixed;
    height: calc(100vh - 2rem);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .brand-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(203, 213, 225, 0.4);
    padding: 1rem 0.75rem 0.35rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    transform: translateX(3px);
}

.sidebar-nav li.active > a {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-color);
}

.nav-badge.pdf {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Submenu Hotspots */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    justify-content: flex-start;
}

.submenu-toggle-icon {
    margin-left: auto;
    font-size: 0.72rem;
    transition: transform 0.3s ease;
}

.has-submenu.open > a .submenu-toggle-icon {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 0.75rem;
    margin: 0.2rem 0 0.4rem 0.8rem;
    display: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.has-submenu.open .submenu {
    display: block;
}

.submenu li {
    margin-bottom: 0.15rem;
}

.submenu a {
    padding: 0.45rem 0.7rem;
    font-size: 0.84rem;
    gap: 0.6rem;
    color: rgba(203, 213, 225, 0.75);
}

.submenu a:hover {
    color: var(--accent-color);
    transform: translateX(2px);
}

.submenu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.35rem 0.4rem;
}

.sidebar-footer {
    padding: 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border-color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: calc(260px + 2rem);
    padding: 1rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    gap: 1.25rem;
}

.btn-sidebar-toggle {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.15rem;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-color);
    border-color: rgba(59, 130, 246, 0.35);
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 380px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    font-size: 0.92rem;
}

.search-bar input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-nav-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-nav-action:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn-nav-action.btn-nav-web:hover {
    color: var(--accent-color);
    border-color: rgba(59, 130, 246, 0.3);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-color);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: white;
}

.admin-name {
    font-weight: 600;
    font-size: 0.92rem;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.stat-card.active-card {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.stat-card.summary-card .stat-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--success);
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.stat-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Charts Section */
.charts-section {
    padding: 1.5rem;
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-container {
    height: 300px;
    width: 100%;
}

/* Data Table Section */
.data-section {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

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

.table-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.glass-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    outline: none;
}

.glass-select option {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: background 0.3s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.site-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-block;
}

.text-center {
    text-align: center;
}

.loading-state {
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem !important;
}

.table-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Backdrop para móvil */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1050;
    transition: opacity 0.3s ease;
}

/* Modal Exportar Reporte PDF */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: modalScaleIn 0.25s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.full-width {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsiveness */
@media (max-width: 992px) {
    .btn-sidebar-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        margin: 0;
        border-radius: 0 20px 20px 0;
        z-index: 1100;
        transform: translateX(-105%);
        box-shadow: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 15px 0 50px rgba(0, 0, 0, 0.7);
    }

    .sidebar-close-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem 1.5rem 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .topbar {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .btn-nav-action span {
        display: none;
    }

    .btn-nav-action {
        padding: 0.6rem;
    }

    .admin-name {
        display: none;
    }
}

/* Clases de utilidad generales y sistema de autenticación */
.hidden {
    display: none !important;
}

.success-text {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: 1rem;
    min-height: 1.2rem;
}

.helper-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.helper-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.question-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

/* Rejilla para mostrar múltiples gráficos uno al lado del otro */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
