/* Classi di utilità: text-center, mb-1, ecc. */
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-auto { margin-top: auto !important; }

/* === RESPONSIVE UTILITIES === */
/* Base display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Bootstrap-style responsive display utilities */
/* SEGNALAZIONI SPECIFIC OVERRIDES - MAXIMUM SPECIFICITY */

/* Desktop: Show desktop container, hide mobile */
@media (min-width: 768px) {
    /* SEGNALAZIONI - DESKTOP TABLE VISIBLE (using table-responsive like ODS) */
    .content-container .table-responsive.d-none.d-md-block,
    .page-content .table-responsive.d-none.d-md-block,
    div.table-responsive.d-none.d-md-block,
    .table-responsive.d-none.d-md-block {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
    }
    
    /* SEGNALAZIONI - MOBILE CARDS HIDDEN */
    .content-container .mobile-cards-container.d-block.d-md-none,
    .page-content .mobile-cards-container.d-block.d-md-none,
    div.mobile-cards-container.d-block.d-md-none,
    .mobile-cards-container.d-block.d-md-none {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* GENERIC RESPONSIVE CLASSES */
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-grid { display: grid !important; }
    .d-md-none { display: none !important; }
}

/* Mobile: Show mobile container, hide desktop */
@media (max-width: 767.98px) {
    /* SEGNALAZIONI - MOBILE CARDS VISIBLE */
    .content-container .mobile-cards-container.d-block.d-md-none,
    .page-content .mobile-cards-container.d-block.d-md-none,
    div.mobile-cards-container.d-block.d-md-none,
    .mobile-cards-container.d-block.d-md-none {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
    }
    
    /* SEGNALAZIONI - DESKTOP TABLE HIDDEN (using table-responsive like ODS) */
    .content-container .table-responsive.d-none.d-md-block,
    .page-content .table-responsive.d-none.d-md-block,
    div.table-responsive.d-none.d-md-block,
    .table-responsive.d-none.d-md-block {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* GENERIC RESPONSIVE CLASSES */
    .d-md-none { display: block !important; }
}

/* Mobile-specific utilities */
@media (max-width: 767.98px) {
    .text-center-mobile { text-align: center !important; }
    .text-left-mobile { text-align: left !important; }
    
    .w-100-mobile { width: 100% !important; }
    .w-auto-mobile { width: auto !important; }
    
    /* Compact spacing for mobile */
    .p-mobile { padding: 0.5rem !important; }
    .m-mobile { margin: 0.5rem !important; }
    .gap-mobile { gap: 0.5rem !important; }
}

/* Desktop-specific utilities */
@media (min-width: 768px) {
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
    .d-mobile-flex { display: flex !important; }
}

/* Spacing utilities for stats */
.stats-compact { 
    gap: 0.5rem !important; 
    margin-bottom: 1rem !important; 
}

.stats-dense .stat-card { 
    padding: 0.5rem !important; 
    min-height: 50px !important; 
}

/* Touch-friendly sizing */
.touch-friendly {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0.75rem !important;
}

/* === OTTIMIZZAZIONE LARGHEZZA CONTENITORI === */

/* Ottimizza i contenitori per utilizzare lo spazio disponibile */
.main-content,
.page-content,
.content-container {
    max-width: none; /* Rimuove limitazioni artificiali */
    width: 100%; /* Usa lo spazio del contenitore padre */
    box-sizing: border-box; /* Include padding nel calcolo */
}

/* Ottimizza le tabelle per lo spazio disponibile */
.desktop-table-container,
.table-responsive {
    width: 100%; /* Usa lo spazio del contenitore padre */
    max-width: 100%; /* Rispetta i limiti del contenitore */
    overflow-x: auto; /* Gestisce overflow se necessario */
}

/* Assicura che il contenuto delle pagine utilizzi tutto lo spazio */
.page-content {
    margin: 0;
    padding: 0.75rem; /* Mantiene il padding ridotto esistente */
}

/* Mantiene le regole del dashboard container come definite in responsive.css */
/* Dashboard container styling is handled in responsive.css */

/* Utility per forzare larghezza completa quando necessario */
.w-100-force { 
    width: 100% !important; 
    max-width: none !important; 
}

/* === MASSIMIZZAZIONE SPAZIO DASHBOARD === */
/* Regole rimosse - spazio dashboard ora gestito automaticamente da layout.css */

/* Ottimizzazione per contenitori full-width - solo se necessario */
.full-width-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

/* Rimuovi margini laterali dalle statistics */
.stats-row.stats-desktop-right {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Aggiungere altre utility se necessario */
