:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #1abc9c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding-top: 56px; /* Altura del header */
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar h2 {
    color: white;
    padding: 0 15px;
    margin-bottom: 20px;
}


main {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.metric-card {
    border-left: 4px solid var(--primary-color);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Ajustes para Bootstrap */
.col-md-9.ms-sm-auto.col-lg-10.px-md-4 {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tablas */
.table th {
    background-color: var(--secondary-color);
    color: white;
}

/* Botones */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Formularios */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Alertas */
.alert {
    border-radius: 5px;
    border: none;
}