 /* assets/css/index.css */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4caf50;
    --danger-color: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fb;
}

/* Sidebar - Ocupa toda la altura */
.sidebar {
    min-height: 100vh;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
    color: white;
}

.sidebar .nav-link.active {
    background: rgba(255,255,255,0.25);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar .nav-link i {
    width: 25px;
    margin-right: 10px;
}

/* Content Wrapper */
.content-wrapper {
    background: #f5f7fb;
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 15px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 20px 40px;
    border-radius: 15px;
    text-align: center;
}

/* Botones de acción */
.btn-action {
    margin: 0 3px;
    padding: 5px 10px;
}

/* Ajuste para el contenido dinámico */
#page-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Asegurar que el contenedor principal ocupe toda la altura */
.container-fluid {
    height: 100%;
    padding: 0 !important;
}

.row {
    height: 100%;
    margin: 0 !important;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .sidebar .nav-link {
        display: inline-block;
        margin: 5px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .top-bar {
        padding: 10px 15px;
    }
    
    #page-content {
        padding: 15px;
    }
}