/* ═══════════════════════════════════════════════════════════════
   DASHBOARD MEDICO - STILE MODERNO CON COLORI VERDI/SMERALDO
   ═══════════════════════════════════════════════════════════════ */

.dashboard-medico-container {
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.dashboard-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-title i {
    font-size: 32px;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-refresh i {
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   KPI CARDS SECTION
   ═══════════════════════════════════════════════════════════════ */

.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 5px solid;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.kpi-card.kpi-primary {
    border-left-color: #27ae60;
}

.kpi-card.kpi-danger {
    border-left-color: #e74c3c;
}

.kpi-card.kpi-success {
    border-left-color: #2ecc71;
}

.kpi-card.kpi-info {
    border-left-color: #1abc9c;
}

.kpi-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    margin-right: 20px;
}

.kpi-primary .kpi-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.kpi-danger .kpi-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.kpi-success .kpi-icon {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.kpi-info .kpi-icon {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CHARTS SECTION
   ═══════════════════════════════════════════════════════════════ */

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chart-header {
    padding: 20px;
    background: linear-gradient(135deg, #d5f4e6 0%, #a2e5c5 100%);
    border-bottom: 3px solid #27ae60;
}

.chart-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-subtitle {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

.chart-body {
    padding: 30px;
    min-height: 300px;
}

.chart-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Trend indicators */
.trend-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
}

.trend-indicator.trend-positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.trend-indicator.trend-negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.trend-indicator i {
    font-size: 24px;
}

.trend-text {
    font-size: 16px;
}

.trend-detail {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════
   PRIME VISITE SECTION
   ═══════════════════════════════════════════════════════════════ */

.prime-visite-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.section-header {
    padding: 20px;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-subtitle {
    font-size: 14px;
    margin-top: 5px;
    opacity: 0.9;
}

.table-responsive {
    padding: 20px;
    overflow-x: auto;
}

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

.table-prime-visite th {
    background: #d5f4e6;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #27ae60;
}

.table-prime-visite td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #2c3e50;
}

.table-prime-visite tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-0 {
    background: #F6F6F6;
    color: #6c757d;
}

.status-badge.status-1 {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-2 {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-3 {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-4 {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.status-5 {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-6 {
    background: #d4edda;
    color: #155724;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-medico-container {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .kpi-section {
        grid-template-columns: 1fr;
    }

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

    .chart-body {
        padding: 15px;
    }

    .kpi-value {
        font-size: 28px;
    }

    .kpi-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .table-responsive {
        padding: 10px;
    }

    .table-prime-visite {
        font-size: 14px;
    }

    .table-prime-visite th,
    .table-prime-visite td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 20px;
    }

    .btn-refresh {
        padding: 8px 12px;
        font-size: 14px;
    }

    .kpi-card {
        padding: 15px;
    }

    .kpi-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-right: 15px;
    }

    .kpi-value {
        font-size: 24px;
    }

    .chart-title {
        font-size: 18px;
    }
}
