
:root {
    --app-font-family: "Cairo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

body,
button,
input,
select,
textarea {
    font-family: var(--app-font-family) !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}
.d-none {
    display: none;
}


/* Screen preview styling */
.barcode-label {
    border: 1px solid #ddd;
    margin: 5px;
    padding: 5px;
    font-family: Arial, sans-serif;
}

.product-name {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.size-price {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
}

img {
    max-width: 100%;
    height: auto;
}
#blazor-error-ui {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #b32121;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: Arial, sans-serif;
    font-size: 14px;
    max-width: 90%;
    z-index: 1000;
    display: none;
}

    #blazor-error-ui a.reload {
        background: white;
        color: #b32121;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
        font-weight: bold;
        text-decoration: none;
        transition: background 0.3s ease, color 0.3s ease;
    }

        #blazor-error-ui a.reload:hover {
            background: #f7c0c0;
            color: #8b1a1a;
        }

    #blazor-error-ui a.dismiss {
        background: none;
        border: none;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        transition: color 0.3s ease;
    }

        #blazor-error-ui a.dismiss:hover {
            color: #ffdddd;
        }

.blazor-error-boundary {
    background: #ffebeb;
    color: #b32121;
    padding: 1rem;
    border: 1px solid #b32121;
    border-radius: 6px;
    font-weight: bold;
}

    .blazor-error-boundary::after {
        content: "An unexpected error has occurred.";
        display: block;
        font-size: 14px;
        margin-top: 5px;
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
.rz-grid-table thead th {
    background: #E6EAED;
}
.custom-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgb(210, 223, 251), rgb(248, 250, 254));
    padding: 16px;
    border-radius: 8px;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-text {
    display: flex;
    flex-direction: column;
}

    .banner-text h5 {
        font-weight: 500;
        margin: 0;
    }

    .banner-text p {
        font-size: 14px;
        margin: 4px 0 0;
    }

.btn-excel {
    background-color: #047C5A;
    color: white;
    border: none;
}

    .btn-excel:hover {
        background-color: #035C44;
    }

.tooltip-custom .tooltip-inner {
    background-color: #343a40;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #343a40;
}

.custom-width {
    width: 400px; /* Adjust as needed */
}
.custom-date {
    width: 280px; /* Adjust as needed */
}
.custom-offcanvas {
    width: 680px !important;
    max-width: 680px !important;
}
.offcanvas-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff; /* Match offcanvas background */
    padding: 15px;
    border-top: 1px solid #ddd;
    z-index: 1050; /* Ensure it's above content */
    text-align: right;
}
.custom-offcanvas {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full height */
}

.offcanvas-body.content-scroll {
    flex-grow: 1;
    overflow-y: auto; /* Enables scrolling */
    max-height: calc(100vh - 120px); /* Adjust based on header/footer height */
    padding-bottom: 60px; /* Space for the footer */
}

.offcanvas-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff; /* Match modal background */
    padding: 15px;
    border-top: 1px solid #ddd;
    text-align: right;
    z-index: 1050;
}
.page-wrapper-new{
    height:200px;
}
.inventory-select-batch {
    width: 120px;
}

.inventory-input-qty {
    width: 80px;
}

.inventory-input-price {
    width: 100px;
}

.inventory-input-discount {
    width: 80px !important;
}

.inventory-input-discount-amount {
    width: 80px !important;
}

.inventory-select-tax {
    width: 100px;
}

.table td input,
.table td select {
    vertical-align: middle !important;
    margin: 0; /* remove extra margins */
    line-height: 1.5; /* ensure a uniform line height */
}

/* Optionally, you can also add custom classes if needed */
.inventory-input,
.inventory-select {
    vertical-align: middle;
}
.select-party-row {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

    .select-party-row:hover {
        background-color: #e9ecef;
    }

.border-dashed {
    border-style: dashed !important;
}

/* Make dropdown scrollable */
.dropdown-scrollable {
    max-height: 300px;
    overflow-y: auto;
    max-width: 402px;
}

/* Highlighted row styling */
.active-item {
    background-color: #007bff !important;
    color: #fff !important;
}
.rz-multiselect .rz-placeholder, .rz-dropdown .rz-placeholder {
    font-size: 13px !important;
}
.rz-menuitem, .rz-autocomplete-list-item, .rz-multiselect-item, .rz-autocomplete-items li, .rz-dropdown-items li, .rz-multiselect-items li, .rz-dropdown-item{
    font-size:14px !important;
}
.rz-listbox-filter-container .rz-inputtext, .rz-dropdown-filter-container .rz-inputtext, .rz-multiselect-filter-container .rz-inputtext{
    font-size:14px !important;
}
.mb-3{
    text-align:start;
}
/* Modern Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.3);
    /*backdrop-filter: blur(5px);*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.required-asterisk {
    color: #dc3545;
}

.modern-input {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.2s;
}

    .modern-input:focus {
        border-color: #4d90fe;
        box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.2);
    }

.input-with-validation {
    position: relative;
}

.validation-message {
    bottom: -18px;
    font-size: 12px;
    color: #dc3545;
}

.editor-container {
    border-radius: 8px;
    overflow: hidden;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.attachment-icon {
    font-size: 24px;
    color: #e74c3c;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-weight: 500;
    margin-bottom: 3px;
}

.attachment-meta {
    font-size: 13px;
    color: #777;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
}
.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #777;
    cursor: pointer;
    transition: all 0.2s;
}

    .close-btn:hover {
        color: #333;
        transform: rotate(90deg);
    }

.with-spinner {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-container {
        margin: 0 15px;
    }
}
.modal-dialog-scrollable .modal-content{
    background: #ffffff;
}
.rz-datepicker:has(.rz-datepicker-trigger) > .rz-inputtext {
    height: 36px;
}
.rz-button-md {
    padding: 0;
    height: auto;
    line-height: 1.25rem;
    min-height: 0rem;
    min-width: 2.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1.25px;
    text-transform: lowercase;
}
/* site.css or in a <style> block */
.btn-icon {
    width: 2.5rem; /* adjust as needed */
    height: 2.5rem; /* adjust as needed */
    padding: 0; /* no extra padding */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem; /* same as btn�s rounded corners */
}
.components-reconnect-modal {
    display: none !important;
}

/* ----------------------------------------------
   Responsive overflow fixes (tables + form fields)
   ---------------------------------------------- */
.page-wrapper,
.card-body,
.modal-body,
.offcanvas-body {
    max-width: 100%;
    overflow-x: auto;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
}

.table td,
.table th {
    white-space: nowrap;
}

input,
select,
textarea,
.form-control,
.form-select,
.rz-inputtext,
.rz-dropdown,
.rz-multiselect,
.rz-datepicker,
.input-group {
    max-width: 100%;
}

@media (max-width: 992px) {
    .custom-width,
    .custom-date {
        width: 100% !important;
    }

    .custom-offcanvas {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .inventory-select-batch,
    .inventory-input-qty,
    .inventory-input-price,
    .inventory-input-discount,
    .inventory-input-discount-amount,
    .inventory-select-tax {
        width: 100% !important;
        min-width: 90px;
    }

    .table td,
    .table th {
        white-space: nowrap;
    }
}

/* POS page — cancel RTL sidebar margin and fix overflow for full-height layout */
body.layout-mode-rtl .pos-pg-wrapper,
.pos-pg-wrapper {
    margin-right: 0 !important;
    margin-left: 0 !important;
    overflow: hidden !important;
}

/* ── Restaurant POS — global layout overrides (fixes Blazor RTL scoped CSS) ── */
.rpos-shell {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 60px) !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    direction: rtl !important;
}
.rpos-topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    height: 62px !important;
    background: #12151f !important;
    border-bottom: 1px solid #2e3350 !important;
    padding: 0 16px !important;
    gap: 12px !important;
}
.rpos-body {
    display: flex !important;
    flex-direction: row !important;
    flex: 1 !important;
    overflow: hidden !important;
    min-height: 0 !important;
}
.rpos-order-side {
    width: 370px !important;
    min-width: 320px !important;
    max-width: 370px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #1a1e2e !important;
}
.rpos-menu-side {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
}

/* POS header — full width, flex layout, no float gap */
body.layout-mode-rtl .header.pos-header {
    right: 0 !important;
    left: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 0 15px;
}

body.layout-mode-rtl .header.pos-header .header-left {
    float: none !important;
    border-left: none !important;
    width: auto;
}

body.layout-mode-rtl .header.pos-header .user-menu {
    float: none !important;
    display: flex !important;
    align-items: center;
}

/* ── Modern Calculator ─────────────────────────────── */
.calc-modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #4361ee;
    color: #fff;
    direction: rtl;
}

.calc-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.calc-close-btn {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    font-size: 14px;
    padding: 0;
}
.calc-close-btn:hover { background: rgba(255,255,255,.3); }

.calc-display-wrap {
    background: #f8f9ff;
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaf6;
}

.calc-display {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    outline: none;
    direction: ltr;
    padding: 4px 0;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e8eaf6;
    padding: 1px;
}

.calc-btn {
    border: none;
    font-size: 20px;
    font-weight: 600;
    padding: 18px 10px;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.calc-btn:active { transform: scale(.93); }

.calc-btn-num    { background: #ffffff; color: #1a1a2e; }
.calc-btn-num:hover { filter: brightness(.95); }

.calc-btn-op     { background: #eef0fd; color: #4361ee; }
.calc-btn-op:hover { filter: brightness(.93); }

.calc-btn-clear  { background: #fff1f0; color: #e74c3c; }
.calc-btn-clear:hover { filter: brightness(.93); }

.calc-btn-back   { background: #fff8eb; color: #f59e0b; }
.calc-btn-back:hover { filter: brightness(.93); }

.calc-btn-equals {
    background: #4361ee;
    color: #ffffff;
    font-size: 24px;
}
.calc-btn-equals:hover { filter: brightness(1.1); }

/* ----------------------------------------------
   Global table & layout overflow containment
   ---------------------------------------------- */

/* Prevent the whole page from scrolling horizontally */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Main content wrapper — clip at the edge */
.page-wrapper .content,
.content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Any card that holds a table: let the card itself scroll */
.card {
    min-width: 0;
}

/* Wrap every table in a scroll container automatically
   (covers tables that aren't already inside .table-responsive) */
.card-body > .table,
.card-body > table,
.content > .table,
.content > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Ensure the table header/body/footer keep their display roles
   after we set the outer <table> to block */
.card-body > .table thead,
.card-body > .table tbody,
.card-body > .table tfoot,
.card-body > table thead,
.card-body > table tbody,
.card-body > table tfoot {
    display: table;
    width: 100%;
}

/* When .table-responsive wraps the table, let it own the scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Cells: keep nowrap so columns don't collapse, but let the container scroll */
.table td,
.table th {
    white-space: nowrap;
}

/* Page-header / top action bar — wrap on small screens */
.page-header {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Container-fluid pages — honour viewport */
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Grid rows inside cards — don't let them burst out */
.card .row {
    margin-left: 0;
    margin-right: 0;
}

/* Responsive: collapse columns earlier for dense tables */
@media (max-width: 1200px) {
    .table td,
    .table th {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-btn {
        width: 100%;
    }
    .page-btn .btn {
        width: 100%;
    }
}

/* ----------------------------------------------
   Theme settings page
   ---------------------------------------------- */
.theme-settings-page .settings-wrapper {
    gap: 20px;
    align-items: stretch;
}

.theme-settings-surface {
    min-width: 0;
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
    overflow: hidden;
}

.theme-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf0f4;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.theme-settings-header h4 {
    margin: 2px 0 0;
    color: #111827;
    font-size: 22px;
    font-weight: 700;
}

.theme-settings-kicker {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.theme-settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px;
}

.theme-setting-panel {
    border: 1px solid #edf0f4;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
}

.theme-setting-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.theme-setting-title > i {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f4f46;
    background: #e9f5f2;
    font-size: 18px;
}

.theme-setting-title h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.theme-setting-title p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.theme-choice-grid,
.theme-color-grid {
    display: grid;
    gap: 12px;
}

.theme-choice-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-choice-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-choice-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme-color-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.theme-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-choice-card,
.theme-color-card,
.theme-layout-card {
    min-height: 84px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.theme-choice-card:hover,
.theme-color-card:hover,
.theme-layout-card:hover {
    border-color: #9fb6ad;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.07);
    transform: translateY(-1px);
}

.theme-choice-input:checked + .theme-choice-card,
.theme-choice-input:checked + .theme-color-card,
.theme-choice-input:checked + .theme-layout-card {
    border-color: #1f4f46;
    box-shadow: 0 0 0 3px rgba(31, 79, 70, .12);
}

.theme-choice-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #111827;
    font-size: 20px;
    flex: 0 0 auto;
}

.theme-choice-copy,
.theme-layout-card > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.theme-choice-copy strong,
.theme-layout-card strong {
    color: #111827;
    font-size: 14px;
}

.theme-choice-copy small,
.theme-layout-card small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.theme-color-card {
    min-height: 58px;
}

.theme-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
    flex: 0 0 auto;
}

.theme-layout-preview {
    width: 58px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 5px;
    padding: 6px;
    background: #eef2f7;
    flex: 0 0 auto;
}

.theme-layout-preview span:first-child,
.theme-layout-preview span:last-child {
    border-radius: 5px;
    background: #fff;
}

.theme-layout-preview.layout-mini {
    grid-template-columns: 8px 1fr;
}

[data-theme=dark] .theme-settings-surface,
[data-theme=dark] .theme-setting-panel,
[data-theme=professional] .theme-settings-surface,
[data-theme=professional] .theme-setting-panel {
    background: var(--nexterp-surface, #fff);
    border-color: var(--nexterp-border, #edf0f4);
}

[data-theme=dark] .theme-settings-header,
[data-theme=professional] .theme-settings-header {
    background: var(--nexterp-surface-muted, #f8fafc);
    border-color: var(--nexterp-border, #edf0f4);
}

[data-theme=dark] .theme-settings-header h4,
[data-theme=dark] .theme-setting-title h5,
[data-theme=dark] .theme-choice-copy strong,
[data-theme=dark] .theme-layout-card strong,
[data-theme=professional] .theme-settings-header h4,
[data-theme=professional] .theme-setting-title h5,
[data-theme=professional] .theme-choice-copy strong,
[data-theme=professional] .theme-layout-card strong {
    color: var(--nexterp-text, #111827);
}

[data-theme=dark] .theme-settings-kicker,
[data-theme=dark] .theme-setting-title p,
[data-theme=dark] .theme-choice-copy small,
[data-theme=dark] .theme-layout-card small,
[data-theme=professional] .theme-settings-kicker,
[data-theme=professional] .theme-setting-title p,
[data-theme=professional] .theme-choice-copy small,
[data-theme=professional] .theme-layout-card small {
    color: var(--nexterp-muted, #64748b);
}

[data-theme=dark] .theme-choice-card,
[data-theme=dark] .theme-color-card,
[data-theme=dark] .theme-layout-card,
[data-theme=professional] .theme-choice-card,
[data-theme=professional] .theme-color-card,
[data-theme=professional] .theme-layout-card {
    background: var(--nexterp-surface, #fff);
    border-color: var(--nexterp-border, #e5e7eb);
}

/* Mobile sidebar RTL fixes */
.sidebar-overlay.opened {
    display: block;
}

@media (max-width: 991.96px) {
    body.layout-mode-rtl .sidebar {
        left: auto;
        right: 0;
        margin-left: 0;
        margin-right: -575px;
    }

    body.layout-mode-rtl .main-wrapper.slide-nav .sidebar {
        margin-right: 0;
    }

    body.layout-mode-rtl .sidebar-overlay {
        left: 0;
        right: 0;
    }
}

/* ----------------------------------------------
   Professional theme
   ---------------------------------------------- */
[data-theme=professional] {
    --primary-rgb: 31, 79, 70;
    --primary-color: #1f4f46;
    --nexterp-bg: #f4f6f8;
    --nexterp-surface: #ffffff;
    --nexterp-surface-muted: #f8faf9;
    --nexterp-border: #dfe6e3;
    --nexterp-text: #16201d;
    --nexterp-muted: #65736f;
    --nexterp-accent: #b08d57;
}

[data-theme=professional] body,
body[data-theme=professional] {
    background: var(--nexterp-bg);
    color: var(--nexterp-text);
}

[data-theme=professional] .main-wrapper,
[data-theme=professional] .page-wrapper {
    background: var(--nexterp-bg);
}

[data-theme=professional] .header {
    background: #ffffff;
    border-bottom: 1px solid var(--nexterp-border);
    box-shadow: 0 8px 24px rgba(22, 32, 29, .06);
}

[data-theme=professional] .header .header-left {
    background: #ffffff;
    border-color: var(--nexterp-border);
}

[data-theme=professional] .sidebar,
[data-theme=professional] .settings-sidebar {
    background: #ffffff;
    border-color: var(--nexterp-border);
    box-shadow: 8px 0 24px rgba(22, 32, 29, .04);
}

[data-theme=professional] .sidebar .sidebar-menu > ul > li a,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li a,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li.submenu-open ul li a {
    color: var(--nexterp-muted);
}

[data-theme=professional] .sidebar .sidebar-menu > ul > li a:hover,
[data-theme=professional] .sidebar .sidebar-menu > ul > li a.active,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li a:hover,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li a.active,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li.submenu-open ul li a:hover,
[data-theme=professional] .settings-sidebar .sidebar-menu > ul > li.submenu-open ul li a.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), .09);
}

[data-theme=professional] .card,
[data-theme=professional] .modal-content,
[data-theme=professional] .dropdown-menu {
    background: var(--nexterp-surface);
    border-color: var(--nexterp-border);
    box-shadow: 0 12px 30px rgba(22, 32, 29, .06);
}

[data-theme=professional] .card .card-header,
[data-theme=professional] .card .card-footer,
[data-theme=professional] .modal-header {
    background: var(--nexterp-surface-muted);
    border-color: var(--nexterp-border);
}

[data-theme=professional] h1,
[data-theme=professional] h2,
[data-theme=professional] h3,
[data-theme=professional] h4,
[data-theme=professional] h5,
[data-theme=professional] h6,
[data-theme=professional] .card-title,
[data-theme=professional] .fw-semibold {
    color: var(--nexterp-text);
}

[data-theme=professional] .text-primary,
[data-theme=professional] a {
    color: var(--primary-color) !important;
}

[data-theme=professional] .btn-primary,
[data-theme=professional] .bg-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

[data-theme=professional] .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme=professional] .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
}

[data-theme=professional] .form-control,
[data-theme=professional] .form-select,
[data-theme=professional] .rz-dropdown,
[data-theme=professional] .rz-numeric {
    background: #fff;
    border-color: var(--nexterp-border);
    color: var(--nexterp-text);
}

[data-theme=professional] .table thead,
[data-theme=professional] .rz-grid-table thead th {
    background: #e9efed;
    color: var(--nexterp-text);
}

[data-theme=professional] .badge.bg-primary,
[data-theme=professional] .page-link.active {
    background: var(--primary-color) !important;
}

[data-theme=professional] .theme-setting-title > i,
[data-theme=professional] .theme-choice-input:checked + .theme-choice-card .theme-choice-icon {
    color: #fff;
    background: var(--primary-color);
}

[data-theme=professional] .theme-choice-input:checked + .theme-choice-card,
[data-theme=professional] .theme-choice-input:checked + .theme-color-card,
[data-theme=professional] .theme-choice-input:checked + .theme-layout-card {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14);
}

@media (max-width: 1200px) {
    .theme-choice-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .theme-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .theme-settings-page .settings-wrapper,
    .theme-settings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .theme-settings-grid {
        padding: 16px;
    }

    .theme-choice-grid-2,
    .theme-choice-grid-3,
    .theme-choice-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------
   Mobile app shell and PWA polish
   ---------------------------------------------- */
html,
body {
    max-width: 100%;
}

body {
    -webkit-tap-highlight-color: transparent;
}

@media (display-mode: standalone) {
    body {
        overscroll-behavior-y: contain;
    }
}

@media (max-width: 991.96px) {
    body {
        overflow-x: hidden;
    }

    .main-wrapper {
        min-height: 100dvh;
        overflow-x: hidden;
    }

    .page-wrapper,
    body.layout-mode-rtl .page-wrapper,
    body.layout-mode-rtl.mini-sidebar .page-wrapper {
        margin: 0 !important;
        padding-top: 60px;
        min-height: 100dvh;
    }

    .content,
    .settings-content,
    .page-wrapper > .content {
        padding: 14px !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    .content .row,
    .settings-content .row,
    .page-wrapper > .content .row {
        min-width: 0;
    }

    .content [class*="col-"],
    .settings-content [class*="col-"],
    .page-wrapper > .content [class*="col-"],
    .content .card,
    .settings-content .card,
    .page-wrapper > .content .card,
    .content .card-body,
    .settings-content .card-body,
    .page-wrapper > .content .card-body {
        max-width: 100%;
        min-width: 0;
    }

    .content .d-flex,
    .settings-content .d-flex,
    .page-wrapper > .content .d-flex {
        min-width: 0;
    }

    .content img,
    .settings-content img,
    .page-wrapper > .content img {
        max-width: 100%;
        height: auto;
    }

    .page-header,
    .page-title,
    .card-title,
    .header-title {
        min-width: 0;
    }

    .page-header,
    .page-header .page-btn,
    .page-header .add-item {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .page-header .btn,
    .page-header .page-btn .btn,
    .action-table-data .btn,
    .btn-icon {
        min-height: 40px;
    }

    .header {
        left: 0 !important;
        right: 0 !important;
        height: 60px;
        padding-inline: 8px;
    }

    .header .main-header,
    .header .user-menu {
        min-width: 0;
    }

    .header .user-menu {
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .header .user-menu::-webkit-scrollbar {
        display: none;
    }

    .header .nav-searchinputs,
    .header .select-store-dropdown {
        display: none !important;
    }

    .header .mobile_btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .header .header-left {
        width: auto;
        min-width: 118px;
        border: 0 !important;
        padding-inline: 8px;
    }

    .header .header-left .logo img,
    .header .header-left .logo-normal img {
        max-height: 38px;
        max-width: 108px;
        object-fit: contain;
    }

    .language-selector .select-pl {
        max-width: 132px;
        min-height: 38px;
        font-size: 12px;
    }

    .sidebar {
        width: min(84vw, 320px);
        max-width: 320px;
        z-index: 1040;
    }

    .sidebar .sidebar-inner {
        height: calc(100dvh - 60px);
    }

    .sidebar-overlay {
        top: 60px;
        z-index: 1035;
    }

    .card {
        border-radius: 8px;
    }

    .card-body,
    .card-header,
    .card-footer {
        padding: 14px !important;
    }

    .table-responsive,
    .rz-data-grid,
    .rz-grid,
    .rz-datatable,
    .table-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > .table,
    .table-wrapper > .table,
    .rz-data-grid table,
    .rz-grid table,
    .rz-datatable table,
    .rz-grid-table {
        width: max-content;
        min-width: 720px;
        max-width: none;
    }

    .table-responsive > .table,
    .table-wrapper > .table {
        margin-bottom: 0;
    }

    .table:not(.table-responsive .table):not(.table-wrapper .table) {
        min-width: 100%;
    }

    .rz-data-grid .rz-cell-data,
    .rz-grid .rz-cell-data,
    .rz-datatable .rz-cell-data,
    .table td,
    .table th {
        white-space: nowrap;
    }

    body.layout-mode-rtl .table-responsive,
    body.layout-mode-rtl .table-wrapper,
    body.layout-mode-rtl .rz-data-grid,
    body.layout-mode-rtl .rz-grid,
    body.layout-mode-rtl .rz-datatable {
        direction: rtl;
        text-align: right;
    }

    .modal-dialog {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        margin: 12px auto;
    }

    .modal-content {
        max-height: calc(100dvh - 24px);
        overflow: hidden;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-control,
    .form-select,
    .btn {
        min-height: 40px;
    }

    .dropdown-menu {
        max-width: calc(100vw - 24px);
    }

    .settings-wrapper {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .settings-wrapper > .card,
    .settings-wrapper .card.flex-fill {
        flex: 1 1 auto !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .settings-wrapper .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .settings-wrapper .card-header > .d-flex {
        flex-wrap: wrap;
        width: 100%;
    }

    .settings-wrapper .card-header .btn {
        flex: 1 1 150px;
        justify-content: center;
    }

    body.layout-mode-rtl .settings-wrapper,
    body.layout-mode-rtl .settings-wrapper .card,
    body.layout-mode-rtl .settings-wrapper .table-responsive {
        direction: rtl;
    }

    .settings-sidebar {
        width: 100%;
        max-width: none;
        position: static;
    }

    .settings-sidebar .sidebar-inner,
    .settings-sidebar .sidebar-menu ul {
        max-height: none;
    }

    .settings-sidebar .sidebar-menu > ul > li > ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .settings-sidebar .sidebar-menu a {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 8px;
    }
}

@media (max-width: 575.98px) {
    .content,
    .settings-content,
    .page-wrapper > .content {
        padding: 10px !important;
    }

    .page-header,
    .page-header .page-btn,
    .page-header .add-item {
        align-items: stretch;
    }

    .page-header .btn,
    .page-header .page-btn .btn,
    .page-header .add-item .btn {
        width: 100%;
    }

    .settings-sidebar .sidebar-menu > ul > li > ul {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 8px auto;
    }
}
