﻿/* دعم RTL لتوست */
body {
    font-size: 12.75px;
    font-family: 'Cairo', Segoe UI;
}

.defaultFont {
    font-family: 'Cairo', Segoe UI;
    font-size: 12.75px;
}

@font-face {
    font-family: 'Cairo';
    src: url('/assets/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    /*font-weight: 400;*/
}

@font-face {
    font-family: 'Cairo';
    src: url('/assets/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    /*font-weight: 700;*/
}

.rz-dropdown-chips .rz-chip .rz-chip-text {
    font-size: 12.75px;
}

.rz-chip-set {
    gap: 4px;
}

.rz-dropdown {
    min-height: 28px;
}

.rz-chip .rz-chip-remove {
    width: 16px; /* العرض */
    height: 16px; /* الارتفاع */
    min-width: 16px;
    min-height: 16px;
    padding: 0;
    margin-left: 2px;
}

    .rz-chip .rz-chip-remove .rzi {
        font-size: 10px; /* حجم الخط/الأيقونة */
        line-height: 16px; /* نفس ارتفاع الزر */
    }

.rz-chip {
    height: 22px;
    min-height: 22px;
    padding: 0 6px;
    font-size: 12.75px;
    line-height: 22px;
}

.rz-button-sm {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    margin-left: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rz-multiselect-item-content {
    font-size: 12.75px;
}

.rz-multiselect-items li {
    padding: 3px;
}

.rz-multiselect-header {
    padding: 3px;
}


.blazored-toast-container {
    direction: rtl;
    text-align: right;
    margin-top: 1.5rem;
    z-index: 1500;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* تحسين مظهر الرسائل في RTL */
.blazored-toast {
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.5rem;
    margin: 0.3rem;
}

    .blazored-toast .blazored-toast-icon {
        margin-inline-end: 0.5rem; /* 0.5rem = حوالي 8px */
    }

.sidebar-menu {
    font-size: 14px;
}

h6 {
    font-size: 10px;
}

h5 {
    font-size: 12.75px;
}

h4 {
    font-size: 14px;
}

h3 {
    font-size: 16px;
}

h2 {
    font-size: 18px;
}

h1 {
    font-size: 20px;
}

.card-title {
    font-size: 16px;
}

.app-header {
    font-size: 16px;
}

.custom-whitespace {
    white-space: pre-line;
}

.h-row {
    transition: background-color 0.2s ease-in-out;
    padding: 5px 0px;
    border-radius: 6px;
}

    .h-row:hover {
        background-color: #e9ecef;
        cursor: pointer;
    }

.collapse {
    transition: all 0.25s ease-in-out;
    overflow: hidden;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse 1.2s infinite;
}

/* تفعيل التفاف النص داخل الخلية */
.wrap-cell {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
}

/* لو تريد كل الخلايا تعمل Wrap */
.my-grid .rz-data-grid-cell {
    white-space: normal !important;
}

.table-wrapper {
    position: relative;
}

.table-loading-overlay {
    position: absolute;
    top: 0; /* يغطي من أعلى */
    left: 0;
    width: 100%;
    height: 100%; /* يغطي كل الطول حتى لو فيه scroll */
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}


/*************************************
 * 1) Hover لجميع الصفوف (عام)
 *************************************/
.rz-datatable-table tr:hover > td,
.rz-datatable tr:hover > td,
.rz-datagrid tr:hover > td,
.rz-data-grid tr:hover > td,
.rz-data-grid-table tr:hover > td,
.rz-datatable-wrapper tr:hover > td,
.rz-grid tr:hover > td,
.rz-table tr:hover > td,
.rz-datatable tbody tr:hover > td {
    background-color: #e9ecef !important; /* لون هوفر عام */
    color: inherit !important;
}

    /* دعم العناصر الداخلية التي تملك background */
    .rz-datatable-table tr:hover > td .rz-cell-data,
    .rz-datagrid tr:hover > td .rz-cell-data,
    .rz-data-grid tr:hover > td .rz-cell-data,
    .rz-datatable tr:hover > td .rz-cell-data,
    .rz-data-grid-table tr:hover > td .rz-cell-data,
    .rz-datatable-wrapper tr:hover > td .rz-cell-data,
    .rz-grid tr:hover > td .rz-cell-data {
        background-color: transparent !important;
    }


/*************************************
 * 2) لون الصف الخطير (row-danger)
 *************************************/
.row-danger,
tr.row-danger > td {
    background-color: #f8d7da !important; /* نفس bootstrap danger */
}


/*************************************
 * 3) تعطيل الهوفر العام عن الصفوص الملوّنة
 *************************************/
.rz-datatable-table tr.row-danger:hover > td,
.rz-datatable tr.row-danger:hover > td,
.rz-datagrid tr.row-danger:hover > td,
.rz-data-grid tr.row-danger:hover > td,
.rz-data-grid-table tr.row-danger:hover > td,
.rz-datatable-wrapper tr.row-danger:hover > td,
.rz-grid tr.row-danger:hover > td,
.rz-table tr.row-danger:hover > td,
.rz-datatable tbody tr.row-danger:hover > td {
    background-color: #f5c2c7 !important; /* لون هوفر خاص للصف الخطر */
}


    /*************************************
 * 4) شفاف داخل الخلية عند hover
 *************************************/
    .rz-datatable-table tr.row-danger:hover > td .rz-cell-data,
    .rz-datagrid tr.row-danger:hover > td .rz-cell-data,
    .rz-data-grid tr.row-danger:hover > td .rz-cell-data,
    .rz-datatable tr.row-danger:hover > td .rz-cell-data,
    .rz-data-grid-table tr.row-danger:hover > td .rz-cell-data,
    .rz-datatable-wrapper tr.row-danger:hover > td .rz-cell-data,
    .rz-grid tr.row-danger:hover > td .rz-cell-data {
        background-color: transparent !important;
    }

.gradient-custom-2 {
    /* fallback for old browsers */
    background: #80d0ff;
    /* Chrome 10-25, Safari 5.1-6 */
    background: -webkit-linear-gradient(to left, #80d0ff, #4ca7ff, #1e7aff, #0056d6);
    /* Modern Browsers */
    background: linear-gradient(to left, #80d0ff, #4ca7ff, #1e7aff, #0056d6);
}

@media (min-width: 768px) {
    .gradient-form {
        height: 100vh !important;
    }
}

@media (min-width: 769px) {
    .gradient-custom-2 {
        border-top-left-radius: .3rem;
        border-bottom-left-radius: .3rem;
    }
}


.account-card {
    transition: all 0.3s ease;
    border: 1px solid #e4e6ef;
}

    .account-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

.card-header-custom {
    padding: 0.50rem;
    color: white;
    border-radius: 0.475rem 0.475rem 0 0 !important;
}

.section-header {
    position: relative;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e4e6ef, transparent);
}

.separator-dashed {
    background: repeating-linear-gradient(90deg, #e4e6ef, #e4e6ef 5px, transparent 5px, transparent 10px);
}

.overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: baseline;
    z-index: 1050;
    border-radius: 0.475rem;
}
.overlay-loader-center {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}
.required:after {
    content: " *";
    color: #f1416c;
}

.form-select-solid {
    background-color: #f5f8fa;
    border-color: #f5f8fa;
}

    .form-select-solid:focus {
        background-color: #fff;
        border-color: #009ef7;
        box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25);
    }

/**/

/* أنماط مخصصة إضافية */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* ألوان خلفيات فاتحة مخصصة */
.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1) !important;
}


.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.form-select-lg {
    height: calc(3.5rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.table th {
    vertical-align: middle;
    /*padding: 1rem;*/
}

.table td {
    vertical-align: middle;
    /*padding: 0.75rem;*/
}

.badge {
    padding: 0.5em 0.8em;
    font-size: 0.85em;
}

.form-label.required:after {
    content: " *";
    color: #dc3545;
}

/* طبّق على جدول الشركاء */
.auto-width-table {
    table-layout: auto; /* اترك المتصفّح يوزع العرض حسب المحتوى */
    width: 100%;
}

    /* خلايا الجدول: وسّع الحد الأدنى واسمح بسطرين أو أكثر */
    .auto-width-table th,
    .auto-width-table td {
        padding: 0.5rem 0.75rem; /* مسافة داخلية معقولة */
        min-width: 120px; /* أقل عرض لكل عمود */
        max-width: 260px; /* يمكن تكبيره حسب الحاجة */
        white-space: normal; /* اسمح للنص أن ينزل لسطر جديد */
        word-wrap: break-word; /* قص الكلمات الطويلة إذا لزم */
    }

.radius-right-0 {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.radius-left-0 {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn {
    margin: 2px !important;
}

/* العنصر الطبيعي */
.drag-item {
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

    /* العنصر أثناء السحب */
    .drag-item.dragging {
        opacity: 0.5;
        transform: scale(1.03);
        background-color: #f8f9fa;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        cursor: grabbing;
    }

    /* المكان اللي هيتم الإفلات فيه */
    .drag-item.drag-over {
        background-color: #e7f1ff;
        border-left: 4px solid #0d6efd;
    }

.dropdown-menu-finance {
    min-width: 150px;
    width: 150px;
    font-size: 0.85rem;
    padding: 4px;
    z-index: 9999 !important;
}

    .dropdown-menu-finance .dropdown-item {
        padding: 4px 8px;
    }

.modal-drag-handle {
    cursor: move;
    user-select: none;
}
.modal-header {
    padding: 0.75rem 0.75rem;
}

.erp-modal-wrapper {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
    .erp-modal-wrapper .modal {
        position: fixed;
        inset: 0;
        display: flex !important;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

.erp-modal {
    width: 100%;
    height: 100%;
    max-width: calc(100vw - 200px);
    max-height: calc(100vh - 110px);
    margin: 0 !important;
}
    .erp-modal .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
    }
.erp-modal .modal-body {
    overflow: auto;
    flex: 1;
    padding:12px 0px
}
/*body.modal-open {
    padding-right: 0 !important;
}

.modal {
    padding-right: 0 !important;
}
.modal-dialog {
    margin: auto;
    margin-top:11px;
}*/

/*.erp-modal {
    top: 8px;
    width: min(1200px, 90vw);*/ /* يكبر مع الشاشة حتى 1200px */
    /*max-width: 1200px;
}

    .erp-modal .modal-content {
        height: min(750px, 90vh);*/ /* يكبر مع الشاشة حتى 750px */
        /*display: flex;
        flex-direction: column;
    }

    .erp-modal .modal-body {
        overflow-y: auto;
        overflow-x: auto;
        flex: 1;
    }*/

.page-card {
    height: calc(100vh - 250px); /* خصم الهيدر أو أي عناصر أعلى الصفحة */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.page-card-220  {
    height: calc(100vh - 220px); /* خصم الهيدر أو أي عناصر أعلى الصفحة */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.page-card-210 {
    height: calc(100vh - 210px); /* خصم الهيدر أو أي عناصر أعلى الصفحة */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.page-card-375 {
    height: calc(100vh - 375px); /* خصم الهيدر أو أي عناصر أعلى الصفحة */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.table-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* مهم لمنع التمدد */
}
.table-responsive {
    flex: 1;
    overflow: auto;
    min-height: 0;
}
    .table-responsive table {
        width: max-content; /* يجعل الجدول يأخذ عرض محتواه */
        min-width: 100%; /* لكن لا يقل عن عرض الحاوية */
    }

.rz-data-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.rz-data-grid-data {
    flex: 1;
    overflow: auto;
    min-height: 0;
}


.table thead th {
    position: sticky;
    top: 0;
    z-index: 0;
    /*background-color: var(--bs-body-bg);*/
    background-color: #e9edf0;
    color:#3a474d;
    padding:8px
}

.rz-dropdown-panel .rz-dropdown-items .rz-dropdown-item {
    font-size: 12.75px; /* Change to your desired size */
}

.rz-grid-table {
    --rz-grid-cell-font-size: 12.75px; /* Change to your desired size */
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 5px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    transition: all .2s ease;
}

    .color-picker-container:focus-within {
        border-color: #86b7fe;
        box-shadow: 0 0 0 .15rem rgba(13,110,253,.15);
    }

.color-picker {
    width: 40px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

    .color-picker::-webkit-color-swatch {
        border: none;
        border-radius: 2px;
    }

    .color-picker::-webkit-color-swatch-wrapper {
        padding: 0;
    }

.color-input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-weight: 200;
    letter-spacing: 1px;
}

.color-preview {
    width: 100px;
    height: 24px;
    color:#ffffff;
    align-content:center;
    text-align:center;
    border-radius: 6px;
    border: 0px solid #ced4da;
    flex-shrink: 0;
}
.category-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,.1);
}
.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0px 5px;
    border-radius: 6px;
    color: white;
    font-size: 10px;
    font-weight: 600;
    margin: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.employee-image-wrapper {
    display: flex;
    justify-content: left;
}

.employee-image-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.employee-image {
    width: 100px;
    height: 100px;
    border-radius: 10%;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid #dee2e6;
    transition: all .2s ease;
    background: #f8f9fa;
}

    .employee-image:hover {
        opacity: .9;
        transform: scale(1.02);
    }

.employee-image-delete {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    transition: all .2s ease;
}

    .employee-image-delete:hover {
        background: #bb2d3b;
        transform: scale(1.08);
    }

.notes-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-preview {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*Organization Chart*/
/*.org-container {
    overflow: auto;
    padding: 30px;
    min-height: 600px;
}

.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-card {
    min-width: 220px;
    max-width: 250px;
    padding: 15px;
    margin: 10px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    text-align: center;
}

.org-name {
    font-weight: 700;
    font-size: 15px;
}

.org-job {
    color: #0d6efd;
    margin-top: 6px;
}

.org-dept {
    color: #6c757d;
    font-size: 13px;
}

.org-children {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: nowrap;
}
*/
.org-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.org-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    justify-content: flex-end;
}

#tree-viewport {
    flex: 1;
    min-height: 0;
    overflow: auto;
    position: relative;
    border: 1px solid #ddd;
    background: #fff;
    direction: ltr;
    cursor: grab;
    user-select: none;
}
    #tree-viewport:active {
        cursor: grabbing;
    }
#tree-container {
    width: max-content;
    min-width: max-content;
    display: inline-block;
    overflow: visible !important;
}

    #tree-container .Treant {
        transform-origin: top center;
        transition: transform 0.15s ease;
        display: inline-block;
    }
/*.org-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 8px 0;
}*/

.zoom-btn {
    min-width: 48px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
}

    .zoom-btn:hover {
        background: #e9ecef;
    }
.zoom-level {
    min-width: 70px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
}
.org-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8db;
    border: 1px solid #ffe58f;
    color: #664d03;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

    .org-hint button {
        margin-right: auto;
        border: none;
        background: transparent;
        cursor: pointer;
        font-size: 16px;
        color: #666;
    }
/* اجعل محتوى العقد بالعربي */
.org-node {
    direction: rtl;
}

.org-node {
    width: 220px;
    min-height: 78px;
    /*padding: 8px 10px;*/
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    background: #f9f9f9;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    text-align: right;
}

    .org-node .node-name {
        font-size: 18px;
        /*font-weight: 700;*/
        color: #111;
        /*line-height: 1.4;*/
        /*margin-bottom: 4px;*/
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        align-content: center;
        text-align:center;
    }

    .org-node .node-title {
        font-size: 12px;
        color: #0d6efd;
        line-height: 1.4;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .org-node .node-desc {
        font-size: 11px;
        color: #6c757d;
        line-height: 1.4;
    }
.root-card{
    font-size: 16px;
    font-weight: 700;
}
.org-root {
    border: 2px solid #0d6efd;
    background: #eef5ff;
    border-radius: 12px;
    min-width: 200px;
    align-content: center;
    text-align: center;
    padding: 10px 20px;
}
.Treant .collapse-switch {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2px solid #0d6efd !important;
    position: absolute !important;
    top: auto !important;
    bottom: -10px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.employee-node {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.employee-card {
    width: 320px;
    height: 120px;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    direction: rtl;
}

.employee-avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

    .employee-avatar img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid #ddd;
    }

.employee-info {
    flex: 1;
    text-align: right;
    overflow: hidden;
}

.employee-name {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-title {
    font-size: 12px;
    color: #0d6efd;
    margin-bottom: 4px;
}

.employee-code {
    font-size: 11px;
    color: #888;
}

.employee-company {
    font-size: 11px;
    color: #777;
}

.employee-count {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #cfcfcf;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}



/* ============================
   Purple
============================ */
.btn-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

    .btn-purple:hover,
    .btn-purple:focus,
    .btn-purple:active,
    .btn-purple.active,
    .show > .btn-purple.dropdown-toggle {
        color: #fff;
        background-color: #5d35a6;
        border-color: #59329e;
    }

    .btn-purple:focus {
        box-shadow: 0 0 0 .25rem rgba(111, 66, 193, .35);
    }

    .btn-purple:disabled,
    .btn-purple.disabled {
        color: #fff;
        background-color: #6f42c1;
        border-color: #6f42c1;
        opacity: .65;
    }


/* ============================
   Mauve (Move)
============================ */
.btn-move {
    color: #fff;
    background-color: #a259c6;
    border-color: #a259c6;
}

    .btn-move:hover,
    .btn-move:focus,
    .btn-move:active,
    .btn-move.active,
    .show > .btn-move.dropdown-toggle {
        color: #fff;
        background-color: #9149b6;
        border-color: #8844ad;
    }

    .btn-move:focus {
        box-shadow: 0 0 0 .25rem rgba(162, 89, 198, .35);
    }

    .btn-move:disabled,
    .btn-move.disabled {
        color: #fff;
        background-color: #a259c6;
        border-color: #a259c6;
        opacity: .65;
    }


/* ============================
   Neon Pink
============================ */
.btn-neon-pink {
    color: #fff;
    background-color: #ed09d3;
    border-color: #ed09d3;
}

    .btn-neon-pink:hover,
    .btn-neon-pink:focus,
    .btn-neon-pink:active,
    .btn-neon-pink.active,
    .show > .btn-neon-pink.dropdown-toggle {
        color: #fff;
        background-color: #d108be;
        border-color: #c507b5;
    }

    .btn-neon-pink:focus {
        box-shadow: 0 0 0 .25rem rgba(237, 9, 211, .35);
    }

    .btn-neon-pink:disabled,
    .btn-neon-pink.disabled {
        color: #fff;
        background-color: #ed09d3;
        border-color: #ed09d3;
        opacity: .65;
    }


/* ============================
   Purple Rain
============================ */
.btn-purple-rain {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

    .btn-purple-rain:hover,
    .btn-purple-rain:focus,
    .btn-purple-rain:active,
    .btn-purple-rain.active,
    .show > .btn-purple-rain.dropdown-toggle {
        color: #fff;
        background-color: #5b34a4;
        border-color: #55309a;
    }

    .btn-purple-rain:focus {
        box-shadow: 0 0 0 .25rem rgba(111, 66, 193, .35);
    }

    .btn-purple-rain:disabled,
    .btn-purple-rain.disabled {
        color: #fff;
        background-color: #6f42c1;
        border-color: #6f42c1;
        opacity: .65;
    }


.btn-outline-purple {
    color: #6f42c1;
    border: 1px solid #6f42c1;
    background-color: transparent;
    transition: all .15s ease-in-out;
}

    .btn-outline-purple:hover,
    .btn-outline-purple:focus,
    .btn-outline-purple:active,
    .btn-outline-purple.active,
    .show > .btn-outline-purple.dropdown-toggle {
        color: #fff;
        background-color: #6f42c1;
        border-color: #6f42c1;
    }

    .btn-outline-purple:focus {
        box-shadow: 0 0 0 .25rem rgba(111, 66, 193, 0.25);
    }

    .btn-outline-purple:disabled,
    .btn-outline-purple.disabled {
        color: #6f42c1;
        background-color: transparent;
        border-color: #6f42c1;
        opacity: .65;
    }

.btn-check:checked + .btn-outline-purple,
.btn-check:active + .btn-outline-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-move {
    color: #d63384;
    border: 1px solid #d63384;
    background-color: transparent;
    transition: all .15s ease-in-out;
}

.btn-outline-move:hover,
.btn-outline-move:focus,
.btn-outline-move:active,
.btn-outline-move.active,
.show > .btn-outline-move.dropdown-toggle {
    color: #fff;
    background-color: #d63384;
    border-color: #d63384;
}

.btn-outline-move:focus {
    box-shadow: 0 0 0 .25rem rgba(214, 51, 132, 0.25);
}

.btn-outline-move:disabled,
.btn-outline-move.disabled {
    color: #d63384;
    background-color: transparent;
    border-color: #d63384;
    opacity: .65;
}

.btn-check:checked + .btn-outline-move,
.btn-check:active + .btn-outline-move {
    color: #fff;
    background-color: #d63384;
    border-color: #d63384;
}

/* ============================
   Neon Pink (#ed09d3)
============================ */
.btn-outline-neon-pink {
    color: #ed09d3;
    border: 1px solid #ed09d3;
    background-color: transparent;
    transition: all .15s ease-in-out;
}

    .btn-outline-neon-pink:hover,
    .btn-outline-neon-pink:focus,
    .btn-outline-neon-pink:active,
    .btn-outline-neon-pink.active,
    .show > .btn-outline-neon-pink.dropdown-toggle {
        color: #fff;
        background-color: #ed09d3;
        border-color: #ed09d3;
    }

    .btn-outline-neon-pink:focus {
        box-shadow: 0 0 0 .25rem rgba(237, 9, 211, .25);
    }

    .btn-outline-neon-pink:disabled,
    .btn-outline-neon-pink.disabled {
        color: #ed09d3;
        background-color: transparent;
        border-color: #ed09d3;
        opacity: .65;
    }

.btn-check:checked + .btn-outline-neon-pink,
.btn-check:active + .btn-outline-neon-pink {
    color: #fff;
    background-color: #ed09d3;
    border-color: #ed09d3;
}


/* ============================
   Purple Rain (#6f42c1)
============================ */
.btn-outline-purple-rain {
    color: #6f42c1;
    border: 1px solid #6f42c1;
    background-color: transparent;
    transition: all .15s ease-in-out;
}

    .btn-outline-purple-rain:hover,
    .btn-outline-purple-rain:focus,
    .btn-outline-purple-rain:active,
    .btn-outline-purple-rain.active,
    .show > .btn-outline-purple-rain.dropdown-toggle {
        color: #fff;
        background-color: #6f42c1;
        border-color: #6f42c1;
    }

    .btn-outline-purple-rain:focus {
        box-shadow: 0 0 0 .25rem rgba(111, 66, 193, .25);
    }

    .btn-outline-purple-rain:disabled,
    .btn-outline-purple-rain.disabled {
        color: #6f42c1;
        background-color: transparent;
        border-color: #6f42c1;
        opacity: .65;
    }

.btn-check:checked + .btn-outline-purple-rain,
.btn-check:active + .btn-outline-purple-rain {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}


/*------------------------------------------*//**/
.modern-journal-table {
    border-collapse: separate;
    border-spacing: 0; /* جعل الصفوف متلاصقة لإظهار خط الفصل بوضوح */
    font-size: 13px;
}

    .modern-journal-table th {
        background: linear-gradient(90deg, #1e3a5f, #2c4d75); /* درجات كحلي احترافية ومتناسقة مع الصورة */
        color: white;
        border: none;
        font-size: 12px;
        font-weight: 600;
        padding: 10px 12px;
        vertical-align: middle;
        position: sticky;
        top: 0;
        z-index: 10;
        white-space: nowrap;
    }

    /* تناوب الألوان بين المجموعات (نفس ألوان كروت الصورة المرفقة) */
    .modern-journal-table tbody tr.journal-group-0 {
        background-color: #ffffff !important;
    }

    .modern-journal-table tbody tr.journal-group-1 {
        background-color: #f7faff !important; /* لون رمادي مزرق خفيف ومريح جداً في العرض لتحديد المجموعات */
    }

    .modern-journal-table tbody tr:hover {
        background-color: #f0f4f8 !important;
        transition: 0.15s;
    }

    /* إزالة الحدود الداخلية تماماً لسطور نفس القيد */
    .modern-journal-table tbody tr.journal-group-item td {
        border-top: none !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    /* 🌟 تحديد لون خط الفصل باللون الأسود البسيط ليفصل بين الجروبات وبعضها */
    .modern-journal-table tbody tr.journal-group-start td {
        border-top: 1px solid rgba(0, 0, 0, 0.12) !important; /* خط أسود بسيط وناعم جداً شفاف ليعطي مظهراً مودرن */
        padding-top: 10px !important;
        padding-bottom: 5px !important;
    }

    .modern-journal-table td {
        padding: 6px 10px;
        vertical-align: middle;
        border-bottom: none;
        background: inherit;
        font-size: 12px;
    }

/* 🌟 تعديل وتصغير كارت العمليات الجانبي ليكون بحجم متناسق ومطابق للصورة */
.journal-side-card {
    width: 90px; /* تم تصغير العرض الإجمالي للعمود والبطاقة */
    min-width: 90px;
    max-width: 90px;
    padding: 0 !important;
    position: relative;
    vertical-align: middle;
    border-left: 2px solid #a4bcdb !important; /* خط ربط ناعم على يسار العمليات */
}

/* توافق خلفية الكارت الجانبي تلقائياً مع لون الجروب التابع له */
tr.journal-group-0 .journal-side-card {
    background-color: #ffffff !important;
}

tr.journal-group-1 .journal-side-card {
    background-color: #f7faff !important;
}

/* إخراج العناصر داخل الكارت بشكل مدمج وصغير */
.journal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    border: 1px solid rgba(0, 0, 0, 0.05); /* حدود خارجية خفيفة للكارد الداخلي */
    border-radius: 8px;
    margin: 4px;
    background-color: rgba(255, 255, 255, 0.6);
}

.journal-number small {
    color: #888888;
    display: block;
    font-size: 9px;
    text-align: center;
    margin-bottom: 1px;
}

/* تنسيق شكل رقم القيد البيضاوي */
.journal-number span {
    background: #4a90d9;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 8px;
    border-radius: 12px;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/* تمييز لون بادج رقم القيد للجروب الثاني */
tr.journal-group-1 .journal-number span {
    background: #6c5ce7;
}

.journal-date {
    color: #777777;
    font-size: 9px;
    white-space: nowrap;
}

.journal-actions {
    display: flex;
    gap: 5px;
    margin-top: 3px;
}

/* تصغير أحجام أزرار التحكم (عرض / حذف) لتناسب حجم الكارد الجديد */
.action-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

    .action-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }

.action-view {
    background-color: #2196f3;
}

.action-delete {
    background-color: #ef4444;
}

/* الحفاظ على التنسيقات الأخرى ثابتة وثنائية الخانات للمبالغ */
.badge.bg-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 10px !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
}

.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}

.text-success {
    color: #22c55e !important;
    font-weight: 600;
}

.text-warning {
    color: #f59e0b !important;
    font-weight: 500;
}

.text-primary {
    color: #3b82f6 !important;
    font-weight: 500;
}