﻿/* دعم 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-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;
}
*/
#tree-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    direction: ltr; /* مهم لثبات الخطوط */
    background: #fff;
}

/* اجعل محتوى العقد بالعربي */
.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;
    }

.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);
}
