/* ================================================
   ANALISI SPESA FORNITORI - STYLES
   ================================================ */

.analisi-spesa-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.page-header .subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Filtri Card */
.filtri-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filtri-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filtro-group {
    flex: 1;
    min-width: 200px;
}

.filtro-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.9rem;
}

.form-select,
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

.stat-card {
    background: white;
    border-radius: 12px;
    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(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Chart Card */
.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.chart-card canvas {
    max-height: 300px;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.table-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

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

/* No Data Card */
.no-data-card {
    background: white;
    border-radius: 12px;
    padding: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-data-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-data-card p {
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .filtri-row {
        flex-direction: column;
    }

    .filtro-group {
        width: 100%;
        min-width: auto;
    }

    .riepilogo-cards {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}
