
/* Theme fonts: Cairo, Noto Kufi Arabic, Tajawal, IBM Plex Sans Arabic, Almarai, Alyamama, Amiri, Changa, Lalezar, Zain */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Alyamama:wght@300..900&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Cairo:wght@200..1000&family=Changa:wght@200..800&family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&family=Lalezar&family=Noto+Kufi+Arabic:wght@100..900&family=Tajawal:wght@200;300;400;500;700;800;900&family=Zain:wght@200;300;400;700;800;900&display=swap');

:root {
    --tblr-font-sans-serif: 'Noto Kufi Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Theme Settings: color scheme (primary/accent) */
body[data-theme-color-scheme="default"] { --tblr-primary: #206bc4; }
body[data-theme-color-scheme="indigo"] { --tblr-primary: #4263eb; }
body[data-theme-color-scheme="azure"] { --tblr-primary: #4299e1; }
body[data-theme-color-scheme="purple"] { --tblr-primary: #ae3ec9; }
body[data-theme-color-scheme="magenta"] { --tblr-primary: #d6336c; }
body[data-theme-color-scheme="red"] { --tblr-primary: #d63939; }
body[data-theme-color-scheme="orange"] { --tblr-primary: #f76707; }
body[data-theme-color-scheme="yellow"] { --tblr-primary: #f59f00; }
body[data-theme-color-scheme="lime"] { --tblr-primary: #74b816; }
body[data-theme-color-scheme="teal"] { --tblr-primary: #0ca678; }
body[data-theme-color-scheme="green"] { --tblr-primary: #2fb344; }
body[data-theme-color-scheme="cyan"] { --tblr-primary: #17a2b8; }

/* Theme Settings: page background (light mode only) */
body[data-bs-theme="light"][data-theme-page-background="default"] { --tblr-body-bg: #f1f3f5; --tblr-body-bg-rgb: 241, 243, 245; }
body[data-bs-theme="light"][data-theme-page-background="white"] { --tblr-body-bg: #ffffff; --tblr-body-bg-rgb: 255, 255, 255; }
body[data-bs-theme="light"][data-theme-page-background="snow"] { --tblr-body-bg: #fffafa; --tblr-body-bg-rgb: 255, 250, 250; }
body[data-bs-theme="light"][data-theme-page-background="off-white"] { --tblr-body-bg: #fafafa; --tblr-body-bg-rgb: 250, 250, 250; }
body[data-bs-theme="light"][data-theme-page-background="light-gray"] { --tblr-body-bg: #f1f3f5; --tblr-body-bg-rgb: 241, 243, 245; }
body[data-bs-theme="light"][data-theme-page-background="cool"] { --tblr-body-bg: #f0f4f8; --tblr-body-bg-rgb: 240, 244, 248; }
body[data-bs-theme="light"][data-theme-page-background="light-blue"] { --tblr-body-bg: #e8f4fc; --tblr-body-bg-rgb: 232, 244, 252; }
body[data-bs-theme="light"][data-theme-page-background="light-green"] { --tblr-body-bg: #f0f9f0; --tblr-body-bg-rgb: 240, 249, 240; }
body[data-bs-theme="light"][data-theme-page-background="mint"] { --tblr-body-bg: #f0fff4; --tblr-body-bg-rgb: 240, 255, 244; }
body[data-bs-theme="light"][data-theme-page-background="light-lavender"] { --tblr-body-bg: #f5f0fa; --tblr-body-bg-rgb: 245, 240, 250; }
body[data-bs-theme="light"][data-theme-page-background="warm"] { --tblr-body-bg: #fdf6f0; --tblr-body-bg-rgb: 253, 246, 240; }
body[data-bs-theme="light"][data-theme-page-background="light-peach"] { --tblr-body-bg: #fff5eb; --tblr-body-bg-rgb: 255, 245, 235; }
body[data-bs-theme="light"][data-theme-page-background="light-yellow"] { --tblr-body-bg: #fefce8; --tblr-body-bg-rgb: 254, 252, 232; }

/*
 * Tinted page backgrounds (not default/gray/white): match cards/modals to --tblr-body-bg so lists match the swatch.
 * default + light-gray: keep Tabler contrast (gray page, white cards). white: unchanged.
 * Use rgba(var(--tblr-body-bg-rgb), a) for broad browser support (avoid rgb(... / a) issues).
 */
body[data-bs-theme="light"][data-theme-page-background]:not([data-theme-page-background="white"]):not([data-theme-page-background="default"]):not([data-theme-page-background="light-gray"]) {
    --tblr-bg-surface: var(--tblr-body-bg);
    --tblr-bg-surface-secondary: rgba(var(--tblr-body-bg-rgb), 0.96);
    --tblr-bg-surface-tertiary: rgba(var(--tblr-body-bg-rgb), 0.9);
    --tblr-card-bg: var(--tblr-body-bg);
    --tblr-card-cap-bg: var(--tblr-bg-surface-tertiary);
    --tblr-dropdown-bg: var(--tblr-body-bg);
    --tblr-popover-bg: var(--tblr-body-bg);
    --tblr-offcanvas-bg: var(--tblr-body-bg);
    --tblr-modal-bg: var(--tblr-body-bg);
    --tblr-modal-footer-bg: var(--tblr-bg-surface-tertiary);
}

/* Theme Settings: font family (only in theme settings) */
body[data-theme-font="cairo"] { --tblr-body-font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="noto-kufi-arabic"] { --tblr-body-font-family: 'Noto Kufi Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="tajawal"] { --tblr-body-font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="sans-serif"] { --tblr-body-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body[data-theme-font="ibm-plex-sans-arabic"] { --tblr-body-font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="almarai"] { --tblr-body-font-family: 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="alyamama"] { --tblr-body-font-family: 'Alyamama', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="amiri"] { --tblr-body-font-family: 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, serif; }
body[data-theme-font="changa"] { --tblr-body-font-family: 'Changa', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="lalezar"] { --tblr-body-font-family: 'Lalezar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body[data-theme-font="zain"] { --tblr-body-font-family: 'Zain', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body {
    --tblr-body-font-family: var(--tblr-font-sans-serif);
    --tblr-btn-font-family: var(--tblr-body-font-family);
    font-family: var(--tblr-body-font-family) !important;
}
body *:not(code):not(pre):not(samp):not(kbd) {
    font-family: var(--tblr-body-font-family) !important;
}

/* Theme Settings: corner radius factor (0, 0.5, 1, 1.5, 2) */
body[data-theme-corner-radius="0"] {
    --tblr-border-radius: 0;
    --tblr-border-radius-sm: 0;
    --tblr-border-radius-lg: 0;
}
body[data-theme-corner-radius="0.5"] {
    --tblr-border-radius: 2px;
    --tblr-border-radius-sm: 1px;
    --tblr-border-radius-lg: 4px;
}
body[data-theme-corner-radius="1"] {
    --tblr-border-radius: 4px;
    --tblr-border-radius-sm: 2px;
    --tblr-border-radius-lg: 8px;
}
body[data-theme-corner-radius="1.5"] {
    --tblr-border-radius: 6px;
    --tblr-border-radius-sm: 3px;
    --tblr-border-radius-lg: 12px;
}
body[data-theme-corner-radius="2"] {
    --tblr-border-radius: 8px;
    --tblr-border-radius-sm: 4px;
    --tblr-border-radius-lg: 16px;
}

/* Force cards and card parts to use theme corner radius (updates when JS sets --tblr-border-radius on body) */
body .card {
    border-radius: var(--tblr-border-radius) !important;
}
body .card-header:first-child,
body .card .card-header {
    border-top-left-radius: var(--tblr-border-radius) !important;
    border-top-right-radius: var(--tblr-border-radius) !important;
}
body .card-footer:last-child {
    border-bottom-left-radius: var(--tblr-border-radius) !important;
    border-bottom-right-radius: var(--tblr-border-radius) !important;
}

/* Smaller height and consistent width for form-selectgroup-boxes (Theme Settings, etc.) */
.form-selectgroup.form-selectgroup-boxes .form-selectgroup-label {
    padding: 0.375rem 0.75rem !important;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.form-selectgroup.form-selectgroup-boxes .form-selectgroup-item {
    min-height: 2rem;
}
.form-selectgroup.form-selectgroup-boxes.d-flex .form-selectgroup-item {
    min-width: 0;
}

/* Theme base: gray shades */
body[data-theme-base="gray"] {
    --tblr-gray-100: #f8f9fa;
    --tblr-gray-100-rgb: 248, 249, 250;
    --tblr-gray-200: #e9ecef;
    --tblr-gray-200-rgb: 233, 236, 239;
    --tblr-gray-300: #dee2e6;
    --tblr-gray-300-rgb: 222, 226, 230;
    --tblr-gray-400: #ced4da;
    --tblr-gray-400-rgb: 206, 212, 218;
    --tblr-gray-500: #adb5bd;
    --tblr-gray-500-rgb: 173, 181, 189;
    --tblr-gray-600: #6c757d;
    --tblr-gray-600-rgb: 108, 117, 125;
    --tblr-gray-700: #495057;
    --tblr-gray-700-rgb: 73, 80, 87;
    --tblr-gray-800: #343a40;
    --tblr-gray-800-rgb: 52, 58, 64;
    --tblr-gray-900: #212529;
    --tblr-gray-900-rgb: 33, 37, 41;
}
body[data-theme-base="zinc"] {
    --tblr-gray-100: #f4f4f5;
    --tblr-gray-100-rgb: 244, 244, 245;
    --tblr-gray-200: #e4e4e7;
    --tblr-gray-200-rgb: 228, 228, 231;
    --tblr-gray-300: #d4d4d8;
    --tblr-gray-300-rgb: 212, 212, 216;
    --tblr-gray-400: #a1a1aa;
    --tblr-gray-400-rgb: 161, 161, 170;
    --tblr-gray-500: #71717a;
    --tblr-gray-500-rgb: 113, 113, 122;
    --tblr-gray-600: #52525b;
    --tblr-gray-600-rgb: 82, 82, 91;
    --tblr-gray-700: #3f3f46;
    --tblr-gray-700-rgb: 63, 63, 70;
    --tblr-gray-800: #27272a;
    --tblr-gray-800-rgb: 39, 39, 42;
    --tblr-gray-900: #18181b;
    --tblr-gray-900-rgb: 24, 24, 27;
}
body[data-theme-base="neutral"] {
    --tblr-gray-100: #f5f5f5;
    --tblr-gray-100-rgb: 245, 245, 245;
    --tblr-gray-200: #e5e5e5;
    --tblr-gray-200-rgb: 229, 229, 229;
    --tblr-gray-300: #d4d4d4;
    --tblr-gray-300-rgb: 212, 212, 212;
    --tblr-gray-400: #a3a3a3;
    --tblr-gray-400-rgb: 163, 163, 163;
    --tblr-gray-500: #737373;
    --tblr-gray-500-rgb: 115, 115, 115;
    --tblr-gray-600: #525252;
    --tblr-gray-600-rgb: 82, 82, 82;
    --tblr-gray-700: #404040;
    --tblr-gray-700-rgb: 64, 64, 64;
    --tblr-gray-800: #262626;
    --tblr-gray-800-rgb: 38, 38, 38;
    --tblr-gray-900: #171717;
    --tblr-gray-900-rgb: 23, 23, 23;
}
body[data-theme-base="stone"] {
    --tblr-gray-100: #f5f5f4;
    --tblr-gray-100-rgb: 245, 245, 244;
    --tblr-gray-200: #e7e5e4;
    --tblr-gray-200-rgb: 231, 229, 228;
    --tblr-gray-300: #d6d3d1;
    --tblr-gray-300-rgb: 214, 211, 209;
    --tblr-gray-400: #a8a29e;
    --tblr-gray-400-rgb: 168, 162, 158;
    --tblr-gray-500: #78716c;
    --tblr-gray-500-rgb: 120, 113, 108;
    --tblr-gray-600: #57534e;
    --tblr-gray-600-rgb: 87, 83, 78;
    --tblr-gray-700: #44403c;
    --tblr-gray-700-rgb: 68, 64, 60;
    --tblr-gray-800: #292524;
    --tblr-gray-800-rgb: 41, 37, 36;
    --tblr-gray-900: #1c1917;
    --tblr-gray-900-rgb: 28, 25, 23;
}

body {
    font-feature-settings: "cv03", "cv04", "cv11";
}

.loading-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    background-color: rgba(239, 239, 239, 0.5);
    z-index: 1000;
}

.loading-overlay .spinner-div {
    height: 100%;
}

/* Promotion modal - smaller header */
#PromotionModal .modal-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    min-height: auto;
    background-color: var(--tblr-active-bg, #f8f9fa);
}
#PromotionModal .modal-title {
    font-size: 0.95rem;
    color: #6c757d;
}
#PromotionModal .modal-header .btn-close {
    top: auto;
}

/* Delete button on image */
.image-delete-icon {
    right: 0;
    z-index: 1;
    top: 0;
    position: absolute;
}

/* Back to Top Button */
#LanguageChangeIcon {
    height: 35px;
    width: 35px;
    position: fixed;
    top: 20px;
    left: 20px;
    color: #656d77;
    z-index: 999;
}

/* Dark Mode Button - uses theme color scheme */
#DarkModeButton {
    height: 35px;
    width: 35px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    color: var(--tblr-primary);
    border-radius: 50%;
    border: 1px solid var(--tblr-primary);
    font-size: 18px;
    z-index: 9999;
}
#DarkModeButton:hover {
    color: var(--tblr-primary);
    border-color: var(--tblr-primary);
    opacity: 0.85;
}

/* Sidebar: tighter vertical spacing between main nav links and dropdown items (RTL / Arabic UI) */
#navbar-menu .navbar-nav > .nav-item > .nav-link {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

#navbar-menu .navbar-nav .dropdown-menu .dropdown-item {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

@media (min-width: 768px) {
    .page-wrapper.sidebar-collapsed:not(.printing) {
        margin-right: 7rem !important;
    }

    #sidebar-container.sidebar-collapsed:not(.printing) {
        width: 6rem !important;
    }

    #sidebar-container.sidebar-collapsed:not(.printing) .menu-text {
        display: none;
    }
}

@media (min-width: 768px) {
    .border-start-md {
        right: 1px solid #dee2e6; /* or whatever border style you want */
    }

    .rounded-start-after-md {
        border-bottom-right-radius: var(--tblr-border-radius) !important;
        border-top-right-radius: var(--tblr-border-radius) !important;
    }

    .rounded-end-after-md {
        border-bottom-left-radius: var(--tblr-border-radius) !important;
        border-top-left-radius: var(--tblr-border-radius) !important;
    }
}

@media (max-width: 768px) {
    .rounded-start-b4-md {
        border-bottom-right-radius: var(--tblr-border-radius) !important;
        border-top-right-radius: var(--tblr-border-radius) !important;
    }

    .rounded-end-b4-md {
        border-bottom-left-radius: var(--tblr-border-radius) !important;
        border-top-left-radius: var(--tblr-border-radius) !important;
    }

    #IndexForm .select2 {
        margin-bottom: 4px !important;
    }
}

.responsive-width {
    width: 100% !important;
}

@media (min-width: 768px) {
    .responsive-width {
        width: auto !important;
    }
}

@media (min-width: 768px) {
    .mw-md-200 {
        max-width: 200px !important;
    }

    .mw-md-230 {
        max-width: 230px !important;
    }

    .mw-md-250 {
        max-width: 250px !important;
    }

    .mw-md-280 {
        max-width: 280px !important;
    }

    .mw-md-150 {
        max-width: 150px !important;
    }

    .mw-md-120 {
        max-width: 120px !important;
    }
}

.border-end-1px {
    border-left: 1px solid #ccc !important;
}

._1rem-wh {
    width: 1.1rem !important;
    height: 1.1rem !important;
}

.readonly-select {
   /* background-color: #f5f5f5;  Light grey background */
    cursor: not-allowed; /* Change cursor to indicate read-only */
    pointer-events: none; /* Disable mouse interaction */
}

.custom-DropDown-icon {
    background-image: url(../img/drop-down-icon.svg);
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
}

.padding-end-075rem {
    padding-right: 0.75rem !important;
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.dropdown-menu::-webkit-scrollbar {
    width: 12px; /* Adjust this width to match the default browser scrollbar */
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #ccc; /* Solid color for the scrollbar thumb */
    border-radius: 4px;
}

    .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background-color: #ccc; /* Darker color when hovered */
    }

.dropdown-menu::-webkit-scrollbar-track {
    background-color: #ccc; /* Background for the scrollbar track */
}

/* For Firefox */
.dropdown-menu {
    scrollbar-color: #888 #f1f1f1; /* thumb color, track color */
    scrollbar-width: auto; /* Let Firefox use its default width */
}



.select2-container .select2-dropdown .select2-results__options {
    max-height: 350px !important;
    overflow-y: auto;
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.select2-results__options::-webkit-scrollbar {
    width: 12px; /* Same as dropdown */
}

.select2-results__options::-webkit-scrollbar-thumb {
    background-color: #888; /* Solid color for the scrollbar thumb */
    border-radius: 4px;
}

    .select2-results__options::-webkit-scrollbar-thumb:hover {
        background-color: #555; /* Darker color when hovered */
    }

.select2-results__options::-webkit-scrollbar-track {
    background-color: #f1f1f1; /* Background for the scrollbar track */
}

/* For Firefox */
.select2-results__options {
    scrollbar-color: #888 #f1f1f1; /* thumb color, track color */
    scrollbar-width: auto; /* Let Firefox use its default width */
}

/* Style the disabled node */
.disabled-node {
    color: gray !important;
    cursor: not-allowed !important;
}

/* Remove annoying 1px left margin */
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-right: 0 !important;
}

@media print {
    table {
        border-collapse: collapse;
        width: 100%;
    }

    table, th, td {
        border: 1px solid #efefef;
    }
}

/* Branch Checkboxes Dropdown - Style to look like searchableSelect (RTL) */
.branch-checkboxes-dropdown {
    width: 48% !important;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    padding: 0rem 0;
}

.branch-checkboxes-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    text-align: right;
}

.branch-checkboxes-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.branch-checkboxes-dropdown .dropdown-item input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
    margin-left: 0.5rem;
    margin-right: 0;
    cursor: pointer;
}

.branch-checkboxes-dropdown .dropdown-item.selectAll-item {
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0.25rem;
    padding-bottom: 0.5rem;
}

/* Custom scrollbar styling for branch checkboxes */
.branch-checkboxes-dropdown::-webkit-scrollbar {
    width: 8px;
}

.branch-checkboxes-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.branch-checkboxes-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.branch-checkboxes-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive styles for branch checkboxes dropdown (RTL) */
@media (max-width: 768px) {
    .btn-group.position-static {
        position: relative !important;
    }

    .branch-checkboxes-dropdown {
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important;
        left: auto !important;
        right: 0 !important;
        max-height: 50vh !important;
        margin-top: 0.25rem !important;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

    .branch-checkboxes-dropdown .dropdown-item {
        white-space: normal !important;
        word-wrap: break-word;
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .branch-checkboxes-dropdown .dropdown-item span {
        word-break: break-word;
        flex: 1;
    }
}

/* Tablet responsive styles (RTL) */
@media (min-width: 769px) and (max-width: 991px) {
    .branch-checkboxes-dropdown {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Style the branch select button to look like form-select (RTL) */
.branch-select-button {
    width: 100%;
    text-align: right;
    padding: 0.375rem 0.75rem 0.375rem 2.25rem;
    padding-left: 0.75rem !important;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
}

/* Set height for BranchSelectButton */
#BranchSelectButton {
    height: 35px;
}

/* Force text alignment for Arabic interface */
html[lang="ar"] .branch-select-button {
    text-align: right !important;
}

/* Force text alignment for English interface */
html[lang="en"] .branch-select-button,
html:not([lang="ar"]) .branch-select-button {
    text-align: left !important;
}

.branch-select-button:hover {
    border-color: #86b7fe;
}

.branch-select-button:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table Container Scrollbar - For Quotations and other pages that need scrollable table */
.table-container-scrollable {
    max-height: 500px;
    overflow-y: auto;
}

@media print {
    .table-container-scrollable {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }
}

/* Report: production work orders detailed — main vs sub row styling */
.pwo-detailed-work-order-grid .pwo-detailed-row-main > td {
    background-color: #e8f4fc !important;
    color: #1a3a52 !important;
    font-weight: 700 !important;
    font-variation-settings: "wght" 700;
}

.pwo-detailed-work-order-grid .pwo-detailed-row-attached > td {
    background-color: #faf8f3 !important;
    color: #44403c !important;
}

.pwo-detailed-work-order-grid .pwo-detached-net-cost {
    color: #a16207 !important;
}

/* Production quantity variance — column headers */
.pwo-detailed-work-order-grid th.pwo-variance-metric-heading {
    color: #78350f !important;
    font-weight: 600 !important;
    font-variation-settings: "wght" 600;
}

.pwo-detailed-work-order-grid th.pwo-variance-percent-heading {
    color: #0c4a6e !important;
    font-weight: 600 !important;
    font-variation-settings: "wght" 600;
}

/* Data cells: weight; color from tone (sign of variance qty) */
.pwo-detailed-work-order-grid td.pwo-variance-metric-cell,
.pwo-detailed-work-order-grid td.pwo-variance-percent-cell {
    font-weight: 600 !important;
    font-variation-settings: "wght" 600;
}

.pwo-detailed-work-order-grid td.pwo-variance-tone-pos {
    color: #b91c1c !important;
}

.pwo-detailed-work-order-grid td.pwo-variance-tone-neg {
    color: #15803d !important;
}

.pwo-detailed-work-order-grid td.pwo-variance-tone-zero {
    color: #64748b !important;
}

.pwo-detailed-work-order-grid .pwo-detailed-row-main > td.pwo-variance-tone-pos {
    color: #991b1b !important;
}

.pwo-detailed-work-order-grid .pwo-detailed-row-main > td.pwo-variance-tone-neg {
    color: #166534 !important;
}

.pwo-detailed-work-order-grid .pwo-detailed-row-main > td.pwo-variance-tone-zero {
    color: #475569 !important;
}

/* تقرير حركة أوامر الإنتاج — عمود النسبة (لون حسب الإشارة؛ وزن خط عادي) */
.pwo-detailed-work-order-grid td.pom-movement-pct-cell {
    font-weight: 400 !important;
    font-variation-settings: normal;
}

.pwo-detailed-work-order-grid td.pom-movement-pct-pos {
    color: #15803d !important;
}

.pwo-detailed-work-order-grid td.pom-movement-pct-neg {
    color: #b91c1c !important;
}

.pwo-detailed-work-order-grid td.pom-movement-pct-zero {
    color: #64748b !important;
}

.pwo-detailed-work-order-grid td.pom-movement-pct-none {
    color: #94a3b8 !important;
}

/* تقرير حركة أوامر الإنتاج — ألوان أعمدة الكميات */
.pwo-detailed-work-order-grid th.pom-movement-qty-production,
.pwo-detailed-work-order-grid td.pom-movement-qty-production {
    color: #1d4ed8 !important;
}

.pwo-detailed-work-order-grid th.pom-movement-qty-receipt,
.pwo-detailed-work-order-grid td.pom-movement-qty-receipt {
    color: #ea580c !important;
}

.pwo-detailed-work-order-grid th.pom-movement-qty-waste,
.pwo-detailed-work-order-grid td.pom-movement-qty-waste {
    color: #dc2626 !important;
}

.pwo-detailed-work-order-grid th.pom-movement-qty-remaining,
.pwo-detailed-work-order-grid td.pom-movement-qty-remaining {
    color: #15803d !important;
}

.pwo-detailed-work-order-grid .pwo-detailed-row-attached > td:first-child {
    padding-inline-start: 0.35rem !important;
    border-inline-start: 2px solid #d97706 !important;
}

.pwo-detailed-work-order-grid tbody tr:not(.pwo-detailed-row-main):not(.pwo-detailed-row-attached) td:first-child {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}