/* ================================================
   BOLLETTE ENERGIA - STYLES
   ================================================ */

.bollette-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;
    margin-bottom: 15px;
}

/* Tipo Selector */
.tipo-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tipo-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tipo-btn:hover {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.tipo-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Alerts Zone */
.alerts-zone {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

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

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.alert-message {
    font-size: 0.95rem;
}

/* Stats Grid */
.stats-grid {
    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;
}

.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;
}

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

.variazioni-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.variazioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.variazione-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.var-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.var-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.var-percent {
    font-size: 1.5rem;
    font-weight: 700;
}

.var-icon {
    font-size: 1.2rem;
}

.var-positive {
    color: #e74c3c;
}

.var-negative {
    color: #27ae60;
}

.var-neutral {
    color: #95a5a6;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.chart-card h3,
.chart-card-full h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

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

/* Tables */
.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;
}

.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;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .variazioni-grid {
        grid-template-columns: 1fr;
    }
}
