﻿
/* =========================================================
   إدارة مستخدمي النظام
   ========================================================= */

body.modal-open {
    overflow: hidden;
}

/* Application rejection | رفض الطلب */
.application-rejection-section {
    border-top: 1px solid #dfe3e6;
}

.application-reject-button,
.application-confirm-reject-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b42318;
    border-radius: 6px;
    background: #b42318;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.application-reject-button {
    width: 100%;
}

    .application-reject-button:hover,
    .application-confirm-reject-button:hover {
        background: #8f1c13;
    }

.application-rejected-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d92d20;
    border-radius: 6px;
    background: #fff1f0;
    color: #8f1c13;
}

#rejectApplicationModal .admin-modal-actions {
    justify-content: center;
}

    #rejectApplicationModal .admin-modal-actions button {
        width: auto;
        min-width: 150px;
        padding-inline: 24px;
        white-space: nowrap;
    }

#rejectApplicationModal .admin-modal-close,
#rejectApplicationModal .admin-modal-close:hover,
#rejectApplicationModal .admin-modal-close:focus-visible {
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 767px) {
    .application-rejected-notice {
        flex-direction: column;
    }

    .application-confirm-reject-button,
    .application-rejection-section .application-reject-button {
        width: 100%;
    }

    #rejectApplicationModal .admin-modal-actions {
        align-items: center;
    }

        #rejectApplicationModal .admin-modal-actions button {
            width: min(100%, 240px);
        }
}

/* الصفحة */

.admin-users-page {
    width: 100%;
    min-height: 650px;
    padding: 48px 24px 80px;
    background: #f5f6f7;
    color: #161616;
    font-family: "IBM Plex Sans Arabic", sans-serif;
    box-sizing: border-box;
}

.admin-users-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

/* رسائل النجاح والخطأ */

.admin-users-message {
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 22px;
    box-sizing: border-box;
}

    .admin-users-message.success {
        border: 1px solid #86cbad;
        background: #ecfdf3;
        color: #05603a;
    }

    .admin-users-message.error {
        border: 1px solid #fda29b;
        background: #fff1f0;
        color: #b42318;
    }

/* بطاقة إدارة المستخدمين */

.admin-users-card {
    width: 100%;
    padding: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
    box-sizing: border-box;
}

.admin-users-header {
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-users-title {
    margin: 0;
    color: #161616;
    font-size: 24px;
    font-weight: 600;
    line-height: 36px;
}

/* زر إضافة مستخدم */

.admin-add-user-btn {
    min-width: 170px;
    height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #1b8354;
    border-radius: 4px;
    background: #1b8354;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .admin-add-user-btn:hover {
        border-color: #166a45;
        background: #166a45;
    }

    .admin-add-user-btn:focus-visible {
        outline: 3px solid rgba(27, 131, 84, 0.22);
        outline-offset: 2px;
    }

    .admin-add-user-btn svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

/* الجدول */

.admin-users-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d2d6db;
    border-radius: 4px;
}

.admin-users-table {
    width: 100%;
    min-width: 700px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

    .admin-users-table th,
    .admin-users-table td {
        text-align: center;
        vertical-align: middle;
    }

    .admin-users-table thead {
        background: #f3f4f6;
    }

    .admin-users-table th {
        height: 48px;
        padding: 10px 18px;
        border-bottom: 1px solid #d2d6db;
        color: #161616;
        font-size: 14px;
        font-weight: 600;
        line-height: 22px;
    }

    .admin-users-table td {
        height: 56px;
        padding: 10px 18px;
        border-bottom: 1px solid #e5e7eb;
        color: #384250;
        font-size: 14px;
        font-weight: 400;
        line-height: 22px;
    }

    .admin-users-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .admin-users-table tbody tr:hover {
        background: #f9fafb;
    }

.admin-user-email {
    color: #161616;
    font-weight: 400;
    unicode-bidi: plaintext;
}

.admin-users-empty {
    height: 100px !important;
    color: #667085 !important;
    text-align: center !important;
}

/* أزرار الإجراءات */

.admin-user-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* حالة مستخدم النظام */

.admin-user-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}

    .admin-user-status.active {
        color: #067647;
        background-color: #ecfdf3;
        border: 1px solid #abefc6;
    }

    .admin-user-status.inactive {
        color: #b42318;
        background-color: #fff1f0;
        border: 1px solid #fecdca;
    }

/* نموذج وزر إعادة تفعيل المستخدم */

.admin-reactivate-form {
    margin: 0;
}

.admin-reactivate-btn {
    min-width: 92px;
    min-height: 40px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #1b8354;
    border-radius: 4px;
    color: #ffffff;
    background-color: #1b8354;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .admin-reactivate-btn:hover {
        border-color: #166a45;
        background-color: #166a45;
    }

    .admin-reactivate-btn:focus-visible {
        outline: 3px solid rgba(27, 131, 84, 0.25);
        outline-offset: 2px;
    }

    .admin-reactivate-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

.admin-edit-btn,
.admin-delete-btn {
    min-width: 92px;
    min-height: 40px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 4px;
    background: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-edit-btn {
    border: 1px solid #6c737f;
    color: #384250;
}

    .admin-edit-btn:hover {
        border-color: #1b8354;
        background: #f3fcf7;
        color: #1b8354;
    }

.admin-delete-btn {
    border: 1px solid #f04438;
    color: #b42318;
}

    .admin-delete-btn:hover {
        background: #fff1f0;
    }

    .admin-edit-btn svg,
    .admin-delete-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

/* =========================================================
   النوافذ المنبثقة
   ========================================================= */

.user-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    padding: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(1px);
    box-sizing: border-box;
}

    .user-modal.show {
        display: flex;
    }

.user-modal-content {
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 48px);
    margin: auto;
    overflow-y: auto;
    border: 1px solid #d2d6db;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 35px rgba(16, 24, 40, 0.14);
    box-sizing: border-box;
}

/* عنوان النافذة */

.user-modal-title {
    width: 100%;
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #d2d6db;
    color: #1b8354;
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    text-align: right;
    box-sizing: border-box;
}

/* النموذج */

.user-modal-form {
    width: 100%;
    margin: 0;
}

.user-modal-fields-grid {
    width: 100%;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    box-sizing: border-box;
}

    .user-modal-fields-grid.single-column {
        grid-template-columns: 1fr;
    }

.user-modal-field {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .user-modal-field.full-width {
        grid-column: 1 / -1;
    }

    .user-modal-field label {
        margin: 0;
        color: #161616;
        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
        text-align: right;
    }

    .user-modal-field input,
    .user-modal-field select {
        width: 100%;
        height: 44px;
        margin: 0;
        padding: 0 12px;
        border: 1px solid #9da4ae;
        border-radius: 4px;
        background: #ffffff;
        color: #384250;
        font-family: inherit;
        font-size: 14px;
        font-weight: 400;
        outline: none;
        box-sizing: border-box;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .user-modal-field input[dir="ltr"] {
            text-align: left;
        }

        .user-modal-field input::placeholder {
            color: #9da4ae;
        }

        .user-modal-field input:focus,
        .user-modal-field select:focus {
            border-color: #1b8354;
            box-shadow: 0 0 0 3px rgba(27, 131, 84, 0.12);
        }

/* القائمة المنسدلة */

.user-modal-select-wrapper {
    position: relative;
    width: 100%;
}

    .user-modal-select-wrapper select {
        padding-left: 40px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
    }

.user-modal-select-arrow {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    color: #384250;
    pointer-events: none;
    transform: translateY(-50%);
}

/* رسائل التحقق */

.user-modal .form-validation-summary {
    margin: 20px 24px 0;
    padding: 12px 14px;
    border: 1px solid #fda29b;
    border-radius: 4px;
    background: #fff1f0;
    color: #b42318;
    font-size: 13px;
}

    .user-modal .form-validation-summary:empty,
    .user-modal .validation-summary-valid {
        display: none;
    }

    .user-modal .form-validation-summary ul {
        margin: 0;
        padding-right: 18px;
    }

.user-modal .field-validation-error {
    min-height: 18px;
    color: #b42318;
    font-size: 12px;
    line-height: 18px;
}

.user-modal-field input.input-validation-error,
.user-modal-field select.input-validation-error,
.admin-assignment-field select.input-validation-error,
.admin-assignment-field textarea.input-validation-error,
.judge-evaluation-field input.input-validation-error,
.judge-evaluation-field textarea.input-validation-error {
    border-color: #b42318 !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12) !important;
}

/* أزرار النافذة */

.user-modal-actions {
    width: 100%;
    padding: 0 24px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
}

.user-modal-cancel-btn,
.user-modal-submit-btn,
.delete-user-confirm-btn {
    min-width: 150px;
    height: 40px;
    padding: 0 18px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.user-modal-cancel-btn {
    border: 1px solid #d2d6db;
    background: #ffffff;
    color: #384250;
}

    .user-modal-cancel-btn:hover {
        background: #f3f4f6;
    }

.user-modal-submit-btn {
    border: 1px solid #1b8354;
    background: #1b8354;
    color: #ffffff;
}

    .user-modal-submit-btn:hover {
        border-color: #166a45;
        background: #166a45;
    }

/* =========================================================
   نافذة الحذف
   ========================================================= */

.delete-user-modal-content {
    max-width: 520px;
}

.delete-user-modal-body {
    width: 100%;
    padding: 34px 24px 24px;
    text-align: center;
    box-sizing: border-box;
}

.delete-user-alert-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161616;
}

    .delete-user-alert-icon svg {
        width: 48px;
        height: 48px;
    }

.delete-user-modal-title {
    margin: 0 0 10px;
    color: #161616;
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
}

.delete-user-modal-text {
    margin: 0;
    color: #667085;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
}

.delete-user-email {
    margin: 8px 0 0;
    color: #384250;
    font-size: 13px;
    direction: ltr;
    text-align: center;
}

.delete-user-confirm-btn {
    border: 1px solid #d92d20;
    background: #d92d20;
    color: #ffffff;
}

    .delete-user-confirm-btn:hover {
        border-color: #b42318;
        background: #b42318;
    }

/* =========================================================
   التجاوب
   ========================================================= */
/* Coordinator assignment cancellation | إلغاء إسناد المحكم */
body.admin-modal-open {
    overflow: hidden;
}

.coordinator-cancel-assignment-button,
.coordinator-confirm-cancel-button {
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid #b42318;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.coordinator-cancel-assignment-button {
    color: #b42318;
    background-color: #ffffff;
}

    .coordinator-cancel-assignment-button:hover,
    .coordinator-cancel-assignment-button:focus-visible {
        color: #ffffff;
        background-color: #b42318;
    }

.coordinator-confirm-cancel-button {
    color: #ffffff;
    background-color: #b42318;
}

    .coordinator-confirm-cancel-button:hover,
    .coordinator-confirm-cancel-button:focus-visible {
        background-color: #912018;
        border-color: #912018;
    }

.assignment-action-unavailable {
    color: #6c737f;
    font-size: 14px;
}

.admin-modal[hidden] {
    display: none;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(22, 22, 22, 0.55);
    backdrop-filter: blur(2px);
}

.admin-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 32px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 24px 48px rgba(22, 22, 22, 0.18);
}

    .admin-modal-dialog h2 {
        margin: 0 0 12px;
        color: #161616;
        font-size: 24px;
        font-weight: 700;
    }

    .admin-modal-dialog > p {
        margin: 0 0 24px;
        color: #384250;
        font-size: 16px;
        line-height: 1.8;
    }

.admin-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #384250;
    background-color: #f3f4f6;
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

    .admin-modal-close:hover,
    .admin-modal-close:focus-visible {
        color: #ffffff;
        background-color: #1b8354;
    }

.admin-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.admin-modal-dialog .admin-assignment-field {
    margin-top: 20px;
}

.admin-modal-dialog textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 16px;
    border: 1px solid #9da4ae;
    border-radius: 4px;
    color: #161616;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.7;
    resize: vertical;
}

    .admin-modal-dialog textarea:focus {
        border-color: #1b8354;
        outline: 3px solid rgba(27, 131, 84, 0.14);
    }

/* Coordinator dashboard | لوحة المنسق الإداري */
.coordinator-dashboard-page .profile-user-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.coordinator-tracking-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coordinator-participants-filters {
    align-items: flex-end;
}

.coordinator-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1px;
}

    .coordinator-filter-actions .admin-assign-button,
    .coordinator-filter-actions .application-back-button {
        min-width: 110px;
        min-height: 44px;
        margin: 0;
        justify-content: center;
    }

.coordinator-dashboard-page
.application-details-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.coordinator-dashboard-page
.application-details-button:hover img {
    transform: translate(-2px, -2px);
}






/* =========================================================
   أقسام لوحة مدير النظام
   ========================================================= */

/* فصل إدارة المستخدمين عن قائمة المشاركين */
.dashboard-system-users-section,
#system-users {
    width: 100%;
    margin-top: 32px;
}

/* بطاقة بيانات مدير النظام */
.admin-profile-information-card {
    width: 100%;
    margin: 0;
}

/* =========================================================
   رحلة المشاركين
   ========================================================= */

.admin-dashboard-page .participant-journey-section {
    width: 100%;
    margin-top: 32px;
}

    .admin-dashboard-page .participant-journey-section .admin-section-title {
        margin: 0 0 16px;
        color: #161616;
        font-size: 24px;
        font-weight: 600;
        line-height: 1.5;
        text-align: right;
    }

.admin-dashboard-page .participant-journey-box {
    width: 100%;
    padding: 32px 28px 24px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient( 90deg, #1b8354 0%, #0f5b43 55%, #0b4937 100% );
}

.admin-dashboard-page .journey-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    align-items: start;
    min-width: 720px;
}

    /* الخط الواصل بين مراحل الرحلة */
    .admin-dashboard-page .journey-steps::before {
        position: absolute;
        z-index: 0;
        top: 9px;
        right: calc(100% / 12);
        left: calc(100% / 12);
        height: 2px;
        content: "";
        background-color: rgba(255, 255, 255, 0.65);
    }

.admin-dashboard-page .journey-step {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.admin-dashboard-page .journey-dot {
    display: block;
    width: 20px;
    height: 20px;
    margin-bottom: 12px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background-color: #d8bfd8;
    box-shadow: 0 0 0 1px rgba(22, 22, 22, 0.25);
}

.admin-dashboard-page .journey-label {
    min-height: 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

.admin-dashboard-page .journey-count {
    display: inline-flex;
    min-width: 28px;
    min-height: 24px;
    margin-top: 6px;
    padding: 2px 9px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

/* لوحة المدير لا تعرض نقطة المرحلة النشطة باللون الأصفر */
.admin-dashboard-page .journey-dot.active {
    border-color: #ffffff;
    background-color: #d8bfd8;
    box-shadow: 0 0 0 1px rgba(22, 22, 22, 0.25);
}

/* =========================================================
   لوحة تتبع المشاركات
   ========================================================= */

.admin-dashboard-page .admin-tracking-section {
    width: 100%;
    margin-top: 32px;
    padding: 32px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background-color: #ffffff;
}

.admin-dashboard-page .tracking-cards-grid {
    display: grid;
    width: 100%;
    margin-top: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.admin-dashboard-page .tracking-card {
    display: flex;
    min-height: 168px;
    padding: 24px 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    text-align: center;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

    .admin-dashboard-page .tracking-card:hover {
        border-color: #b8c3bd;
        box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
        transform: translateY(-2px);
    }

/* حاوية الأيقونة دون دائرة خلفية */
.admin-dashboard-page .tracking-card-icon {
    display: flex;
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

    .admin-dashboard-page .tracking-card-icon img {
        display: block;
        width: 42px;
        height: 42px;
        max-width: 42px;
        max-height: 42px;
        object-fit: contain;
    }

.admin-dashboard-page .tracking-card-title {
    margin: 0;
    color: #1b8354;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.admin-dashboard-page .tracking-card-number {
    display: block;
    margin-top: 4px;
    color: #1b8354;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

/* =========================================================
   الرسم البياني لمسارات الجائزة
   ========================================================= */

.admin-dashboard-page .participants-chart {
    width: 100%;
    margin-top: 28px;
    padding: 24px 24px 20px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
}

.admin-dashboard-page .participants-chart-title {
    margin: 0 0 24px;
    color: #161616;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.admin-dashboard-page .chart-plot {
    position: relative;
    width: 100%;
    min-width: 700px;
    height: 310px;
    padding-top: 8px;
}

.admin-dashboard-page .chart-grid-lines {
    position: absolute;
    z-index: 0;
    top: 32px;
    right: 0;
    bottom: 58px;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

    .admin-dashboard-page .chart-grid-lines span {
        display: block;
        width: 100%;
        height: 1px;
        background-color: #edf0ef;
    }

        /* إخفاء خط الشبكة الأخير حتى لا يمر خلف أسماء المسارات */
        .admin-dashboard-page .chart-grid-lines span:last-child {
            display: none;
        }

.admin-dashboard-page .chart-area {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    grid-template-columns: repeat(6, minmax(95px, 1fr));
    align-items: end;
    gap: 20px;
    direction: rtl;
}

.admin-dashboard-page .chart-item {
    display: grid;
    height: 100%;
    grid-template-rows: 28px 1fr 58px;
    align-items: end;
    justify-items: center;
}

.admin-dashboard-page .chart-value {
    align-self: center;
    color: #384250;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.admin-dashboard-page .chart-column {
    display: flex;
    width: 100%;
    height: 210px;
    align-items: flex-end;
    justify-content: center;
}

.admin-dashboard-page .chart-bar {
    width: 48px;
    min-height: 0;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #55c98a 0%, #3eb978 100%);
    transition: height 300ms ease, opacity 180ms ease;
}

    .admin-dashboard-page .chart-bar:hover {
        opacity: 0.82;
    }

.admin-dashboard-page .chart-bar-zero {
    height: 2px !important;
    min-height: 2px;
    border-radius: 2px;
    background-color: #3eb978;
}

.admin-dashboard-page .chart-label {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 52px;
    padding-top: 12px;
    align-items: flex-start;
    justify-content: center;
    border: 0;
    background-color: #ffffff;
    color: #384250;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

/* =========================================================
   قائمة المشاركين والفلاتر
   ========================================================= */

.admin-participants-section {
    width: 100%;
    margin-top: 32px;
    padding: 28px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
    box-sizing: border-box;
}

.admin-section-heading {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #e5e7eb;
}

    .admin-section-heading h2 {
        margin: 0 0 6px;
        color: #1f2a37;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.5;
    }

    .admin-section-heading p {
        margin: 0;
        color: #6c737f;
        font-size: 14px;
        line-height: 1.7;
    }

/* حقول البحث والتصفية */
.participants-filters {
    display: grid;
    margin-bottom: 24px;
    padding: 18px;
    grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(180px, 1fr));
    gap: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
}

.participants-search-field,
.participants-filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .participants-search-field label,
    .participants-filter-field label {
        color: #384250;
        font-size: 14px;
        font-weight: 600;
    }

.participants-search-input {
    position: relative;
    display: flex;
    align-items: center;
}

    .participants-search-input svg {
        position: absolute;
        right: 14px;
        width: 20px;
        height: 20px;
        max-width: 20px;
        max-height: 20px;
        color: #6c737f;
        pointer-events: none;
    }

    .participants-search-input input,
    .participants-filter-field select {
        width: 100%;
        height: 46px;
        border: 1px solid #9da4ae;
        border-radius: 6px;
        outline: none;
        background-color: #ffffff;
        color: #161616;
        font-family: inherit;
        font-size: 14px;
        box-sizing: border-box;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .participants-search-input input {
        padding: 0 44px 0 14px;
    }

.participants-filter-field select {
    padding: 0 14px;
    cursor: pointer;
}

.participants-search-input input::placeholder {
    color: #9da4ae;
}

.participants-search-input input:hover,
.participants-filter-field select:hover {
    border-color: #6c737f;
}

.participants-search-input input:focus,
.participants-filter-field select:focus {
    border-color: #067647;
    box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.12);
}

/* جدول المشاركين */
.admin-participants-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d2d6db;
    border-radius: 8px;
}

.admin-participants-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    background-color: #ffffff;
}

    .admin-participants-table thead {
        background-color: #f3f4f6;
    }

    .admin-participants-table th {
        height: 48px;
        padding: 12px 20px;
        border-bottom: 1px solid #d2d6db;
        color: #384250;
        font-size: 14px;
        font-weight: 700;
        text-align: right;
        white-space: nowrap;
    }

    .admin-participants-table td {
        height: 64px;
        padding: 12px 20px;
        border-bottom: 1px solid #e5e7eb;
        color: #4d5761;
        font-size: 14px;
        vertical-align: middle;
    }

    .admin-participants-table tbody tr {
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

        .admin-participants-table tbody tr:last-child td {
            border-bottom: 0;
        }

    /* إبراز صف المشاركة عند مرور المؤشر */
    .admin-participants-table tbody .participant-row:hover {
        background-color: #dff7e8;
        box-shadow: inset -4px 0 0 #067647;
    }

    /* موازاة رقم الطلب أسفل عنوان العمود */
    .admin-participants-table th:first-child,
    .admin-participants-table td:first-child {
        width: 110px;
        text-align: center;
    }

.participant-application-id {
    color: #384250;
    font-weight: 500;
    text-align: center;
    direction: ltr;
}

.participant-name-text {
    color: #1f2a37;
    font-size: 14px;
    font-weight: 600;
}

/* شارة حالة الطلب */
.participant-status-badge {
    display: inline-flex;
    min-width: 104px;
    min-height: 28px;
    padding: 4px 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid #abefc6;
    border-radius: 999px;
    background-color: #ecfdf3;
    color: #067647;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.participant-row[data-status*="مكتمل"] .participant-status-badge {
    border-color: #b2ddff;
    background-color: #eff8ff;
    color: #175cd3;
}

.participant-row[data-status="طلب مرفوض"] .participant-status-badge {
    border-color: #f3b5b0;
    background: #fff1f0;
    color: #b42318;
}

.participant-row[data-status*="تحكيم"] .participant-status-badge {
    border-color: #d9d6fe;
    background-color: #f4f3ff;
    color: #6941c6;
}

.participant-row[data-status*="الأمانة"] .participant-status-badge {
    border-color: #fedf89;
    background-color: #fffaeb;
    color: #b54708;
}

.participant-row[data-status*="نتائج"] .participant-status-badge {
    border-color: #c7d7fe;
    background-color: #f0f1ff;
    color: #363f72;
}



.admin-participants-empty,
.participants-no-results td {
    padding: 40px 20px;
    color: #6c737f;
    text-align: center;
}

/* =========================================================
   الاستجابة للشاشات المتوسطة والصغيرة
   ========================================================= */







/* =========================================================
   عنوان صفحة تفاصيل الطلب ورقم الطلب
   ========================================================= */

.admin-details-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

    .admin-details-heading h1 {
        margin: 0;
        color: #161616;
        font-size: 40px;
        font-weight: 700;
        line-height: 1.4;
    }

.admin-details-request-number {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #384250;
    font-size: 18px;
    font-weight: 400;
}

    .admin-details-request-number span {
        color: #161616;
        font-weight: 600;
        direction: ltr;
    }


/* =========================================================
   زر الرجوع أسفل صفحة تفاصيل الطلب
   ========================================================= */

.admin-details-footer {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 32px;
}

.admin-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #067647;
    border-radius: 4px;
    background-color: #ffffff;
    color: #067647;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

    .admin-back-button:hover {
        border-color: #05603a;
        background-color: #067647;
        color: #ffffff;
        text-decoration: none;
    }

    .admin-back-button:focus-visible {
        outline: 3px solid rgba(6, 118, 71, 0.25);
        outline-offset: 3px;
    }

    .admin-back-button svg {
        flex: 0 0 auto;
    }


/* الجوال */




/* زر الرجوع أسفل صفحة تفاصيل الطلب */

.admin-details-bottom-actions {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 24px;
    margin-bottom: 32px;
}

.admin-details-back-button-v2 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #067647;
    border-radius: 4px;
    background-color: #ffffff;
    color: #067647 !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none !important;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

    .admin-details-back-button-v2:hover {
        border-color: #05603a;
        background-color: #067647;
        color: #ffffff !important;
        text-decoration: none !important;
    }

    .admin-details-back-button-v2 svg {
        flex: 0 0 auto;
    }

    .admin-details-back-button-v2:focus-visible {
        outline: 3px solid rgba(6, 118, 71, 0.25);
        outline-offset: 3px;
    }





/* =========================================================
   لوحة المحكم
   ========================================================= */

/* البطاقات الثلاث مطابقة لبطاقات لوحة مدير النظام */
.judge-dashboard-page .judge-tracking-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* توزيع أعمدة جدول طلبات المحكم */
.judge-applications-table th:nth-child(1),
.judge-applications-table td:nth-child(1) {
    width: 20%;
    text-align: center;
}

.judge-applications-table th:nth-child(2),
.judge-applications-table td:nth-child(2) {
    width: 40%;
}

.judge-applications-table th:nth-child(3),
.judge-applications-table td:nth-child(3) {
    width: 40%;
}

/* أزرار الإجراءات داخل الجدول */
.judge-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

    .judge-row-actions .application-details-button {
        min-height: 40px;
        padding: 8px 14px;
    }

/* زر فتح نافذة التقييم */
.judge-evaluation-open-button {
    display: inline-flex;
    min-width: 96px;
    min-height: 40px;
    padding: 8px 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid #1b8354;
    border-radius: 4px;
    background-color: #1b8354;
    color: #ffffff;
    font-family: "IBM Plex Sans Arabic", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

    .judge-evaluation-open-button:hover {
        border-color: #166a45;
        background-color: #166a45;
        box-shadow: 0 3px 8px rgba(27, 131, 84, 0.18);
    }

    .judge-evaluation-open-button:focus-visible {
        outline: 3px solid rgba(27, 131, 84, 0.22);
        outline-offset: 2px;
    }

/* حالة الطلب بعد اعتماد التقييم */
.judge-evaluated-button {
    display: inline-flex;
    min-width: 116px;
    min-height: 40px;
    padding: 8px 14px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #abefc6;
    border-radius: 4px;
    background-color: #ecfdf3;
    color: #087443;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

    .judge-evaluated-button svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

/* =========================================================
   نافذة تقييم المشاركة
   ========================================================= */

body.judge-modal-open {
    overflow: hidden;
}

.judge-evaluation-modal[hidden] {
    display: none !important;
}

.judge-evaluation-modal {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: flex;
    padding: 24px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background-color: rgba(16, 24, 40, 0.58);
    backdrop-filter: blur(2px);
}

.judge-evaluation-modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    padding: 28px;
    overflow-y: auto;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 24px 48px rgba(16, 24, 40, 0.2);
    animation: judgeModalEnter 180ms ease-out;
}

@keyframes judgeModalEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.judge-evaluation-modal-header {
    display: flex;
    margin-bottom: 24px;
    padding-bottom: 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e5e7eb;
}

    .judge-evaluation-modal-header h2 {
        margin: 0;
        color: #161616;
        font-size: 24px;
        font-weight: 600;
        line-height: 1.5;
    }

    .judge-evaluation-modal-header p {
        margin: 6px 0 0;
        color: #384250;
        font-size: 14px;
        line-height: 1.5;
    }

        .judge-evaluation-modal-header p strong {
            color: #1b8354;
            font-weight: 700;
        }

.judge-evaluation-close-button {
    display: inline-flex;
    width: 40px;
    height: 40px;
    padding: 0;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d2d6db;
    border-radius: 4px;
    background-color: #ffffff;
    color: #161616;
    font-family: Arial, sans-serif;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

    .judge-evaluation-close-button:hover {
        border-color: #fecdca;
        background-color: #fef3f2;
        color: #b42318;
    }

/* حقول نموذج التقييم */
.judge-evaluation-field {
    display: flex;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 8px;
}

    .judge-evaluation-field label {
        color: #161616;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.5;
    }

        .judge-evaluation-field label span {
            color: #b42318;
        }

    .judge-evaluation-field input,
    .judge-evaluation-field textarea {
        width: 100%;
        padding: 11px 14px;
        border: 1px solid #9da4ae;
        border-radius: 4px;
        background-color: #ffffff;
        color: #161616;
        font-family: "IBM Plex Sans Arabic", sans-serif;
        font-size: 15px;
        line-height: 1.5;
        box-sizing: border-box;
        transition: border-color 180ms ease, box-shadow 180ms ease;
    }

    .judge-evaluation-field input {
        min-height: 48px;
    }

    .judge-evaluation-field textarea {
        min-height: 130px;
        resize: vertical;
    }

        .judge-evaluation-field input:focus,
        .judge-evaluation-field textarea:focus {
            border-color: #1b8354;
            outline: none;
            box-shadow: 0 0 0 3px rgba(27, 131, 84, 0.14);
        }

    .judge-evaluation-field .field-validation-error {
        min-height: 20px;
        color: #b42318;
        font-size: 13px;
        line-height: 1.5;
    }

.judge-evaluation-attachments-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.judge-evaluation-file-picker {
    position: relative;
}

.judge-evaluation-file-button {
    display: inline-flex;
    min-height: 42px;
    padding: 8px 18px;
    border: 1px solid #abefc6;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    background-color: #ecfdf3;
    color: #087443;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.judge-evaluation-attachments-input:focus-visible +
.judge-evaluation-file-button {
    outline: 3px solid rgba(27, 131, 84, 0.2);
    outline-offset: 2px;
}

.judge-evaluation-attachments-help {
    color: #52606d;
    font-size: 12px;
    line-height: 1.6;
}

.judge-evaluation-selected-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.judge-evaluation-attachments-input.input-validation-error +
.judge-evaluation-file-button {
    border-color: #d92d20;
    background-color: #fffafa;
    color: #b42318;
}

.workflow-return-details-message {
    padding: 16px 18px;
    border: 1px solid #fedf89;
    border-radius: 6px;
    background-color: #fffaeb;
    color: #7a2e0e;
}

    .workflow-return-details-message p {
        margin: 0;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

        .workflow-return-details-message p + p {
            margin-top: 6px;
        }

.evaluation-attachment-links {
    display: flex;
    min-width: 190px;
    flex-direction: column;
    gap: 8px;
}

.evaluation-attachment-link-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.evaluation-attachment-file-name {
    min-width: 0;
    color: #384250;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.evaluation-attachment-link-row > .attachment-action-button {
    min-width: 92px;
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
}

.workflow-evaluation-average {
    margin-top: 24px;
    padding: 14px 16px;
}

/* أزرار أسفل النافذة */
.judge-evaluation-actions {
    display: flex;
    margin-top: 28px;
    padding-top: 20px;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
}

.judge-evaluation-cancel-button,
.judge-evaluation-submit-button {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 22px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-family: "IBM Plex Sans Arabic", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.judge-evaluation-cancel-button {
    border: 1px solid #9da4ae;
    background-color: #ffffff;
    color: #161616;
}

    .judge-evaluation-cancel-button:hover {
        border-color: #6c737f;
        background-color: #f3f4f6;
    }

.judge-evaluation-submit-button {
    border: 1px solid #1b8354;
    background-color: #1b8354;
    color: #ffffff;
}

    .judge-evaluation-submit-button:hover {
        border-color: #166a45;
        background-color: #166a45;
    }

/* =========================================================
   لوحة المحكم على الشاشات الصغيرة
   ========================================================= */




/* =========================================================
   Workflow dashboards
   الأمانة العامة - اللجنة العلمية - مجلس الأمناء
   ========================================================= */

.workflow-dashboard-page {
    min-height: 100vh;
    padding: 48px 24px 80px;
    background: #f7f8fa;
    color: #161616;
    font-family: "IBM Plex Sans Arabic", sans-serif;
}

.workflow-dashboard-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* رسائل النظام */

.admin-error-message {
    margin-bottom: 24px;
    padding: 14px 18px;
    border: 1px solid #fecdca;
    border-radius: 8px;
    background: #fef3f2;
    color: #b42318;
    font-size: 15px;
    font-weight: 500;
}

/* بطاقة الترحيب */

.workflow-welcome-card {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 40px;
    padding: 32px 36px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background: #ffffff;
}

.workflow-welcome-icon {
    display: flex;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: #1b8354;
}

    .workflow-welcome-icon svg {
        width: 58px;
        height: 58px;
        fill: currentColor;
    }

.workflow-welcome-content {
    flex: 1;
}

    .workflow-welcome-content h1 {
        margin: 0 0 8px;
        color: #161616;
        font-size: 24px;
        font-weight: 600;
        line-height: 1.5;
    }

    .workflow-welcome-content > p {
        margin: 0 0 16px;
        color: #384250;
        font-size: 16px;
        line-height: 1.7;
    }

.workflow-user-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 30px;
    margin: 0;
}

    .workflow-user-details div {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .workflow-user-details dt,
    .workflow-user-details dd {
        margin: 0;
        font-size: 14px;
        line-height: 1.7;
    }

    .workflow-user-details dt {
        color: #384250;
        font-weight: 500;
    }

    .workflow-user-details dd {
        color: #161616;
        font-weight: 400;
    }

/* الأقسام العامة */

.workflow-section {
    margin-bottom: 40px;
}

.workflow-section-title {
    margin: 0 0 18px;
    color: #161616;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

/* رحلة المشاركين */

.workflow-journey-card {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 12px;
    overflow: hidden;
    padding: 26px 26px 24px;
    border-radius: 12px;
    background: linear-gradient( 110deg, #0b4f35 0%, #126b48 55%, #1b8354 100% );
    color: #ffffff;
}

.workflow-journey-line {
    position: absolute;
    top: 39px;
    right: 8%;
    left: 8%;
    height: 2px;
    background: rgba(255, 255, 255, 0.55);
}

.workflow-journey-item {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.workflow-journey-point {
    width: 18px;
    height: 18px;
    margin: 4px 0 14px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #aab7b1;
    box-shadow: 0 0 0 2px rgba(11, 79, 53, 0.85);
}

.workflow-journey-item strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}


/* لوحة الإحصائيات */

.workflow-statistics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.workflow-statistics-card {
    display: flex;
    min-height: 138px;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .workflow-statistics-card:hover {
        border-color: #84c6a7;
        box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
        transform: translateY(-2px);
    }

.workflow-statistics-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.workflow-statistics-card > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workflow-statistics-card span {
    color: #384250;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.workflow-statistics-card strong {
    color: #161616;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
}

/* الرسم البياني */

.workflow-chart-card {
    min-height: 360px;
    padding: 32px 32px 24px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background: #ffffff;
}

.workflow-chart {
    display: flex;
    height: 235px;
    align-items: stretch;
    justify-content: space-around;
    gap: 24px;
}

.workflow-chart-column {
    display: flex;
    min-width: 90px;
    flex: 1;
    flex-direction: column;
    align-items: center;
}

.workflow-chart-value {
    height: 28px;
    color: #161616;
    font-size: 14px;
    font-weight: 600;
}

.workflow-chart-bar-area {
    display: flex;
    width: 100%;
    max-width: 58px;
    flex: 1;
    align-items: flex-end;
    justify-content: center;
}

.workflow-chart-bar {
    width: 100%;
    min-height: 8px;
    border-radius: 7px 7px 0 0;
    background: linear-gradient( 180deg, #31a36f 0%, #1b8354 100% );
    transition: height 0.3s ease, background-color 0.2s ease;
}

.workflow-chart-column:hover .workflow-chart-bar {
    background: #0b4f35;
}

.workflow-chart-label {
    display: flex;
    min-height: 52px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    color: #384250;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

/* قائمة المشاركين */

.workflow-participants-section {
    margin-top: 48px;
    padding: 30px;
    border: 1px solid #d2d6db;
    border-radius: 12px;
    background: #ffffff;
}

.workflow-participants-heading {
    margin-bottom: 22px;
}

    .workflow-participants-heading h2 {
        margin: 0;
        color: #161616;
        font-size: 24px;
        font-weight: 600;
        line-height: 1.5;
    }

.workflow-filters-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(190px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.workflow-search-field {
    position: relative;
}

    .workflow-search-field svg {
        position: absolute;
        top: 50%;
        right: 14px;
        width: 20px;
        height: 20px;
        fill: #6c737f;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .workflow-search-field input,
    .workflow-filters-form select {
        width: 100%;
        height: 44px;
        border: 1px solid #9da4ae;
        border-radius: 6px;
        background: #ffffff;
        color: #161616;
        font-family: inherit;
        font-size: 14px;
        outline: none;
    }

    .workflow-search-field input {
        padding: 0 44px 0 14px;
    }

.workflow-filters-form select {
    padding: 0 12px;
}

    .workflow-search-field input:focus,
    .workflow-filters-form select:focus {
        border-color: #1b8354;
        box-shadow: 0 0 0 3px rgba(27, 131, 84, 0.12);
    }

.workflow-filter-button,
.workflow-reset-button {
    display: inline-flex;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.workflow-filter-button {
    border: 1px solid #1b8354;
    background: #1b8354;
    color: #ffffff;
    cursor: pointer;
}

    .workflow-filter-button:hover {
        border-color: #166a45;
        background: #166a45;
    }

.workflow-reset-button {
    border: 1px solid #9da4ae;
    background: #ffffff;
    color: #384250;
}

    .workflow-reset-button:hover {
        border-color: #1b8354;
        color: #1b8354;
    }

/* الجدول */

.workflow-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.workflow-participants-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

    .workflow-participants-table th,
    .workflow-participants-table td {
        padding: 16px;
        border-bottom: 1px solid #e5e7eb;
        color: #161616;
        font-size: 14px;
        line-height: 1.6;
        text-align: right;
        vertical-align: middle;
    }

    .workflow-participants-table th {
        background: #f3f4f6;
        color: #384250;
        font-weight: 600;
    }

    .workflow-participants-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .workflow-participants-table tbody tr:hover {
            background: #edf8f2;
        }

        .workflow-participants-table tbody tr:last-child td {
            border-bottom: 0;
        }

.workflow-application-number {
    color: #161616;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.workflow-score {
    color: #161616;
    font-weight: 600;
}

.workflow-no-score {
    color: #6c737f;
}

.workflow-approved-status,
.workflow-pending-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.workflow-approved-status {
    background: #ecfdf3;
    color: #067647;
}

    .workflow-approved-status svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

.workflow-pending-status {
    background: #fffaeb;
    color: #b54708;
}

.workflow-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .workflow-table-actions .application-details-button {
        display: inline-flex;
        height: 38px;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 13px;
        border: 1px solid #1b8354;
        border-radius: 6px;
        background: #ffffff;
        color: #1b8354;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .workflow-table-actions .application-details-button svg {
            width: 18px;
            height: 18px;
        }

        .workflow-table-actions .application-details-button:hover {
            background: #1b8354;
            color: #ffffff;
        }

.workflow-approve-form {
    margin: 0;
}

.workflow-approve-button {
    display: inline-flex;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #1b8354;
    border-radius: 6px;
    background: #1b8354;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .workflow-approve-button:hover {
        border-color: #0b4f35;
        background: #0b4f35;
    }

/* أزرار أسفل القائمة */

.workflow-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.workflow-approve-all-form {
    margin: 0;
}

.workflow-approve-all-button,
.workflow-export-button {
    display: inline-flex;
    min-width: 145px;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.workflow-approve-all-button {
    border: 1px solid #1b8354;
    background: #1b8354;
    color: #ffffff;
    cursor: pointer;
}

    .workflow-approve-all-button:hover:not(:disabled) {
        border-color: #0b4f35;
        background: #0b4f35;
    }

    .workflow-approve-all-button:disabled {
        border-color: #d2d6db;
        background: #d2d6db;
        color: #6c737f;
        cursor: not-allowed;
    }

.workflow-export-button {
    border: 1px solid #1b8354;
    background: #ffffff;
    color: #1b8354;
}

    .workflow-export-button svg {
        width: 19px;
        height: 19px;
        fill: currentColor;
    }

    .workflow-export-button:hover {
        background: #edf8f2;
        color: #0b4f35;
    }

.workflow-empty-state {
    padding: 34px 20px !important;
    color: #6c737f !important;
    text-align: center !important;
}

/* الشاشات المتوسطة */



/* الجوال */



/* =========================================================
   جدول لوحات الأمانة واللجان
   */

.workflow-applications-table {
    min-width: 1080px;
}
    /* توزيع أعمدة جدول الأمانة واللجان بعد حذف حالة الاعتماد */

    /* رقم الطلب */
    .workflow-applications-table th:nth-child(1),
    .workflow-applications-table td:nth-child(1) {
        width: 10%;
        text-align: center;
    }

    /* اسم المشارك */
    .workflow-applications-table th:nth-child(2),
    .workflow-applications-table td:nth-child(2) {
        width: 20%;
    }

    /* فرع الجائزة */
    .workflow-applications-table th:nth-child(3),
    .workflow-applications-table td:nth-child(3) {
        width: 22%;
    }

    /* التقييم */
    .workflow-applications-table th:nth-child(4),
    .workflow-applications-table td:nth-child(4) {
        width: 16%;
        text-align: center;
    }

    /* الإجراءات */
    .workflow-applications-table th:nth-child(5),
    .workflow-applications-table td:nth-child(5) {
        width: 32%;
    }

/* درجة تقييم المحكم */
.workflow-score-value {
    display: inline-block;
    color: #1f2a37;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    direction: ltr;
    unicode-bidi: isolate;
}

/* إبقاء أزرار الإجراءات بجانب بعضها */
.workflow-row-actions {
    flex-wrap: nowrap;
    gap: 12px;
}

    .workflow-row-actions form {
        flex: 0 0 auto;
        margin: 0;
    }

    .workflow-row-actions .application-details-button,
    .workflow-row-actions .judge-evaluation-open-button,
    .workflow-row-actions .workflow-return-button,
    .workflow-row-actions .judge-evaluated-button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

.workflow-return-button,
.workflow-return-submit-button {
    display: inline-flex;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid #b54708;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #b54708;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.workflow-return-submit-button {
    background: #b54708;
    color: #ffffff;
}

.workflow-return-button:hover,
.workflow-return-button:focus-visible {
    background: #fff4ed;
}

.workflow-return-submit-button:hover,
.workflow-return-submit-button:focus-visible {
    background: #93370d;
}

/* منع النموذج من إضافة مسافات داخل خلية الإجراءات */
.workflow-applications-table .judge-row-actions form {
    margin: 0;
}

/* حالة انتظار الاعتماد */
.workflow-application-row[data-status="بانتظار الاعتماد"]
.participant-status-badge {
    border-color: #fedf89;
    background-color: #fffaeb;
    color: #b54708;
}

/* حالة تم الاعتماد */
.workflow-application-row[data-status="تم الاعتماد"]
.participant-status-badge {
    border-color: #abefc6;
    background-color: #ecfdf3;
    color: #067647;
}

/* أزرار أسفل قائمة المشاركين */
.workflow-bottom-actions {
    display: flex;
    margin-top: 24px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

    .workflow-bottom-actions .application-details-button,
    .workflow-bottom-actions .judge-evaluation-open-button {
        min-width: 148px;
        min-height: 44px;
    }

/* موازاة الرقم والتقييم */
.workflow-applications-table .participant-application-id,
.workflow-applications-table td:nth-child(4) {
    font-variant-numeric: tabular-nums;
}

/* الشاشات الصغيرة */



/* نافذة اعتماد جميع المشاركات */

.workflow-approve-all-modal-card {
    max-width: 520px;
}

.workflow-approve-all-message {
    display: flex;
    padding: 24px 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    text-align: center;
}

.workflow-approve-all-icon {
    display: flex;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: center;
    color: #b54708;
}

    .workflow-approve-all-icon svg {
        width: 46px;
        height: 46px;
    }

.workflow-approve-all-message p {
    margin: 0;
    color: #384250;
    font-size: 15px;
    font-weight: 500;
}

.workflow-approve-all-message strong {
    margin: 8px 0;
    color: #1b8354;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.workflow-approve-all-message span {
    color: #6c737f;
    font-size: 13px;
}

/* تفاصيل تقييمات المحكمين في لوحات الاعتماد */

.workflow-evaluations-list {
    display: grid;
    margin-top: 20px;
    gap: 16px;
}

.workflow-evaluation-card {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
}

.workflow-evaluation-card-header {
    display: flex;
    margin-bottom: 18px;
    padding-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e5e7eb;
}

    .workflow-evaluation-card-header strong {
        color: #1f2a37;
        font-size: 16px;
        font-weight: 600;
    }

    .workflow-evaluation-card-header span {
        color: #1b8354;
        font-size: 18px;
        font-weight: 700;
    }

/* الصلاحية الثابتة في نافذة التعديل */

#editRoleDisplay[readonly] {
    color: #384250;
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.user-role-fixed-note {
    display: block;
    margin-top: 6px;
    color: #6c737f;
    font-size: 12px;
    line-height: 20px;
}

/* Coordinator mobile layout | واجهة المنسق على الجوال */


/* Coordinator tablet layout | واجهة المنسق على الأجهزة اللوحية */


/* Coordinator mobile layout | واجهة المنسق على الجوال */


/* Download icon | أيقونة التحميل */
.button-download-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("../images/download.svg");
    mask-image: url("../images/download.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.attachment-action-button .button-download-icon {
    width: 18px;
    min-width: 18px;
    height: 18px;
}

/* Preview icon | أيقونة المعاينة */
.button-preview-icon {
    width: 18px;
    min-width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("../images/preview.svg");
    mask-image: url("../images/preview.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}
/* Back button icon | أيقونة زر الرجوع */
.back-button-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("../images/arrow-left-01.svg");
    mask-image: url("../images/arrow-left-01.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    transform: scaleX(-1);
}

/* Add icon | أيقونة الإضافة */
.button-add-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("../images/add.svg");
    mask-image: url("../images/add.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* Shared dashboard icons | أيقونات لوحة التحكم المشتركة */
.icon-search,
.icon-check,
.icon-edit,
.icon-user-disable,
.icon-chevron-down,
.icon-warning-triangle,
.icon-alert-circle {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* Search icon | أيقونة البحث */
.icon-search {
    width: 20px;
    height: 20px;
    -webkit-mask-image: url("../images/search.svg");
    mask-image: url("../images/search.svg");
}

/* Check icon | أيقونة التحقق */
.icon-check {
    width: 18px;
    height: 18px;
    -webkit-mask-image: url("../images/check.svg");
    mask-image: url("../images/check.svg");
}

/* Edit icon | أيقونة التعديل */
.icon-edit {
    width: 18px;
    height: 18px;
    -webkit-mask-image: url("../images/edit.svg");
    mask-image: url("../images/edit.svg");
}

/* Disable user icon | أيقونة تعطيل المستخدم */
.icon-user-disable {
    width: 18px;
    height: 18px;
    -webkit-mask-image: url("../images/user-disable.svg");
    mask-image: url("../images/user-disable.svg");
}

/* Select arrow icon | أيقونة قائمة الاختيار */
.icon-chevron-down {
    width: 16px;
    height: 16px;
    -webkit-mask-image: url("../images/chevron-down.svg");
    mask-image: url("../images/chevron-down.svg");
}

/* Warning icon | أيقونة التحذير */
.icon-warning-triangle {
    width: 48px;
    height: 48px;
    -webkit-mask-image: url("../images/warning-triangle.svg");
    mask-image: url("../images/warning-triangle.svg");
}

/* Alert icon | أيقونة التنبيه */
.icon-alert-circle {
    width: 46px;
    height: 46px;
    -webkit-mask-image: url("../images/alert-circle.svg");
    mask-image: url("../images/alert-circle.svg");
}

/* Search field position | موضع أيقونة البحث */
.participants-search-input .icon-search {
    position: absolute;
    right: 14px;
    color: #6c737f;
    pointer-events: none;
}

/* Select arrow position | موضع سهم الاختيار */
.user-modal-select-wrapper .icon-chevron-down {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #384250;
    pointer-events: none;
    transform: translateY(-50%);
}

/* Reactivate icon size | حجم أيقونة التفعيل */
.admin-reactivate-btn .icon-check {
    width: 14px;
    height: 14px;
}

/* Modal close icon | أيقونة إغلاق النافذة */
.modal-close-icon {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

/* Responsive styles | تنسيقات الشاشات */

@media (max-width: 768px) {
    .admin-users-page {
        padding: 32px 16px 56px;
    }

    .admin-users-card {
        padding: 20px 16px;
    }

    .admin-users-header {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .admin-users-title {
        font-size: 21px;
        line-height: 32px;
    }

    .admin-add-user-btn {
        width: 100%;
    }

    .user-modal {
        padding: 16px;
        align-items: flex-start;
    }

    .user-modal-content {
        max-height: none;
    }

    .user-modal-fields-grid {
        grid-template-columns: 1fr;
        padding: 20px 18px;
    }

    .user-modal-field.full-width {
        grid-column: auto;
    }

    .user-modal-actions {
        padding: 0 18px 24px;
    }
}

@media (max-width: 480px) {
    .admin-user-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-edit-btn,
    .admin-delete-btn {
        width: 100%;
    }

    .user-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .user-modal-cancel-btn,
    .user-modal-submit-btn,
    .delete-user-confirm-btn {
        width: 100%;
    }


    /* إغلاق استجابة إدارة المستخدمين للشاشات الصغيرة */
}

@media (max-width: 991px) {
    .admin-dashboard-page .tracking-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .participants-filters {
        grid-template-columns: 1fr 1fr;
    }

    .participants-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .admin-dashboard-page .participant-journey-box {
        padding: 24px 16px 20px;
        overflow-x: auto;
    }

    .admin-dashboard-page .participant-journey-section .admin-section-title {
        font-size: 20px;
    }

    .admin-dashboard-page .journey-label {
        font-size: 13px;
    }

    .admin-dashboard-page .admin-tracking-section {
        padding: 24px 16px;
    }

    .admin-dashboard-page .participants-chart {
        padding: 20px 16px 16px;
    }

    .admin-dashboard-page .participants-chart-title {
        font-size: 16px;
    }

    .admin-dashboard-page .chart-bar {
        width: 40px;
    }

    .admin-participants-section {
        margin-top: 24px;
        padding: 20px 16px;
        border-radius: 8px;
    }

    .admin-section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

        .admin-section-heading h2 {
            font-size: 20px;
        }

    .participants-filters {
        padding: 16px;
        grid-template-columns: 1fr;
    }

    .participants-search-field {
        grid-column: auto;
    }
}

@media (max-width: 575px) {
    .admin-dashboard-page .tracking-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-dashboard-page .tracking-card {
        min-height: 150px;
    }
}

@media (max-width: 767px) {
    .admin-details-heading h1 {
        font-size: 30px;
    }

    .admin-details-request-number {
        font-size: 16px;
    }

    .admin-details-footer {
        margin-top: 24px;
    }

    .admin-back-button {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .admin-details-back-button-v2 {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .judge-dashboard-page .judge-tracking-cards-grid {
        grid-template-columns: 1fr;
    }

    .judge-row-actions {
        min-width: 250px;
    }

    .judge-evaluation-modal {
        padding: 16px;
        align-items: flex-start;
    }

    .judge-evaluation-modal-card {
        max-height: calc(100vh - 32px);
        padding: 20px 16px;
        border-radius: 8px;
    }

    .judge-evaluation-modal-header h2 {
        font-size: 20px;
    }

    .judge-evaluation-actions {
        flex-direction: column-reverse;
    }

    .judge-evaluation-cancel-button,
    .judge-evaluation-submit-button {
        width: 100%;
    }
}

@media (max-width: 1050px) {
    .workflow-statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-filters-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-search-field {
        grid-column: 1 / -1;
    }

    .workflow-journey-card {
        overflow-x: auto;
        grid-template-columns: repeat(6, minmax(130px, 1fr));
    }

    .workflow-journey-line {
        right: 70px;
        left: 70px;
        min-width: 690px;
    }

    .workflow-chart {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .workflow-chart-column {
        min-width: 120px;
    }
}

@media (max-width: 700px) {
    .workflow-dashboard-page {
        padding: 28px 16px 56px;
    }

    .workflow-welcome-card {
        align-items: flex-start;
        gap: 16px;
        padding: 24px 20px;
    }

    .workflow-welcome-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

        .workflow-welcome-icon svg {
            width: 42px;
            height: 42px;
        }

    .workflow-welcome-content h1,
    .workflow-section-title,
    .workflow-participants-heading h2 {
        font-size: 20px;
    }

    .workflow-user-details {
        flex-direction: column;
        gap: 5px;
    }

    .workflow-statistics-grid {
        grid-template-columns: 1fr;
    }

    .workflow-statistics-card {
        min-height: 112px;
    }

    .workflow-chart-card {
        min-height: 290px;
        padding: 28px 28px 22px;
        border: 1px solid #d2d6db;
        border-radius: 12px;
        background: #ffffff;
    }

    .workflow-participants-section {
        padding: 20px 16px;
    }

    .workflow-filters-form {
        grid-template-columns: 1fr;
    }

    .workflow-search-field {
        grid-column: auto;
    }

    .workflow-filter-button,
    .workflow-reset-button {
        width: 100%;
    }

    .workflow-list-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-approve-all-button,
    .workflow-export-button {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .workflow-bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .workflow-bottom-actions .application-details-button,
        .workflow-bottom-actions .judge-evaluation-open-button {
            width: 100%;
        }
}

@media (max-width: 767px) {
    .admin-modal {
        align-items: flex-end;
        padding: 0;
    }

    .admin-modal-dialog {
        width: 100%;
        padding: 28px 20px 24px;
        border-radius: 16px 16px 0 0;
    }

        .admin-modal-dialog h2 {
            padding-left: 42px;
            font-size: 21px;
        }

    .admin-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

        .admin-modal-actions button,
        .admin-modal-actions a {
            width: 100%;
            justify-content: center;
        }

    .responsive-card-table thead {
        display: none;
    }

    .responsive-card-table,
    .responsive-card-table tbody,
    .responsive-card-table tr,
    .responsive-card-table td {
        display: block;
        width: 100%;
    }

        .responsive-card-table tbody {
            display: grid;
            gap: 16px;
        }

        .responsive-card-table tr {
            overflow: hidden;
            border: 1px solid #d2d6db;
            border-radius: 8px;
            background-color: #ffffff;
        }

        .responsive-card-table td {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 12px 16px;
            border: 0;
            border-bottom: 1px solid #e5e7eb;
            text-align: left;
        }

            .responsive-card-table td:last-child {
                border-bottom: 0;
            }

            .responsive-card-table td::before {
                content: attr(data-label);
                flex: 0 0 40%;
                color: #384250;
                font-weight: 600;
                text-align: right;
            }

        .responsive-card-table .assignment-notes-row {
            margin-top: -16px;
            border-top: 0;
            border-radius: 0 0 8px 8px;
        }

        .responsive-card-table .assignment-notes-cell {
            display: block;
            text-align: right;
        }

            .responsive-card-table .assignment-notes-cell::before {
                display: none;
            }
}

@media (max-width: 991px) {
    .coordinator-tracking-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coordinator-participants-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coordinator-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .coordinator-tracking-cards {
        grid-template-columns: 1fr;
    }

    .coordinator-participants-filters {
        grid-template-columns: 1fr;
    }

    .coordinator-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .coordinator-filter-actions
        .admin-assign-button,
        .coordinator-filter-actions
        .application-back-button {
            width: 100%;
        }

    .coordinator-dashboard-page
    .application-details-button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile dashboard layout | تنسيق لوحات التحكم للجوال */
@media (max-width: 767px) {
    /* Keep all journey stages visible without horizontal scrolling | إظهار مراحل الرحلة دون تمرير أفقي */
    .admin-dashboard-page .participant-journey-box {
        padding: 20px 6px 16px;
        overflow: hidden;
    }

    .admin-dashboard-page .journey-steps {
        width: 100%;
        min-width: 0;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0;
    }

        .admin-dashboard-page .journey-steps::before {
            top: 7px;
            right: calc(100% / 12);
            left: calc(100% / 12);
        }

    .admin-dashboard-page .journey-dot {
        width: 14px;
        height: 14px;
        margin-bottom: 8px;
        border-width: 2px;
    }

    .admin-dashboard-page .journey-label {
        min-height: 30px;
        padding: 0 2px;
        font-size: 10px;
        line-height: 1.35;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .admin-dashboard-page .journey-count {
        min-width: 22px;
        min-height: 20px;
        margin-top: 4px;
        padding: 2px 6px;
        font-size: 11px;
    }

    /* Fit the six chart columns to the screen | ملاءمة أعمدة الرسم مع عرض الشاشة */
    .admin-dashboard-page .participants-chart {
        padding: 18px 8px 12px;
        overflow: hidden;
    }

    .admin-dashboard-page .participants-chart-title {
        margin-bottom: 18px;
        font-size: 15px;
    }

    .admin-dashboard-page .chart-area {
        width: 100%;
        height: 220px;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
    }

    .admin-dashboard-page .chart-item {
        min-width: 0;
        grid-template-rows: 22px 1fr 58px;
    }

    .admin-dashboard-page .chart-column {
        width: 100%;
        min-width: 0;
        height: 140px;
    }

    .admin-dashboard-page .chart-bar {
        width: clamp(12px, 5vw, 26px);
    }

    .admin-dashboard-page .chart-value {
        font-size: 11px;
    }

    .admin-dashboard-page .chart-label {
        min-width: 0;
        min-height: 56px;
        padding: 8px 2px 0;
        font-size: 9.5px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    /* Use compact tracking cards on phones | تصغير بطاقات المؤشرات على الجوال */
    .admin-dashboard-page .admin-tracking-section {
        padding: 20px 12px;
    }

    .admin-dashboard-page .tracking-cards-grid,
    .judge-dashboard-page .judge-tracking-cards-grid,
    .coordinator-tracking-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .admin-dashboard-page .tracking-card {
        min-height: 118px;
        padding: 14px 8px;
    }

    .admin-dashboard-page .tracking-card-icon,
    .admin-dashboard-page .tracking-card-icon img {
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
    }

    .admin-dashboard-page .tracking-card-icon {
        margin-bottom: 8px;
    }

    .admin-dashboard-page .tracking-card-title {
        font-size: 12px;
        line-height: 1.45;
    }

    .admin-dashboard-page .tracking-card-number {
        font-size: 22px;
    }

    /* Replace horizontal tables with readable cards | تحويل الجداول إلى بطاقات واضحة */
    .admin-participants-table-wrapper,
    .admin-users-table-wrapper {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .responsive-card-table {
        min-width: 0 !important;
        table-layout: auto;
        background: transparent;
    }

        .responsive-card-table tbody {
            gap: 14px;
        }

        .responsive-card-table tr {
            overflow: hidden;
            border: 1px solid #d7ded9;
            border-radius: 12px;
            background: #ffffff;
            box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
        }

        .responsive-card-table td {
            display: grid;
            width: 100% !important;
            min-height: 48px;
            height: auto !important;
            padding: 12px 14px;
            grid-template-columns: minmax(92px, 35%) minmax(0, 1fr);
            align-items: center;
            justify-content: initial;
            gap: 12px;
            border: 0;
            border-bottom: 1px solid #e8ecea;
            text-align: right !important;
            overflow-wrap: anywhere;
        }

            .responsive-card-table td::before {
                content: attr(data-label);
                flex: none;
                color: #52605a;
                font-size: 12px;
                font-weight: 600;
                line-height: 1.5;
                text-align: right;
            }

            .responsive-card-table td:last-child {
                border-bottom: 0;
            }

            .responsive-card-table td[data-label="الإجراءات"] {
                display: block;
                padding: 14px;
                background: #f8faf9;
            }

                .responsive-card-table td[data-label="الإجراءات"]::before {
                    display: block;
                    margin-bottom: 10px;
                }

            .responsive-card-table td[colspan] {
                display: block;
                padding: 28px 16px;
                text-align: center !important;
            }

                .responsive-card-table td[colspan]::before {
                    display: none;
                }

        .responsive-card-table .participant-application-id {
            direction: ltr;
            text-align: right !important;
        }

        .responsive-card-table .participant-status-badge,
        .responsive-card-table .admin-user-status {
            justify-self: start;
        }

        .responsive-card-table .admin-user-name,
        .responsive-card-table .admin-user-email {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .responsive-card-table .admin-user-email {
            text-align: left;
        }

        .responsive-card-table .admin-user-identity-cell::before {
            grid-row: 1 / span 2;
            align-self: start;
        }

        .responsive-card-table .admin-user-identity-cell .admin-user-name,
        .responsive-card-table .admin-user-identity-cell .admin-user-email {
            grid-column: 2;
        }

        /* Keep action buttons aligned and easy to tap | ترتيب أزرار الإجراءات وتسهيل الضغط */
        .responsive-card-table .judge-row-actions,
        .responsive-card-table .workflow-row-actions,
        .responsive-card-table .admin-user-actions {
            display: grid;
            width: 100%;
            min-width: 0;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: stretch;
            gap: 8px;
        }

            .responsive-card-table .judge-row-actions > *,
            .responsive-card-table .workflow-row-actions > *,
            .responsive-card-table .admin-user-actions > *,
            .responsive-card-table .admin-reactivate-form {
                width: 100%;
                min-width: 0;
                margin: 0;
            }

            .responsive-card-table .admin-user-actions .admin-reactivate-form {
                grid-column: 1 / -1;
            }

        .responsive-card-table .application-details-button,
        .responsive-card-table .judge-evaluation-open-button,
        .responsive-card-table .judge-evaluated-button,
        .responsive-card-table .admin-edit-btn,
        .responsive-card-table .admin-delete-btn,
        .responsive-card-table .admin-reactivate-btn,
        .responsive-card-table .coordinator-cancel-assignment-button {
            width: 100%;
            min-width: 0;
            min-height: 42px;
            padding: 8px 10px;
            justify-content: center;
            white-space: normal;
            text-align: center;
        }

    .admin-users-page {
        padding: 28px 12px 48px;
    }

    .admin-users-card {
        padding: 18px 12px;
    }

    .admin-participants-section {
        padding: 18px 12px;
    }

    .participants-filters,
    .coordinator-participants-filters {
        padding: 14px 12px;
        gap: 12px;
    }
}

/* Extra compact phones | الهواتف الصغيرة جدًا */
@media (max-width: 380px) {
    .admin-dashboard-page .participant-journey-box {
        padding-right: 3px;
        padding-left: 3px;
    }

    .admin-dashboard-page .journey-label {
        padding: 0 1px;
        font-size: 9px;
    }

    .admin-dashboard-page .chart-label {
        font-size: 8.5px;
    }

    .responsive-card-table td {
        grid-template-columns: 84px minmax(0, 1fr);
        padding: 11px 12px;
        gap: 8px;
    }
}

/* Mobile final improvements | التحسينات النهائية للجوال */
@media (max-width: 767px) {

    /* Scrollable compact chart | رسم بياني مصغر وقابل للتمرير */
    .admin-dashboard-page .participants-chart {
        width: 100%;
        padding: 18px 12px 12px;
        overflow-x: auto !important;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: #1b8354 #edf2ef;
        -webkit-overflow-scrolling: touch;
    }

        .admin-dashboard-page .participants-chart::-webkit-scrollbar {
            height: 6px;
        }

        .admin-dashboard-page .participants-chart::-webkit-scrollbar-track {
            border-radius: 999px;
            background: #edf2ef;
        }

        .admin-dashboard-page .participants-chart::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: #1b8354;
        }

    .admin-dashboard-page .participants-chart-title {
        margin-bottom: 14px;
        font-size: 15px;
    }

    .admin-dashboard-page .chart-area {
        width: 620px !important;
        min-width: 620px !important;
        height: 200px;
        grid-template-columns: repeat(6, minmax(88px, 1fr));
        gap: 12px;
    }

    .admin-dashboard-page .chart-item {
        min-width: 0;
        grid-template-rows: 20px 1fr 52px;
    }

    .admin-dashboard-page .chart-column {
        height: 125px;
    }

    .admin-dashboard-page .chart-bar {
        width: 28px;
    }

    .admin-dashboard-page .chart-value {
        font-size: 11px;
    }

    .admin-dashboard-page .chart-label {
        min-height: 50px;
        padding: 7px 4px 0;
        font-size: 10px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    /* Tracking cards in two columns | بطاقات التتبع في عمودين */
    .admin-dashboard-page .tracking-cards-grid,
    .judge-dashboard-page .judge-tracking-cards-grid,
    .coordinator-tracking-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    /* Assigned judges card values | قيم بطاقات المحكمين المسندين */
    .responsive-card-table td[data-label="البريد الإلكتروني"],
    .responsive-card-table td[data-label="تاريخ الإسناد"] {
        direction: rtl;
        unicode-bidi: plaintext;
    }

        .responsive-card-table td[data-label="البريد الإلكتروني"] > *,
        .responsive-card-table td[data-label="تاريخ الإسناد"] > * {
            min-width: 0;
        }

    /* Request number alignment | ترتيب رقم الطلب */
    .responsive-card-table td.participant-application-id {
        grid-template-columns: 110px minmax(0, 1fr);
        direction: rtl;
        color: #1b8354;
        font-size: 15px;
        font-weight: 700;
        text-align: right !important;
    }

        .responsive-card-table td.participant-application-id::before {
            color: #52605a;
            font-size: 12px;
            font-weight: 600;
        }

    /* User action buttons | أزرار تعديل وتعطيل المستخدم */
    .responsive-card-table .admin-user-actions {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 10px;
    }

    .responsive-card-table .admin-edit-btn,
    .responsive-card-table .admin-delete-btn,
    .responsive-card-table .admin-reactivate-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 9px 14px;
        justify-content: center;
        gap: 7px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 500;
    }

        .responsive-card-table .admin-edit-btn span,
        .responsive-card-table .admin-delete-btn span,
        .responsive-card-table .admin-reactivate-btn span {
            white-space: nowrap;
        }

    /* Evaluation attachments | مرفقات التقييم */
    .judge-evaluation-selected-files {
        flex-direction: column;
    }

        .judge-evaluation-selected-files > .selected-file-item {
            width: 100%;
            box-sizing: border-box;
        }

    .evaluation-attachment-links {
        width: 100%;
        min-width: 0;
    }

    .evaluation-attachment-link-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evaluation-attachment-file-name {
        grid-column: 1 / -1;
    }

    .evaluation-attachment-link-row > .attachment-action-button {
        width: 100%;
        min-width: 0;
    }

    .workflow-evaluation-average {
        margin-top: 18px;
        padding: 12px;
    }

    .responsive-card-table td.workflow-evaluation-date {
        grid-template-columns: 110px minmax(0, 1fr);
        direction: rtl;
        text-align: left !important;
        unicode-bidi: plaintext;
    }

        .responsive-card-table td.workflow-evaluation-date::before {
            text-align: right;
        }

    .workflow-row-actions .workflow-return-button,
    .workflow-return-submit-button {
        width: 100%;
    }
}
