
/* --- Variables CSS --- */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: rgba(59, 130, 246, 0.15);
    --sidebar-active-text: #3b82f6;
    --sidebar-hover-bg: #1e293b;
    --navbar-height: 64px;
    --content-bg: #f1f5f9;
    --card-bg: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #06b6d4;
    --info-light: #ecfeff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.25s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--content-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* --- Scrollbar personalizado --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: var(--navbar-height);
}

    .sidebar-brand .brand-icon {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--primary), #8b5cf6);
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .sidebar-brand .brand-text {
        color: #f1f5f9;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        white-space: nowrap;
    }

    .sidebar-brand .brand-sub {
        color: var(--sidebar-text);
        font-size: 0.7rem;
        font-weight: 500;
        letter-spacing: 0.05em;
    }

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

    .sidebar-nav .nav-label {
        padding: 0.5rem 1.5rem 0.4rem;
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        margin-top: 0.5rem;
    }

    .sidebar-nav .nav-item {
        padding: 0 0.75rem;
        margin-bottom: 2px;
    }

    .sidebar-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 0.75rem;
        color: var(--sidebar-text);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        font-weight: 500;
        transition: var(--transition);
        white-space: nowrap;
    }

        .sidebar-nav .nav-link i {
            font-size: 1.15rem;
            width: 20px;
            text-align: center;
            flex-shrink: 0;
        }

        .sidebar-nav .nav-link:hover {
            background: var(--sidebar-hover-bg);
            color: #e2e8f0;
        }

        .sidebar-nav .nav-link.active {
            background: var(--sidebar-active-bg);
            color: var(--sidebar-active-text);
            font-weight: 600;
        }

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

    .sidebar-footer .nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 0.75rem;
        color: var(--danger);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        font-weight: 500;
        transition: var(--transition);
    }

        .sidebar-footer .nav-link:hover {
            background: rgba(239, 68, 68, 0.1);
            color: #ffffff;
        }

        .sidebar-footer .nav-link i {
            font-size: 1.15rem;
            width: 20px;
            text-align: center;
        }

/* ============================================
   NAVBAR SUPERIOR
   ============================================ */
.main-navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .navbar-toggle:hover {
        background: var(--content-bg);
        color: var(--text-primary);
    }

.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--content-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

    .navbar-icon-btn:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

    .navbar-icon-btn .badge-dot {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 8px;
        height: 8px;
        background: var(--danger);
        border-radius: 50%;
        border: 2px solid var(--card-bg);
    }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0.25rem;
}

    .navbar-user:hover {
        background: var(--content-bg);
    }

.navbar-user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.navbar-user-info {
    line-height: 1.2;
}

.navbar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-user-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    padding: 1.75rem;
}

/* ============================================
   CARDS
   ============================================ */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .card-custom:hover {
        box-shadow: var(--shadow);
    }

    .card-custom .card-header {
        background: transparent;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.25rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .card-custom .card-header h5,
        .card-custom .card-header h6 {
            margin: 0;
            font-weight: 700;
            color: var(--text-primary);
        }

    .card-custom .card-body {
        padding: 1.25rem;
    }

/* --- Stat Cards --- */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .stat-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        flex-shrink: 0;
    }

        .stat-card .stat-icon.bg-primary-soft {
            background: var(--primary-light);
            color: var(--primary);
        }

        .stat-card .stat-icon.bg-success-soft {
            background: var(--success-light);
            color: var(--success);
        }

        .stat-card .stat-icon.bg-warning-soft {
            background: var(--warning-light);
            color: var(--warning);
        }

        .stat-card .stat-icon.bg-info-soft {
            background: var(--info-light);
            color: var(--info);
        }

    .stat-card .stat-info h3 {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--text-primary);
        margin: 0;
        line-height: 1.2;
    }

    .stat-card .stat-info p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin: 0;
        font-weight: 500;
    }

    .stat-card .stat-change {
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 0.25rem;
    }

        .stat-card .stat-change.positive {
            color: var(--success);
        }

        .stat-card .stat-change.negative {
            color: var(--danger);
        }

/* ============================================
   TABLAS
   ============================================ */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table-custom thead th {
        background: var(--content-bg);
        color: var(--text-secondary);
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;

    }

    .table-custom tbody td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.875rem;
        color: var(--text-primary);
        vertical-align: middle;
   
    }

    .table-custom tbody tr {
        transition: var(--transition);
    }

        .table-custom tbody tr:hover {
            background: rgba(59, 130, 246, 0.03);
        }

        .table-custom tbody tr:last-child td {
            border-bottom: none;
        }

/* ============================================
   BADGES
   ============================================ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

    .badge-status.active {
        background: var(--success-light);
        color: var(--success);
    }

    .badge-status.inactive {
        background: var(--danger-light);
        color: var(--danger);
    }

    .badge-status .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

/* ============================================
   BOTONES
   ============================================ */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

    .btn-primary-custom:hover {
        background: var(--primary-hover);
        color: #fff;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
        transform: translateY(-1px);
    }

.btn-outline-custom {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

    .btn-outline-custom:hover {
        background: var(--content-bg);
        color: var(--text-primary);
        border-color: var(--text-muted);
    }

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

    .btn-icon:hover {
        background: var(--content-bg);
        color: var(--text-primary);
    }

    .btn-icon.btn-edit:hover {
        background: var(--primary-light);
        color: var(--primary);
        border-color: var(--primary);
    }

    .btn-icon.btn-delete:hover {
        background: var(--danger-light);
        color: var(--danger);
        border-color: var(--danger);
    }

    .btn-icon.btn-permissions:hover {
        background: var(--warning-light);
        color: var(--warning);
        border-color: var(--warning);
    }

/* ============================================
   FORMULARIOS
   ============================================ */
.form-control-custom {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition);
    background: var(--card-bg);
}

    .form-control-custom:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        outline: none;
    }

    .form-control-custom::placeholder {
        color: var(--text-muted);
    }

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-check-custom .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-custom .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- Search Input --- */
.search-wrapper {
    position: relative;
}

    .search-wrapper i {
        position: absolute;
        left: 0.85rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 0.95rem;
    }

    .search-wrapper .form-control-custom {
        padding-left: 2.5rem;
    }

/* ============================================
   MODALES
   ============================================ */
.modal-custom .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-custom .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
}

.modal-custom .modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.modal-custom .modal-body {
    padding: 1.5rem;
}

.modal-custom .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background: var(--content-bg);
}

.modal-custom .btn-close:focus {
    box-shadow: none;
}

/* ============================================
   PAGINACION
   ============================================ */
.pagination-custom .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    margin: 0 2px;
    transition: var(--transition);
}

    .pagination-custom .page-link:hover {
        background: var(--primary-light);
        color: var(--primary);
        border-color: var(--primary);
    }

.pagination-custom .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-custom .page-item.disabled .page-link {
    opacity: 0.5;
}

/* ============================================
   PERMISOS (Columnas)
   ============================================ */
.permissions-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

    .permissions-panel .panel-header {
        background: var(--content-bg);
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .permissions-panel .panel-header h6 {
            margin: 0;
            font-weight: 700;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .permissions-panel .panel-header .count-badge {
            background: var(--primary-light);
            color: var(--primary);
            font-size: 0.75rem;
            font-weight: 600;
            padding: 0.2rem 0.6rem;
            border-radius: 9999px;
        }

    .permissions-panel .panel-body {
        padding: 1rem 1.25rem;
        max-height: 420px;
        overflow-y: auto;
    }

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

    .permission-item:hover {
        background: var(--content-bg);
    }

    .permission-item .form-check-input {
        margin: 0;
        cursor: pointer;
    }

    .permission-item .item-name {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .permission-item .item-detail {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

/* ============================================
   VISUALIZACION POWER BI
   ============================================ */
.embed-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.embed-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .embed-header h5 {
        margin: 0;
        font-weight: 700;
    }

#reportContainer {
    width: 100%;
    height: 600px;
    background: var(--content-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   LOADER
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: opacity 0.4s ease;
}

    .page-loader.hidden {
        opacity: 0;
        pointer-events: none;
    }

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container-custom {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toast-custom {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 420px;
    animation: slideInRight 0.35s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .toast-custom.removing {
        opacity: 0;
        transform: translateX(100%);
    }

    .toast-custom .toast-icon {
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 1px;
    }

    .toast-custom.toast-success .toast-icon {
        color: var(--success);
    }

    .toast-custom.toast-error .toast-icon {
        color: var(--danger);
    }

    .toast-custom.toast-warning .toast-icon {
        color: var(--warning);
    }

    .toast-custom.toast-info .toast-icon {
        color: var(--info);
    }

    .toast-custom .toast-content {
        flex: 1;
    }

    .toast-custom .toast-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.15rem;
    }

    .toast-custom .toast-message {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.4;
    }

    .toast-custom .toast-close {
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        font-size: 1rem;
        padding: 0;
        transition: var(--transition);
    }

        .toast-custom .toast-close:hover {
            color: var(--text-primary);
        }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: scaleIn 0.25s ease;
}

    .confirm-dialog .confirm-icon {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--danger-light);
        color: var(--danger);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin: 0 auto 1rem;
    }

    .confirm-dialog h5 {
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .confirm-dialog p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .confirm-dialog .confirm-actions {
        display: flex;
        gap: 0.75rem;
        justify-content: center;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   TOOLBAR (Search + Actions)
   ============================================ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

    .empty-state .empty-icon {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background: var(--content-bg);
        color: var(--text-muted);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin: 0 auto 1rem;
    }

    .empty-state h6 {
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.35rem;
    }

    .empty-state p {
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin-bottom: 1.25rem;
    }

/* ============================================
   TABLE INFO BAR
   ============================================ */
.table-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--content-bg);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   SIDEBAR OVERLAY (Mobile)
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1035;
    display: none;
    animation: fadeIn 0.2s ease;
}

    .sidebar-overlay.show {
        display: block;
    }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-navbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .navbar-toggle {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 1.25rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: flex-end;
    }

    .stat-card {
        padding: 1rem;
    }

        .stat-card .stat-info h3 {
            font-size: 1.25rem;
        }

    .navbar-user-info {
        display: none;
    }

    #reportContainer {
        height: 400px;
    }
}

@media (max-width: 575.98px) {
    .content-wrapper {
        padding: 1rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .toast-custom {
        min-width: auto;
        max-width: calc(100vw - 2.5rem);
    }
}

/* ============================================
   DASHBOARD GROUP ITEMS (Home)
   ============================================ */
.dashboard-group-item {
    display: block;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 2px;
}

    .dashboard-group-item:hover {
        background: var(--content-bg);
        border-color: var(--border-color);
        transform: translateX(2px);
    }

    .dashboard-group-item:last-child {
        margin-bottom: 0;
    }

.count-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-truncate-custom {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gap-custom-sm {
    gap: 0.5rem;
}

.gap-custom-md {
    gap: 1rem;
}

.gap-custom-lg {
    gap: 1.5rem;
}

.fw-700 {
    font-weight: 700;
}

.fs-sm {
    font-size: 0.85rem;
}

.fs-xs {
    font-size: 0.75rem;
}

/* Animacion de entrada */
.fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-delay-1 {
    animation-delay: 0.05s;
}

.fade-delay-2 {
    animation-delay: 0.1s;
}

.fade-delay-3 {
    animation-delay: 0.15s;
}

.fade-delay-4 {
    animation-delay: 0.2s;
}


