/**
 * reports.css
 * 
 * تنسيق صفحة التقارير والإحصائيات
 */

/* ===== Dark Theme Override ===== */
body.dark-theme .period-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-theme .period-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #34d399;
    color: #ffffff;
}

body.dark-theme .period-btn.active {
    background: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
    border-color: #34d399;
    color: #0a0a15;
}

body.dark-theme .summary-stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-theme .chart-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

body.dark-theme .chart-card h3 {
    color: #34d399;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Period Selector ===== */
.period-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.period-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background-color: var(--bg-card);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

.period-btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.custom-period {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto;
}

.custom-period input {
    padding: 0.5rem;
}

/* ===== Summary Statistics ===== */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.summary-stat-card h4 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.summary-stat-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ===== Charts Section ===== */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    margin: 0 0 1.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.chart-container {
    min-height: 300px;
    position: relative;
}

/* ===== Reports Section ===== */
.reports-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.report-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.report-card h3 {
    margin: 0 0 1.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-content {
    max-height: 400px;
    overflow-y: auto;
}

/* ===== Bar Chart ===== */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    min-width: 120px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.bar-container {
    flex: 1;
    height: 30px;
    background-color: #e9ecef;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.5rem;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
}

.bar-value {
    min-width: 60px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Peak Times ===== */
.peak-times-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.peak-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: var(--radius-sm);
    border-right: 4px solid var(--primary-color);
}

.peak-time-item .time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.peak-time-item .count {
    color: var(--text-secondary);
}

/* ===== Doctors Report ===== */
.doctors-report-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doctor-report-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    border-right: 4px solid var(--primary-color);
}

.doctor-report-item h4 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.doctor-report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.doctor-report-stat {
    text-align: center;
    padding: 0.5rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
}

.doctor-report-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.doctor-report-stat .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .reports-section {
        grid-template-columns: 1fr;
    }
    
    .period-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-period {
        flex-direction: column;
        align-items: stretch;
    }
}

