/* =======================================================
   EduLytics Pro - Public Styles (Frontend)
   ======================================================= */

/* الحاويات الأساسية */
.elp-container {
    max-width: 800px;
    margin: 0 auto;
    direction: rtl;
}
.elp-honor-container {
    max-width: 1000px;
    margin: 20px auto;
    direction: rtl;
    text-align: center;
}

/* البطاقات (Cards) */
.elp-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.elp-card-center {
    text-align: center;
}

/* الترويسة والفلاتر */
.elp-header-box {
    background: #f8f9fa;
    border-right: 5px solid #0073aa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.elp-header-box h2 { margin-top: 0; color: #0073aa; }
.elp-header-box p { margin: 5px 0; }

.elp-filter-box {
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    display: inline-block;
}
.elp-filter-box select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* الأزرار والحقول */
.elp-btn {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}
.elp-btn:hover { background: #555; color: #fff;}
.elp-btn-primary {
    background: #0073aa;
    padding: 15px 40px;
    font-size: 18px;
}
.elp-btn-primary:hover { background: #005177; }
.elp-input-code {
    width: 80%;
    max-width: 400px;
    padding: 15px;
    border: 2px solid #0073aa;
    border-radius: 5px;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

/* الجداول */
.elp-table-responsive { overflow-x: auto; }
.elp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}
.elp-table th {
    padding: 10px;
    background-color: #f1f1f1;
    border-bottom: 2px solid #ddd;
}
.elp-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* النصوص التنبيهية (Alerts) */
.elp-alert-error {
    background: #ffebe8;
    border-right: 4px solid #c00;
    padding: 15px;
    margin-bottom: 20px;
}
.elp-alert-warning {
    background: #fffae6;
    border-right: 4px solid #f0c36d;
    padding: 15px;
}
.elp-badge-month {
    background: #eaf1f6;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}
.elp-score-pass { font-weight: bold; color: #46b450; }
.elp-score-fail { font-weight: bold; color: #d63638; }

/* لوحة الشرف */
.elp-honor-title {
    color: #d63638;
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: 1px 1px 2px #ccc;
}
.elp-honor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.elp-honor-card {
    width: 250px;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}
.elp-honor-card:hover { transform: scale(1.05); }
.elp-honor-medal { font-size: 50px; margin-bottom: 10px; }
.elp-honor-name { margin: 0 0 10px 0; color: #333; font-size: 1.2em; }
.elp-honor-info { margin: 5px 0; font-size: 0.9em; color: #666; }
.elp-honor-score-box {
    margin-top: 15px;
    padding-top: 10px;
}
.elp-honor-score { font-size: 1.8em; }
.elp-honor-rank {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #333;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    line-height: 35px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* =======================================================
   تقرير تقدم الطالب (Student Progress Report)
   ======================================================= */
.elp-progress-report {
    max-width: 1000px;
    margin: 20px auto;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.elp-pr-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a4f 100%);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.elp-pr-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}
.elp-pr-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}
.elp-pr-name {
    margin: 0 0 5px;
    color: #fff;
    font-size: 1.6em;
    font-weight: 600;
}
.elp-pr-meta {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 0.9em;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.elp-pr-meta span {
    white-space: nowrap;
}

.elp-pr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 700px) {
    .elp-pr-grid { grid-template-columns: 1fr; }
}

.elp-pr-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}
.elp-pr-card-title {
    margin: 0 0 15px;
    font-size: 1.1em;
    color: #333;
}
.elp-pr-course-name {
    color: #666;
    font-size: 0.85em;
    margin: -10px 0 12px;
}

/* شريط التقدم */
.elp-pr-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.elp-pr-progress-bar {
    flex: 1;
    height: 14px;
    background: #e9ecef;
    border-radius: 7px;
    overflow: hidden;
}
.elp-pr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d6a4f, #40916c);
    border-radius: 7px;
    transition: width 0.8s ease;
}
.elp-pr-progress-label {
    font-size: 1.2em;
    font-weight: 700;
    color: #2d6a4f;
    min-width: 48px;
    text-align: left;
}
.elp-pr-progress-text {
    margin: 5px 0 0;
    color: #666;
    font-size: 0.85em;
}

/* الرسم البياني */
.elp-pr-chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}
.elp-pr-card-chart {
    display: flex;
    flex-direction: column;
}

/* الجدول */
.elp-pr-table-wrap {
    overflow-x: auto;
}
.elp-pr-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9em;
}
.elp-pr-table th {
    padding: 10px 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}
.elp-pr-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}
.elp-pr-table tbody tr:hover {
    background: #f0faf0;
}
.elp-pr-grade {
    direction: ltr;
    text-align: center;
    white-space: nowrap;
}
.elp-pr-pass {
    color: #2d6a4f;
    font-weight: 600;
}
.elp-pr-fail {
    color: #d62828;
    font-weight: 600;
}
.elp-pr-badge {
    display: inline-block;
    background: #e9ecef;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-right: 6px;
    color: #495057;
}
.elp-pr-pass .elp-pr-badge {
    background: #d4edda;
    color: #155724;
}
.elp-pr-fail .elp-pr-badge {
    background: #f8d7da;
    color: #721c24;
}