/**
 * Stili Frontend per Shaktiman B2B
 */

/* Container principale */
.shaktiman-b2b-archive,
.shaktiman-b2b-single,
.shaktiman-b2b-grid-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* Header pagina */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.page-title {
    margin: 0 0 10px;
    font-size: 32px;
    color: #333;
}

.taxonomy-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Filtri */
.mezzi-filters {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: center;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.filter-search {
    grid-column: span 2;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #f26a21;
}

/* Azioni filtri */
.filter-item.filter-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-direction: row;
    align-items: flex-end;
}

.filter-item.filter-actions a, .filter-item.filter-actions button {
    min-height: 50px;
}

/* Stato loading dei dropdown durante aggiornamento opzioni */
.filter-item.filter-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s;
}
.filter-item.filter-loading .filter-select,
.filter-item.filter-loading .select2-container {
    cursor: wait;
}

.btn-search,
.btn-reset {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
}

.btn-search {
    background: #f26a21;
}

.btn-search:hover {
    background: #d85a15;
    transform: translateY(-2px);
}

.btn-reset {
    background: #666;
}

.btn-reset:hover {
    background: #555;
    transform: translateY(-2px);
}

/* Risultati */
.mezzi-results {
    margin-bottom: 40px;
}

.results-count {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 16px;
    color: #666;
}

/* Griglia mezzi */
.mezzi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.mezzi-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mezzi-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mezzi-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mezzi-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Responsive */
@media (max-width: 1600px) {
    .mezzi-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .mezzi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .mezzi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .mezzi-grid {
        grid-template-columns: 1fr;
    }
}

/* Card mezzo */
.mezzo-item {
    position: relative;
}

.mezzo-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mezzo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Immagine */
.mezzo-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f5f5f5;
}

.mezzo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mezzo-card:hover .mezzo-image img {
    transform: scale(1.05);
}

.mezzo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
}

/* Badge stato */
.mezzo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    z-index: 1;
}

.badge-disponibile {
    background: #4CAF50;
}

.badge-riservato {
    background: #FF9800;
}

.badge-venduto {
    background: #F44336;
}

/* Contenuto card */
.mezzo-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mezzo-title {
    margin: 0 0 15px;
    font-size: 18px;
    line-height: 1.4;
}

.mezzo-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.mezzo-title a:hover {
    color: #f26a21;
}

.mezzo-meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.mezzo-meta-info span {
    display: block;
}

.mezzo-stato-magazzino {
    display: inline-block;
    padding: 3px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mezzo-excerpt {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    flex-grow: 1;
}

.mezzo-cliente {
    margin-top: 10px;
    padding: 10px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    font-size: 14px;
    color: #333;
}

/* Footer card */
.mezzo-footer {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.btn-dettagli,
.btn-modifica {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-dettagli {
    background: #f26a21;
    color: white;
}

.btn-dettagli:hover {
    background: #fff;
    border:solid 1px #f26a21;
}

.btn-modifica {
    background: #2196F3;
    color: white;
}

.btn-modifica:hover {
    background: #0b7dda;
}

/* Pulsanti di stato */
.mezzo-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-stato:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-stato:disabled,
.btn-stato.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-riserva {
    background: #FFC107;
    color: #000;
}

.btn-riserva:hover {
    background: #FFB300;
}

.btn-venduto {
    background: #f26a21;
    color: white;
}

.btn-venduto:hover {
    background: #45a049;
}

.btn-libera {
    background: #2196F3;
    color: white;
}

.btn-libera:hover {
    background: #0b7dda;
}

/* Pulsanti piccoli per le card */
.btn-riserva-small,
.btn-libera-small {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-riserva-small {
    background: #FFC107;
    color: #000;
}

.btn-riserva-small:hover {
    background: #FFB300;
}

.btn-libera-small {
    background: #2196F3;
    color: white;
}

.btn-libera-small:hover {
    background: #0b7dda;
}

/* Pagina singola */
.mezzo-single {
    background: white;
    padding: 30px;
    border-radius: 8px;
}

.mezzo-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.mezzo-stato,
.mezzo-magazzino {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.mezzo-magazzino {
    background: #2196F3;
}

.mezzo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0;
}

.mezzo-thumbnail {
    overflow: hidden;
    border-radius: 8px;
}

.mezzo-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.mezzo-thumbnail img:hover {
    transform: scale(1.2);
}

.mezzo-thumbnail-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    border-radius: 8px;
    color: #999;
}

.mezzo-info-box {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.mezzo-info-box h2,
.mezzo-info-box h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #333;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

.mezzo-actions {
    margin-top: 20px;
}

.btn,
.btn-edit {
    display: inline-block;
    padding: 12px 24px;
    background: #f26a21;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn:hover,
.btn-edit:hover {
    background: #45a049;
}

.mezzo-description {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.mezzo-description h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.btn-back {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 20px;
    background: #666;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-back:hover {
    background: #555;
}

/* Nessun mezzo trovato */
.no-mezzi {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

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



/* Paginazione */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f26a21;
    color: white;
    border-color: #f26a21;
}

.pagination .current {
    background: #f26a21;
    color: white;
    border-color: #f26a21;
}

/* Responsive */
@media (max-width: 1024px) {
    .mezzi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mezzi-grid.columns-3,
    .mezzi-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mezzo-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-form .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-search {
        grid-column: span 1;
    }
    
    .mezzi-grid,
    .mezzi-grid.columns-2,
    .mezzi-grid.columns-3,
    .mezzi-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 24px;
    }
}

/* Modale per cambio stato */
.shaktiman-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.shaktiman-modal-overlay.active {
    display: flex;
}

.shaktiman-modal {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-field {
    margin-bottom: 20px;
}

.modal-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.modal-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.modal-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: white;
    cursor: pointer;
}

.modal-field input:focus,
.modal-field select:focus {
    outline: none;
    border-color: #f26a21;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: #f26a21;
    color: white;
}

.modal-btn-confirm:hover {
    background: #45a049;
}

.modal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   SINGLE MEZZO STYLES
   ============================================ */

/* Header sezione stato e azioni */
.mezzo-status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

/* Stato vendita */
.stato-vendita-title {
    margin: 0 0 5px;
    font-size: 22px;
    color: #333;
}

.stato-disponibile {
    color: #f26a21;
}

.stato-riservato {
    color: #FFC107;
}

.stato-venduto {
    color: #f44336;
}

.stato-ubicazione {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Contenitore pulsanti azioni */
.mezzo-actions-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Stili base pulsanti stato */
.btn-stato {
    padding: 3px 15px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    transition: all 0.3s;
    flex: 1;
    min-height: 36px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-stato:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-stato:active {
    transform: translateY(0);
}

/* Pulsante Riserva */
.btn-riserva {
    background: #FFC107;
    color: #000;
}

.btn-riserva:hover {
    background: #FFB300;
}

/* Pulsante Venduto */
.btn-venduto {
    background: #f26a21;
    color: white;
}

.btn-venduto:hover {
    background: #45a049;
}

/* Pulsante Libera */
.btn-libera {
    background: #FFC107;
    color: #000;
}

.btn-libera.venduto-state {
    background: #f44336;
    color: white;
}

.btn-libera.venduto-state:hover {
    background: #da190b;
}

/* Pulsante Contratto */
.btn-contratto {
    background: #f26a21;
    color: white;
}

.btn-contratto:hover {
    background: #45a049;
}

/* Pulsante Cambia Ubicazione */
.btn-cambia-ubicazione {
    background: #2196F3;
    color: white;
}

.btn-cambia-ubicazione:hover {
    background: #0b7dda;
}

/* Tabella attributi */
.mezzo-attributes-table {
    background: white;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Modali piccoli (conferma e notifica) */
.shaktiman-modal.modal-small {
    max-width: 450px;
}

.modal-message {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.label-required {
    color: red;
}

/* Select2 Custom Styles */
.select2-container--default .select2-selection--single {
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-top: -16px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
}

.filter-select {
    width: 100%;
}

/* Select2 nel modale */
.modal-field .select2-container {
    width: 100% !important;
}

.modal-field .select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: 15px;
    color: #666;
}

.modal-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.modal-field .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #f26a21;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f26a21;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f0f0;
}

/* Z-index per Select2 dropdown sopra il modale */
.select2-container--open {
    z-index: 10001;
}

.select2-dropdown {
    z-index: 10002;
}

/* Modale Large per lo storico */
.modal-large {
    max-width: 900px;
    width: 90%;
}

/* Bottone Storico */
.btn-storico {
    background: #607D8B;
    color: white;
}

.btn-storico:hover {
    background: #546E7A;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #607D8B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading-spinner p {
    margin: 0;
    font-size: 16px;
}

/* Tabella Storico */
.storico-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.storico-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.storico-table thead {
    background: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.storico-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.storico-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.storico-table tbody tr:hover {
    background: #f9f9f9;
}

.storico-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge per azioni */
.action-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e0e0e0;
    color: #333;
}

.storico-table small {
    color: #666;
    font-size: 12px;
}

.storico-table em {
    font-weight: 600;
    color: #f26a21;
}

/* Messaggio quando non ci sono dati */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
    font-size: 16px;
}

/* ========================================
   STATISTICHE RIVENDITORI
   ======================================== */

.rivenditore-stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.stats-title {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.btn-refresh-stats {
    padding: 10px 20px;
    background: #f26a21;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-refresh-stats:hover {
    background: #45a049;
}

/* Cards statistiche */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 40px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-riservati {
    border-left: 4px solid #FF9800;
}

.stat-card-venduti {
    border-left: 4px solid #f26a21;
}

.stat-card-contratto {
    border-left: 4px solid #2196F3;
}

.stat-card-no-contratto {
    border-left: 4px solid #f44336;
}

/* Filtri statistiche */
.stats-filters {
    background: #f5f5f5;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.stats-filters input[type="radio"],
.stats-filters input[type="checkbox"] {
    cursor: pointer;
}

/* Tabella statistiche */
.stats-table-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: #f5f5f5;
}

.stats-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.stats-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;
}

.stats-table tbody tr {
    transition: background 0.2s;
}

.stats-table tbody tr:hover {
    background: #f9f9f9;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stats-table tbody tr[style*="display: none"] {
    display: none !important;
}

/* Badge nella tabella */
.stato-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.stato-badge.stato-disponibile {
    background: #E3F2FD;
    color: #1976D2;
}

.stato-badge.stato-riservato {
    background: #FFF3E0;
    color: #F57C00;
}

.stato-badge.stato-venduto {
    background: #E8F5E9;
    color: #388E3C;
}

.contratto-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.contratto-badge.contratto-si {
    background: #E8F5E9;
    color: #2E7D32;
}

.contratto-badge.contratto-no {
    background: #FFEBEE;
    color: #C62828;
}

.btn-view-mezzo {
    display: inline-block;
    padding: 6px 12px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-view-mezzo:hover {
    background: #1976D2;
    color: white;
}

.stats-error {
    padding: 20px;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

/* Dashboard Widget */
.shaktiman-dashboard-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.shaktiman-dashboard-widget .widefat {
    margin-top: 10px;
}

.shaktiman-dashboard-widget .widefat th {
    font-size: 12px;
    padding: 8px;
}

.shaktiman-dashboard-widget .widefat td {
    font-size: 13px;
    padding: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-table-wrapper {
        overflow-x: auto;
    }
    
    .stats-table {
        min-width: 600px;
    }
}

