/* ========== NOUVELLES RÈGLES POUR CONTENU ÉLARGI ========== */

/* Supprimer les marges et padding du conteneur principal */
.content-expanded {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#scrollable-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 15px !important;
}

/* Adapter le contenu principal */
.content-wrapper, 
.main-content {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ajuster le dashboard pour utiliser l'espace disponible */
.dashboard, 
.welcome-section, 
.sales-overview {
    width: 100% !important;
    max-width: none !important;
}

/* Élargir les cartes et widgets */
.box, 
.info-box, 
.small-box {
    width: 100% !important;
    max-width: none !important;
}

/* Ajuster les tableaux pour qu'ils utilisent toute la largeur */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
}

.table {
    width: 100% !important;
    max-width: none !important;
}

/* Ajuster les grilles Bootstrap */
.container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
}

.row {
    margin-left: -8px !important;
    margin-right: -8px !important;
    width: calc(100% + 16px) !important;
}

.col-md-1, .col-md-2, .col-md-3, .col-md-4, 
.col-md-5, .col-md-6, .col-md-7, .col-md-8, 
.col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Ajustements spécifiques pour le dashboard */
.home.dashboard_overview {
    width: 100% !important;
    max-width: none !important;
}

/* Élargir les statistiques */
.dashboard-stats .col-md-3 {
    width: 25% !important;
    flex: 0 0 25% !important;
}

/* Ajustements responsive */
@media (max-width: 768px) {
    .content-expanded {
        padding: 10px !important;
    }
    
    #scrollable-container {
        padding: 10px !important;
    }
    
    .dashboard-stats .col-md-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-stats .col-md-3 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Assurer que le footer reste en bas */
.main-footer {
    width: 100% !important;
    margin: 0 !important;
    padding: 15px !important;
}

/* Correction pour les modales */
.modal-dialog {
    max-width: 95% !important;
}

/* Ajuster les formulaires */
.form-horizontal .form-group {
    width: 100% !important;
}

/* Élargir les champs de formulaire */
.form-control {
    width: 100% !important;
}

/* Ajustements pour POS si nécessaire */
.pos-layout .content-expanded {
    width: 100% !important;
}
/* Dashboard Full Width Styles */
.dashboard-full-width {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.content-expanded {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#scrollable-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Modern Card Styles */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.chart-card, .data-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.chart-card:hover, .data-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Table Styles */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-full-width {
        padding: 0.5rem !important;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem !important;
    }
    
    .tw-grid-cols-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .tw-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .tw-grid-cols-6,
    .tw-grid-cols-4,
    .tw-grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Animation for numbers */
.stat-card h3, .stat-card-sm h4 {
    font-variant-numeric: tabular-nums;
}

/* Loading states */
.stat-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: loading 1.5s ease infinite;
}

@keyframes loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}