/* ================================================
   DASHBOARD ANALISI CIBO & FOOD COST - STYLES
   ================================================ */

/* Header Dashboard */
.dashboard-analisi-header {
    background: linear-gradient(135deg, #71a894 0%, #5a8a73 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(113, 168, 148, 0.3);
}

.dashboard-analisi-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white !important;
    font-weight: 700;
}

.dashboard-analisi-header .subtitle {
    font-size: 1rem;
    opacity: 1;
    color: white;
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-analisi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #e0e0e0;
    overflow: hidden;
    word-wrap: break-word;
}

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

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}

.kpi-card-desc {
    font-size: 0.85rem;
    color: #95a5a6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* KPI Color Variants */
.kpi-alert-red {
    border-left-color: #e74c3c;
}

.kpi-alert-red .kpi-card-header {
    color: #e74c3c;
}

.kpi-alert-yellow {
    border-left-color: #f39c12;
}

.kpi-alert-yellow .kpi-card-header {
    color: #f39c12;
}

.kpi-alert-green {
    border-left-color: #71a894;
}

.kpi-alert-green .kpi-card-header {
    color: #71a894;
}

.kpi-alert-blue {
    border-left-color: #3498db;
}

.kpi-alert-blue .kpi-card-header {
    color: #3498db;
}

/* Text Colors */
.text-red {
    color: #e74c3c !important;
}

.text-yellow {
    color: #f39c12 !important;
}

.text-green {
    color: #71a894 !important;
}

.text-blue {
    color: #3498db !important;
}

.text-center {
    text-align: center;
}

/* Action Hub */
.action-hub {
    grid-column: 1 / -1;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-action {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #71a894 0%, #5a8a73 100%) !important;
    color: white !important;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(113, 168, 148, 0.4) !important;
    background: linear-gradient(135deg, #5a8a73 0%, #4a7563 100%) !important;
}

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

.btn-action-icon {
    font-size: 1.3rem;
    color: white !important;
}

.btn-action-text {
    color: white !important;
    font-weight: 600;
}

.btn-action-yellow {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.btn-action-yellow:hover {
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4) !important;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
}

.btn-action-blue {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

.btn-action-blue:hover {
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4) !important;
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%) !important;
}

/* Quick Nav Section */
.quick-nav-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quick-nav-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-nav-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-nav {
    flex: 1;
    min-width: 250px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.btn-nav:hover {
    border-color: #71a894;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(113, 168, 148, 0.2);
}

.btn-nav-icon {
    font-size: 2rem;
    color: #71a894;
}

.btn-nav-content {
    flex: 1;
}

.btn-nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.btn-nav-desc {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.btn-nav-arrow {
    font-size: 1.5rem;
    color: #71a894;
    opacity: 0.5;
    transition: all 0.3s;
}

.btn-nav:hover .btn-nav-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* Chart Section */
.chart-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Data Table */
.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;
    font-size: 0.9rem;
}

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

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

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

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-info {
    background: #d6eaf8;
    color: #2874a6;
}

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

    .action-hub {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        min-width: auto;
    }

    .quick-nav-buttons {
        flex-direction: column;
    }

    .btn-nav {
        min-width: auto;
        width: 100%;
    }

    .kpi-card-value {
        font-size: 2rem;
    }

    .dashboard-analisi-header h1 {
        font-size: 1.5rem;
    }
}
