.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px;
}

.breakdown-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breakdown-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    flex-shrink: 0;
}

.card-icon.production {
    background: #e8f5e8;
    color: #28a745;
}

.card-icon.consumption {
    background: #fff3cd;
    color: #ffc107;
}

.card-icon.positive {
    background: #e8f5e8;
    color: #28a745;
}

.card-icon.negative {
    background: #f8d7da;
    color: #dc3545;
}

.card-icon.grid-import {
    background: #e7f3ff;
    color: #007bff;
}

.card-icon.grid-export {
    background: #e7f3ff;
    color: #17a2b8;
}

.card-icon.battery-charge {
    background: #e8f5e8;
    color: #28a745;
}

.card-icon.battery-discharge {
    background: #fff3e0;
    color: #ff9800;
}

.card-icon.households {
    background: #f3e5f5;
    color: #9c27b0;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-value.positive {
    color: #28a745;
}

.card-value.negative {
    color: #dc3545;
}

.breakdown-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    gap: 15px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.breakdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-message h5 {
    margin: 0 0 8px 0;
    color: #495057;
}

.empty-message p {
    margin: 0;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .breakdown-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 15px;
    }

    .breakdown-card {
        padding: 12px;
        gap: 10px;
    }

    .card-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .card-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .breakdown-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-value {
        font-size: 14px;
    }

    .card-label {
        font-size: 10px;
    }
}