/* =======================================================
   AL MURSHIDOON HAJJ SYSTEM — UI V3
   ======================================================= */

body.almurshidoon-ui {
    font-family:
        "IBM Plex Sans Arabic",
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif !important;

    letter-spacing: 0;
}


/* =======================================================
   ACTIVE SEASON CONTEXT BAR
   ======================================================= */

.ui-context-bar {
    position: relative;
    z-index: 1030;

    min-height: 43px;

    display: flex;
    align-items: center;

    background: #ffffff;

    border-bottom:
        1px solid #e9ebef;

    box-shadow:
        0 2px 10px
        rgba(17, 19, 24, 0.025);
}

.ui-context-inner {
    max-width: 1540px;

    margin: 0 auto;

    padding-inline:
        24px;
}

.ui-context-items {
    min-height: 42px;

    display: flex;
    align-items: center;

    gap: 14px;

    overflow-x: auto;

    white-space: nowrap;

    scrollbar-width: none;
}

.ui-context-items::-webkit-scrollbar {
    display: none;
}

.ui-context-item {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #5d636d;

    font-size: 12px;
}

.ui-context-icon {
    width: 27px;
    height: 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background:
        #fff8df;

    color:
        #a77e00;

    font-size:
        13px;
}

.ui-context-label {
    color:
        #8a909a;

    font-weight:
        600;
}

.ui-context-value {
    color:
        #25282e;

    font-weight:
        800;
}

.ui-context-divider {
    width: 1px;
    height: 20px;

    flex: 0 0 auto;

    background:
        #eceef1;
}

.ui-live-badge {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    padding:
        4px 8px;

    border-radius:
        20px;

    background:
        #eaf8ef;

    color:
        #168444;

    font-size:
        10px;

    font-weight:
        900;
}

.ui-live-badge::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        #19a653;

    box-shadow:
        0 0 0 3px
        rgba(25, 166, 83, 0.10);
}


/* =======================================================
   NAV ICONS
   ======================================================= */

.hajj-navbar .nav-link {
    display: inline-flex;
    align-items: center;

    gap: 7px;
}

.hajj-navbar .nav-link > .ui-nav-icon {
    color:
        rgba(229, 184, 25, 0.82);

    font-size:
        14px;
}

.hajj-navbar .nav-link.active > .ui-nav-icon {
    color:
        #e5b819;
}


/* =======================================================
   UNIFIED PAGE HEADINGS
   ======================================================= */

.page-heading.ui-enhanced-heading {
    position: relative;

    display: flex;
    align-items: center;

    gap: 13px;

    min-height: 72px;

    padding:
        14px 18px;

    margin-bottom:
        22px;

    border:
        1px solid #e8eaee;

    border-radius:
        15px;

    background:
        #ffffff;

    box-shadow:
        0 5px 20px
        rgba(17, 19, 24, 0.035);
}

.ui-page-heading-copy {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.page-heading.ui-enhanced-heading h1 {
    margin: 0;

    font-size:
        23px;

    line-height:
        1.15;

    font-weight:
        900;
}

.ui-page-subtitle {
    margin: 0;

    color:
        #7a8089;

    font-size:
        12.5px;

    font-weight:
        500;
}

.page-heading.ui-enhanced-heading
.page-heading-accent {
    width: 5px;
    height: 42px;

    flex: 0 0 5px;

    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            #e5b819,
            #b68c00
        );
}


/* Headings created inside pages */

.ui-standalone-heading {
    position: relative;

    margin-bottom:
        20px !important;

    padding-right:
        15px;

    font-weight:
        900 !important;
}

.ui-standalone-heading::before {
    content: "";

    position: absolute;

    right: 0;
    top: 4px;
    bottom: 4px;

    width: 4px;

    border-radius:
        20px;

    background:
        #e5b819;
}


/* =======================================================
   ACTION BUTTON HIERARCHY
   ======================================================= */

.almurshidoon-ui .btn.ui-primary-action {
    border-color:
        #e5b819 !important;

    background:
        #e5b819 !important;

    color:
        #111318 !important;

    box-shadow:
        0 5px 15px
        rgba(229, 184, 25, 0.17);
}

.almurshidoon-ui .btn.ui-secondary-action {
    border:
        1px solid #dde0e5 !important;

    background:
        #ffffff !important;

    color:
        #454a53 !important;
}

.almurshidoon-ui .btn.ui-success-action {
    border:
        1px solid #bde7ca !important;

    background:
        #eefaf2 !important;

    color:
        #187b3e !important;
}

.almurshidoon-ui .btn.ui-danger-action {
    border:
        1px solid #f1c3c9 !important;

    background:
        #fff1f3 !important;

    color:
        #bd2937 !important;
}

.almurshidoon-ui .btn.ui-primary-action:hover {
    background:
        #cfa50f !important;

    border-color:
        #cfa50f !important;
}

.almurshidoon-ui .btn.ui-secondary-action:hover {
    border-color:
        #c8ccd2 !important;

    background:
        #f7f8f9 !important;
}


/* =======================================================
   TABLES — PROFESSIONAL
   ======================================================= */

.almurshidoon-ui .table-responsive {
    position: relative;

    border:
        1px solid #e7e9ed;

    border-radius:
        15px;

    background:
        #ffffff;

    box-shadow:
        0 5px 20px
        rgba(17, 19, 24, 0.035);
}

.almurshidoon-ui table thead th,
.almurshidoon-ui table.dataTable thead th {
    position: sticky;

    top: 108px;

    z-index: 5;

    background:
        #f7f8fa !important;

    color:
        #383c44 !important;

    font-size:
        12.5px !important;

    font-weight:
        900 !important;

    white-space:
        nowrap;
}

.almurshidoon-ui table tbody td {
    font-size:
        13.5px;

    color:
        #42464e;
}

.almurshidoon-ui table tbody tr:hover td {
    background:
        #fffcf4;
}


/* =======================================================
   STATUS BADGES
   ======================================================= */

.ui-status {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    padding:
        5px 9px;

    border-radius:
        20px;

    font-size:
        11px;

    font-weight:
        800;

    white-space:
        nowrap;
}

.ui-status::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius:
        50%;

    background:
        currentColor;
}

.ui-status-success {
    background:
        #ebf8f0;

    color:
        #148345;
}

.ui-status-warning {
    background:
        #fff8df;

    color:
        #967000;
}

.ui-status-danger {
    background:
        #fff0f2;

    color:
        #c12e3d;
}

.ui-status-neutral {
    background:
        #f0f2f4;

    color:
        #656b75;
}


/* =======================================================
   EMPTY STATES
   ======================================================= */

.ui-empty-state {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding:
        28px 20px;

    text-align:
        center;

    color:
        #7c828c;
}

.ui-empty-state-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom:
        3px;

    border-radius:
        15px;

    background:
        #fff8df;

    color:
        #a57c00;

    font-size:
        22px;
}

.ui-empty-state strong {
    color:
        #33373e;

    font-size:
        15px;

    font-weight:
        900;
}

.ui-empty-state span {
    max-width:
        420px;

    font-size:
        12.5px;
}


/* =======================================================
   THREE DOT ACTION MENU
   ======================================================= */

.ui-row-actions {
    position: relative;

    display: inline-block;
}

.ui-row-actions summary {
    width: 35px;
    height: 35px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    list-style: none;

    cursor: pointer;

    border:
        1px solid #e0e3e7;

    border-radius:
        9px;

    background:
        #ffffff;

    color:
        #41464e;

    font-size:
        18px;

    transition:
        all 0.15s ease;
}

.ui-row-actions summary::-webkit-details-marker {
    display: none;
}

.ui-row-actions summary:hover {
    border-color:
        #e5b819;

    background:
        #fffaf0;

    color:
        #8a6700;
}

.ui-row-actions-menu {
    position: absolute;

    top: calc(100% + 5px);
    left: 0;

    z-index: 30;

    min-width:
        170px;

    display: flex;
    flex-direction: column;

    gap: 5px;

    padding:
        7px;

    border:
        1px solid #e5e7eb;

    border-radius:
        11px;

    background:
        #ffffff;

    box-shadow:
        0 14px 38px
        rgba(17, 19, 24, 0.14);
}

.ui-row-actions-menu .btn {
    width: 100%;

    display: flex;
    justify-content: flex-start;

    margin: 0 !important;

    text-align: right;
}


/* =======================================================
   CUSTOM CONFIRM MODAL
   ======================================================= */

.ui-confirm-backdrop {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: none;
    align-items: center;
    justify-content: center;

    padding:
        20px;

    background:
        rgba(9, 11, 15, 0.62);

    backdrop-filter:
        blur(3px);
}

.ui-confirm-backdrop.show {
    display: flex;
}

.ui-confirm-dialog {
    width:
        min(100%, 460px);

    overflow: hidden;

    border:
        1px solid
        rgba(229, 184, 25, 0.25);

    border-radius:
        18px;

    background:
        #ffffff;

    box-shadow:
        0 28px 80px
        rgba(0, 0, 0, 0.28);

    animation:
        uiDialogIn 0.16s ease;
}

@keyframes uiDialogIn {
    from {
        opacity: 0;
        transform:
            translateY(8px)
            scale(0.985);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

.ui-confirm-head {
    display: flex;
    align-items: center;

    gap: 12px;

    padding:
        20px 21px 12px;
}

.ui-confirm-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius:
        13px;

    background:
        #fff4dd;

    color:
        #a37800;

    font-size:
        20px;
}

.ui-confirm-dialog.danger
.ui-confirm-icon {
    background:
        #fff0f2;

    color:
        #c22b3c;
}

.ui-confirm-title {
    margin: 0;

    color:
        #202329;

    font-size:
        18px;

    font-weight:
        900;
}

.ui-confirm-body {
    padding:
        0 21px 19px;

    color:
        #6f7580;

    font-size:
        13.5px;

    line-height:
        1.8;
}

.ui-confirm-actions {
    display: flex;
    justify-content: flex-end;

    gap: 8px;

    padding:
        13px 21px;

    border-top:
        1px solid #eceef1;

    background:
        #fafbfc;
}

.ui-confirm-actions button {
    min-width:
        100px;
}


/* =======================================================
   INPUTS / FILTERS
   ======================================================= */

.almurshidoon-ui .form-control,
.almurshidoon-ui .form-select,
.almurshidoon-ui select {
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.almurshidoon-ui .form-control:hover,
.almurshidoon-ui .form-select:hover,
.almurshidoon-ui select:hover {
    border-color:
        #cfd3d9;
}

.almurshidoon-ui .dataTables_filter {
    position: relative;
}

.almurshidoon-ui
.dataTables_filter input {
    min-width:
        220px;
}


/* =======================================================
   CARDS
   ======================================================= */

.almurshidoon-ui .card {
    overflow: hidden;
}

.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header {
    padding:
        13px 17px;

    border-bottom:
        1px solid #eceef1;

    background:
        #f8f9fa;

    color:
        #34383f;

    font-size:
        14px;

    font-weight:
        900;
}


/* Override random bootstrap card header colors */
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-primary,
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-success,
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-info,
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-secondary,
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-dark,
.almurshidoon-ui
.card:not(.hajj-dashboard .card)
.card-header.bg-warning {
    border-right:
        4px solid #e5b819;

    background:
        #f8f9fa !important;

    color:
        #34383f !important;
}


/* =======================================================
   MOBILE
   ======================================================= */

@media (max-width: 991px) {

    .ui-context-inner {
        padding-inline:
            15px;
    }

    .ui-context-divider {
        display:
            none;
    }

    .ui-context-items {
        gap:
            12px;
    }

    .ui-refresh-item {
        display:
            none;
    }

    .almurshidoon-ui table thead th,
    .almurshidoon-ui table.dataTable thead th {
        top: 0;
    }
}

@media (max-width: 767px) {

    .ui-context-label {
        display:
            none;
    }

    .ui-context-item {
        font-size:
            11px;
    }

    .page-heading.ui-enhanced-heading {
        min-height:
            64px;

        padding:
            12px 14px;

        border-radius:
            13px;
    }

    .page-heading.ui-enhanced-heading h1 {
        font-size:
            20px;
    }

    .ui-page-subtitle {
        font-size:
            11.5px;
    }

    .ui-confirm-actions {
        flex-direction:
            column-reverse;
    }

    .ui-confirm-actions button {
        width:
            100%;
    }

    .almurshidoon-ui
    .dataTables_filter input {
        min-width:
            150px;
        width:
            100%;
    }
}

/* HAJJ_TABLES_FIX_V31_START */

/* =======================================================
   DATATABLES / TABLES LAYOUT FIX V3.1
   ======================================================= */

.almurshidoon-ui .dataTables_wrapper {
    width: 100% !important;
    max-width: 100%;

    overflow: visible !important;
}

/*
 * مهم:
 * إلغاء Sticky لكل TH لأن DataTables + RTL
 * كان يسبب اختلاف مستوى رؤوس الأعمدة.
 */
.almurshidoon-ui table thead th,
.almurshidoon-ui table.dataTable thead th {
    position: static !important;

    top: auto !important;
    right: auto !important;
    left: auto !important;

    display: table-cell !important;

    float: none !important;

    height: auto !important;

    padding: 14px 12px !important;

    vertical-align: middle !important;

    white-space: nowrap !important;

    line-height: 1.45 !important;

    text-align: right !important;

    background: #f7f8fa !important;

    border-top: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}


/* صف الرأس يبقى صفًا واحدًا */
.almurshidoon-ui table thead,
.almurshidoon-ui table.dataTable thead {
    display: table-header-group !important;
}

.almurshidoon-ui table thead tr,
.almurshidoon-ui table.dataTable thead tr {
    display: table-row !important;

    height: auto !important;
}


/* جسم الجدول */
.almurshidoon-ui table tbody {
    display: table-row-group !important;
}

.almurshidoon-ui table tbody tr {
    display: table-row !important;
}

.almurshidoon-ui table tbody td,
.almurshidoon-ui table.dataTable tbody td {
    position: static !important;

    display: table-cell !important;

    float: none !important;

    padding: 12px !important;

    vertical-align: middle !important;

    text-align: right;

    line-height: 1.55;
}


/* الجدول نفسه */
.almurshidoon-ui table.dataTable,
.almurshidoon-ui .dataTables_wrapper table {
    width: 100% !important;

    max-width: none !important;

    margin:
        0 !important;

    table-layout: auto !important;

    border-collapse: collapse !important;

    direction: rtl;
}


/* الجداول الكبيرة يسمح لها بالتمرير الأفقي بدل التبعثر */
.almurshidoon-ui .table-responsive {
    width: 100%;

    max-width: 100%;

    overflow-x: auto !important;
    overflow-y: visible !important;
}

.almurshidoon-ui .table-responsive table.dataTable {
    min-width: 100%;
}


/* رؤوس DataTables الخاصة بالفرز */
.almurshidoon-ui table.dataTable thead
> tr > th.sorting,
.almurshidoon-ui table.dataTable thead
> tr > th.sorting_asc,
.almurshidoon-ui table.dataTable thead
> tr > th.sorting_desc {
    padding-left: 28px !important;
    padding-right: 12px !important;
}


/* منع أي رأس من النزول إلى سطر مستقل */
.almurshidoon-ui table.dataTable th,
.almurshidoon-ui table.dataTable td {
    box-sizing: border-box !important;
}


/* =======================================================
   EMPTY TABLE
   ======================================================= */

.almurshidoon-ui
table.dataTable tbody td.dataTables_empty {
    height: auto !important;

    padding:
        24px 15px !important;

    text-align:
        center !important;
}

.almurshidoon-ui
.dataTables_empty
.ui-empty-state {
    min-height:
        95px !important;

    padding:
        10px 15px !important;
}

.almurshidoon-ui
.dataTables_empty
.ui-empty-state-icon {
    width: 42px;
    height: 42px;

    font-size: 18px;
}


/* =======================================================
   DATATABLE CONTROLS
   ======================================================= */

.almurshidoon-ui .dataTables_wrapper
.dataTables_length,
.almurshidoon-ui .dataTables_wrapper
.dataTables_filter {
    margin-bottom: 16px;
}

.almurshidoon-ui .dataTables_wrapper
.dataTables_info,
.almurshidoon-ui .dataTables_wrapper
.dataTables_paginate {
    margin-top: 14px;
}


/* البحث */
.almurshidoon-ui .dataTables_wrapper
.dataTables_filter input {
    min-width: 220px;

    height: 42px;

    margin-right: 8px;

    border-radius: 10px;
}


/* اختيار عدد السجلات */
.almurshidoon-ui .dataTables_wrapper
.dataTables_length select {
    min-width: 66px;

    height: 42px;

    margin-inline: 7px;

    border-radius: 10px;
}


/* =======================================================
   WIDE TABLES
   ======================================================= */

@media (min-width: 992px) {

    .almurshidoon-ui table.dataTable {
        font-size: 13px;
    }

    .almurshidoon-ui table.dataTable th {
        font-size: 12px !important;
    }
}


/* =======================================================
   MOBILE
   ======================================================= */

@media (max-width: 767px) {

    .almurshidoon-ui table.dataTable {
        min-width: 900px;
    }

    .almurshidoon-ui table.dataTable thead th,
    .almurshidoon-ui table.dataTable tbody td {
        padding:
            10px 11px !important;
    }

    .almurshidoon-ui .dataTables_wrapper
    .dataTables_filter,
    .almurshidoon-ui .dataTables_wrapper
    .dataTables_length {
        width: 100%;

        float: none !important;

        text-align: right !important;
    }
}

/* HAJJ_TABLES_FIX_V31_END */

