html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff !important; /* إرجاع خلفية المتصفح العامة بيضاء نقية وطبيعية */
    color: #212529 !important; /* إرجاع الخطوط داكنة صريحة وواضحة لراحة العين */
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* 🔴 هيدر الفاتورة بنظام إسلام الأصلي - تم تفتيح الخلفية والخطوط فقط 🔴 */
.islam-invoice-wrapper {
    background-color: #f8f9fa !important; /* خلفية فاتحة مريحة تبتلع مستطيلات رادزن */
    border: 1px solid #dee2e6; /* إطار ناعم متناسق */
    padding: 15px;
    border-radius: 4px;
    margin: 10px auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.invoice-centered-title {
    text-align: center;
    width: 100%;
    margin-bottom: 18px;
    padding-bottom: 5px;
    border-bottom: 2px solid #0056b3; /* تحديد أزرق كلاسيكي فخم */
}

.invoice-title-yellow {
    color: #0056b3 !important; /* خط كحلي واضح للعنوان */
    font-size: 18px;
    font-weight: bold;
}

.invoice-title-white {
    color: #212529 !important; /* خط داكن صريح للرقم */
    font-size: 20px;
    font-weight: bold;
    margin-right: 12px;
}

.islam-strict-grid {
    display: grid;
    grid-gap: 12px 10px;
    width: 100%;
}

/* 👑 إرجاع مربعات رادزن لطبيعتها القياسية المستقرة لتختفي العتمة 👑 */
.rz-lookup, .rz-dropdown, .rz-calendar, .rz-textbox {
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    color: #212529 !important;
    box-shadow: none !important;
    width: 100% !important;
}

    /* الوهج الأزرق القياسي عند التركيز والوقوف داخل الحقل */
    .rz-lookup:focus-within, .rz-dropdown:focus-within, .rz-textbox:focus, .rz-calendar:focus-within {
        border-color: #86b7fe !important;
        outline: 0 !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }

    /* إرجاع النصوص الداخلية وحقول الإدخال العميقة لرادزن للون القياسي الداكن */
    .rz-inputtext, .rz-dropdown-label, .rz-lookup-label, .rz-calendar .rz-inputtext {
        color: #212529 !important;
        background-color: transparent !important;
        padding-right: 4px !important;
    }

.rz-placeholder {
    color: #6c757d !important;
}

/* 👑 شروط التجاوب وتقسيم الخلايا لشبكة الهيدر الأصلية لأبي إسلام بالملي 👑 */
@media (min-width: 960px) {
    .islam-strict-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .notes-cell {
        grid-column: span 5;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .islam-strict-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .notes-cell {
        grid-column: span 3;
    }
}

@media (max-width: 599px) {
    .islam-strict-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notes-cell {
        grid-column: span 2;
    }
}

.matrix-cell {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.islam-label-box {
    color: #212529 !important; /* تسمية داكنة صريحة للأكسس القياسي */
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    min-width: 75px;
    text-align: left;
    padding-left: 6px;
}

.islam-field-box {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
}
/* 🔴 جدول تفاصيل الأصناف بنظام إسلام الأصلي - تم الحفاظ على الأبعاد بالملي 🔴 */
.islam-table-wrapper {
    background-color: #ffffff !important; /* تحويل الخلفية البيضاء الطبيعية لراحة رادزن */
    border: 1px solid #dee2e6; /* إطار انسيابي ناعم */
    padding: 10px;
    border-radius: 4px;
    margin: 10px auto;
    width: 100%;
    box-shadow: none !important;
}

@media (min-width: 960px) {
    /* 👑 الحفاظ الصارم على شبكة الـ 16 عمود الحاكمة لأصنافك كما هي دون تغيير بيكسل واحد 👑 */
    .islam-matrix-header-desktop, .islam-matrix-row {
        display: grid !important;
        grid-template-columns: 40px 35px 85px 3.8fr 1.2fr 75px 85px 95px 105px 95px 95px 105px 125px 1.4fr 95px 125px;
        align-items: stretch;
        width: 100%;
    }

    .islam-matrix-header-desktop {
        border: 1px solid #dee2e6;
        border-bottom: 2px solid #0056b3;
    }

    .islam-matrix-row {
        border-left: 1px solid #dee2e6;
        border-right: 1px solid #dee2e6;
        border-bottom: 1px solid #dee2e6;
    }

    .td-cell-matrix {
        border-left: 1px solid #dee2e6;
        padding: 0px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

        .td-cell-matrix:last-child {
            border-left: none;
        }

    .m-label {
        display: none !important;
    }
}

@media (max-width: 959px) {
    .islam-matrix-header-desktop {
        display: none !important;
    }

    .islam-matrix-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .islam-matrix-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 8px 12px;
        padding: 12px;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
    }

    .col-delete-btn {
        grid-column: span 2 !important;
        width: 100%;
    }

    .m-label {
        display: inline-block !important;
        color: #0056b3 !important;
        font-weight: bold;
        margin-bottom: 4px;
        text-align: right;
    }
}

.th-cell-matrix {
    color: #0056b3 !important; /* خط كحلي صريح للعناوين */
    font-weight: bold !important;
    font-size: 12px;
    text-align: center;
    padding: 6px 2px !important;
    border-left: 1px solid #dee2e6 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .th-cell-matrix:last-child {
        border-left: none !important;
    }

.islam-grid-cell-box {
    width: 100%;
    background-color: #ffffff !important; /* حقول إدخال بيضاء ناصعة */
    color: #212529 !important;
    padding: 2px 4px !important;
    height: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.input-with-percent {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.percent-inside {
    position: absolute;
    left: 4px;
    color: #0056b3 !important;
    font-size: 11px;
    font-weight: bold;
}

.loss-badge-matrix {
    background-color: #ff4d4d;
    color: #ffffff !important;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 11px;
}

.text-right-align {
    justify-content: flex-start !important;
    text-align: right !important;
    padding-right: 6px !important;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.islam-matrix-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #0056b3;
    padding-top: 10px;
}

.footer-total-zone-expanded {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    justify-content: flex-end;
    padding-left: 15px;
}

.footer-matrix-label {
    color: #212529 !important;
    font-weight: bold !important;
    white-space: nowrap;
}

.footer-matrix-value-expanded {
    color: #212529 !important;
    font-weight: bold !important;
    font-size: 15px !important;
    border-bottom: 2px double #212529;
    padding: 0 15px;
    min-width: 140px;
    text-align: center;
}

.text-yellow {
    color: #0056b3 !important;
}

.text-white {
    color: #212529 !important;
}

.font-medium {
    font-weight: 500 !important;
}
/* 🔴 ذيل الفاتورة المالي بنظام إسلام الأصلي - تم الحفاظ على التقسيمات بالملي 🔴 */
.islam-footer-wrapper {
    background-color: #f8f9fa !important; /* تحويل للخلفية الفاتحة المتناسقة مع الرأس */
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 4px;
    margin: 10px auto;
    width: 100%;
    box-sizing: border-box;
}

.islam-strict-footer-matrix {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

@media (min-width: 960px) {
    /* 👑 التوزيع الخماسي الأصلي لأسطرك المالية كما هي دون أدنى تغيير 👑 */
    .footer-matrix-row {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-gap: 10px;
        align-items: center;
        width: 100%;
    }

    .align-left-desktop {
        justify-content: flex-end;
    }
}

@media (max-width: 959px) {
    .footer-matrix-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 10px;
        width: 100%;
        border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
        padding-bottom: 10px;
    }

        .footer-matrix-row:last-child {
            border-bottom: none;
        }

    .cell-tot, .cell-due, .cell-netdoc {
        grid-column: span 2;
    }
}

.f-cell {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.min-width-label {
    white-space: nowrap;
    min-width: 75px;
    text-align: left;
    padding-left: 6px;
    display: inline-block;
    color: #212529 !important;
    font-weight: bold;
}

.text-orange-spec {
    color: #ff9800 !important;
    font-size: 12px !important;
    font-weight: bold !important;
}

.footer-field-single-box, .footer-field-combo-box {
    flex-grow: 1;
    background-color: transparent !important;
    display: flex;
    align-items: center;
    min-width: 0;
}

.footer-field-combo-box {
    gap: 6px;
}

.orange-border {
    border-bottom: 1.5px solid #ff9800 !important;
}

.islam-footer-native-input {
    width: 100%;
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    text-align: center;
    height: 24px !important;
}

.bg-trans {
    cursor: not-allowed;
    opacity: 0.9;
}

.text-orange {
    color: #ff9800 !important;
}

.input-with-percent-footer {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.percent-inside-footer {
    position: absolute;
    left: 4px;
    color: #0056b3 !important;
    font-size: 11px;
    font-weight: bold;
}

.font-bold-footer {
    font-weight: bold !important;
}

.font-medium-footer {
    font-weight: 500 !important;
}

/* 👑 الحفاظ الصارم والكامل على هوية أزرارك الفيزيائية التابعة لرادزن دون مساس 👑 */
.rz-button.islam-global-access-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 14px !important;
    min-width: 65px !important;
    height: 32px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: bold !important;
    color: #212529 !important;
    transition: all 0.2s ease-in-out !important;
}

    .rz-button.islam-global-access-btn:hover:not(.rz-state-disabled) {
        border-color: #0056b3 !important;
        background: #e9ecef !important;
        color: #0056b3 !important;
    }

    .rz-button.islam-global-access-btn:active:not(.rz-state-disabled) {
        transform: translateY(1px) !important;
    }

    .rz-button.islam-global-access-btn .rz-button-text,
    .rz-button.islam-global-access-btn .rz-button-icon {
        color: #212529 !important;
    }

.islam-invoice-main-wrapper {
    padding-top: 5px !important;
    padding-right: 5px !important;
    padding-left: 5px !important;
    padding-bottom: 0px !important;
    margin: 0px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* 🎯 إجبار البلايس هولدر في رادزن دروب داون جريد على الظهور دائماً بنقاء وثبات */
.rz-dropdown-data-grid .rz-dropdown-label.rz-placeholder,
.rz-dropdown .rz-dropdown-label.rz-placeholder {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6c757d !important; /* لون رمادي خفيف شيك للتلميح */
    opacity: 1 !important; /* إلغاء أي شفافية تخفيه عن العين */
    width: 100% !important;
}

/*<style >*/
/* إزالة البادنج الجانبي لجميع مربعات النص والمدخلات في الجدول والفاتورة */
.islam-custom-input,
.rz-textbox,
.rz-inputtext,
.rz-spinner input,
.rz-dropdown-label {
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center !important;
}

/*</style >*/


