﻿.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: #5f85ff; /* ⬅️ استبدال التدرج القديم */
    color: #0f172a;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
    .dashboard-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 10px;
        text-shadow: none;
        color: white; /* ✅ النص باللون الأبيض */
    }

    .dashboard-header p {
        font-size: 1.1rem;
        opacity: 0.9;
        margin: 0;
        color: white; /* ✅ النص باللون الأبيض */
    }


.card {
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

    .card:hover {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .card-title i {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #3b82f6;
        color: white;
        border-radius: 10px;
        font-size: 1rem;
    }

.period-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

#periodToolbar,
#patientsToolbar,
#frequentTestsToolbar {
    position: static;
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    margin-top: -6px; /* تقريب من العنوان */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}


    #periodToolbar button,
    #patientsToolbar button,
    #frequentTestsToolbar button {
        border: none;
        background: transparent;
        color: #2563eb;
        padding: 6px 16px;
        font-weight: 600;
        font-size: 0.8rem;
        border-radius: 999px; /* pill shape */
        cursor: pointer;
        transition: all 0.3s ease;
    }

        #periodToolbar button.active,
        #patientsToolbar button.active,
        #frequentTestsToolbar button.active {
            background: #3b82f6;
            color: white;
            box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
        }

#transactionsPerDay,
#newPatientsLine,
#resultStatus,
#mostFrequentTests {
    margin: 20px 0;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

    #transactionsPerDay::before,
    #newPatientsLine::before,
    #resultStatus::before,
    #mostFrequentTests::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 30% 30%, rgba(147, 197, 253, 0.15), transparent 60%);
    }

.stats-row {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
}

    .stats-row > div {
        text-align: center;
        flex: 1;
    }

    .stats-row .value {
        font-size: 1.4rem;
        font-weight: 700;
        color: #3b82f6;
    }

#resultStatusTotal {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3b82f6;
    margin-left: 8px;
}

.text-center {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

#frequentTestsToolbar {
    position: static;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

    #frequentTestsToolbar .btn {
        border: none;
        background: transparent;
        color: #2563eb;
        padding: 6px 14px;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        #frequentTestsToolbar .btn:hover {
            background: #3b82f6;
            color: white;
        }

.animate-on-load {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-effect {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }

    .card-body {
        padding: 20px;
    }

    #periodToolbar,
    #patientsToolbar,
    #frequentTestsToolbar {
        position: static;
        margin-bottom: 16px;
        justify-content: center;
    }

    .stats-row {
        flex-direction: column;
        gap: 12px;
    }
}
