/*
 * Source-backed Qt visual parity, batch 3 — 2026-11-18.
 * Sources extracted directly from the uploaded offline ERPSYSTEM RAR:
 * modules/sales/views/sales_window_ui_mixin.py:
 *     _create_invoices_tab (13 columns, row/header 44, pixel widths).
 * modules/purchases/views/purchases_window_ui_mixin.py:
 *     _create_invoices_tab (13 columns, row/header 40, widths),
 *     _create_returns_tab (11 columns, 40px, widths).
 * modules/expenses/views/expense_window.py: setup_ui (7 columns,
 *     35px toolbar/filters, 28x74 row actions, 10px outer spacing).
 * This stylesheet applies presentation only in logged-in customer portals.
 * It never changes invoice state, SQL, tenant permissions or Master Owner.
 */

/* SalesWindow: 13-column invoice register, source grid OFF, rows 44px. */
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .table-scroll{
 overflow:auto;min-width:0;scrollbar-width:thin
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)){
 width:100%;min-width:1198px;table-layout:fixed;border-collapse:separate;
 border-spacing:0;direction:rtl
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) thead th{
 box-sizing:border-box;height:44px;min-height:44px;
 text-align:center;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) tbody td{
 box-sizing:border-box;height:44px;min-height:44px;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-data-scope select[aria-label="نوع نطاق العرض"]{
 box-sizing:border-box;width:120px;min-width:120px;max-width:120px
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-data-scope input[type=date]{
 box-sizing:border-box;width:124px;min-width:124px;max-width:124px
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-data-scope>.qt-invoice-button:nth-of-type(1){
 box-sizing:border-box;width:112px;min-width:112px
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-data-scope>.qt-invoice-button:nth-of-type(2){
 box-sizing:border-box;width:104px;min-width:104px
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-data-scope>.qt-invoice-button:nth-of-type(3){
 box-sizing:border-box;width:96px;min-width:96px
}
/* Sales invoice filters: original Qt Search / Type / Delivery buttons. */
@media(min-width:1151px){
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .qt-invoice-filters{
  gap:9px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin
 }
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .qt-invoice-filters select[aria-label="حالة التسليم"]{
  box-sizing:border-box;width:154px;min-width:154px;max-width:154px
 }
}

/* PurchasesWindow: source fixed columns except the supplier name. */
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register>.table-scroll{
 min-width:0;overflow:auto;scrollbar-width:thin
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)){
 box-sizing:border-box;width:100%;min-width:1251px;table-layout:fixed;
 border-collapse:separate;border-spacing:0;direction:rtl
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) thead th{
 box-sizing:border-box;height:40px;min-height:40px;white-space:nowrap
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) tbody td{
 box-sizing:border-box;height:40px;min-height:40px;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters select[aria-label="نوع فاتورة المشتريات"]{
 box-sizing:border-box;width:142px;min-width:142px;max-width:142px
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters select[aria-label="حالة فواتير المشتريات"]{
 box-sizing:border-box;width:155px;min-width:155px;max-width:155px
}
/* Purchase returns list: 11 source columns and 40px rows. */
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)){
 box-sizing:border-box;min-width:1102px;width:100%;table-layout:fixed;direction:rtl
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td){
 box-sizing:border-box;height:40px;white-space:nowrap
}

/* ExpensesWindow: offline native toolbar + 7-column table contract. */
body.qt-desktop-mode .qt-expenses-window{
 box-sizing:border-box;display:flex;flex-direction:column;min-width:0;
 gap:10px;padding:10px;background:#fff
}
body.qt-desktop-mode .qt-expenses-window>h2{
 margin:0;color:#244875;font-weight:800
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-toolbar{
 box-sizing:border-box;margin:0;min-height:35px;padding:0;
 border:0;background:transparent;border-radius:0;gap:8px
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-toolbar>.row-actions{
 display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-toolbar .button{
 box-sizing:border-box;min-height:35px;height:35px;
 padding:6px 12px;font-weight:700;white-space:nowrap
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-toolbar .button:last-child{
 max-width:120px
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter{
 box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;
 gap:12px;min-height:35px;min-width:0;margin:0;padding:0;
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter>label{
 display:flex;flex-direction:row;align-items:center;gap:7px;
 margin:0;min-width:0;white-space:nowrap;font-weight:700;color:#244875
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input{
 box-sizing:border-box;height:35px;min-height:35px;
 background:#fff;color:#244875;border:2px solid #d1d1d6;
 border-radius:6px;padding:6px 8px
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input[type=search]{
 width:300px;min-width:170px;max-width:300px
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input[type=date]{
 width:150px;min-width:120px;max-width:150px
}
body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input:focus-visible{
 outline:none;border-color:#244875;background:#e8f0f7
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results{
 min-width:0;overflow:auto
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results>.table-scroll{
 min-width:0;overflow:auto;border:1px solid #d1d1d6;
 border-radius:6px;background:white
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)){
 box-sizing:border-box;direction:rtl;table-layout:fixed;
 min-width:850px;width:100%;border-collapse:collapse
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table th{
 background:#244875;color:#fff;font-weight:700;
 padding:10px 8px;border:0;font-size:10pt
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table td{
 box-sizing:border-box;border-bottom:1px solid #d1d1d6;
 height:40px;padding:8px;vertical-align:middle
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table tbody tr:nth-child(even){
 background:#f9f9f9
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table td:last-child .row-actions{
 display:flex;align-items:center;gap:5px;flex-wrap:nowrap;
}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table td:last-child .row-actions .button{
 box-sizing:border-box;min-width:74px;width:auto;max-width:none;height:28px;min-height:28px;
 padding:2px 10px;font-size:11px;white-space:nowrap
}
@media(max-width:680px){
 body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter{
  align-items:stretch
 }
 body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter>label{
  flex-wrap:wrap;flex:1 1 150px
 }
 body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input[type=search],
 body.qt-desktop-mode .qt-expenses-window>.qt-expense-filter input[type=date]{
  max-width:100%;width:100%
 }
}

/* Exact Qt setColumnWidth sequences (RTL logical order). */
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(1){width:48px;min-width:48px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(2){width:112px;min-width:112px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(3){width:112px;min-width:112px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(4){width:126px;min-width:126px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(5){width:80px;min-width:80px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(6){width:96px;min-width:96px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(7){width:96px;min-width:96px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(8){width:96px;min-width:96px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(9){width:76px;min-width:76px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(10){width:98px;min-width:98px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(11){width:86px;min-width:86px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(12){width:86px;min-width:86px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(13){width:86px;min-width:86px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(1){width:52px;min-width:52px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(2){width:112px;min-width:112px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(3){width:112px;min-width:112px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(4){width:145px;min-width:145px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(5){width:92px;min-width:92px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(6){width:105px;min-width:105px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(7){width:105px;min-width:105px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(8){width:105px;min-width:105px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(9){width:86px;min-width:86px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(10){width:105px;min-width:105px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(11){width:80px;min-width:80px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(12){width:76px;min-width:76px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register table:has(thead th:nth-child(13)) :is(th,td):nth-child(13){width:76px;min-width:76px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(1){width:52px;min-width:52px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(2){width:112px;min-width:112px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(3){width:126px;min-width:126px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(4){width:112px;min-width:112px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(5){width:145px;min-width:145px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(6){width:108px;min-width:108px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(7){width:105px;min-width:105px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(8){width:110px;min-width:110px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(9){width:80px;min-width:80px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(10){width:76px;min-width:76px}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-workarea>:has(.qt-purchase-returns-toolbar) .table-scroll table:has(thead th:nth-child(11)) :is(th,td):nth-child(11){width:76px;min-width:76px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(1){width:100px;min-width:100px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(2){width:100px;min-width:100px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(3){width:150px;min-width:150px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(4){width:100px;min-width:100px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(5){width:100px;min-width:100px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(6){width:100px;min-width:100px}
body.qt-desktop-mode .qt-expenses-window .qt-expense-results table:has(thead th:nth-child(7)) :is(th,td):nth-child(7){width:228px;min-width:228px}

/* SalesWindow._create_returns_tab (sales_window_ui_mixin.py:703–734).
 * Exact native RTL logical column sequence:
 * [48,116,118,112,148,108,86,86,86] = 908px.
 * QTableWidget has Interactive resize, no stretched last column and
 * 44px header/rows. Scope only this sales-return register: not invoices,
 * purchases, saved invoice previews, or finance/print layouts.
 */
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register{
 padding:0;border:0
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll{
 min-width:0;overflow-x:auto;overflow-y:auto;scrollbar-width:thin;border-inline:0
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child){
 box-sizing:border-box;width:908px;min-width:908px;max-width:none;
 table-layout:fixed;border-collapse:separate;border-spacing:0;
 direction:rtl
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td){
 box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) thead th{
 height:44px;min-height:44px
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) tbody td{
 height:44px;min-height:44px
}

body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(1){width:48px;min-width:48px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(2){width:116px;min-width:116px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(3){width:118px;min-width:118px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(4){width:112px;min-width:112px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(5){width:148px;min-width:148px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(6){width:108px;min-width:108px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(7){width:86px;min-width:86px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(8){width:86px;min-width:86px}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-returns-register>.table-scroll>table:has(thead tr>th:nth-child(9):last-child) :is(th,td):nth-child(9){width:86px;min-width:86px}

/* qt-sales-invoice-form-toolbar-source-20261118
 * Source (user-provided RAR):
 * modules/sales/views/sales_invoice_ui_mixin.py::_create_toolbar(),
 * lines 2497-2515 and 2520-2549. Qt-scaled default widths:
 * [82,82,118,82,82,100,100,88,78]. Third sales button 118px
 * was already correct; remaining action widths had incorrectly fallen
 * back to the generic 82px. Styling only; no change to enabled states.
 */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar{
  scrollbar-width:thin;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn{
  font-size:17px;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(1){min-width:82px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(2){min-width:82px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(3){min-width:118px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(4){min-width:82px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(5){min-width:82px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(6){min-width:100px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(7){min-width:100px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(8){min-width:88px}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar > .qt-sales-entry-btn:nth-child(9){min-width:78px}
/* SalesInvoiceUiMixin._create_content_area() uses search 175..285px
 * and customer_id_field exactly 66px at default Qt DPI (lines 2733-2750).
 * Keep browser flex shrink for narrower viewports, but do not stretch
 * either input to the current generic 330px / 90px defaults.
 */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row label:first-child{
  box-sizing:border-box;flex:0 1 285px;width:285px;min-width:175px;max-width:285px;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row label:nth-child(2){
  box-sizing:border-box;flex:0 0 66px;width:66px;min-width:66px;max-width:66px;
}

/* Batch 5 commercial feature enhancements (thumbs, danger badges, salon visit cards) */
.qt-native-product-image-preview{display:inline-flex;align-items:center;gap:8px;vertical-align:middle}
.qt-native-thumb{width:42px;height:42px;object-fit:cover;border-radius:6px;border:1px solid #c5d4e6;background:#fff}
.badge.danger{display:inline-block;padding:2px 8px;border-radius:999px;background:#fce8ea;color:#a51d2a;font-size:12px;font-weight:700;border:1px solid #f2c0c5}
.button.danger{background:#c82333;color:#fff;border-color:#b21f2d}
.button.danger:hover:not(:disabled){background:#a71d2a}
.qt-salon-visit-card{margin-top:12px;padding:12px;border:1px solid #d5e0ec;border-radius:8px;background:#fafcff}
.qt-salon-visit-card h4{margin:0 0 8px 0;color:#244875;font-size:14px}

/* Full-screen desktop workspace sizing, offline Qt module parity & sub-window alignment */
body.qt-desktop-mode .sidebar{padding:4px 0}
body.qt-desktop-mode .qt-native-nav{
 gap:4px;padding:2px 6px 6px;
 scrollbar-width:thin;scrollbar-color:#9bb8db #193558
}
body.qt-desktop-mode .qt-native-nav::-webkit-scrollbar{width:6px}
body.qt-desktop-mode .qt-native-nav::-webkit-scrollbar-track{background:#193558}
body.qt-desktop-mode .qt-native-nav::-webkit-scrollbar-thumb{background:#9bb8db;border-radius:4px}

/* Compact desktop header & full untruncated module titles */
body.qt-desktop-mode .header{
 min-height:54px;height:54px;flex:0 0 54px;padding:4px 14px;gap:12px
}
body.qt-desktop-mode .header-title{
 width:auto;min-width:180px;max-width:440px;flex:0 1 auto
}
body.qt-desktop-mode .header h1{
 font-size:18px;padding:2px 0;line-height:1.2
}
body.qt-desktop-mode .qt-window-bar{
 flex:0 0 28px;height:28px;padding-inline-start:10px
}
body.qt-desktop-mode .qt-window-close{
 width:36px;min-height:27px;height:27px
}

body.qt-desktop-mode #body-content{
 display:flex;flex-direction:column;padding:8px 10px 10px;
 overflow-y:auto;overflow-x:hidden;min-height:0;min-width:0
}
body.qt-desktop-mode .qt-render-root,
body.qt-desktop-mode .qt-render-root.qt-salon-native-window{
 width:100%;max-width:none;min-height:100%;margin:0;padding:4px 6px 8px;
 flex:1 0 auto;display:flex;flex-direction:column;gap:8px;box-sizing:border-box
}
body.qt-desktop-mode .qt-render-root>:only-child{
 width:100%;max-width:none;margin-inline:0;min-height:100%;flex:1 1 auto;box-sizing:border-box
}
/* Full-width expansion for all 31 module workspaces (beats ID-scoped max-width constraints) */
body.qt-desktop-mode #body-content :is(.qt-branches-window,.qt-product-notes,.qt-delivery-areas,.qt-printer-ports,.qt-rooms-window,.qt-tables-workspace,.qt-devices-workspace,.qt-maintenance-workspace,.qt-shifts-window,.qt-expenses-window,.qt-accounts-workspace,.qt-accounts-dashboard,.qt-employees-workspace,.qt-employees-list,.qt-sessions-window,.qt-settings-window,.qt-users-window,.qt-mfg-window,.qt-sub-window,.qt-ship-window,.qt-cleanup-window,.qt-delmon-window,.qt-native-module,.qt-pos-window,.qt-sales-window,.qt-invoice-purchase,.qt-pos-inv-window,.qt-treasury-window,.qt-salon-navigation,.qt-salon-appointments-page,.qt-salon-sales,.qt-salon-chairs,.qt-salon-settings,.qt-salon-packages-workspace,.qt-salon-invoices-workspace){
 width:100%;max-width:none;margin-inline:0;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-sales-window.qt-sales-entry-open .qt-invoice-workarea>.panel:not(.hidden){
 width:100%;max-width:none;margin-inline:0;box-sizing:border-box
}
body.qt-desktop-mode #body-content :is(.qt-expenses-window .qt-expense-history,.qt-native-module-main){
 flex:1 1 auto;min-height:240px;display:flex;flex-direction:column
}
body.qt-desktop-mode #body-content :is(th,td){letter-spacing:0}
body.qt-desktop-mode #body-content .qt-native-table-scroll{scrollbar-width:thin}

/* Reports window: never stretch top filter bar to 100% height; keep tabs + results visible */
body.qt-desktop-mode #body-content .qt-report-window{
 flex:0 0 auto;min-height:0;width:100%;max-width:none;padding:8px 12px;margin:0;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-report-native-tabs{
 flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:6px;
 padding:6px 10px;background:#fff;border:1px solid #d5e0ec;border-radius:8px;width:100%;box-sizing:border-box
}
body.qt-desktop-mode #body-content :is(.qt-report-results,.qt-report-treasury,.qt-report-items,.qt-report-trial){
 flex:1 1 auto;min-height:0;width:100%;max-width:none;margin:0;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-report-cards{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px
}

/* Sales & POS Invoices: keep table structure + summary visible on open (matches offline SalesWindow) */
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-scope-required{
 width:100%;max-width:none;min-height:0;height:auto;margin:0 0 6px;padding:7px 14px;
 display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;
 background:#eef5fc;border:1px solid #b8d0e8;border-radius:8px;
 text-align:right;box-shadow:none;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-scope-required strong{
 font-size:13px;color:#173b66;margin:0
}
body.qt-desktop-mode #body-content .qt-sales-window .qt-sales-scope-required p{
 font-size:12px;color:#3d5a80;margin:0
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scroll{
 display:block
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scope-message{
 width:100%;max-width:none;min-height:0;height:auto;margin:6px 0 0;padding:7px 14px;
 display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;
 background:#eef5fc;border:1px solid #b8d0e8;border-radius:8px;
 text-align:right;box-shadow:none;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scope-message :is(strong,p){
 margin:0;font-size:12.5px
}

/* Native modules (Customers, Suppliers, Warehouses, Inventory): prevent filter button & table clipping */
body.qt-desktop-mode #body-content .qt-native-filters{
 display:flex;flex-wrap:wrap;align-items:center;gap:6px;overflow:visible
}
body.qt-desktop-mode #body-content .qt-native-filters>input[type=search],
body.qt-desktop-mode #body-content .qt-native-filters>input[type=text]{
 flex:1 1 200px;min-width:160px
}
body.qt-desktop-mode #body-content .qt-native-module .qt-native-module-header{
 padding:6px 10px;gap:8px
}
body.qt-desktop-mode #body-content .qt-native-module .qt-native-cards{
 gap:6px
}
body.qt-desktop-mode #body-content .qt-native-module .qt-native-card{
 padding:8px 10px;min-height:0
}
body.qt-desktop-mode #body-content .qt-native-stock-table{
 width:100%;min-width:0;table-layout:auto;font-size:11.5px
}
body.qt-desktop-mode #body-content .qt-native-stock-table :is(th,td){
 padding:5px 4px;height:36px;white-space:nowrap;width:auto;min-width:0;max-width:none
}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_selector"]{width:32px;min-width:32px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_seq"]{width:34px;min-width:34px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="name"]{width:175px;min-width:140px;max-width:220px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="barcode"]{width:100px;min-width:85px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="category"]{width:80px;min-width:68px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_qty"]{width:58px;min-width:52px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_min"]{width:66px;min-width:58px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_cost"]{width:66px;min-width:58px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_price"]{width:74px;min-width:66px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_value"]{width:84px;min-width:74px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_date"]{width:82px;min-width:74px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_status"]{width:68px;min-width:62px}
body.qt-desktop-mode #body-content .qt-native-stock-table [data-field="_qt_barcode"]{width:68px;min-width:62px}

/* Fit 13-column Sales & Purchases registers cleanly on 1366px-1520px desktop monitors without clipping actions */
@media(max-width:1520px){
 body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)),
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)){
  width:100%;min-width:0;table-layout:auto;font-size:11.5px
 }
 body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) :is(th,td),
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) :is(th,td){
  width:auto;min-width:0;padding:4px 3px;white-space:normal
 }
 body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) :is(th,td):nth-child(n),
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) :is(th,td):nth-child(n){
  width:auto;min-width:0
 }
 body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) td :is(.button,.qt-invoice-button),
 body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-register .table-scroll table:has(thead th:nth-child(13)) td :is(.button,.qt-invoice-button){
  padding:2px 6px;font-size:11px;min-width:0;width:auto;min-height:26px;height:26px;white-space:nowrap
 }
}

/* Salon / Bookings window: single-row horizontal search bar & compact top tab navigation */
body.qt-desktop-mode #body-content .qt-salon-navigation{
 flex:0 0 auto;min-height:0;padding:8px 12px;display:flex;flex-direction:column;gap:8px
}
body.qt-desktop-mode #body-content .qt-salon-titlebar{
 display:flex;align-items:center;justify-content:space-between;gap:10px
}
body.qt-desktop-mode #body-content .qt-salon-titlebar h2{
 margin:0;font-size:17px;color:#244875
}
body.qt-desktop-mode #body-content .qt-salon-tabs{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;margin:0;padding:0
}
body.qt-desktop-mode #body-content .qt-salon-tabs .button{
 flex:0 0 auto;min-height:36px;padding:6px 14px;display:inline-flex;align-items:center;gap:6px
}
body.qt-desktop-mode #body-content .qt-salon-appointments-page{
 flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:10px;padding:12px
}
body.qt-desktop-mode #body-content .qt-salon-appointments-page>h2{margin:0;font-size:17px}
body.qt-desktop-mode #body-content .qt-salon-appointments-page>.hint{margin:0;font-size:12px}
body.qt-desktop-mode #body-content .qt-salon-appointments-page>form.form-grid,
body.qt-desktop-mode #body-content .qt-salon-appointments-page>form:not(.qt-salon-booking-form){
 display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto;
 gap:10px;align-items:end;background:#f8fafc;border:1px solid #d7e2ee;border-radius:8px;padding:10px 12px
}
body.qt-desktop-mode #body-content .qt-salon-appointments-page>form>label{
 display:flex;flex-direction:column;gap:4px;margin:0;min-width:0
}
body.qt-desktop-mode #body-content .qt-salon-appointments-page>form>button{
 height:38px;min-height:38px;padding:0 18px;white-space:nowrap
}

/* Settings window: wrap all 13 tabs cleanly & place labels directly next to controls */
body.qt-desktop-mode #body-content .qt-settings-tabs{
 display:flex;flex-wrap:wrap;gap:4px;padding:6px 8px;overflow:visible;
 background:#eef3f9;border-bottom:2px solid #244875
}
body.qt-desktop-mode #body-content .qt-settings-tabs>.button{
 flex:0 0 auto;padding:6px 10px;font-size:12px;border-radius:6px 6px 0 0;
 border:1px solid #c5d4e6;white-space:nowrap;min-height:32px
}
body.qt-desktop-mode #body-content #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field{
 display:grid;grid-template-columns:175px minmax(0,1fr);justify-content:start;align-items:center;gap:12px
}
body.qt-desktop-mode #body-content .qt-settings-field{
 display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:4px 0
}
body.qt-desktop-mode #body-content .qt-settings-field>span:not(.qt-settings-color-editor):not(.qt-settings-unit):not(.qt-settings-unit-suffix):not(.qt-settings-dark-label),
body.qt-desktop-mode #body-content .qt-settings-field>label.qt-settings-color-label{
 flex:0 0 175px;text-align:right;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content .qt-settings-field>input:not([type=checkbox]):not([type=radio]),
body.qt-desktop-mode #body-content .qt-settings-field>select,
body.qt-desktop-mode #body-content .qt-settings-field>textarea{
 flex:1 1 auto;width:100%;max-width:100%;min-width:0
}
body.qt-desktop-mode #body-content .qt-settings-group textarea{
 min-height:56px;max-height:110px
}
body.qt-desktop-mode #body-content .qt-settings-actions{
 position:sticky;bottom:0;background:#fff;border-top:1px solid #d5e0ec;
 padding:10px 14px;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:10px
}

/* Tables & Devices workspaces: stop right/left column clipping */
body.qt-desktop-mode #body-content .qt-tables-workspace>.qt-tables-columns{
 grid-template-columns:minmax(0,1fr) 310px;gap:10px
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-table{
 min-width:100%;width:100%;table-layout:auto;font-size:12px
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-history-group table{
 table-layout:auto;font-size:11px;width:100%
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-history-group :is(th,td){
 padding:4px 3px;white-space:normal;font-size:10.5px;line-height:1.25
}

/* Employees window: keep search bar & action toolbar on single crisp rows + prevent mid-word email wrap */
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row{
 flex-wrap:nowrap;gap:6px;padding:6px 10px
}
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>input[type=search]{
 min-width:170px;flex:2 1 190px;height:36px;min-height:36px
}
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>label>select{
 width:128px;min-width:120px;height:36px;min-height:36px
}
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>.button{
 height:36px;min-height:36px;padding:4px 10px;width:auto;min-width:0
}
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-toolbar{
 gap:5px;padding:6px 10px
}
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-toolbar>.button{
 height:35px;min-height:35px;padding:4px 10px;width:auto;min-width:0;font-size:12px
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-info-card{
 font-size:12px;gap:4px
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-info-value{
 overflow-wrap:anywhere;word-break:normal;font-size:11.5px;padding:4px 8px
}

/* Accounts dashboard: compact toolbar/filter rows & stop analytics table clipping */
body.qt-desktop-mode #body-content .qt-accounts-dashboard{gap:8px}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-dashboard-header{padding:8px 12px}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-native-command-row,
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-native-filters{
 padding:6px 10px;min-height:0;gap:8px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-summary-card{padding:10px 12px}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel .qt-native-table,
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel table{
 width:100%;min-width:0;table-layout:auto;font-size:11px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel :is(th,td){
 padding:4px 5px;white-space:normal
}

/* POS product image rendering & crisp contrast on total badge */
body.qt-desktop-mode #body-content .qt-pos-product-visual .qt-pos-product-img{
 width:100%;height:100%;object-fit:cover;border-radius:6px;display:block
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.toolbar>strong.qt-pos-native-total{
 color:#ffffff;background:#244875;font-size:15px;font-weight:800;
 min-width:155px;padding:6px 14px;border-radius:7px
}

@media(min-width:1200px){
 body.qt-desktop-mode #body-content .qt-pos-window{
  display:flex;flex-direction:column;flex:1 1 auto;min-height:100%;gap:6px
 }
 body.qt-desktop-mode #body-content .qt-pos-workspace{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(560px,49%);
  flex:1 1 auto;min-height:0;gap:8px;align-items:stretch
 }
 body.qt-desktop-mode #body-content .qt-pos-cart{
  width:100%;min-width:560px;max-width:none;
  display:flex;flex-direction:column;min-height:0
 }
 body.qt-desktop-mode #body-content .qt-pos-catalog{
  display:flex;flex-direction:column;min-height:0;height:100%
 }
 body.qt-desktop-mode #body-content .qt-pos-products-grid{
  flex:1 1 auto;min-height:220px;overflow-y:auto
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form{
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:5px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .invoice-lines{
  flex:1 1 110px;min-height:110px;max-height:clamp(140px,30vh,310px);overflow-y:auto
 }
 /* Exact 6-column POS cart line alignment with 4-part quantity controls (- qty + keypad) */
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item{
  grid-template-columns:minmax(126px,1.55fr) 68px 118px 56px minmax(92px,1fr) 44px;
  gap:4px;min-width:0;width:100%;box-sizing:border-box;padding-inline:5px;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item>*{
  min-width:0;width:100%;max-width:100%;justify-self:stretch;box-sizing:border-box
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-controls{
  display:grid;grid-template-columns:24px minmax(34px,1fr) 24px 24px;gap:2px;
  align-items:center;width:100%;min-width:0;overflow:hidden
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-button{
  width:24px;min-width:24px;max-width:24px;height:28px;min-height:28px;padding:0;
  display:flex;align-items:center;justify-content:center;font-size:13px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-controls input[data-qty]{
  width:100%;min-width:0;height:28px;min-height:28px;padding:0 2px;text-align:center;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register input[data-price]{
  height:28px;min-height:28px;padding:0 5px;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-note,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-remove{
  padding:2px 4px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
 }
 /* Align POS cart form grid cleanly with full-width single-row customer picker */
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:6px 8px;padding:5px 8px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:has(.qt-pos-customer-picker){
  grid-column:1/-1
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-picker{
  display:grid;grid-template-columns:minmax(140px,1fr) minmax(160px,1.2fr) auto;
  gap:6px;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager{
  display:flex;align-items:center;gap:4px;flex-wrap:nowrap;margin:0
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid :is(input,select){
  min-height:32px;height:32px;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid textarea{
  min-height:32px;max-height:48px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart-header .qt-pos-cart-search{
  flex:1 1 210px;min-width:170px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart-header .qt-pos-cart-search input{
  max-width:none;width:100%
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions{
  min-height:48px;padding:4px 8px 6px
 }
}

/* Sub-windows & Dialogs: spacious desktop layout, sticky save/cancel footer, inline checkboxes, unclipped toolbars */
body.qt-desktop-mode :is(.dialog.qt-native-edit-dialog,.qt-native-edit-backdrop>.dialog,.qt-expense-dialog,.qt-expense-report-dialog){
 width:min(1160px,95vw);max-width:1160px;max-height:92dvh;
 display:flex;flex-direction:column;overflow:hidden;padding:0;box-sizing:border-box
}
body.qt-desktop-mode :is(.dialog.qt-native-edit-dialog,.qt-native-edit-backdrop>.dialog,.qt-expense-dialog,.qt-expense-report-dialog)>h2{
 flex:0 0 auto;margin:0;padding:11px 18px;background:#244875;color:#fff;
 font-size:16px;font-weight:700;border-radius:10px 10px 0 0
}
body.qt-desktop-mode :is(.dialog.qt-native-edit-dialog,.qt-native-edit-backdrop>.dialog)>form.qt-native-edit-form{
 display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto;
 padding:12px 18px 0;gap:10px
}
body.qt-desktop-mode :is(.dialog.qt-native-edit-dialog,.qt-native-edit-backdrop>.dialog) fieldset{
 padding:10px 12px;margin:0;border:1px solid #d5e0ec;border-radius:8px
}
body.qt-desktop-mode :is(.dialog.qt-native-edit-dialog,.qt-native-edit-backdrop>.dialog) .dialog-actions{
 position:sticky;bottom:0;flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;
 gap:8px;padding:10px 0 12px;margin-top:auto;background:#fff;border-top:1px solid #d5e0ec;z-index:10
}
body.qt-desktop-mode :is(.qt-expense-dialog,.qt-expense-report-dialog)>:not(h2){
 margin-inline:16px
}
body.qt-desktop-mode :is(.qt-expense-dialog,.qt-expense-report-dialog)>:last-child{
 margin-bottom:14px
}
/* Render checkboxes cleanly inline beside their labels inside edit modals */
body.qt-desktop-mode .qt-native-edit-dialog label:has(>input[type=checkbox]){
 display:inline-flex;flex-direction:row-reverse;align-items:center;justify-content:flex-end;
 gap:8px;padding:6px 10px;background:#f8fafc;border:1px solid #d9e4f0;border-radius:6px;
 cursor:pointer;align-self:end;min-height:36px;box-sizing:border-box;width:100%
}
body.qt-desktop-mode .qt-native-edit-dialog label:has(>input[type=checkbox])>input[type=checkbox]{
 width:16px;height:16px;min-width:16px;min-height:16px;margin:0;flex:0 0 16px
}

/* Sales & Purchase Invoice Sub-Windows: unclipped toolbar buttons & balanced header alignment */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-toolbar{
 display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:6px 12px;overflow:visible
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-toolbar>.qt-purchase-entry-btn{
 font-size:13.5px;height:34px;min-height:34px;padding:0 10px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar,.qt-purchase-entry-toolbar) button:disabled{
 opacity:0.65;color:#475569;background:#eef2f7;border:1px solid #cbd5e1
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-form>.form-grid{
 align-items:start
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-sequence,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-sequence{
 margin-inline-start:auto;display:flex;align-items:center;gap:5px;flex-wrap:nowrap
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-sequence .qt-sales-entry-btn,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-sequence .qt-purchase-entry-btn{
 width:auto;min-width:56px;padding:4px 10px;font-size:12.5px;white-space:nowrap
}

/* ============================================================================
   Batch 6: Zero-clipping, checkbox/radio & select normalization, all 13 Settings
   tabs, unified Qt navy headers, and full commercial desktop visual polish
   ============================================================================ */

/* 1. Neutralize styles.css global input { width:100%; min-height:43px; padding:12px } on checkboxes & radios */
body.qt-desktop-mode #body-content input[type="checkbox"],
body.qt-desktop-mode #body-content input[type="radio"],
body.qt-desktop-mode dialog input[type="checkbox"],
body.qt-desktop-mode dialog input[type="radio"],
body.qt-desktop-mode .dialog input[type="checkbox"],
body.qt-desktop-mode .dialog input[type="radio"]{
 width:17px!important;min-width:17px!important;max-width:17px!important;
 height:17px!important;min-height:17px!important;max-height:17px!important;
 padding:0!important;margin:0!important;flex:0 0 17px!important;
 border-radius:4px;accent-color:#244875;cursor:pointer;vertical-align:middle
}
body.qt-desktop-mode #body-content input[type="radio"],
body.qt-desktop-mode dialog input[type="radio"]{border-radius:50%}

/* 2. Sidebar density matching offline PySide6 desktop ergonomics */
body.qt-desktop-mode .qt-native-nav button{
 min-height:36px;height:36px;font-size:15.5px;padding:0 8px
}

/* 3. Unified Offline Qt #244875 navy table headers across Rooms, Tables, Devices, Maintenance & Accounts (Shifts uses #f1f3f5) */
body.qt-desktop-mode #body-content :is(.qt-rooms-table,.qt-tables-table,.qt-tables-history-group table,.qt-devices-table,.qt-maintenance-table,.qt-native-accounts table,.qt-native-account-master table,.qt-native-account-documents table,.qt-accounts-workspace table,.qt-shift-report-dialog table) thead th{
 background:#244875!important;color:#ffffff!important;font-weight:700;border-bottom:2px solid #1a3558
}

/* 4. Prevent stretched giant <select> elements in paginators, maintenance, reports & settings */
body.qt-desktop-mode #body-content .qt-invoice-pager{
 display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px;
 padding:6px 10px;min-height:40px;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-invoice-pager label{
 display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:0 0 auto;margin:0;width:auto
}
body.qt-desktop-mode #body-content .qt-invoice-pager select,
body.qt-desktop-mode #body-content .qt-native-pagination select{
 width:auto!important;min-width:74px!important;max-width:110px!important;
 height:32px!important;min-height:32px!important;padding:2px 10px!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-native-pagination{
 display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px
}
body.qt-desktop-mode #body-content .qt-native-pagination :is(label,span,small,strong){
 white-space:nowrap;flex:0 0 auto
}
body.qt-desktop-mode #body-content .qt-maintenance-workspace .qt-rooms-actions{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:10px;padding:8px 12px
}
body.qt-desktop-mode #body-content .qt-maintenance-workspace .qt-rooms-actions>label{
 display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;width:auto;margin:0;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-maintenance-workspace .qt-rooms-actions select{
 width:190px!important;min-width:160px!important;max-width:220px!important;
 height:36px!important;min-height:36px!important;padding:4px 10px!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-maintenance-workspace .qt-rooms-actions .button{
 height:36px;min-height:36px;padding:0 14px;flex:0 0 auto
}

/* 5. All 13 Settings tabs: zero crushed labels, zero overlapping fieldsets/sticky footer, clean RTL checkboxes & radios */
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window){
 display:flex!important;flex-direction:column!important;min-height:0!important;height:100%!important;overflow:hidden!important
}
body.qt-desktop-mode #body-content .qt-settings-tabs{
 justify-content:flex-start;flex:0 0 auto
}
body.qt-desktop-mode #body-content .qt-settings-body{
 flex:1 1 0!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;padding:8px 12px 10px!important
}
body.qt-desktop-mode #body-content :is(.qt-settings-form,.qt-settings-page):not([hidden]):not(.hidden){
 display:flex!important;flex-direction:column!important;gap:10px;flex:1 1 0!important;min-height:0!important;height:auto!important;overflow:hidden!important
}
body.qt-desktop-mode #body-content :is(.qt-settings-form,.qt-settings-page):is([hidden],.hidden){display:none!important}
body.qt-desktop-mode #body-content .qt-settings-fields{
 flex:1 1 0!important;min-height:120px!important;display:flex!important;flex-direction:column!important;gap:12px!important;
 padding:8px 10px 16px!important;overflow-y:auto!important;overflow-x:hidden!important
}
body.qt-desktop-mode #body-content .qt-settings-backup-panel{
 flex:1 1 0!important;min-height:120px!important;overflow-y:auto!important;overflow-x:hidden!important
}
body.qt-desktop-mode #body-content .qt-settings-group{
 flex:0 0 auto!important;display:flex;flex-direction:column;gap:8px;padding:12px 14px;
 min-height:max-content!important;height:auto!important;overflow:visible!important;margin-inline:0!important
}
body.qt-desktop-mode #body-content .qt-settings-group>*{
 flex:0 0 auto
}
body.qt-desktop-mode #body-content :is(#qt-settings-page-general,#qt-settings-page-system,#qt-settings-page-appearance,#qt-settings-page-printing,#qt-settings-page-thermal_invoices,#qt-settings-page-a4_invoices,#qt-settings-page-contract,#qt-settings-page-thermal_pos,#qt-settings-page-shift_printing,#qt-settings-page-preparation,#qt-settings-page-zatca_draft,#qt-settings-page-program) .qt-settings-field:not(:has(>input[type="checkbox"])):not(:has(>input[type="radio"])):not(:has(.qt-settings-color-editor)):not(:has(.qt-settings-dark-toggle)):not(:has(.qt-settings-unit)):not(:has(.qt-settings-unit-suffix)):not(:has([name="contract_clauses_text"])){
 display:grid!important;grid-template-columns:175px minmax(0,1fr)!important;align-items:center!important;justify-content:stretch!important;gap:12px!important;
 padding:4px 0!important;min-height:34px;height:auto;width:100%!important;box-sizing:border-box;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content :is(#qt-settings-page-general,#qt-settings-page-system,#qt-settings-page-appearance,#qt-settings-page-printing,#qt-settings-page-thermal_invoices,#qt-settings-page-a4_invoices,#qt-settings-page-contract,#qt-settings-page-thermal_pos,#qt-settings-page-shift_printing,#qt-settings-page-preparation,#qt-settings-page-zatca_draft,#qt-settings-page-program) .qt-settings-field:has(>textarea):not(:has([name="contract_clauses_text"])){
 align-items:start!important
}
body.qt-desktop-mode #body-content :is(#qt-settings-page-general,#qt-settings-page-system,#qt-settings-page-appearance,#qt-settings-page-printing,#qt-settings-page-thermal_invoices,#qt-settings-page-a4_invoices,#qt-settings-page-contract,#qt-settings-page-thermal_pos,#qt-settings-page-shift_printing,#qt-settings-page-preparation,#qt-settings-page-zatca_draft,#qt-settings-page-program) .qt-settings-field:is(:has(.qt-settings-unit),:has(.qt-settings-unit-suffix)){
 display:grid!important;grid-template-columns:175px 130px auto!important;align-items:center!important;justify-content:start!important;gap:10px!important;
 padding:4px 0!important;min-height:34px;height:auto;width:100%!important;box-sizing:border-box;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content .qt-settings-field :is(.qt-settings-unit,.qt-settings-unit-suffix){
 flex:0 0 auto!important;width:auto!important;min-width:0!important;white-space:nowrap!important;font-weight:700;color:#334155;text-align:right
}
body.qt-desktop-mode #body-content .qt-settings-field:has(>input[type="checkbox"]):not(:has(.qt-settings-dark-toggle)),
body.qt-desktop-mode #body-content .qt-settings-field:has(>input[type="radio"]){
 display:flex!important;flex-direction:row-reverse!important;align-items:center!important;
 justify-content:flex-end!important;gap:10px!important;width:100%!important;max-width:none!important;
 min-height:34px!important;height:auto!important;padding:6px 10px!important;text-align:right!important;
 white-space:normal!important;line-height:1.45;cursor:pointer;
 background:#f8fafc;border:1px solid #e6edf5;border-radius:6px;font-weight:600;color:#1e293b
}
body.qt-desktop-mode #body-content .qt-settings-field:has(>input[type="checkbox"]):not(:has(.qt-settings-dark-toggle)):hover,
body.qt-desktop-mode #body-content .qt-settings-field:has(>input[type="radio"]):hover{
 background:#eef4fb;border-color:#cbd9eb
}
body.qt-desktop-mode #body-content .qt-settings-field:has(>input[type="checkbox"])>span:not(.qt-settings-color-editor):not(.qt-settings-dark-label){
 flex:1 1 auto!important;width:auto!important;text-align:right;font-weight:600;color:#1e293b
}
body.qt-desktop-mode #body-content #qt-settings-page-a4_invoices .qt-settings-group{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 18px!important;align-items:center
}
body.qt-desktop-mode #body-content #qt-settings-page-a4_invoices .qt-settings-group:nth-of-type(-n+2){
 grid-template-columns:minmax(0,1fr)!important
}
body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-group,
body.qt-desktop-mode #body-content #qt-settings-page-thermal_pos .qt-settings-group{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-group:nth-of-type(4){
 display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-native-font-row{
 display:grid!important;grid-template-columns:330px auto!important;align-items:center!important;justify-content:start!important;gap:14px!important;width:100%!important
}
body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-native-font-row>.qt-settings-field:not(.qt-settings-font-bold){
 grid-template-columns:195px 125px!important;gap:10px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-native-font-row>.qt-settings-field.qt-settings-font-bold{
 flex:0 0 auto!important;width:auto!important;min-width:78px!important;background:transparent!important;border:0!important;padding:4px 8px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-a4_invoices .qt-settings-a4-printer{
 display:grid!important;grid-template-columns:175px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;width:100%!important;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content #qt-settings-page-a4_invoices .qt-settings-a4-printer>select{
 width:100%!important;max-width:100%!important;min-width:0!important;min-height:34px;height:34px;font-weight:400;color:#0f172a
}
body.qt-desktop-mode #body-content .qt-settings-fields>*{
 max-width:100%!important;box-sizing:border-box!important;margin-inline:0!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) fieldset{
 margin-inline:0!important
}
body.qt-desktop-mode #body-content :is(#qt-settings-page-a4_invoices,#qt-settings-page-thermal_invoices,#qt-settings-page-thermal_pos) .qt-settings-group>:is(legend,p,.qt-settings-a4-printer,.qt-settings-note,.qt-settings-native-font-row,.qt-settings-field:has(textarea),.qt-settings-field:has(select)){
 grid-column:1/-1
}
body.qt-desktop-mode #body-content #qt-settings-page-contract .qt-settings-field:has([name="contract_clauses_text"]){
 display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important
}
body.qt-desktop-mode #body-content #qt-settings-page-contract textarea[name="contract_clauses_text"]{
 width:100%!important;max-width:100%!important;min-width:0!important;min-height:240px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-group:first-of-type{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-dark-toggle){
 display:grid!important;grid-template-columns:175px auto minmax(0,1fr)!important;align-items:center!important;justify-items:start!important;gap:10px!important;
 width:100%!important;padding:6px 0!important;background:transparent!important;border:0!important;font-weight:700;color:#173b66;cursor:pointer
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-dark-label{
 flex:0 1 auto!important;width:auto!important;min-width:0!important;font-weight:600;color:#1e293b;text-align:right
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-color-editor){
 display:grid!important;grid-template-columns:175px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;width:100%!important
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-color-label{
 flex:0 0 auto!important;width:100%!important;text-align:right;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-color-editor{
 flex:1 1 auto!important;width:100%!important;max-width:100%!important;min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important
}
body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-color-editor>input[type="text"]{
 flex:1 1 auto!important;width:auto!important;min-width:100px!important;max-width:100%!important
}
body.qt-desktop-mode #body-content #qt-settings-page-printing fieldset{
 align-items:stretch!important;text-align:right;width:100%!important;box-sizing:border-box
}
body.qt-desktop-mode #body-content #qt-settings-page-printing :is(.qt-settings-printer-device,.qt-settings-paper-options,.qt-settings-printer-subgroup){
 width:100%!important;align-self:stretch!important;box-sizing:border-box
}
body.qt-desktop-mode #body-content #qt-settings-page-printing .qt-settings-printer-device-label{
 display:grid!important;grid-template-columns:175px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;width:100%!important;font-weight:700;color:#173b66
}
body.qt-desktop-mode #body-content #qt-settings-page-printing .qt-settings-radio-group{
 align-items:stretch!important;text-align:right;width:100%!important
}
body.qt-desktop-mode #body-content #qt-settings-page-shift_printing .qt-settings-group{
 align-items:stretch
}
body.qt-desktop-mode #body-content .qt-settings-field>input:not([type="checkbox"]):not([type="radio"]),
body.qt-desktop-mode #body-content .qt-settings-field>select,
body.qt-desktop-mode #body-content .qt-settings-printer-device-label>select{
 min-height:34px;height:34px;padding:4px 10px;width:100%!important;max-width:100%!important;min-width:0!important;font-weight:400;color:#0f172a
}
body.qt-desktop-mode #body-content .qt-settings-field>textarea{
 font-weight:400;color:#0f172a;width:100%!important;max-width:100%!important;min-width:0!important;min-height:72px
}
body.qt-desktop-mode #body-content .qt-settings-field>input[type="number"]:not([type="checkbox"]):not([type="radio"]){
 width:130px!important;max-width:140px!important;min-width:0!important;flex:0 0 130px!important;justify-self:start!important;text-align:center
}
body.qt-desktop-mode #body-content .qt-settings-actions{
 position:static!important;margin-top:10px;background:#f8fafc;border:1px solid #d5e0ec;border-radius:8px;
 padding:8px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px
}
body.qt-desktop-mode #body-content .qt-settings-footer{
 position:static!important;margin-top:8px;padding:8px 14px;border-top:1px solid #d5e0ec;
 background:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px
}

/* 6. Customers: fix unreadable "رسائل العملاء" button & fit all 10 columns cleanly without horizontal clip */
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-command-row .qt-native-action,
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-command-row .qt-native-action:last-child{
 background:#244875!important;border-color:#244875!important;color:#ffffff!important;opacity:1
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-command-row .qt-native-action:hover:not(:disabled){
 background:#1a3558!important
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-filters{
 height:auto;min-height:0;flex:0 0 auto;flex-wrap:wrap;overflow:visible;padding:6px 10px
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-filters input[type=search]{
 flex:1 1 230px;min-width:210px;max-width:340px;height:34px;min-height:34px
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-filters select{
 flex:0 0 112px;min-width:105px;max-width:125px;height:34px;min-height:34px
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-table{
 width:100%!important;min-width:0!important;table-layout:auto!important;font-size:12px
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-table :is(th,td){
 width:auto!important;min-width:0!important;max-width:none!important;padding:6px 6px!important;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-table td:last-child{
 width:126px!important;min-width:118px!important
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-table td:last-child .button,
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-table td:last-child button{
 padding:3px 8px;font-size:11px;min-height:26px;height:26px
}

/* 7. Suppliers: move keyboard shortcut hint below filter controls cleanly */
body.qt-desktop-mode #body-content .qt-native-suppliers .qt-native-filters{
 flex-wrap:wrap;height:auto;min-height:0;padding:8px 10px
}
body.qt-desktop-mode #body-content .qt-native-suppliers .qt-native-filters>small,
body.qt-desktop-mode #body-content .qt-native-suppliers .qt-native-filters>.qt-native-shortcuts{
 flex:1 0 100%;order:10;font-size:11px;color:#64748b;margin-top:2px
}

/* 8. Inventory: single-row filter bar (100% unclipped), clean barcode header, unclipped bottom status footer */
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-filters,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters{
 display:flex;flex-wrap:nowrap!important;align-items:center;gap:4px!important;padding:6px 8px;overflow:visible
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters label,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters span{
 font-size:11.5px;white-space:nowrap;flex:0 0 auto
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="search"],
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="text"]{
 flex:1 1 135px!important;min-width:110px!important;max-width:210px!important;height:32px!important;min-height:32px!important;padding:3px 8px!important;font-size:12px
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="date"]{
 width:112px!important;min-width:108px!important;max-width:116px!important;height:32px!important;min-height:32px!important;padding:2px 4px!important;font-size:11.5px;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="number"]{
 width:56px!important;min-width:52px!important;max-width:62px!important;height:32px!important;min-height:32px!important;padding:2px 5px!important;font-size:12px;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters select{
 width:auto!important;min-width:64px!important;max-width:96px!important;height:32px!important;min-height:32px!important;padding:2px 6px!important;font-size:11.5px;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters button{
 height:32px!important;min-height:32px!important;padding:0 12px!important;flex:0 0 auto!important;font-size:12px
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary{
 min-height:0;height:auto
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card{
 padding:6px 10px;min-height:58px
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-footer{
 padding:6px 12px;margin-top:4px;font-size:11.5px;flex:0 0 auto
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-updated{
 unicode-bidi:plaintext
}

/* 9. Sessions: eliminate 1320px horizontal table clip & align header/filters cleanly */
body.qt-desktop-mode #body-content .qt-sessions-window{
 padding:10px 14px;gap:8px
}
body.qt-desktop-mode #body-content .qt-sessions-window>:is(h2,p){
 text-align:right;margin:0
}
body.qt-desktop-mode #body-content .qt-session-filters{
 display:grid!important;grid-template-columns:220px minmax(0,1fr);gap:10px;align-items:end
}
body.qt-desktop-mode #body-content .qt-session-filters>label{
 display:flex;flex-direction:column;gap:4px;text-align:right;margin:0
}
body.qt-desktop-mode #body-content .qt-session-filters :is(input,select){
 height:36px!important;min-height:36px!important;padding:4px 10px!important
}
body.qt-desktop-mode #body-content .qt-session-grid{
 width:100%!important;min-width:0!important;table-layout:auto!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-session-grid :is(th,td){
 padding:5px 4px!important;white-space:normal!important;min-width:0!important;width:auto!important
}

/* 10. Employees: fit table cleanly, prevent left card row/fieldset/hint collapse & mid-word email break */
body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-columns{
 flex:1 1 0!important;min-height:0!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employees-list{
 display:flex!important;flex-direction:column!important;min-height:0!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employees-list>.table-scroll{
 flex:1 1 0!important;min-height:180px!important;overflow:auto!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employees-table{
 width:100%!important;min-width:0!important;table-layout:auto!important;font-size:11.5px
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employees-table :is(th,td){
 padding:6px 5px!important;min-width:0!important;width:auto!important;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-info-panel,
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details{
 display:flex!important;flex-direction:column!important;gap:8px!important;
 max-height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;padding-bottom:12px
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details>*{
 flex:0 0 auto!important;min-height:auto!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details .qt-employee-detail-card{
 display:flex!important;flex-direction:column!important;gap:6px!important;padding:10px 12px!important;
 height:auto!important;min-height:max-content!important;overflow:visible!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details fieldset.qt-tables-detail-group{
 flex:0 0 auto!important;min-height:74px!important;max-height:150px!important;height:auto!important;
 overflow-y:auto!important;margin:0 12px!important;padding:8px 10px!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details .qt-employee-performance-entry{
 padding:0 12px!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details>p.muted{
 margin:4px 12px 10px!important;line-height:1.5!important;white-space:normal!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details p{
 flex:0 0 auto!important;margin:0!important;gap:6px!important;align-items:center;min-height:28px!important;height:auto!important
}
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-details p>span,
body.qt-desktop-mode #body-content .qt-employees-workspace .qt-employee-info-value{
 direction:auto;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
 font-size:11px!important;padding:3px 7px!important;min-height:24px!important;line-height:1.35!important
}

/* 11. Tables history mini-table: widen detail column & wrap headers cleanly inside sidebar card */
@media(min-width:1151px){
 body.qt-desktop-mode #body-content .qt-tables-workspace>.qt-tables-columns{
  grid-template-columns:minmax(0,1fr) 340px!important;gap:10px!important
 }
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-history-group{
 overflow-x:auto;overflow-y:visible
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-history-group table{
 table-layout:auto!important;width:100%!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-tables-workspace .qt-tables-history-group :is(th,td){
 padding:5px 4px!important;font-size:10.5px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;text-align:center
}

/* 12. Accounts Dashboard & Journal: fit all 3 bottom analytics charts above the fold + zero journal table clip */
body.qt-desktop-mode #body-content .qt-accounts-dashboard{
 display:flex;flex-direction:column;gap:6px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-dashboard-header{
 padding:6px 12px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-dashboard-heading h1{
 font-size:18px;margin:0
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-command-row,
body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-filters{
 padding:4px 10px;min-height:36px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-summary-card{
 padding:8px 10px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-summary-card strong{
 font-size:19px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel{
 padding:8px 10px
}
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel td:first-child,
body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel td:nth-child(3){
 white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-native-accounts .qt-native-table{
 width:100%!important;min-width:0!important;table-layout:auto!important;font-size:11.5px
}
body.qt-desktop-mode #body-content .qt-native-accounts .qt-native-table :is(th,td){
 padding:6px 5px!important;min-width:0!important;width:auto!important;white-space:nowrap
}

/* 13. Reports: clean 5+4 KPI cards (2 compact rows), unclipped P&L table, horizontal Branch & Treasury filters */
body.qt-desktop-mode #body-content .qt-report-cards{
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-report-card{
 padding:6px 9px!important;min-height:0!important
}
body.qt-desktop-mode #body-content .qt-report-card strong{
 font-size:15px!important
}
body.qt-desktop-mode #body-content .qt-report-financial-filters{
 display:flex;flex-wrap:wrap;align-items:end;gap:10px
}
body.qt-desktop-mode #body-content .qt-report-financial-filters input[type="search"],
body.qt-desktop-mode #body-content .qt-report-financial-filters input[type="text"]{
 min-width:220px
}
body.qt-desktop-mode #body-content :is(.qt-report-branches,.qt-report-treasury) :is(.toolbar,.qt-report-branch-filters,.qt-report-treasury-controls){
 display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px
}
body.qt-desktop-mode #body-content :is(.qt-report-branches,.qt-report-treasury) select{
 width:auto!important;min-width:170px!important;max-width:260px!important;height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content :is(.qt-report-branches,.qt-report-treasury) input[type="search"],
body.qt-desktop-mode #body-content :is(.qt-report-branches,.qt-report-treasury) input[type="text"]{
 width:240px!important;max-width:280px!important;height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content .qt-report-result-table :is(th,td){
 padding:6px 8px;font-size:12px
}

/* 14. POS Invoices: show 8-column table header under scope banner + symmetric 4x2 summary grid */
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await{
 display:flex;flex-direction:column;gap:8px
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scope-message{
 order:-1;margin:0
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-tables,
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scroll{
 display:block!important
}
body.qt-desktop-mode #body-content .qt-pos-inv-content.qt-pos-inv-await .qt-pos-inv-scroll[hidden]{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-inv-summary{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-summary-title{
 grid-column:1/-1!important
}
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-stat,
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-stat:nth-of-type(-n+3),
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-stat:nth-of-type(4),
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-stat:nth-of-type(5),
body.qt-desktop-mode #body-content .qt-pos-inv-summary .qt-pos-inv-stat:nth-of-type(n+6){
 grid-column:span 1!important;height:30px;min-height:30px
}

/* 15. POS cart refinements: full-width notes, nowrap customer counter + visible page-size select, 2-line product names */
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-picker{
 grid-template-columns:minmax(108px,1fr) minmax(122px,1.05fr) auto!important;gap:5px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager select{
 width:78px!important;min-width:74px!important;padding:2px 6px!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager small,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager span{
 white-space:nowrap!important;font-size:11px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:has(textarea){
 grid-column:1/-1!important
}
body.qt-desktop-mode #body-content .qt-pos-product-name{
 display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
 overflow:hidden;white-space:normal;line-height:1.25;min-height:2.4em;text-align:center
}

/* 16. Salon, Devices, Delivery Areas, Printer Ports, Deletion Monitor & Treasury refinements */
body.qt-desktop-mode #body-content .qt-salon-titlebar .button{
 flex:0 0 auto;width:36px;min-width:36px;height:36px;min-height:36px;padding:0;
 display:inline-flex;align-items:center;justify-content:center
}
body.qt-desktop-mode #body-content .qt-salon-appointments-page .qt-salon-pager,
body.qt-desktop-mode #body-content .qt-salon-appointments-page .pager{
 justify-content:center!important;gap:12px!important
}
body.qt-desktop-mode #body-content :is(.qt-devices-workspace,.qt-delivery-areas,.qt-printer-ports)>:is(h2,header){
 text-align:right;justify-content:flex-start
}
body.qt-desktop-mode #body-content .qt-printer-ports table td:nth-child(3){
 direction:ltr;unicode-bidi:isolate;text-align:center
}
body.qt-desktop-mode #body-content .qt-dm-filter-grid{
 grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px 12px
}
body.qt-desktop-mode #body-content .qt-dm-filter-grid :is(input,select){
 height:34px!important;min-height:34px!important;padding:4px 10px!important
}
body.qt-desktop-mode #body-content .qt-treasury-window .qt-treasury-scope-bar input[type="date"]{
 width:136px!important;min-width:128px!important;height:34px!important;min-height:34px!important
}

/* 17. Purchase Invoice header alignment (2 crisp rows), Users pager buttons, Expense dialog padding & Shift Report modal */
body.qt-desktop-mode #body-content .qt-users-footer button{
 width:auto!important;min-width:68px!important;padding:4px 14px!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 align-items:end!important;gap:6px 10px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label{
 order:1
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:nth-child(3){
 order:2!important;grid-column:1/-1!important;
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:nth-child(3)>div{
 flex:1 1 auto!important;display:grid!important;
 grid-template-columns:minmax(200px,1fr) minmax(220px,1.2fr) auto!important;
 align-items:center!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:nth-child(3) nav,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:nth-child(3)>div>div:not([data-single-page="1"]):not([hidden]){
 display:inline-flex!important;align-items:center!important;gap:5px!important;white-space:nowrap!important;margin:0!important
}
body.qt-desktop-mode :is(.qt-expense-dialog,.qt-expense-report-dialog)>:nth-child(2){
 margin-top:12px
}
body.qt-desktop-mode .qt-shift-report-dialog{
 width:min(900px,94vw);max-width:900px;display:flex;flex-direction:column;gap:12px;padding:18px
}
body.qt-desktop-mode .qt-shift-report-meta{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px
}
body.qt-desktop-mode .qt-shift-report-kpi{
 background:#f8fafc;border:1px solid #d5e0ec;border-radius:8px;padding:8px 10px;
 display:flex;flex-direction:column;gap:3px
}
body.qt-desktop-mode .qt-shift-report-kpi span{font-size:11px;color:#526b85;font-weight:700}
body.qt-desktop-mode .qt-shift-report-kpi strong{font-size:14px;color:#173b66}

/* Batch 7 Commercial Completion UI Polish */
body.qt-desktop-mode .qt-record-state.qt-state-busy,
body.qt-desktop-mode .qt-record-state.qt-device-in_use{
 background:#fff4e5;color:#b45309;border:1px solid #f59e0b;font-weight:700
}
body.qt-desktop-mode .qt-sales-shift-picker{
 width:auto!important;min-width:220px;max-width:340px!important
}
body.qt-desktop-mode .qt-wa-direct-btn{
 display:inline-flex;align-items:center;justify-content:center;gap:4px;
 padding:4px 10px;min-height:28px;font-size:12px;font-weight:700;
 background:#16a34a!important;color:#fff!important;border-color:#15803d!important;
 text-decoration:none!important;white-space:nowrap
}
body.qt-desktop-mode .qt-wa-direct-btn:hover{background:#15803d!important}
body.qt-desktop-mode .qt-settings-full-backup{
 background:#f0f6fc;border:1px solid #bfd3ea;border-radius:10px;
 padding:12px 14px;margin-bottom:14px;display:flex;flex-direction:column;gap:8px
}

/* Employees detail performance-entry button bar must wrap cleanly inside narrow side column */
body.qt-desktop-mode #body-content .qt-employee-details .qt-employee-performance-entry{
 display:flex;flex-wrap:wrap;gap:6px;max-width:100%;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-employee-details .qt-employee-performance-entry>:is(button,.button){
 max-width:100%;flex:1 1 auto;min-width:0;white-space:normal;text-align:center
}

/* Mobile viewport (<=700px) zero-overflow hardening for Settings, Employees, Users, Warehouses & Salon Bookings */
@media(max-width:700px){
 body.qt-desktop-mode #body-content #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;grid-template-columns:none!important
 }
 body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row{flex-wrap:wrap!important}
 body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>input[type=search]{
  flex:1 1 100%!important;min-width:0!important;max-width:100%!important
 }
 body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>label{
  flex:1 1 100%!important;min-width:0!important;max-width:100%!important
 }
 body.qt-desktop-mode #body-content .qt-employees-workspace>.qt-employee-filter-row>label>select{
  width:100%!important;min-width:0!important;max-width:100%!important
 }
 body.qt-desktop-mode .qt-settings-fields{grid-template-columns:minmax(0,1fr)!important}
 body.qt-desktop-mode .qt-settings-group{min-width:0;max-width:100%}
 body.qt-desktop-mode .qt-settings-field{flex-direction:column!important;align-items:stretch!important;gap:6px;min-width:0}
 body.qt-desktop-mode .qt-settings-field>:is(input:not([type=checkbox]),select,textarea){
  width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box
 }
 body.qt-desktop-mode .qt-settings-actions{flex-wrap:wrap!important;gap:8px}
 body.qt-desktop-mode .qt-settings-actions>:is(button,.button){max-width:100%;box-sizing:border-box}
 body.qt-desktop-mode .qt-users-footer{flex-wrap:wrap!important;gap:6px!important;justify-content:center}
 body.qt-desktop-mode .qt-warehouse-balance-pagination,
 body.qt-desktop-mode .qt-inventory-history-pagination{flex-wrap:wrap!important;gap:6px!important;max-width:100%}
 body.qt-desktop-mode .qt-salon-appointments-page .form{
  display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%
 }
 body.qt-desktop-mode .qt-salon-appointments-page .form>label{
  flex:1 1 100%!important;min-width:0!important;max-width:100%!important
 }
 body.qt-desktop-mode .qt-salon-appointments-page .form>:is(button,.button){max-width:100%}
 body.qt-desktop-mode .qt-native-module .qt-native-tabs{flex-wrap:wrap!important;gap:6px!important}
 body.qt-desktop-mode .qt-native-module .qt-native-tabs>.qt-native-action{white-space:normal;max-width:100%;height:auto}
}

/* Batch 8 Commercial Financial Disbursement Badges & Cashbox Action Panels */
body.qt-desktop-mode .qt-batch8-paid-badge{
 background:#ecfdf3;color:#166534;border:1px solid #86efac;border-radius:8px;
 padding:8px 12px;font-weight:700;font-size:12.5px;margin:8px 0
}
body.qt-desktop-mode .qt-batch8-cashbox-panel{
 background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px;
 padding:10px 12px;margin:10px 0;display:flex;flex-direction:column;gap:8px
}
body.qt-desktop-mode .qt-employee-withdrawal-is-approved{
 color:#15803d;font-weight:700;background:#ecfdf3
}
body.qt-desktop-mode .qt-payment-reversed-row{
 opacity:.68;background:#fef2f2!important;text-decoration:line-through
}

/* Batch 10 Printable Accounting Voucher & Cheque Sheet */
.qt-account-doc-print-sheet{
 position:fixed;inset:0;z-index:12000;background:rgba(15,23,42,.55);
 display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto
}
.qt-account-doc-print-card{
 width:min(760px,100%);background:#fff;color:#0f172a;border-radius:10px;
 border:1px solid #cbd5e1;box-shadow:0 18px 45px rgba(15,23,42,.25);padding:24px
}
.qt-account-doc-print-actions{
 display:flex;justify-content:flex-end;gap:8px;margin-bottom:16px
}
.qt-account-doc-print-header{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
 border-bottom:2px solid #1e3a5f;padding-bottom:12px;margin-bottom:16px
}
.qt-account-doc-print-header h1{margin:0;font-size:22px;color:#1e3a5f}
.qt-account-doc-print-number{
 font-weight:700;font-size:14px;background:#eef5fc;color:#1e3a5f;padding:4px 10px;border-radius:6px
}
.qt-account-doc-print-status{
 font-weight:700;font-size:13px;background:#f1f5f9;color:#334155;padding:4px 10px;border-radius:6px
}
.qt-account-doc-print-table{
 width:100%;border-collapse:collapse;margin-bottom:24px;font-size:14px
}
.qt-account-doc-print-table :is(th,td){
 border:1px solid #cbd5e1;padding:10px 12px;text-align:right
}
.qt-account-doc-print-table th{
 width:32%;background:#f8fafc;color:#1e293b;font-weight:700
}
.qt-account-doc-print-signatures{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:28px;text-align:center
}
.qt-account-doc-print-sig strong{display:block;font-size:13px;color:#334155;margin-bottom:32px}
.qt-account-doc-print-sig-line{border-bottom:1px dashed #64748b;height:1px}
@media print{
 body.qt-account-doc-print-mode>*:not(.qt-account-doc-print-sheet){display:none!important}
 body.qt-account-doc-print-mode .qt-account-doc-print-sheet{
  position:static!important;background:#fff!important;padding:0!important;display:block!important
 }
 body.qt-account-doc-print-mode .qt-account-doc-print-card{
  width:100%!important;border:none!important;box-shadow:none!important;padding:0!important
 }
 body.qt-account-doc-print-mode .qt-account-doc-print-actions{display:none!important}
}

/* Guarantee zero generic shell or half-rendered Qt chrome flash while customer login / session loading is active */
body.customer-auth-view .sidebar,
body.customer-auth-view .header,
body.customer-auth-view .qt-main-menubar,
body.customer-auth-view .qt-statusbar,
body.customer-auth-view #workspace{display:none!important}
body.customer-auth-view .app{display:block!important;padding:0!important;height:auto!important;overflow:visible!important}

/* ============================================================================
   Batch 12: POS Full Desktop Visual Parity, Full-Screen Large Windows &
   Large Sub-Windows (Sales/Purchase Invoice Entry, Returns, Reports, Stats,
   Search, Previews), while keeping compact Add/Edit Modals Compact
   ============================================================================ */

/* 1. POS (نقطة البيع) at ALL desktop widths >= 1101px:
   - Fix 1101-1199px cropped cart fallback & 49% over-wide cart split
   - Zero horizontal scrollbar in cart lines & unclipped header invoice field
   - Compact checkout controls + crisp catalog placeholder badge styling */
@media(min-width:1101px){
 body.qt-desktop-mode #body-content:has(.qt-pos-window){
  padding:4px 8px;overflow:hidden
 }
 body.qt-desktop-mode #body-content .qt-pos-window{
  display:flex;flex-direction:column;flex:1 1 0;min-height:0;height:100%;max-height:100%;gap:4px;overflow:hidden
 }
 body.qt-desktop-mode #body-content .qt-pos-workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(448px,466px);
  flex:1 1 0;min-height:0;gap:6px;align-items:stretch
 }
 body.qt-desktop-mode #body-content .qt-pos-catalog{
  display:flex;flex-direction:column;min-height:0;min-width:0;height:100%;gap:4px;overflow:hidden
 }
 body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-top-row,
 body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-tool-row{
  flex:0 0 auto;padding:4px 8px;gap:6px;min-height:0
 }
 body.qt-desktop-mode #body-content .qt-pos-products-grid{
  flex:1 1 0;min-height:140px;overflow-y:auto;overflow-x:hidden;align-content:start
 }
 body.qt-desktop-mode #body-content .qt-pos-catalog-pager{
  flex:0 0 auto;padding:3px 6px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart{
  width:100%;min-width:448px;max-width:none;
  display:flex;flex-direction:column;min-height:0;overflow:hidden
 }
 body.qt-desktop-mode #body-content .qt-pos-cart>.qt-pos-form{
  display:flex;flex-direction:column;flex:1 1 0;min-height:0;gap:4px;padding:5px 7px;box-sizing:border-box;overflow:hidden
 }
 /* Top dark navy header: wide product/barcode search + unclipped invoice number */
 body.qt-desktop-mode #body-content .qt-pos-cart>.qt-pos-form>.qt-pos-cart-header{
  display:flex;flex-wrap:nowrap;align-items:center;gap:8px;
  padding:4px 8px;min-height:38px;flex:0 0 auto;border-radius:7px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header>.qt-pos-cart-search{
  flex:1 1 auto;min-width:0;max-width:none!important;display:flex;flex-direction:row!important;align-items:center;gap:6px;margin:0
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header>label:not(.qt-pos-cart-search){
  flex:0 0 184px;min-width:174px;max-width:194px!important;display:flex;flex-direction:row!important;align-items:center;gap:5px;margin:0
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header input{
  flex:1 1 auto;min-width:0;width:100%;height:30px!important;min-height:30px!important;
  padding:2px 7px!important;font-size:12px
 }
 /* Cart 6-column table: strictly fits container with ZERO horizontal scrollbar & NO peeking duplicate labels */
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register{
  flex:1 1 0;min-height:92px;max-height:none;
  display:flex;flex-direction:column;min-width:0;overflow-x:hidden;overflow-y:auto;
  border:1px solid #cbd9e8;border-radius:6px;background:#fff
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item{
  grid-template-columns:minmax(90px,1.6fr) 54px 98px 50px minmax(62px,1fr) 38px;
  gap:3px;min-width:0;width:100%;box-sizing:border-box;padding:3px 4px;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head{
  position:sticky;top:0;z-index:2;min-height:28px;padding:4px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head>span{
  font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .invoice-lines{
  flex:1 1 auto;min-height:48px;max-height:none;overflow:visible;gap:2px;padding:2px 0
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item>label{
  font-size:0!important;line-height:0!important;gap:0!important;padding:0!important;margin:0!important;display:flex;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item>*,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item select,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item input{
  min-width:0;width:100%;max-width:100%;box-sizing:border-box;
  height:28px!important;min-height:28px!important;padding:2px 4px!important;font-size:12px;line-height:normal
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-quantity-controls{
  display:grid;grid-template-columns:20px minmax(28px,1fr) 20px 20px;gap:2px;min-width:0;width:100%;align-items:center;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-quantity-button{
  width:20px;min-width:20px;max-width:20px;height:26px;min-height:26px;padding:0;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-quantity-controls input[data-qty]{
  height:26px!important;min-height:26px!important;padding:0 2px!important;text-align:center;font-size:12px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-line-total{
  font-size:12px;font-weight:700;text-align:center;white-space:nowrap
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item button.small{
  min-width:0;width:100%;height:26px;min-height:26px;padding:0 3px;font-size:11px
 }
 /* Prevent customer picker pager overflowing border & tighten cart footer vertically */
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label{
  height:auto!important;min-height:0!important
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-picker{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:4px 6px!important;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager{
  grid-column:1/-1!important;display:flex;align-items:center;justify-content:space-between;gap:4px;flex-wrap:nowrap;margin:0
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager button,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager select{
  height:25px!important;min-height:25px!important;padding:0 6px!important;font-size:11px;width:auto!important;min-width:0!important
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-panel{
  flex:0 0 auto;padding:4px 6px;gap:4px;border-radius:6px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-panel input,
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-panel button{
  height:26px!important;min-height:26px!important;font-size:11.5px;padding:2px 6px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .form-grid{
  flex:0 0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;
  padding:4px 6px;gap:4px 6px;border-radius:6px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .form-grid>label:has(.qt-pos-customer-picker){
  grid-column:1/-1
 }
 body.qt-desktop-mode #body-content .qt-pos-cart>.qt-pos-form{
  overflow-y:auto
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .form-grid label{
  font-size:11px;gap:2px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .form-grid :is(input,select,button){
  height:27px!important;min-height:27px!important;font-size:11.5px;padding:2px 6px
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .form-grid textarea{
  height:27px!important;min-height:27px!important;max-height:32px;padding:3px 6px!important;
  font-size:11.5px;resize:none
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-payment-hint,
 body.qt-desktop-mode #body-content .qt-pos-cart .hint{
  margin:0;padding:2px 6px;font-size:10.5px;line-height:1.25
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .toolbar{
  flex:0 0 auto;padding:2px 0!important;gap:5px;min-height:0!important
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions{
  flex:0 0 auto;gap:4px;padding:2px 0 0;min-height:0;display:flex;flex-wrap:nowrap;align-items:center
 }
 body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions button{
  height:32px;min-height:32px;font-size:11.5px;padding:3px 6px;white-space:nowrap;flex:1 1 auto;min-width:0
 }
}
@media(min-width:1420px){
 body.qt-desktop-mode #body-content .qt-pos-workspace{
  grid-template-columns:minmax(0,1.4fr) minmax(505px,540px)
 }
 body.qt-desktop-mode #body-content .qt-pos-cart{
  min-width:505px
 }
}
/* Clean visual tile placeholder badge inside catalog cards */
body.qt-desktop-mode #body-content .qt-pos-product-visual{
 background:linear-gradient(145deg,#f6f9fd 0%,#e9f1fb 100%);
 border:1px solid #d5e2f0;color:#7a90a8;font-size:11px;font-weight:700
}

/* 2. FULL-SCREEN (100vw x 100dvh) for ALL Large Windows & Large Sub-Windows:
   Sales Invoice Entry, Purchase Invoice Entry, Sales/Purchase Returns,
   Sales/Purchase Reports, Statistics, Reservations, Advanced Search, Saved
   Invoice Previews, Pending Purchases, POS Stats/Preview, Stock Count.
   Notice: Small/compact Add/Edit forms (.qt-native-edit-backdrop, .qt-expense-backdrop,
   .qt-invoice-cash-backdrop, .qt-reorder-shade, .qt-invoice-chooser) remain compact! */
body.qt-desktop-mode .dialog-backdrop{z-index:200}
body.qt-desktop-mode .qt-invoice-form-dialog:not(.hidden),
body.qt-desktop-mode .dialog-backdrop:has(>.qt-sales-return-native-dialog,>.qt-purchase-return-native-dialog,>.qt-sales-reports-dialog,>.qt-sales-stat-dialog,>.qt-sales-reservations-dialog,>.qt-sales-standalone-dialog,>.qt-sales-source-dialog,>.qt-purchase-search-dialog,>.qt-purchase-insights-dialog,>.qt-pending-purchases-dialog,>.qt-pos-stat-dialog,>.qt-pos-inv-detail,>.qt-sales-saved-invoice-dialog,>.qt-purchase-native-preview-dialog,>.qt-sales-return-history-dialog,>.qt-stock-adjustment-dialog),
body.qt-desktop-mode .dialog-backdrop.qt-invoice-preview:has(.qt-purchase-return-history-lines,.qt-sales-saved-invoice-lines,.qt-sales-return-history-lines),
body.qt-desktop-mode .dialog-backdrop.qt-invoice-cash-history-backdrop{
 position:fixed!important;inset:0!important;padding:0!important;margin:0!important;z-index:260!important;
 align-items:stretch!important;justify-content:stretch!important;background:#eef3f9
}
body.qt-desktop-mode .dialog-backdrop:has(>.qt-sales-return-native-dialog,>.qt-purchase-return-native-dialog){
 z-index:280!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-purchase-notes-strip{
 min-height:36px;padding:3px 6px
}
body.qt-desktop-mode .qt-invoice-form-dialog:not(.hidden)>.panel,
body.qt-desktop-mode .qt-invoice-form-dialog:not(.hidden)>.qt-invoice-entry-panel,
body.qt-desktop-mode .qt-purchase-entry-backdrop:not(.hidden)>.panel,
body.qt-desktop-mode .qt-sales-entry-backdrop:not(.hidden)>.panel,
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog,.qt-sales-reports-dialog,.qt-sales-stat-dialog,.qt-sales-reservations-dialog,.qt-sales-standalone-dialog,.qt-sales-source-dialog,.qt-purchase-search-dialog,.qt-purchase-insights-dialog,.qt-pending-purchases-dialog,.qt-pos-stat-dialog,.qt-pos-inv-detail,.qt-sales-saved-invoice-dialog,.qt-purchase-native-preview-dialog,.qt-sales-return-history-dialog,.qt-stock-adjustment-dialog),
body.qt-desktop-mode .dialog-backdrop.qt-invoice-preview:has(.qt-purchase-return-history-lines,.qt-sales-saved-invoice-lines,.qt-sales-return-history-lines)>.qt-invoice-dialog,
body.qt-desktop-mode .dialog-backdrop.qt-invoice-cash-history-backdrop>.dialog{
 width:100vw!important;max-width:100vw!important;min-width:100vw!important;
 height:100dvh!important;max-height:100dvh!important;min-height:100dvh!important;
 margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
 overflow-y:auto!important;overflow-x:hidden!important
}
body.qt-desktop-mode .qt-invoice-form-dialog:not(.hidden)>.panel,
body.qt-desktop-mode .qt-invoice-form-dialog:not(.hidden)>.qt-invoice-entry-panel{
 padding:0!important;background:#eef3f9!important
}
/* Offline-style Qt navy titlebar strip across full-screen invoice entry windows */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading{
 background:#244875!important;color:#fff!important;margin:0!important;padding:6px 14px!important;min-height:38px;
 border-bottom:1px solid #19375c!important;display:flex;align-items:center;justify-content:space-between;gap:8px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-caption{
 color:#fff!important;font-size:13.5px;font-weight:800
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-back{
 width:auto!important;flex:0 0 auto;height:28px;min-height:28px;padding:0 10px;
 border:1px solid rgba(255,255,255,.35);border-radius:6px;background:rgba(255,255,255,.14);
 color:#fff;font-size:12px;font-weight:700
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-back:hover{
 background:rgba(255,255,255,.24)
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-title-close{
 width:30px;height:28px;min-height:28px;padding:0;border:1px solid rgba(255,255,255,.35);
 border-radius:6px;background:rgba(255,255,255,.14);color:#fff;font-size:18px;line-height:1;
 display:inline-flex;align-items:center;justify-content:center;cursor:pointer
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-title-close:hover{
 background:#d9363e;border-color:#d9363e
}
/* Flex-stretch Sales & Purchase Invoice Entry forms so table fills center vertically like Offline Qt */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-sales-entry-form,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-purchase-entry-form{
 display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:6px;padding:8px 12px;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-sales-entry-card,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-purchase-entry-card{
 padding:8px 10px;gap:6px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-products-card,.qt-purchase-products-card){
 flex:1 1 auto!important;min-height:230px;display:flex;flex-direction:column
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-line-scroll,.qt-purchase-entry-table-scroll){
 flex:1 1 auto;min-height:185px;max-height:none!important;background:#fff;border:1px solid #b8ccdf;border-radius:6px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-entry-items-table,.qt-purchase-entry-table){
 width:100%;min-width:1080px;border-collapse:collapse
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-entry-items-table,.qt-purchase-entry-table) thead th{
 position:sticky;top:0;z-index:2;background:#244875;color:#fff;padding:8px 6px;font-size:12px;font-weight:800;border:1px solid #193b67
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-close{
 margin:0 12px 8px auto
}
/* Full-screen Returns & Reports stretch tables & keep bottom action bar pinned cleanly */
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog,.qt-sales-reports-dialog,.qt-sales-stat-dialog,.qt-sales-reservations-dialog,.qt-sales-standalone-dialog,.qt-sales-source-dialog,.qt-purchase-search-dialog,.qt-purchase-insights-dialog,.qt-pending-purchases-dialog,.qt-pos-stat-dialog,.qt-pos-inv-detail,.qt-sales-saved-invoice-dialog,.qt-purchase-native-preview-dialog,.qt-sales-return-history-dialog,.qt-stock-adjustment-dialog){
 justify-content:flex-start!important;align-items:stretch!important;
 padding:0!important;background:#eef3f9!important
}
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog,.qt-sales-reports-dialog,.qt-sales-stat-dialog,.qt-sales-reservations-dialog,.qt-sales-standalone-dialog,.qt-sales-source-dialog,.qt-purchase-search-dialog,.qt-purchase-insights-dialog,.qt-pending-purchases-dialog,.qt-pos-stat-dialog,.qt-pos-inv-detail,.qt-sales-saved-invoice-dialog,.qt-purchase-native-preview-dialog,.qt-sales-return-history-dialog,.qt-stock-adjustment-dialog)>h2{
 flex:0 0 auto!important;margin:0!important;padding:9px 16px!important;
 background:#244875!important;color:#fff!important;font-size:15px!important;font-weight:800!important;
 border-bottom:1px solid #19375c!important;border-radius:0!important
}
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog,.qt-sales-reports-dialog,.qt-sales-stat-dialog,.qt-sales-reservations-dialog,.qt-sales-standalone-dialog,.qt-sales-source-dialog,.qt-purchase-search-dialog,.qt-purchase-insights-dialog,.qt-pending-purchases-dialog,.qt-pos-stat-dialog,.qt-pos-inv-detail,.qt-sales-saved-invoice-dialog,.qt-purchase-native-preview-dialog,.qt-sales-return-history-dialog,.qt-stock-adjustment-dialog)>:not(h2){
 width:calc(100% - 28px)!important;max-width:calc(100% - 28px)!important;margin-inline:auto!important;box-sizing:border-box!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-number,.qt-purchase-entry-number),
body.qt-desktop-mode :is(.qt-sales-entry-number,.qt-purchase-entry-number),
body.qt-desktop-mode .qt-sales-entry-sequence output{
 font-family:"Segoe UI",Tahoma,Arial,sans-serif!important;font-size:13px!important;font-weight:700!important;
 font-variant-numeric:tabular-nums;direction:auto!important;letter-spacing:0!important;
 white-space:nowrap!important;min-width:104px!important;width:auto!important;padding:6px 14px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important
}
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog){
 gap:8px!important;padding-bottom:10px!important
}
body.qt-desktop-mode :is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog) :is(.qt-sales-return-table-wrap,.qt-purchase-return-table-wrap){
 flex:1 1 auto!important;min-height:240px!important;max-height:none!important
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table,
body.qt-desktop-mode .qt-sales-return-native-dialog .qt-sales-return-linked-table{
 min-width:100%!important;width:100%!important;table-layout:auto!important
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td),
body.qt-desktop-mode .qt-sales-return-native-dialog .qt-sales-return-linked-table :is(th,td){
 width:auto!important;min-width:0!important;padding:6px 5px!important;white-space:nowrap
}
body.qt-desktop-mode :is(.qt-sales-reports-dialog,.qt-sales-stat-dialog,.qt-sales-reservations-dialog,.qt-sales-standalone-dialog,.qt-sales-source-dialog,.qt-purchase-search-dialog,.qt-purchase-insights-dialog,.qt-pending-purchases-dialog,.qt-pos-stat-dialog) :is(.table-scroll,.qt-purchase-insights-scroll,.qt-purchase-search-scroll,.qt-sales-standalone-scroll,.qt-sales-reservations-scroll){
 flex:1 1 auto;min-height:240px;max-height:none!important
}

/* ============================================================================
   Batch 13: True Offline Qt Window Maximization (qt-module-maximized) Across
   All 31 Sidebar Modules + Generic Routes + All Wide Sub-Windows
   ============================================================================ */

/* When ANY module is open (view !== 'home'), hide MainWindow sidebar/header/menubar
   and maximize the active module 100vw x 100dvh, matching Offline module_window_manager.py::showMaximized(). */
body.qt-desktop-mode.qt-module-maximized .app{
 display:grid!important;
 grid-template-areas:"main"!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:minmax(0,1fr)!important;
 width:100vw!important;max-width:100vw!important;
 height:100dvh!important;min-height:100dvh!important;
 padding:0!important;margin:0!important;gap:0!important;overflow:hidden!important
}
body.qt-desktop-mode.qt-module-maximized :is(.sidebar,.qt-main-menubar,.header,.qt-statusbar){
 display:none!important
}
body.qt-desktop-mode.qt-module-maximized .main,
body.qt-desktop-mode.qt-module-maximized #workspace{
 width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
 margin:0!important;padding:0!important;border:0!important;background:#eef3f9!important
}
body.qt-desktop-mode #qt-sidebar-home,
body.qt-desktop-mode #qt-window-tabs{
 display:none!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-bar{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px;
 flex:0 0 36px!important;height:36px!important;min-height:36px!important;
 padding:0 12px 0 0!important;margin:0!important;border:0!important;border-bottom:1px solid #163357!important;
 background:#244875!important;color:#fff!important;font-size:14px!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-bar strong{
 color:#fff!important;font-weight:800!important;font-size:14px!important;margin-inline-end:auto
}
body.qt-desktop-mode.qt-module-maximized .qt-window-close{
 width:44px!important;height:35px!important;min-height:35px!important;
 color:#fff!important;font-size:19px!important;border-radius:0!important;background:transparent!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-close:hover{
 background:#d9363e!important;color:#fff!important
}
body.qt-desktop-mode .qt-dashboard-stat-caption{
 display:block;font-size:11px;font-weight:600;color:#7f92a8;margin-top:2px
}
body.qt-desktop-mode .qt-category-center{
 flex-direction:column!important;gap:1px!important;line-height:1.15!important
}
body.qt-desktop-mode .qt-category-center small{
 font-size:9px!important;font-weight:700!important;color:#5b728b!important
}
body.qt-desktop-mode .qt-activity-kind{
 display:inline-block!important;width:9px!important;height:9px!important;min-width:9px!important;
 padding:0!important;border-radius:50%!important;font-size:0!important;overflow:hidden!important;margin-inline-end:4px!important
}
body.qt-desktop-mode .qt-activity-kind.is-sale{background:#18a957!important}
body.qt-desktop-mode .qt-activity-kind.is-purchase{background:#1d70ce!important}
body.qt-desktop-mode .qt-activity-kind.is-expense{background:#d92d20!important}
body.qt-desktop-mode .qt-stock-pill.deficit{background:#fdecea;color:#b42318;border:1px solid #f4caca}
body.qt-desktop-mode.qt-module-maximized #body-content{
 flex:1 1 0!important;min-height:0!important;height:auto!important;width:100%!important;
 padding:6px 8px!important;margin:0!important;box-sizing:border-box;
 overflow-y:auto!important;overflow-x:hidden!important;
 display:flex!important;flex-direction:column!important;background:#eef3f9!important
}
body.qt-desktop-mode.qt-module-maximized .qt-render-root{
 flex:1 1 auto!important;width:100%!important;max-width:none!important;
 min-height:100%!important;display:flex!important;flex-direction:column!important;padding:0!important;margin:0!important;gap:6px
}
body.qt-desktop-mode.qt-module-maximized .qt-render-root>:not(dialog):not(.dialog-backdrop){
 width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box
}
body.qt-desktop-mode.qt-module-maximized [hidden]{display:none!important}
/* Single-root full-screen workspaces & active sub-views (never stretch toolbar/tab headers like .qt-report-window or .qt-salon-navigation) */
body.qt-desktop-mode.qt-module-maximized :is(.qt-branches-window,.qt-product-notes,.qt-delivery-areas,.qt-printer-ports,.qt-rooms-window,.qt-tables-workspace,.qt-devices-workspace,.qt-maintenance-workspace,.qt-shifts-window,.qt-expenses-window,.qt-accounts-workspace,.qt-accounts-dashboard,.qt-employees-workspace,.qt-employees-list,.qt-sessions-window,.qt-settings,.qt-settings-window,.qt-users-window,.qt-mfg-window,.qt-sub-window,.qt-ship-window,.qt-cleanup-window,.qt-delmon-window,.qt-native-module,.qt-pos-window,.qt-sales-window,.qt-invoice-purchase,.qt-pos-inv-window,.qt-treasury-window,.qt-cash-window,.qt-render-root>.panel:only-child){
 flex:1 1 auto!important;min-height:100%!important;width:100%!important;max-width:none!important;
 display:flex!important;flex-direction:column!important;margin:0!important
}
body.qt-desktop-mode.qt-module-maximized :is(.qt-report-window,.qt-report-native-tabs,.qt-salon-navigation){
 flex:0 0 auto!important;height:auto!important;min-height:0!important;width:100%!important;max-width:none!important;margin:0!important
}
body.qt-desktop-mode.qt-module-maximized .qt-render-root>.panel:not(:only-child){
 flex:0 0 auto!important;height:auto!important;min-height:0!important
}
body.qt-desktop-mode.qt-module-maximized :is(.qt-report-results,.qt-report-treasury,.qt-salon-workspace,.qt-salon-appointments-page,.qt-salon-sales,.qt-salon-chairs,.qt-salon-settings,.qt-salon-packages-workspace,.qt-salon-invoices-workspace):not([hidden]),
body.qt-desktop-mode.qt-module-maximized .qt-render-root>.panel:not(:only-child):not(.qt-report-window):not(.qt-salon-navigation):last-of-type:not([hidden]){
 flex:1 1 auto!important;min-height:260px!important;width:100%!important;max-width:none!important;
 display:flex!important;flex-direction:column!important;margin:0!important
}
body.qt-desktop-mode.qt-module-maximized :is(.qt-branches-window,.qt-product-notes,.qt-delivery-areas,.qt-printer-ports,.qt-rooms-window,.qt-tables-workspace,.qt-devices-workspace,.qt-maintenance-workspace,.qt-shifts-window,.qt-expenses-window,.qt-accounts-workspace,.qt-employees-workspace,.qt-sessions-window,.qt-settings,.qt-settings-window,.qt-users-window,.qt-mfg-window,.qt-sub-window,.qt-ship-window,.qt-cleanup-window,.qt-delmon-window,.qt-native-module,.qt-sales-window,.qt-invoice-purchase,.qt-pos-inv-window,.qt-treasury-window,.qt-report-results,.qt-render-root>.panel) :is(.table-scroll,.qt-native-table-scroll,.qt-invoice-workarea,.qt-accounts-frame,.qt-users-table-wrap,.qt-employees-table-scroll,.qt-sessions-table-wrap,.qt-pos-inv-scroll){
 flex:1 1 auto!important;min-height:200px!important
}
/* Full-screen remaining wide sub-windows (Sales Advanced Search, Session Details/Search, Wide Treasury Reports) */
body.qt-desktop-mode .dialog-backdrop:has(>.qt-sales-advanced-search-dialog,>.qt-session-advanced-details,>.qt-session-advanced-search,>.qt-session-statistics),
body.qt-desktop-mode .qt-treasury-backdrop:is([data-treasury-window="reports"],[data-treasury-window="statistics"],[data-treasury-window="audit"],[data-treasury-window="ledger"]){
 position:fixed!important;inset:0!important;padding:0!important;margin:0!important;z-index:260!important;
 align-items:stretch!important;justify-content:stretch!important;background:#eef3f9
}
body.qt-desktop-mode :is(.qt-sales-advanced-search-dialog,.qt-session-advanced-details,.qt-session-advanced-search,.qt-session-statistics),
body.qt-desktop-mode .qt-treasury-backdrop:is([data-treasury-window="reports"],[data-treasury-window="statistics"],[data-treasury-window="audit"],[data-treasury-window="ledger"])>.qt-treasury-modal{
 width:100vw!important;max-width:100vw!important;min-width:100vw!important;
 height:100dvh!important;max-height:100dvh!important;min-height:100dvh!important;
 margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 display:flex!important;flex-direction:column!important;padding:0!important;overflow-y:auto!important
}
body.qt-desktop-mode :is(.qt-sales-advanced-search-dialog,.qt-session-advanced-details,.qt-session-advanced-search,.qt-session-statistics)>h2{
 flex:0 0 auto!important;margin:0!important;padding:9px 16px!important;
 background:#244875!important;color:#fff!important;font-size:15px!important;font-weight:800!important
}

/* ============================================================================
   Batch 14: Exact 1:1 Offline Qt Parity for POS, Sales & Purchases
   (Customer Workflow, Top Bars, Cart Proportions, Entry Cards, Summary Footer)
   ============================================================================ */

/* --- 1. POS (نقطة البيع) Right Catalog Panel --- */
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-top-row{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:8px!important;
 padding:4px 10px!important;min-height:42px!important;
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-order-modes{
 order:1!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;
 margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
 display:flex!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-order-label{
 font-size:12px!important;font-weight:800!important;color:#244875!important;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-switch{
 order:2!important;flex:0 0 auto!important;margin:0!important;padding:2px 4px!important;
 background:#edf2f7!important;border:1px solid #c5d4e5!important;border-radius:18px!important;
 display:flex!important;align-items:center!important;gap:3px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-title{
 font-size:11.5px!important;font-weight:800!important;color:#334e68!important;padding:0 6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-choice{
 border:0!important;background:transparent!important;color:#475569!important;
 border-radius:14px!important;padding:3px 11px!important;min-height:26px!important;height:26px!important;
 font-size:12px!important;font-weight:700!important;box-shadow:none!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-choice.is-active:nth-of-type(1){
 background:#18A957!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-choice.is-active:nth-of-type(2){
 background:#d97706!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-tool-row{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:8px!important;
 padding:4px 10px!important;min-height:42px!important;max-width:100%!important;overflow-x:auto!important;
 display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:nowrap!important
}
@media(max-width:700px){
 body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-tool-row{
  flex-wrap:wrap!important
 }
 body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-tools{
  max-width:100%!important;overflow-x:auto!important
 }
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-tools{
 border:0!important;background:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important;
 flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-tool{
 height:30px!important;min-height:30px!important;padding:0 12px!important;border-radius:6px!important;
 font-size:12px!important;font-weight:700!important;border:1px solid #c5d4e5!important;
 background:#fff!important;color:#183659!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-tool.qt-pos-order-selected{
 background:#061f3e!important;color:#fff!important;border-color:#061f3e!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-pricing-policy{
 flex:0 0 auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;
 margin:0!important;font-size:12px!important;font-weight:700!important;color:#244875!important;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-pricing-policy-select{
 height:30px!important;min-height:30px!important;min-width:140px!important;max-width:190px!important;
 font-size:12px!important;padding:2px 8px!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-category-frame{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:8px!important;
 padding:4px 10px!important;min-height:38px!important;display:flex!important;align-items:center!important;justify-content:space-between!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-category-pill{
 height:28px!important;min-height:28px!important;padding:0 12px!important;font-size:12px!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-category-pill.is-active{
 background:#061f3e!important;color:#fff!important;border-color:#061f3e!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-products-grid{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:8px!important;
 justify-content:start!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-product-tile{
 border:1px solid #d5e2f0!important;border-radius:8px!important;background:#fff!important;padding:5px 6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-catalog-pager{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:6px!important;
 padding:2px 8px!important;min-height:28px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-catalog-pager :is(button,select){
 height:24px!important;min-height:24px!important;padding:0 8px!important;font-size:11px!important
}
body.qt-desktop-mode .qt-pos-window .qt-pos-catalog-pager[data-single-page="1"],
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-catalog-pager[data-single-page="1"]{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-shortcuts-help{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-product-tile .qt-pos-product-visual:not(:has(img)){
 font-size:0!important;
 background:#f4f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa9ba' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/34px no-repeat!important
}

/* --- 2. POS Left Cart Panel: Exact Offline 1:1 Header, Zero Scrollbar Cart, Unified Compact Settings --- */
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header{
 background:#061f3e!important;padding:4px 6px!important;height:44px!important;min-height:44px!important;border-radius:7px!important;
 display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header > label{
 font-size:0!important;line-height:0!important;gap:0!important;color:transparent!important;margin:0!important;flex-direction:row!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header > .qt-pos-cart-search{
 flex:1 1 auto!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header > label:not(.qt-pos-cart-search){
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-header input{
 font-size:12.5px!important;line-height:normal!important;height:32px!important;min-height:32px!important;
 border-radius:16px!important;padding:2px 12px!important;background:#fff!important;border:1px solid #c5d4e5!important;color:#183659!important;width:100%!important;max-width:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-bar{
 flex:0 0 auto!important;position:relative!important;z-index:20;
 background:#f0f5fb!important;border:1px solid #cbd9e8!important;border-radius:6px!important;padding:3px 6px!important;box-sizing:border-box;
 display:flex!important;flex-direction:column!important;gap:2px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-bar > label{
 font-size:0!important;line-height:0!important;gap:0!important;margin:0!important;display:block!important;width:100%!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-picker{
 display:flex!important;flex-direction:column!important;gap:2px!important;width:100%!important;position:relative!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-inputs{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;align-items:center!important;width:100%
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-select-sync{
 position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-party-balance{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;
 font-size:11px!important;color:#334e68!important;padding:1px 4px!important;line-height:1.2
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-party-balance strong{
 color:#183659!important;font-weight:800!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-inputs input{
 height:28px!important;min-height:28px!important;font-size:12px!important;padding:2px 8px!important;border-radius:6px!important;
 background:#fff;border:1px solid #b8ccdf;color:#183659;min-width:0;width:100%;box-sizing:border-box
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-add{
 height:28px!important;min-height:28px!important;padding:0 9px!important;border-radius:6px!important;
 background:#18A957!important;color:#fff!important;border:1px solid #138a46!important;
 font-size:11.5px!important;font-weight:700!important;white-space:nowrap!important;cursor:pointer
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-add:disabled{opacity:.45;cursor:not-allowed}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-suggestions:not([hidden]){
 position:absolute!important;top:31px!important;right:0!important;left:0!important;z-index:55!important;
 background:#fff!important;border:1px solid #244875!important;border-radius:7px!important;
 box-shadow:0 10px 24px rgba(6,31,62,.2)!important;max-height:185px!important;overflow-y:auto!important;
 display:flex;flex-direction:column;gap:2px;padding:4px
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-suggestion{
 width:100%;text-align:right;padding:5px 8px;border:0;border-radius:5px;background:#f8fbff;
 color:#183659;font-size:12px;font-weight:700;cursor:pointer
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-suggestion:hover{
 background:#244875;color:#fff
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:4px!important;margin:0!important;min-height:18px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager[data-single-page="1"]{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-pager .qt-pos-customer-status{
 font-size:10.5px!important;color:#5b728b!important;line-height:1.2
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register{
 flex:1 1 auto!important;min-height:200px!important;overflow-x:hidden!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item{
 grid-template-columns:minmax(60px,1.2fr) 48px 80px 56px 78px 28px!important;gap:3px!important;padding:3px 4px!important;min-width:0!important;width:100%!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-line-note{
 min-width:0!important;width:100%!important;padding-inline:3px!important;font-size:10.5px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-line-product-select{
 appearance:none!important;-webkit-appearance:none!important;background:transparent!important;border-color:transparent!important;
 font-weight:700!important;color:#183659!important;padding:0 2px!important;text-overflow:ellipsis!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-controls{
 grid-template-columns:18px minmax(30px,1fr) 18px 18px!important;gap:1px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-controls input[data-qty]{
 padding:0!important;min-width:0!important;text-align:center!important;font-size:12px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-quantity-button{
 width:18px!important;min-width:18px!important;max-width:18px!important;height:24px!important;min-height:24px!important;font-size:11px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head{
 background:#ffffff!important;color:#1e293b!important;border-bottom:1px solid #cbd5e1!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .qt-pos-line-head>span{
 color:#1e293b!important;font-size:11.5px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item .qt-pos-quantity-button{
 background:#244875!important;color:#fff!important;border:1px solid #19375c!important;border-radius:4px!important;font-weight:800
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-register .invoice-item button.small:not(.qt-pos-quantity-button){
 background:#B42318!important;color:#fff!important;border:1px solid #8d1b12!important;border-radius:4px!important;font-weight:700;
 width:28px!important;min-width:28px!important;padding:0 2px!important;font-size:10px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-native-settings{
 flex:0 0 auto!important;padding:3px 6px!important;gap:2px!important;background:#f8fbff;border:1px solid #d5e2f0;border-bottom:0;border-radius:6px 6px 0 0;margin:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-native-settings .qt-pos-settings-title,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-line-add,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-payment-mode-field{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid{
 display:grid!important;grid-template-columns:68px 62px minmax(0,1fr) auto!important;gap:4px!important;align-items:end!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid label{
 font-size:10px!important;gap:1px!important;margin:0!important;min-width:0
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid :is(input,button){
 height:25px!important;min-height:25px!important;font-size:11px!important;padding:1px 5px!important;border-radius:5px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid{
 flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:3px 5px!important;padding:3px 6px 4px!important;background:#f8fbff;border:1px solid #d5e2f0;border-top:0;border-radius:0 0 6px 6px;margin-top:-4px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label{
 font-size:10.5px!important;gap:1px!important;margin:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid :is(input,select){
 height:26px!important;min-height:26px!important;font-size:11.5px!important;padding:1px 5px!important;border-radius:5px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:has(textarea){
 grid-column:1/-1!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid textarea{
 height:26px!important;min-height:26px!important;max-height:28px!important;font-size:11.5px!important;padding:2px 6px!important;resize:none
}
body.qt-desktop-mode #body-content .qt-pos-tender-panel:has(.qt-pos-tender-hint[hidden]),
body.qt-desktop-mode #body-content .qt-pos-catalog-hint,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cart-stats,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-cash-preview{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .toolbar{
 flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:0!important;padding:0!important;margin:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-native-total{
 flex:1 1 100%!important;width:100%!important;height:36px!important;min-height:36px!important;background:#244875!important;color:#fff!important;
 border-radius:6px!important;display:flex!important;align-items:center!important;justify-content:center!important;
 font-size:15px!important;font-weight:800!important;padding:0 12px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions{
 flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;gap:5px!important;padding:0!important;margin:0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button{
 height:38px!important;min-height:38px!important;padding:0 6px!important;white-space:nowrap!important;border-radius:6px!important;font-size:11.5px!important;font-weight:700!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button:first-child{
 flex:0 0 84px!important;background:#B42318!important;border-color:#8d1b12!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button:nth-child(2),
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button:nth-child(3),
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button:nth-child(4){
 flex:1 1 0!important;background:#244875!important;border-color:#19375c!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-actions>button:hover:not(:disabled){
 filter:brightness(1.08)
}

/* --- 3. Sales & Purchases Main Register Windows: Bottom-Pinned 5 Cards & Crisp Scope --- */
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) :is(.qt-sales-scope-required.hidden,.qt-invoice-workarea>.panel.hidden){
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-sales-scope-required:not(.hidden){
 padding:5px 12px!important;margin:0!important;display:flex!important;align-items:center!important;gap:10px!important;
 border-radius:6px!important;background:#f4f8fd!important;border:1px solid #c5d4e5!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-sales-scope-required p{
 margin:0!important;font-size:12px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-register:not(.hidden),
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-workarea>.panel:not(.hidden){
 display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;gap:6px!important;padding:8px 10px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-filters,
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-purchase-returns-filters{
 order:1!important;flex:0 0 auto!important;margin:0!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-purchase-filter-note{
 order:1!important;flex:0 0 auto!important;font-size:10.5px!important;line-height:1.25!important;margin:0!important;padding:0 4px!important;color:#5b728b!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-register>.table-scroll,
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-workarea>.panel>.table-scroll{
 order:2!important;flex:1 1 0!important;min-height:180px!important;background:#fff!important;border:1px solid #c5d4e5!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-register>.hint{
 order:2!important;flex:0 0 auto!important;margin:0!important;padding:2px 6px!important;font-size:11px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-pager{
 order:3!important;flex:0 0 auto!important;margin:0!important;padding:2px 6px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-register .qt-invoice-pager[data-single-page="1"],
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-purchase-classification-note,
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-purchase-filter-note,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-info,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-duplicate-party-field,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-redundant-add,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-back,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-party-pager[data-single-page="1"],
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-product-pager[data-single-page="1"]{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-aging-bar{
 order:1!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;margin:0!important;padding:0!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-aging-bar>button{
 height:26px!important;min-height:26px!important;padding:0 10px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-summary{
 order:5!important;flex:0 0 auto!important;margin-top:auto!important;margin-bottom:0!important
}
body.qt-desktop-mode .qt-invoice-aging-dialog{
 width:min(1120px,96vw)!important;max-width:1120px!important
}
body.qt-desktop-mode #body-content .qt-accounts-more:not([open]),
body.qt-desktop-mode #body-content .qt-users-screen-title,
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-title,
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-footnote,
body.qt-desktop-mode #body-content .qt-settings-note,
body.qt-desktop-mode #body-content .qt-settings-cloud-extras>summary,
body.qt-desktop-mode #body-content .qt-report-trial>p.muted,
body.qt-desktop-mode #body-content :is(.qt-tables-list,.qt-devices-workspace .qt-tables-list)>p.muted,
body.qt-desktop-mode .qt-native-customer-dialog .qt-native-form-note,
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-quiet,
body.qt-desktop-mode #body-content .qt-native-warehouses :is(.qt-native-filters-host,.qt-native-list-options,.qt-native-column-picker,.qt-native-warehouse-extras),
body.qt-desktop-mode #body-content .qt-native-warehouses .qt-native-pagination:not(:has(button:not(:disabled))),
body.qt-desktop-mode #body-content .qt-subscriptions-window :is(.qt-native-module-heading,.qt-native-summary,.qt-native-form-note),
body.qt-desktop-mode #body-content .qt-pos-invoice-window>h2,
body.qt-desktop-mode #body-content .qt-pos-invoice-window .qt-pos-inv-scope-message,
body.qt-desktop-mode #body-content .qt-pos-invoice-window .qt-pos-inv-filter .qt-pos-inv-status,
body.qt-desktop-mode #body-content .qt-shifts>p.muted,
body.qt-desktop-mode #body-content .qt-rooms-window>p.muted,
body.qt-desktop-mode #body-content .qt-rooms-window>.qt-rooms-actions:has(.qt-room-status):not(:has(button:not(:disabled))),
body.qt-desktop-mode #body-content .qt-devices-workspace .qt-tables-list>.qt-rooms-actions:has(.qt-room-status):not(:has(button:not(:disabled))),
body.qt-desktop-mode #body-content .qt-devices-header,
body.qt-desktop-mode #body-content .qt-settings>.qt-settings-batch-actions,
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-admin-info,
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions:not(:has(button:not([hidden]))),
body.qt-desktop-mode #body-content .qt-sessions-workspace>.qt-session-heading,
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-history>.toolbar:not(:has(button:not(:disabled))),
body.qt-desktop-mode #body-content .qt-expenses-window>.qt-expense-footnote,
body.qt-desktop-mode #body-content .qt-transfers-intro:not(:has(button)),
body.qt-desktop-mode #body-content .qt-transfers-intro>p.muted,
body.qt-desktop-mode #body-content .qt-warehouse-balances>p.hint,
body.qt-desktop-mode #body-content .qt-warehouse-balances>.qt-warehouse-alert-summary,
body.qt-desktop-mode #body-content .qt-stock-counts-intro:not(:has(p:not(.muted):not(.hint))),
body.qt-desktop-mode #body-content .qt-stock-counts-intro>p.muted,
body.qt-desktop-mode #body-content .qt-stock-counts-intro>p.hint,
body.qt-desktop-mode #body-content .qt-manufacturing-window :is(.qt-native-module-heading,.qt-native-summary,.qt-native-form-note),
body.qt-desktop-mode #body-content .qt-shipping-window :is(.qt-native-module-heading,.qt-native-form-note),
body.qt-desktop-mode #body-content .qt-cleanup-window :is(.qt-native-module-heading,.qt-native-summary,.qt-native-form-note),
body.qt-desktop-mode #body-content .qt-deletion-monitor-window :is(.qt-native-module-heading,.qt-native-form-note),
body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-pagination:empty,
body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-content>.qt-native-pagination-status,
body.qt-desktop-mode #body-content .qt-salon-appointments-page>p.hint{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-accounts-workspace{
 padding:6px 10px!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-accounts-primary-tabs{
 min-height:42px!important;padding:4px 8px!important
}
body.qt-desktop-mode #body-content .qt-accounts-primary-tabs .qt-native-action{
 min-height:34px!important;height:34px!important;font-size:12px!important
}
@media(min-width:960px){
 body.qt-desktop-mode #body-content .qt-accounts-dashboard{
  display:grid!important;grid-template-columns:auto 1fr!important;gap:5px!important;align-items:center!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-accounts-dashboard-header{
  grid-column:1 / -1;min-height:0!important;padding:2px 6px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-today{
  min-height:48px!important;padding:4px 12px!important;gap:12px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-today strong{
  font-size:16px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-command-row{
  grid-column:1;background:transparent!important;border:0!important;padding:0!important;min-height:0!important;margin:0!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-filters{
  grid-column:2;justify-self:start;background:transparent!important;border:0!important;padding:0!important;min-height:0!important;margin:0!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard>.qt-native-content{
  grid-column:1 / -1;gap:6px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-summary-card{
  min-height:62px!important;padding:6px 10px!important;gap:2px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-summary-card strong{
  font-size:18px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel{
  padding:6px 10px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-analytics-panel h3,
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-quick-panel h3{
  font-size:13px!important;margin:0 0 5px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard :is(.qt-accounts-native-trend,.qt-accounts-trend-content,.qt-accounts-trend-pending){
  min-height:98px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-native-trend svg{
  min-height:95px!important;max-height:118px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-donut svg{
  width:94px!important;height:94px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-bottom-row .qt-accounts-quick-links{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-quick-panel{
  padding:5px 9px!important
 }
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-quick-links .qt-native-action,
 body.qt-desktop-mode #body-content .qt-accounts-dashboard .qt-accounts-fast-actions .qt-native-action{
  min-height:30px!important;height:auto!important;padding:3px 5px!important;font-size:11px!important
 }
 body.qt-desktop-mode #body-content .qt-stock-counts-form .invoice-item{
  display:grid!important;grid-template-columns:minmax(240px,2fr) minmax(215px,1.25fr) minmax(150px,1fr) auto!important;
  gap:8px!important;align-items:end!important
 }
}
body.qt-desktop-mode #body-content .qt-warehouse-transfer-row{
 align-items:start!important
}
body.qt-desktop-mode #body-content .qt-warehouse-transfer-row>label{
 font-size:0!important;gap:0!important
}
body.qt-desktop-mode #body-content .qt-warehouse-transfer-row :is(input,select,.qt-warehouse-transfer-code,.qt-stock-product-picker){
 font-size:12px!important
}
body.qt-desktop-mode #body-content .qt-stock-counts-form .invoice-item{
 background:#f8fbff;border:1px solid #d5e2f0;border-radius:7px;padding:8px 10px!important
}
body.qt-desktop-mode #body-content .qt-stock-counts-form .invoice-item>label{
 margin:0!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-stock-counts-form .invoice-item>p.hint{
 margin:0!important;font-size:11.5px!important;align-self:center!important
}
body.qt-desktop-mode #body-content form.qt-stock-counts-form>button{
 width:auto!important;min-width:170px!important;max-width:340px!important;justify-self:start!important;justify-content:center!important;align-items:center!important;align-self:flex-start!important;display:inline-flex!important;padding:0 16px!important;margin-inline-end:8px!important
}
body.qt-desktop-mode #body-content .qt-pos-invoice-window .qt-pos-inv-content{
 display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-pos-invoice-window .qt-pos-inv-tables,
body.qt-desktop-mode #body-content .qt-pos-invoice-window .qt-pos-inv-scroll:not([hidden]){
 display:block!important;flex:1 1 0!important;min-height:0!important
}
body.qt-desktop-mode #body-content .qt-subscriptions-window .qt-native-module-header{
 padding:4px 8px!important;min-height:42px!important
}
body.qt-desktop-mode #body-content .qt-subscriptions-window .qt-native-filters{
 padding:3px 6px!important;min-height:32px!important;gap:6px!important;margin:0!important
}
body.qt-desktop-mode #body-content .qt-accounts-workspace .qt-accounts-primary-tabs{
 flex-wrap:wrap!important
}

/* --- 4. Sales & Purchases Invoice Entry Dialogs: Unified Offline 4-Stage Parity --- */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden)>.panel,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden)>.qt-invoice-entry-panel{
 display:flex!important;flex-direction:column!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-close{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-entry-form,.qt-purchase-entry-form){
 flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;
 overflow:hidden!important;padding:4px 8px!important;gap:4px!important;box-sizing:border-box!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-toolbar{
 padding:4px 8px!important;gap:5px!important;flex-wrap:wrap!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn){
 height:32px!important;min-height:32px!important;border-radius:6px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn{
 font-size:17px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-products-card,.qt-purchase-products-card){
 flex:1 1 0!important;min-height:85px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:4px 8px!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-products-card>h3,.qt-purchase-products-card>h3){
 margin:0!important;font-size:11.5px!important;line-height:1.2!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-line-scroll,.qt-purchase-entry-table-scroll){
 flex:1 1 0!important;min-height:70px!important;max-height:none!important;overflow:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn).success{
 background:#18A957!important;border-color:#138a46!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn).primary{
 background:#244875!important;border-color:#19375c!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn).secondary{
 background:#4A647F!important;border-color:#3a4f66!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn).danger{
 background:#B42318!important;border-color:#8d1b12!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-btn,.qt-purchase-entry-btn):disabled{
 opacity:.42!important;cursor:not-allowed!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-quick-add-party{
 height:30px!important;min-height:30px!important;padding:0 10px!important;border-radius:6px!important;
 background:#18A957!important;border:1px solid #138a46!important;color:#fff!important;
 font-size:12px!important;font-weight:700!important;white-space:nowrap!important;cursor:pointer
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading{
 min-height:26px!important;height:26px!important;padding:0 10px!important;background:#173c63!important;color:#fff!important;border-bottom:1px solid #0e2844!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-title-close{
 width:24px!important;height:20px!important;min-height:20px!important;font-size:15px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card){
 position:relative!important;gap:3px 8px!important;padding:4px 8px!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card)>h3{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card{
 display:grid!important;grid-template-columns:minmax(380px,1.5fr) minmax(280px,1fr)!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card>.qt-entry-options-strip{
 grid-column:1/-1!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row{
 position:relative!important;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:5px!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row>label{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;margin:0!important;font-size:11px!important;font-weight:700!important;white-space:nowrap!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row>label:first-child{
 flex:1 1 auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row>label:nth-child(2){
 flex:0 0 92px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row>label:nth-child(2) input{
 width:62px!important;text-align:center
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row input{
 height:28px!important;min-height:28px!important;padding:1px 7px!important;font-size:12px!important;flex:1 1 auto!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-invoice-party-suggestions,.qt-sales-product-results,.qt-invoice-product-popup)[hidden]{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-party-suggestions:not([hidden]){
 position:absolute!important;top:calc(100% + 2px)!important;right:0!important;width:min(360px,100%)!important;z-index:55!important;
 background:#fff!important;border:1px solid #244875!important;border-radius:7px!important;
 box-shadow:0 10px 24px rgba(6,31,62,.2)!important;max-height:190px!important;overflow-y:auto!important;
 display:flex;flex-direction:column;gap:2px;padding:4px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-party-suggestion{
 width:100%;justify-content:flex-start!important;text-align:right;font-size:12px!important;font-weight:700
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card) .form-grid{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px 6px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid{
 grid-template-columns:repeat(2,minmax(0,1fr))!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card) .form-grid>label{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;margin:0!important;font-size:11px!important;font-weight:700!important;white-space:nowrap!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card) .form-grid :is(input,select){
 height:28px!important;min-height:28px!important;padding:1px 7px!important;font-size:12px!important;flex:1 1 auto!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:nth-child(3),
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker){
 grid-column:1/-1!important;order:-1!important;
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker)>.qt-invoice-party-picker{
 flex:1 1 auto!important;display:grid!important;
 grid-template-columns:minmax(180px,1.4fr) minmax(180px,1.4fr) 66px auto auto!important;
 gap:6px!important;align-items:center!important;position:relative!important;width:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker) .qt-invoice-party-suggestions[hidden]{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker) .qt-invoice-party-suggestions:not([hidden]){
 display:flex!important;flex-direction:column!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker) .qt-invoice-party-picker .qt-invoice-party-pager:not([data-single-page="1"]),
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .qt-invoice-party-picker .qt-invoice-party-pager:not([data-single-page="1"]){
 grid-column:auto!important;margin:0!important;gap:4px!important;min-height:24px!important;display:inline-flex!important;align-items:center!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-party-picker .qt-invoice-party-pager button{
 height:22px!important;min-height:22px!important;padding:0 7px!important;font-size:11px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-party-picker :is(input,select){
 height:30px!important;min-height:30px!important;padding:2px 7px!important;font-size:12px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-options-strip{
 display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:10px!important;
 padding:3px 10px!important;background:#f8fbff!important;border:1px solid #d5e2f0!important;border-radius:7px!important;min-height:30px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills{
 display:flex!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-label{
 font-size:12px!important;font-weight:800!important;color:#244875!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill{
 height:25px!important;min-height:25px!important;padding:0 12px!important;border-radius:14px!important;
 border:1px solid #c5d4e5!important;background:#edf2f7!important;color:#334e68!important;
 font-size:12px!important;font-weight:700!important;display:inline-flex;align-items:center
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill.is-active{
 background:#18A957!important;border-color:#138a46!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill-static.is-active{
 background:#244875!important;border-color:#19375c!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill{
 display:inline-flex!important;align-items:center!important;gap:6px!important;
 padding:2px 10px!important;background:#fff!important;border:1px solid #d5e2f0!important;border-radius:6px!important;
 font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill small{
 color:#5b728b!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill strong{
 color:#183659!important;font-weight:800!important;font-variant-numeric:tabular-nums
}

/* Product quick bar & popup (Sales + Purchases identical) */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-products-card,.qt-purchase-products-card){
 flex:1 1 0!important;min-height:140px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:5px 8px!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) :is(.qt-sales-line-scroll,.qt-purchase-entry-table-scroll){
 flex:1 1 0!important;min-height:110px!important;max-height:none!important;overflow:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-products-card,.qt-purchase-products-card)>h3{
 font-size:11.5px!important;margin:0!important;color:#244875!important;font-weight:800!important;line-height:1.2
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-search,.qt-invoice-product-picker){
 position:relative!important;z-index:25!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar){
 display:grid!important;grid-template-columns:minmax(240px,2.5fr) 86px 96px auto auto!important;
 gap:6px!important;align-items:center!important;padding:4px 8px!important;
 background:#f8fbff!important;border:1px solid #d5e2f0!important;border-radius:7px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>label{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;
 margin:0!important;font-size:11.5px!important;font-weight:700!important;white-space:nowrap
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar) input{
 height:28px!important;min-height:28px!important;padding:2px 8px!important;font-size:12px!important;min-width:0;flex:1 1 auto
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>button{
 height:28px!important;min-height:28px!important;padding:0 12px!important;font-size:12px!important;font-weight:700!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-results,.qt-invoice-product-popup):not([hidden]){
 position:absolute!important;top:calc(100% + 2px)!important;right:0!important;left:0!important;z-index:60!important;
 background:#fff!important;border:1px solid #244875!important;border-radius:8px!important;
 box-shadow:0 12px 28px rgba(6,31,62,.22)!important;padding:8px!important;max-height:245px!important;overflow-y:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-product-popup .qt-invoice-product-grid{
 display:grid!important;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-product-popup .qt-invoice-product-tile{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;
 padding:6px 8px!important;min-height:34px!important;border:1px solid #d5e2f0!important;border-radius:6px!important;background:#f8fbff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-invoice-product-popup .qt-invoice-product-tile:hover{
 background:#244875!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-items-table,.qt-purchase-entry-table) tbody button.small{
 background:#B42318!important;border-color:#8d1b12!important;color:#fff!important;border-radius:5px!important
}

/* Stage 4: Bottom Notes Strip + 3 Side-by-Side Summary Cards (Offline summary_cards.py twin) */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-summary-card,.qt-purchase-totals-card){
 flex:0 0 auto!important;padding:4px 8px!important;gap:4px!important;background:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-notes-strip,.qt-purchase-notes-strip)>label{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;width:100%!important;margin:0!important;font-size:11.5px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-notes-strip,.qt-purchase-notes-strip) input{
 flex:1 1 auto!important;height:26px!important;min-height:26px!important;padding:2px 8px!important;font-size:12px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-summary-cards{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;width:100%!important;align-items:stretch
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card{
 background:#f8fbff!important;border:1px solid #c5d4e5!important;border-radius:7px!important;
 padding:5px 9px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card>h4{
 margin:0!important;font-size:11.5px!important;font-weight:800!important;color:#244875!important;border-bottom:1px solid #dce6f2;padding-bottom:2px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-input{
 display:flex!important;flex-direction:column!important;gap:1px!important;margin:0!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-input span{
 font-size:10px!important;color:#4a647f!important;font-weight:700!important;line-height:1.1!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-input :is(input,select){
 height:26px!important;min-height:26px!important;padding:1px 6px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sale-pay-controls{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-grid{
 display:flex!important;flex-direction:column!important;gap:2px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-metric{
 background:transparent!important;border:0!important;border-bottom:1px solid #e4ecf5!important;border-radius:0!important;
 padding:1px 4px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-grid{
 display:grid!important;grid-template-columns:repeat(auto-fit,minmax(78px,1fr))!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-metric{
 background:#fff!important;border:1px solid #d5e2f0!important;border-radius:6px!important;
 padding:3px 6px!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:1px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-metric span{
 font-size:11px!important;color:#5b728b!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-summary-card,.qt-purchase-totals-card) .qt-entry-summary-cards strong{
 background:transparent!important;border:0!important;padding:0!important;border-radius:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-metric strong{
 font-size:13px!important;color:#183659!important;font-weight:800!important;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-grand-total{
 background:#173c63!important;color:#fff!important;border-radius:7px!important;
 padding:7px 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
 font-size:14px!important;font-weight:800!important;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-grand-total strong{
 color:#fff!important;font-size:17px!important;font-weight:900!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-row{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric{
 border-radius:6px!important;padding:5px 8px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
 font-size:12px!important;font-weight:800!important;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-paid{
 background:#eaf7ef!important;border:1px solid #bfe3cd!important;color:#15693d!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-paid strong{
 color:#15693d!important;font-size:14px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-remaining{
 background:#fdeeed!important;border:1px solid #f0ccc5!important;color:#9c2219!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-remaining strong{
 color:#9c2219!important;font-size:14px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-footer{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;flex-wrap:wrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-method{
 font-size:11px!important;font-weight:700!important;color:#244875!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-legacy-total-sync,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-footer>.toolbar,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-footer>button[type="submit"]{
 display:none!important
}
body.qt-desktop-mode :is(.qt-pos-quick-modal-backdrop,.qt-invoice-quick-modal-backdrop)>.dialog{
 width:min(460px,94vw)!important;max-width:460px!important;min-width:0!important;height:auto!important;max-height:90dvh!important;
 border-radius:10px!important;padding:12px 14px!important
}
body.qt-desktop-mode :is(.qt-pos-quick-modal-head,.qt-invoice-quick-modal-head){
 display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #d5e2f0;padding-bottom:6px;margin-bottom:8px
}
body.qt-desktop-mode :is(.qt-pos-quick-modal-head,.qt-invoice-quick-modal-head) h3{
 margin:0;color:#244875;font-size:14px;font-weight:800
}

/* --- Batch 18: Complete 11-Module 1:1 Offline Visual & Structural Parity --- */
/* 1. Sales & Purchases Lists + Returns + Aging strip */
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-workarea .qt-sales-scope-required:not(#_){
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-aging-bar{
 order:3!important;justify-content:flex-start!important;margin-top:2px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-sales-filters>button:first-of-type,
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-purchase-filters>button:first-of-type,
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-scope-bar .button.primary{
 background:#1769C2!important;border-color:#1256a0!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-filter-clear{
 background:#FFF7F7!important;border:1px solid #F0AAAA!important;color:#C62828!important
}

/* 2. Sales & Purchases Entry Dialogs + Return Dialogs (tight single-row Stage 2 & clean Stage 3/4) */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid>label.qt-sales-duplicate-party-field{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid{
 grid-template-columns:repeat(2,minmax(120px,1fr))!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid{
 grid-template-columns:repeat(4,minmax(110px,1fr))!important;gap:4px 8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-products-card,.qt-purchase-products-card)>h3,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-product-status{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-notes-strip,.qt-purchase-notes-strip){
 padding:1px 4px!important;background:transparent!important;border:0!important
}
body.qt-desktop-mode .dialog:is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog)>p.muted,
body.qt-desktop-mode .dialog:is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog) .qt-purchase-return-accuracy-note,
body.qt-desktop-mode .dialog:is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog) form>p.hint{
 display:none!important
}
body.qt-desktop-mode .dialog:is(.qt-sales-return-native-dialog,.qt-purchase-return-native-dialog) form>label{
 max-width:440px!important
}

/* 3. Customers & Suppliers (Exact Offline header buttons + RTL filter bar order) */
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-module-header{
 padding:6px 12px!important;min-height:48px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-module-header .qt-native-action{
 min-height:32px!important;height:32px!important;padding:0 13px!important;font-size:12px!important;background:#244875!important;border-color:#19375c!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-module-header .qt-native-action:first-child{
 background:#4A647F!important;border-color:#3a4f66!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters{
 padding:6px 10px!important;gap:7px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>input{
 order:5!important;flex:1 1 250px!important;height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>select{
 height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>select:nth-of-type(1){order:4!important}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>select:nth-of-type(2){order:3!important}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>select:nth-of-type(3){order:2!important}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>.qt-native-action:not(.qt-party-filter-add-btn){
 min-height:34px!important;height:34px!important;padding:0 13px!important;font-size:12px!important;background:#4A647F!important;border-color:#3a4f66!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>.qt-native-action:first-of-type{order:-3!important}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>.qt-native-action:nth-of-type(2){order:-4!important}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters>.qt-party-filter-add-btn{
 order:-5!important;min-height:34px!important;height:34px!important;padding:0 14px!important;font-size:12px!important;background:#244875!important;border-color:#19375c!important;color:#fff!important
}

/* 4. Expenses (Offline toolbar colors + single seamless table container + totals styling) */
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-toolbar .button{
 min-height:34px!important;height:34px!important;padding:0 14px!important;font-size:12.5px!important;background:#4A647F!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-toolbar .button.primary{
 background:#244875!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-results{
 flex:1 1 0!important;min-height:180px!important;display:flex!important;flex-direction:column!important;
 border:1px solid #d1d1d6!important;border-radius:6px!important;background:#fff!important;overflow:auto!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-results>.table-scroll{
 border:0!important;border-radius:0!important;min-height:0!important;flex:0 0 auto!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-totals>span{
 padding:6px 12px!important;border-radius:5px!important;color:#244875!important;background:#e8f0f7!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-totals>span:nth-child(2),
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-totals>span:nth-child(3){
 background:#eef2f6!important;color:#4a647f!important
}

/* 5. Products / StockWindow (clean filter bar + single action bar + compact selection bar) */
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters .qt-native-stock-section-label,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters .qt-stock-dup-add-btn,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-module-heading{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions{
 padding:5px 10px!important;min-height:42px!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-action{
 min-height:32px!important;height:32px!important;padding:0 12px!important;font-size:12px!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-action.success{
 background:#1aa158!important;border-color:#168649!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-action.primary{
 background:#154b82!important;border-color:#103a65!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-action.danger{
 background:#df382f!important;border-color:#b82a23!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions .qt-native-action.secondary{
 background:#fff!important;border:1px solid #cbd5e1!important;color:#244875!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-selection-bar{
 padding:3px 10px!important;min-height:32px!important
}

/* 6. Treasury / Cash (Offline slate Clear Display button) */
body.qt-desktop-mode #body-content .qt-treasury-window .qt-treasury-filter-actions button:not(.primary){
 background:#4A647F!important;border-color:#3a4f66!important;color:#fff!important
}

/* 7. Reports (hide redundant scope prose & compact cards) */
body.qt-desktop-mode #body-content .qt-report-results>p.muted,
body.qt-desktop-mode #body-content .qt-report-profit-matrix>p.muted{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards{
 flex:0 0 auto!important;overflow:visible!important;height:auto!important;max-height:none!important;
 gap:6px!important;margin:4px 0!important;min-height:0!important
}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>article{
 height:auto!important;min-height:58px!important;max-height:none!important;padding:6px 10px!important
}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>article>strong{
 font-size:15px!important;line-height:1.25!important
}

/* 8. System Settings (single horizontal scrollable tab strip like QTabWidget) */
body.qt-desktop-mode #body-content .qt-settings-tabs{
 flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
 gap:2px!important;padding:4px 8px 0!important;scrollbar-width:thin
}
body.qt-desktop-mode #body-content .qt-settings-tabs>.button{
 flex:0 0 auto!important;min-height:32px!important;padding:4px 10px!important;font-size:11.5px!important
}

/* 9. Shifts (remove extra closed subtitle) */
body.qt-desktop-mode #body-content :is(.qt-shifts,.qt-shifts-window) fieldset>h3.closed+p{
 display:none!important
}

/* 10. Users Window & UserDialog (QToolBar at top + exact Offline action colors + clean dialog footer) */
body.qt-desktop-mode #body-content .qt-users-window{
 display:flex!important;flex-direction:column!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-top-toolbar{
 order:-2!important;justify-content:flex-end!important;min-height:42px!important;padding:4px 14px!important;margin:0!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-filters{
 order:-1!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions{
 order:0!important;min-height:48px!important;padding:6px 12px!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions>.qt-users-button{
 min-height:34px!important;height:34px!important;padding:0 14px!important;font-size:12px!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions>.qt-users-button:nth-child(1){
 background:#0f67c8!important;border-color:#0c53a1!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions>.qt-users-button:nth-child(2){
 background:#fff!important;border:1px solid #78a9dc!important;color:#1459a0!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions>.qt-users-button.danger{
 background:#e43c43!important;border-color:#c62d34!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-users-window>.qt-users-actions>.qt-users-button:not(:nth-child(1)):not(:nth-child(2)):not(.danger){
 background:#fff!important;border:1px solid #cfdceb!important;color:#214f80!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog fieldset.qt-users-permissions:not(:has(.qt-users-permission-row)){
 display:none!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding-top:8px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions>.button,
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions>.qt-users-button{
 width:100%!important;min-height:36px!important;justify-content:center!important
}

/* --- Batch 20: True 1:1 PySide6 Fusion QSS Fidelity, Vector Icons, Table Gridlines & Exact Module Geometry --- */

/* 0. Offline modern_main_window.css Sidebar Parity + Segoe/Tahoma QSS Typography + Universal QTableWidget Gridlines */
body.qt-desktop-mode,
body.qt-desktop-mode #body-content,
body.qt-desktop-mode #body-content input,
body.qt-desktop-mode #body-content select,
body.qt-desktop-mode #body-content textarea,
body.qt-desktop-mode #body-content button{
 font-family:"Segoe UI",Tahoma,Arial,sans-serif!important
}
body.qt-desktop-mode .sidebar{
 background:#244875!important;padding:10px 8px!important;gap:6px!important;border-inline-start:1px solid #162e4d!important
}
body.qt-desktop-mode .qt-sidebar-button{
 background:#244875!important;color:#ffffff!important;border:1px solid #6d89aa!important;border-radius:7px!important;
 font-family:Arial,Tahoma,sans-serif!important;font-weight:700!important;font-size:17px!important;
 text-align:center!important;padding:0 10px!important;box-shadow:none!important
}
body.qt-desktop-mode .qt-sidebar-button:hover{
 background:#305889!important;border-color:#90accb!important
}
body.qt-desktop-mode .qt-sidebar-button.active{
 background:#eef4fa!important;color:#173b66!important;border:1px solid #eef4fa!important
}
body.qt-desktop-mode #body-content .table-scroll:not(.qt-sales-returns-register .table-scroll){
 border:1px solid #b8ccdf!important;border-radius:4px!important;background:#ffffff!important
}
body.qt-desktop-mode #body-content table:not(.qt-sales-returns-register table){
 border-collapse:collapse!important;background:#ffffff!important
}
body.qt-desktop-mode #body-content table:not(.qt-sales-returns-register table):not(.qt-shifts-window table):not(.qt-shifts table):not(.qt-dashboard-table) th{
 background:#244875!important;color:#ffffff!important;font-weight:700!important;font-size:12px!important;height:34px!important;
 padding:6px 8px!important;border-bottom:1px solid #19375c!important;border-inline-end:1px solid rgba(255,255,255,.16)!important;box-sizing:border-box
}
body.qt-desktop-mode #body-content :is(.qt-shifts,.qt-shifts-window) table th{
 background:#f1f3f5!important;color:#1e293b!important;font-weight:700!important;font-size:12px!important;height:32px!important;
 padding:5px 8px!important;border-bottom:1px solid #cbd5e1!important;border-inline-end:1px solid #cbd5e1!important;box-sizing:border-box
}
body.qt-desktop-mode #body-content table:not(.qt-sales-returns-register table) td{
 padding:4px 8px!important;height:30px!important;font-size:12px!important;
 border-bottom:1px solid #e5ecf3!important;border-inline-end:1px solid #e5ecf3!important;box-sizing:border-box
}
body.qt-desktop-mode #body-content table:not(.qt-sales-returns-register table) :is(th,td):last-child{
 border-inline-end:0!important
}
body.qt-desktop-mode #body-content table tbody tr:nth-child(even){
 background:#f8fafc!important
}
body.qt-desktop-mode #body-content table tbody tr:hover{
 background:#edf4fc!important
}
body.qt-desktop-mode.qt-module-maximized #workspace,
body.qt-desktop-mode.qt-module-maximized #body-content{
 background:#F5F6FA!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-bar{
 flex:0 0 24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;
 background:#ffffff!important;color:#1e293b!important;border-bottom:1px solid #d5dfe9!important;
 padding:0 10px 0 0!important;font-size:11.5px!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-bar strong{
 color:#1e293b!important;font-size:11.5px!important;font-weight:600!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-close{
 width:32px!important;height:23px!important;min-height:23px!important;font-size:15px!important;
 color:#475569!important;background:transparent!important
}
body.qt-desktop-mode.qt-module-maximized .qt-window-close:hover{
 background:#c42b1c!important;color:#fff!important
}
body.qt-desktop-mode.qt-module-maximized #body-content{
 padding:4px 6px!important;gap:4px!important
}
body.qt-desktop-mode.qt-module-maximized .panel{
 border-radius:4px!important;border-color:#d5dfe9!important
}

/* 1. POS Compact Inline Cart Controls matching offline_all/pos_window.png */
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-bar{
 padding:2px 5px!important;border-radius:4px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-inputs input,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-customer-add{
 height:25px!important;min-height:25px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-party-balance{
 padding:0 2px!important;font-size:10.5px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-native-top-row{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:4px 6px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-switch{
 order:-1!important;display:inline-flex!important;align-items:center!important;gap:2px!important;padding:2px!important;
 background:#eef3f8!important;border:1px solid #c5d4e4!important;border-radius:16px!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-title{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-choice{
 height:24px!important;min-height:24px!important;padding:0 12px!important;border-radius:13px!important;
 font-size:11.5px!important;font-weight:700!important;border:0!important;background:transparent!important;color:#475569!important
}
body.qt-desktop-mode #body-content .qt-pos-catalog .qt-pos-payment-choice.is-active:nth-of-type(2){
 background:#dc2626!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-native-settings{
 padding:3px 6px!important;border-radius:4px 4px 0 0!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid{
 display:grid!important;grid-template-columns:minmax(90px,1fr) minmax(90px,1fr) auto!important;gap:4px 6px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>label:nth-child(3){
 grid-row:2!important;grid-column:1 / -1!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>button:nth-child(4){
 grid-row:1!important;grid-column:3!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-tender-panel[hidden],
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label[hidden],
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>.qt-pos-payment-mode-field{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>label:not([hidden]),
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:not([hidden]):not(.qt-pos-payment-mode-field){
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;
 font-size:11px!important;font-weight:700!important;color:#1e293b!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>label>input,
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label>:is(input,select,textarea){
 flex:1 1 auto!important;min-width:0!important;height:25px!important;min-height:25px!important;border-radius:4px!important;font-size:11px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>button{
 height:25px!important;min-height:25px!important;padding:0 12px!important;background:#244875!important;color:#fff!important;border-color:#1b385d!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-discount-grid>button:disabled{
 opacity:.45!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 padding:3px 6px 4px!important;border-radius:0 0 4px 4px!important;gap:4px 6px!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:has(textarea){
 grid-column:1 / -1!important
}
body.qt-desktop-mode #body-content .qt-pos-cart .qt-pos-form>.form-grid>label:has(textarea) textarea{
 height:25px!important;min-height:25px!important;max-height:25px!important;line-height:1.3!important;padding:2px 6px!important
}

/* 2. Sales & Purchases List Toolbars: Full Edge-to-Edge Stretch + Crisp Icons matching offline_all/sales_window.png & purchases_window.png */
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar{
 width:100%!important;padding:2px 0!important;background:transparent!important;border:0!important;border-radius:0!important;gap:5px!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-fill{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button{
 flex:1 1 0!important;min-width:0!important;height:34px!important;min-height:34px!important;
 padding:0 8px!important;border-radius:5px!important;font-size:12px!important;font-weight:700!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button::before{
 content:"";display:inline-block;width:14px;height:14px;flex:0 0 14px;background-position:center;background-repeat:no-repeat;background-size:14px 14px
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button:nth-child(1)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button:nth-child(2)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button:nth-child(3)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-toolbar>.qt-invoice-button:nth-child(4)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-toolbar>.qt-invoice-button:nth-child(5)::before,
body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-toolbar>.qt-invoice-button:nth-child(4)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-6'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-toolbar>.qt-invoice-button:nth-child(6)::before,
body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-toolbar>.qt-invoice-button:nth-child(5)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-toolbar>.qt-invoice-button:nth-child(7)::before,
body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-toolbar>.qt-invoice-button:nth-child(6)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9c.26.6.77 1 1.51 1H21a2 2 0 0 1 0 4h-.09c-.74 0-1.25.4-1.51 1z'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-sales-window .qt-invoice-toolbar>.qt-invoice-button:nth-child(8)::before,
body.qt-desktop-mode #body-content .qt-invoice-purchase .qt-invoice-toolbar>.qt-invoice-button:nth-child(7)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button:last-child::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-toolbar>.qt-invoice-button:last-child{
 background:#4A647F!important;border-color:#3a4f66!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-aging-bar{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) :is(.qt-sales-filters,.qt-purchase-filters){
 padding:4px 8px!important;border-radius:4px!important;background:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-sales-scope-bar button.primary{
 background:#0071E3!important;border-color:#0062c4!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-sales-scope-bar button.secondary{
 background:#5a6b7c!important;border-color:#495867!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-tabs .qt-invoice-button.tab.active,
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-tabs .tab.active{
 background:#0071E3!important;border-color:#0071E3!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) :is(.qt-sales-filters,.qt-purchase-filters)>button.primary{
 background:#0071E3!important;border-color:#0062c4!important;color:#fff!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) :is(.qt-sales-filters,.qt-purchase-filters)>button:last-child{
 background:#fff5f5!important;border:1px solid #feb2b2!important;color:#e53e3e!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-summary{
 gap:6px!important;padding-top:4px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-metric{
 border-radius:6px!important;padding:6px 10px!important
}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-metric.blue{background:#eff6ff!important;border:1px solid #bfdbfe!important;color:#175EA8!important}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-metric.green{background:#eefaf3!important;border:1px solid #b7e4c7!important;color:#149447!important}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-metric.red{background:#fef2f2!important;border:1px solid #fecaca!important;color:#D9363E!important}
body.qt-desktop-mode #body-content :is(.qt-sales-window,.qt-invoice-purchase) .qt-invoice-metric.amber{background:#fffbeb!important;border:1px solid #fde68a!important;color:#D97706!important}

/* 3. Sales & Purchase Entry Dialogs: True 1:1 Offline Visual Layout (offline_all/sales_entry.png & purchase_entry.png) */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden)>.panel{
 padding:4px 6px!important;background:#F5F6FA!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading{
 min-height:22px!important;height:22px!important;padding:0 8px!important;background:#ffffff!important;
 color:#1e293b!important;border-bottom:1px solid #d5dfe9!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-caption{
 color:#1e293b!important;font-size:11.5px!important;font-weight:600!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-title-close{
 width:28px!important;height:21px!important;min-height:21px!important;color:#475569!important;background:transparent!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog:not(.hidden) .qt-invoice-entry-window-heading .qt-invoice-entry-title-close:hover{
 background:#c42b1c!important;color:#fff!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar,.qt-purchase-entry-toolbar){
 display:flex!important;align-items:center!important;gap:4px!important;width:100%!important;padding:0!important;background:transparent!important;border:0!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-toolbar>.qt-purchase-entry-btn{
 flex:1 1 auto!important;height:36px!important;min-height:36px!important;padding:0 6px!important;border-radius:5px!important;
 gap:5px!important;justify-content:center!important;align-items:center!important;display:inline-flex!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn)::before{
 content:"";display:inline-block;width:15px;height:15px;flex:0 0 15px;background-position:center;background-repeat:no-repeat;background-size:15px 15px
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn):nth-child(1)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn):nth-child(2)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpolyline points='17 21 17 13 7 13 7 21'/%3E%3Cpolyline points='7 3 7 8 15 8'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn):nth-child(3)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn):nth-child(4)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-toolbar>.qt-sales-entry-btn,.qt-purchase-entry-toolbar>.qt-purchase-entry-btn):nth-child(5)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn:nth-child(6)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13' rx='1'/%3E%3Cpath d='M16 8h4l3 3v5h-7z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn:nth-child(7)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn:nth-child(8)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-entry-toolbar>.qt-sales-entry-btn:nth-child(9)::before,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-entry-toolbar>.qt-purchase-entry-btn:nth-child(6)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence){
 flex:0 0 auto!important;margin-inline-start:0!important;display:inline-flex!important;align-items:center!important;gap:3px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-sales-entry-btn,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-purchase-entry-btn{
 width:32px!important;min-width:32px!important;max-width:32px!important;height:34px!important;min-height:34px!important;
 font-size:0!important;padding:0!important;border-radius:6px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-sales-entry-btn:first-child::after,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-purchase-entry-btn:first-child::after{
 content:"";width:15px;height:15px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center/contain no-repeat
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-sales-entry-btn:last-child::after,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-sequence,.qt-purchase-entry-sequence)>.qt-purchase-entry-btn:last-child::after{
 content:"";width:15px;height:15px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") center/contain no-repeat
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-entry-number,.qt-purchase-entry-number){
 width:104px!important;min-width:86px!important;height:34px!important;min-height:34px!important;border-radius:6px!important;
 font-family:"Consolas","Courier New",monospace!important;font-size:13px!important;font-weight:800!important;
 background:#f8fbff!important;border:1px solid #b9cbe0!important;color:#244875!important
}

/* Stage 2 Customer & Supplier Card: Unclipped 1-Row Header + Info Button + PillToggleSwitch Row */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card) .form-grid>label.qt-entry-invoice-number-field{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-customer-card,.qt-purchase-details-card){
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:5px!important;padding:5px 8px!important;gap:5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card{
 display:grid!important;grid-template-columns:minmax(420px,1.25fr) minmax(520px,1.5fr)!important;align-items:center!important;gap:5px 8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .qt-sales-customer-search-row{
 display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .qt-sales-customer-search-row>label:first-child{
 flex:1 1 auto!important;min-width:175px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .qt-sales-customer-search-row>label:nth-child(2){
 order:-1!important;flex:0 0 66px!important;width:66px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-party-info-btn{
 flex:0 0 30px!important;width:30px!important;min-width:30px!important;max-width:30px!important;height:30px!important;min-height:30px!important;
 background:#244875!important;color:#fff!important;border:1px solid #1b385d!important;border-radius:6px!important;
 padding:0!important;font-size:15px!important;font-weight:800!important;display:inline-flex!important;align-items:center!important;justify-content:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid>label{
 flex:1 1 0!important;min-width:120px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid>.qt-entry-sales-meta{
 order:-1!important;flex:1.6 1 auto!important;display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid>.qt-entry-sales-meta>label{
 display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;
 margin:0!important;font-size:11.5px!important;font-weight:700!important;color:#244875!important;white-space:nowrap!important;flex:1 1 0!important;min-width:110px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid>.qt-entry-sales-meta>label>select{
 flex:1 1 auto!important;min-width:74px!important;height:30px!important;min-height:30px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-party-select-sync,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(select[aria-label*="نوع فاتورة"]){
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid{
 display:grid!important;grid-template-columns:minmax(440px,2fr) 170px minmax(200px,1fr)!important;gap:5px 6px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker){
 grid-column:auto!important;order:-2!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid>label:has(.qt-invoice-party-picker)>.qt-invoice-party-picker{
 grid-template-columns:58px minmax(170px,1fr) auto 30px!important;gap:5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid .qt-purchase-supplier-id{
 order:-1!important;text-align:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-options-strip{
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:4px!important;padding:4px 8px!important;gap:12px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill{
 background:#ffffff!important;border:1px solid #cbd5e1!important;border-radius:5px!important;padding:3px 12px!important;gap:14px!important;min-width:154px!important;justify-content:space-between!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills{
 display:inline-flex!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)){
 background:transparent!important;border:0!important;padding:0!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)) .qt-entry-pill:not(.is-active){
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)) .qt-entry-pill.is-active{
 position:relative!important;height:24px!important;min-height:24px!important;padding:0 12px 0 26px!important;
 border-radius:12px!important;background:#dbe3ed!important;border:1px solid #c3cedc!important;color:#1e293b!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)) .qt-entry-pill.is-active::after{
 content:"";position:absolute;left:4px;top:4px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.22)
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill{
 position:relative!important;height:24px!important;min-height:24px!important;border-radius:12px!important;padding:0 10px 0 24px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill::after{
 content:"";position:absolute;left:4px;top:4px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.22)
}

/* Stage 3 Product Quick Bar matching offline_all/sales_entry.png ([+] right-first, unit, price, qty, disc%, disc EGP, final) */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-products-card,.qt-purchase-products-card){
 background:transparent!important;border:0!important;padding:0!important;gap:3px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-product-controls{
 display:grid!important;grid-template-columns:34px minmax(140px,2fr) auto auto auto auto auto auto auto!important;
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:5px!important;padding:4px 6px!important;gap:5px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-quick-bar{
 display:grid!important;grid-template-columns:34px minmax(135px,1.8fr) auto auto auto auto auto auto auto auto!important;
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:5px!important;padding:4px 6px!important;gap:5px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>label:nth-child(2){
 font-size:0!important;gap:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>label:nth-child(2)>input{
 font-size:12px!important;text-align:right!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>label>input{
 width:62px!important;min-width:56px!important;text-align:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar)>label:nth-child(2)>input{
 width:100%!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-product-controls,.qt-purchase-quick-bar) select{
 min-width:52px!important;height:28px!important;min-height:28px!important;padding:2px 4px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-add-product-btn{
 width:32px!important;min-width:32px!important;padding:0!important;height:28px!important;min-height:28px!important;
 font-size:18px!important;font-weight:800!important;background:#244875!important;border-color:#1b385d!important;color:#fff!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-quick-submit{
 padding:0 9px!important;height:28px!important;min-height:28px!important;font-size:11px!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-final-price-readout{
 display:inline-flex;align-items:center;justify-content:center;min-width:64px;height:28px;padding:0 8px;
 border-radius:5px;background:#f0fdf4;border:1px solid #22c55e;color:#15803d;font-weight:800;font-size:12.5px;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-items-caption{
 font-size:11.5px;font-weight:800;color:#244875;padding:1px 2px;line-height:1.2
}

/* Stage 4 Bottom Notes + Exact Offline summary_cards.py 3-Card Layout */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-summary-card,.qt-purchase-totals-card){
 background:transparent!important;border:0!important;padding:0!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog :is(.qt-sales-notes-strip,.qt-purchase-notes-strip){
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:4px!important;padding:3px 8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card{
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:6px!important;padding:7px 10px!important;
 justify-content:flex-start!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card>h4{
 border-bottom:0!important;padding-bottom:0!important;color:#1c3555!important;font-size:15px!important;font-weight:800!important;text-align:right!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-extras .qt-entry-sum-grid{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-extras .qt-entry-tax-readonly{
 grid-column:span 2!important;background:#f8fafc!important;border:1px solid #cbd5e1!important;border-radius:4px!important;
 padding:2px 6px!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-extras .qt-entry-tax-readonly span{
 font-size:10px!important;text-align:right!important;color:#64748b!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-extras .qt-entry-tax-readonly strong{
 font-size:13px!important;text-align:center!important;color:#1e293b!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-grid{
 display:flex!important;flex-direction:column!important;gap:3px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-metric{
 background:transparent!important;border:0!important;border-radius:0!important;
 padding:1px 2px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-metric span{
 font-size:11.5px!important;color:#64748b!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-sum-metric strong{
 font-size:13.5px!important;color:#1c3555!important;font-weight:800!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sum-card:nth-child(2) .qt-entry-summary-tax-extra{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-grand-total{
 margin-top:auto!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;gap:2px!important;padding:7px 12px!important;border-radius:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-grand-total>span{
 font-size:10.5px!important;font-weight:600!important;color:rgba(255,255,255,.88)!important;text-align:right!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-grand-total>strong{
 font-size:21px!important;text-align:center!important;width:100%
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-row{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-col{
 display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-label{
 font-size:10.5px!important;color:#64748b!important;font-weight:700!important;text-align:right!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric{
 flex-direction:column!important;align-items:center!important;justify-content:center!important;padding:4px 8px!important;border-radius:6px!important;min-height:36px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-paid{
 background:#eefaf2!important;border:1px solid #cbe5d6!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-paid input.qt-entry-paid-input{
 width:100%!important;background:transparent!important;border:0!important;border-bottom:1px solid transparent!important;border-radius:0!important;
 box-shadow:none!important;text-align:center!important;font-size:18px!important;font-weight:800!important;color:#26714e!important;
 height:26px!important;min-height:26px!important;padding:0!important;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-paid input.qt-entry-paid-input:focus{
 border-bottom-color:#26714e!important;outline:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-remaining{
 background:#fdf2ef!important;border:1px solid #f0d9d1!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-metric.is-remaining strong{
 color:#b15040!important;font-size:18px!important;font-weight:800!important;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sale-pay-controls{
 display:flex!important;align-items:center!important;gap:8px!important;margin-top:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sale-pay-controls .qt-entry-sum-input{
 flex:1 1 0!important;flex-direction:row!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sale-pay-controls .qt-entry-sum-input span{
 font-size:11px!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-sale-pay-controls .qt-entry-sum-input select{
 flex:1 1 auto!important;min-width:0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pay-method{
 display:none!important
}

/* 4. Customers & Suppliers + Expenses + Products + Warehouses + Treasury */
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-module-header{
 background:#fff!important;border:0!important;border-bottom:1px solid #d5dfe9!important;border-radius:0!important;padding:4px 10px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-tabs{
 border-bottom:1px solid #d5dfe9!important;background:#f8fafc!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-tab.active{
 background:#fff!important;border-bottom:2px solid #244875!important;color:#244875!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters input[type="search"]{
 flex:1 1 320px!important;min-width:295px!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-cloud-reset{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-toolbar{
 background:transparent!important;border:0!important;padding:2px 0!important;border-radius:0!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-filter{
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:4px!important;padding:4px 8px!important
}
body.qt-desktop-mode #body-content .qt-expenses-window .qt-expense-totals>span{
 background:#eef2f6!important;color:#1e293b!important;border:0!important;border-radius:4px!important;padding:4px 10px!important;font-size:12px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-actions{
 background:#fff!important;border:1px solid #d5dfe9!important;border-radius:4px!important;padding:5px 8px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-command-row{
 display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important;width:100%!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="search"]{
 flex:1 1 260px!important;min-width:220px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-stock-inline-options{
 margin-inline-start:auto!important;display:inline-flex!important;align-items:center!important;gap:5px!important;
 flex-wrap:nowrap!important;background:transparent!important;border:0!important;padding:0!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card{
 position:relative!important;padding-inline-end:44px!important;border-radius:6px!important;
 display:flex!important;flex-direction:column!important;align-items:flex-start!important;text-align:right!important;gap:4px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card strong{
 font-size:20px!important;font-weight:800!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card::after{
 content:"";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:22px;height:22px;background-position:center;background-repeat:no-repeat;background-size:22px 22px
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card:nth-child(1)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23133f6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card:nth-child(2)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316884e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card:nth-child(3)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c67a08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card:nth-child(4)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cc2d26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='4.93' y1='4.93' x2='19.07' y2='19.07'/%3E%3C/svg%3E")}
body.qt-desktop-mode #body-content .qt-treasury-window .qt-treasury-toolbar{
 background:transparent!important;border:0!important;padding:2px 0!important;justify-content:center!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-treasury-window .qt-treasury-toolbar>button{
 min-width:142px!important;flex:1 1 0!important;max-width:176px!important;height:34px!important;border-radius:6px!important
}

/* 5. Reports + Settings + Shifts + Users + UserDialog 1:1 Fidelity */
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-financial-filters,
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>.qt-report-cloud-extra-kpi,
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-result-table,
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-pager,
body.qt-desktop-mode #body-content .qt-report-results>p.hint{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>.qt-report-kpi-revenue{border-top:3px solid #0071E3!important}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>.qt-report-kpi-cost{border-top:3px solid #FF6B6B!important}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>.qt-report-kpi-expenses{border-top:3px solid #FFA94D!important}
body.qt-desktop-mode #body-content .qt-report-results>.qt-report-cards>.qt-report-kpi-profit{border-top:3px solid #51CF66!important}
body.qt-desktop-mode #body-content .qt-report-cloud-ledger{
 margin-top:6px;border:1px solid #d5dfe9;border-radius:5px;background:#fff;padding:4px 8px
}
body.qt-desktop-mode #body-content .qt-report-cloud-ledger>summary{
 cursor:pointer;font-size:12px;font-weight:700;color:#244875;padding:3px 0
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-reset{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-batch-actions{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-actions{
 justify-content:flex-start!important;gap:8px!important;border-top:1px solid #d5e0ec!important;padding:8px 14px!important;background:#f8fafc!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-logo-drop,
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-logo-box,
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-logo-placeholder{
 background:#ffffff!important;border:1px solid #cbd5e1!important;border-radius:4px!important;border-style:solid!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-extras{
 margin-top:4px;background:#f8fafc!important;border:1px solid #cbd8e5!important;border-radius:6px!important;padding:8px 12px!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-extras>summary{
 display:flex!important;align-items:center!important;justify-content:space-between!important;cursor:pointer!important;
 font-weight:700!important;font-size:12.5px!important;color:#173b66!important;padding:4px 2px!important;list-style:none!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-extras>summary::after{
 content:'▾';font-size:13px;color:#244875
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-extras[open]>summary{
 margin-bottom:10px!important;padding-bottom:8px!important;border-bottom:1px solid #d5e0ec!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-cloud-extras[open]>summary::after{
 content:'▴'
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) :is(.qt-settings-program-local,.qt-settings-program-nested,.qt-settings-program-linked)>.qt-settings-note,
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-shift-note,
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-thermal-preview .qt-settings-note{
 display:block!important;margin:4px 0 6px!important;padding:6px 10px!important;border-radius:5px!important;
 background:#f8fafc!important;color:#475569!important;font-size:12px!important;line-height:1.5!important
}
body.qt-desktop-mode #body-content #qt-settings-page-printing .qt-settings-printer-tabs button[aria-selected="true"]{
 background:#2196f3!important;color:#ffffff!important;border-color:#1976d2!important;font-weight:700!important;border-radius:4px!important
}
@media(min-width:900px){
 body.qt-desktop-mode #body-content #qt-settings-page-zatca_draft .qt-settings-fields>.qt-settings-group:first-of-type{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 18px!important;align-items:center
 }
 body.qt-desktop-mode #body-content #qt-settings-page-zatca_draft .qt-settings-fields>.qt-settings-group:first-of-type>legend{
  grid-column:1/-1
 }
 body.qt-desktop-mode #body-content #qt-settings-page-zatca_draft .qt-settings-fields>.qt-settings-group:first-of-type>.qt-settings-field{
  grid-template-columns:150px minmax(0,1fr)!important
 }
}
@media(max-width:760px){
 body.qt-desktop-mode #body-content :is(#qt-settings-page-a4_invoices,#qt-settings-page-thermal_invoices) .qt-settings-group{
  grid-template-columns:minmax(0,1fr)!important
 }
 body.qt-desktop-mode #body-content :is(#qt-settings-page-general,#qt-settings-page-system,#qt-settings-page-appearance,#qt-settings-page-printing,#qt-settings-page-thermal_invoices,#qt-settings-page-a4_invoices,#qt-settings-page-contract,#qt-settings-page-thermal_pos,#qt-settings-page-shift_printing,#qt-settings-page-preparation,#qt-settings-page-zatca_draft,#qt-settings-page-program) .qt-settings-field:not(:has(>input[type="checkbox"])):not(:has(>input[type="radio"])):not(:has(.qt-settings-color-editor)):not(:has(.qt-settings-dark-toggle)):not(:has(.qt-settings-unit)):not(:has(.qt-settings-unit-suffix)):not(:has([name="contract_clauses_text"])),
 body.qt-desktop-mode #body-content #qt-settings-page-printing .qt-settings-printer-device-label,
 body.qt-desktop-mode #body-content #qt-settings-page-a4_invoices .qt-settings-a4-printer,
 body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-native-font-row>.qt-settings-field:not(.qt-settings-font-bold){
  display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important;gap:6px!important
 }
 body.qt-desktop-mode #body-content #qt-settings-page-thermal_invoices .qt-settings-native-font-row{
  display:flex!important;flex-wrap:wrap!important;gap:8px!important
 }
 body.qt-desktop-mode #body-content :is(#qt-settings-page-general,#qt-settings-page-system,#qt-settings-page-appearance,#qt-settings-page-printing,#qt-settings-page-thermal_invoices,#qt-settings-page-a4_invoices,#qt-settings-page-contract,#qt-settings-page-thermal_pos,#qt-settings-page-shift_printing,#qt-settings-page-preparation,#qt-settings-page-zatca_draft,#qt-settings-page-program) .qt-settings-field:is(:has(.qt-settings-unit),:has(.qt-settings-unit-suffix)){
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:6px 10px!important
 }
 body.qt-desktop-mode #body-content .qt-settings-field>input[type="number"]:not([type="checkbox"]):not([type="radio"]){
  flex:0 0 auto!important;width:110px!important;height:34px!important
 }
 body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-color-editor){
  display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important
 }
 body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-color-editor>input[type="text"]{
  min-width:0!important;flex:1 1 80px!important
 }
 body.qt-desktop-mode #body-content #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-dark-toggle){
  grid-template-columns:auto auto 1fr!important
 }
 body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-printing-actions,
 body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-actions{
  flex-wrap:wrap!important
 }
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-branches-group{
 padding:4px 8px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-branches-list{
 display:flex!important;flex-wrap:wrap!important;gap:6px 12px!important;margin:2px 0!important
}
body.qt-desktop-mode #body-content :is(.qt-shifts,.qt-shifts-window) .qt-shift-cloud-refresh{
 display:none!important
}
body.qt-desktop-mode #body-content :is(.qt-shifts,.qt-shifts-window) .qt-shift-pager{
 width:100%!important;display:flex!important;align-items:center!important;gap:10px!important
}
body.qt-desktop-mode #body-content :is(.qt-shifts,.qt-shifts-window) .qt-shift-pager>button{
 flex:1 1 0!important;min-height:30px!important;border-radius:4px!important
}
body.qt-desktop-mode #body-content .qt-users-window .qt-users-cloud-ownpass,
body.qt-desktop-mode #body-content .qt-users-window .qt-users-cloud-reset{
 display:none!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-pane .qt-users-cloud-extra,
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-cloud-extra,
body.qt-desktop-mode .qt-users-tabbed-dialog fieldset.qt-users-permissions{
 display:none!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-tabbar{
 background:#f0f2f5!important;border:0!important;border-bottom:1px solid #cbd5e1!important;
 border-radius:0!important;padding:2px 6px 0!important;gap:2px!important;min-height:32px!important;
 flex-wrap:nowrap!important;overflow-x:auto!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-tabbar>button{
 height:28px!important;min-height:28px!important;padding:0 10px!important;font-size:11.5px!important;
 border-radius:4px 4px 0 0!important;white-space:nowrap!important;flex:0 0 auto!important;
 background:#e6ebf2!important;color:#334155!important;border:1px solid #cbd5e1!important;border-bottom:0!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-tabbar>button.active{
 background:#fff!important;color:#173b66!important;font-weight:800!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-pane{
 display:flex!important;flex-direction:column!important;gap:7px!important;padding:8px 10px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-pane .qt-users-field:not(.qt-users-cloud-extra){
 display:grid!important;grid-template-columns:118px minmax(0,1fr)!important;align-items:center!important;
 gap:8px!important;margin:0!important;font-size:12px!important;font-weight:700!important;color:#1e293b!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-pane .qt-users-field input:not([type="checkbox"]),
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-pane .qt-users-field select{
 height:28px!important;min-height:28px!important;border-radius:3px!important;font-size:12px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-password-group{
 border:1px solid #d1d5db!important;border-radius:4px!important;padding:8px 10px!important;margin:0!important;
 display:flex!important;flex-direction:column!important;gap:6px!important;background:#fafafa!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-password-tip{
 margin:0!important;font-size:11px!important;color:#64748b!important;text-align:right!important;padding-inline-start:126px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-active-inline{
 display:inline-flex!important;align-items:center!important;gap:6px!important;font-weight:600!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-basic-groups{
 border:1px solid #d1d5db!important;border-radius:4px!important;padding:6px 10px!important;margin:0!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-quick-group-controls{
 display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-quick-group-controls>select{
 flex:1 1 auto!important;min-width:0!important;height:28px!important;min-height:28px!important;border-radius:3px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-quick-group-controls>button{
 flex:0 0 auto!important;height:28px!important;min-height:28px!important;padding:0 12px!important;border-radius:3px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions{
 grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:6px 10px!important;border-top:1px solid #e2e8f0!important;background:#f8fafc!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions>.button,
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions>.qt-users-button{
 height:30px!important;min-height:30px!important;border-radius:4px!important
}

/* ==== BATCH 22: TRUE 1:1 OFFLINE WORKFLOW, PRESENTATION & VISUAL FIDELITY ==== */
/* 1. Main Shell Header Clock, Bell & Dashboard Viewport Fit */
body.qt-desktop-mode #qt-notifications-btn{
 background:transparent!important;border:0!important;box-shadow:none!important;
 width:38px!important;height:38px!important;min-height:38px!important;padding:0!important;border-radius:6px!important
}
body.qt-desktop-mode #qt-notifications-btn:hover{background:#eef3f8!important}
body.qt-desktop-mode .qt-dashboard{gap:8px!important}
body.qt-desktop-mode .qt-dashboard-shortcuts{
 min-height:58px!important;padding:5px 8px!important;gap:6px!important;border-radius:9px!important
}
body.qt-desktop-mode .qt-dashboard-shortcuts button,
body.qt-desktop-mode .qt-dashboard-scope select{
 height:46px!important;min-height:46px!important;font-size:14px!important
}
body.qt-desktop-mode .qt-dashboard-stats{gap:8px!important}
body.qt-desktop-mode .qt-dashboard-stat{
 min-height:102px!important;padding:10px 14px!important;gap:2px!important;border-radius:9px!important
}
body.qt-desktop-mode .qt-dashboard-stat-title{font-size:13.5px!important}
body.qt-desktop-mode .qt-dashboard-stat-value{font-size:28px!important;line-height:1.1!important}
body.qt-desktop-mode .qt-dashboard-panel{min-height:225px!important;padding:10px 12px!important}
body.qt-desktop-mode .qt-dashboard-trend-svg{min-height:180px!important;max-height:200px!important}
body.qt-desktop-mode .qt-dashboard-bottom .qt-dashboard-panel{min-height:180px!important}

/* 2. POS Clean Empty Cart, Payment Switch, Second Row & Customer Header */
body.qt-desktop-mode #body-content .qt-pos-line-register .invoice-item.qt-untouched-draft-line{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-pos-payment-switch{
 background:#f7f9fc!important;border:1px solid #d8e1eb!important;border-radius:8px!important;
 height:40px!important;min-height:40px!important;padding:3px 6px!important;gap:4px!important;
 display:inline-flex!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-pos-payment-switch .qt-pos-payment-choice{
 height:28px!important;min-height:28px!important;border-radius:999px!important;padding:0 12px!important;font-size:12px!important;font-weight:800!important
}
body.qt-desktop-mode #body-content .qt-pos-filters-bar{
 justify-content:flex-start!important;gap:6px!important;padding:4px 8px!important;
 background:#f7f9fc!important;border:1px solid #d8e1eb!important;border-radius:8px!important;
 min-height:44px!important
}
body.qt-desktop-mode #body-content .qt-pos-filters-bar>.qt-pos-policy-label{font-size:0!important;gap:0!important}
body.qt-desktop-mode #body-content .qt-pos-filters-bar>.qt-pos-policy-label>select{
 min-width:104px!important;height:34px!important;min-height:34px!important;font-size:12.5px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-pos-customer-bar{
 padding:3px 6px!important;gap:6px!important;background:#f7f9fc!important;border-bottom:1px solid #d8e1eb!important
}
body.qt-desktop-mode #body-content .qt-pos-customer-status{display:none!important}
body.qt-desktop-mode #body-content .qt-pos-customer-inputs>.qt-pos-customer-add{
 min-width:34px!important;width:auto!important;padding:0 8px!important;height:30px!important;min-height:30px!important;font-size:11.5px!important
}

/* 3. Sales & Purchases List: Connected Tab Pane, Bright Blue Refresh + Pink Clear + Crisp 5 KPI Cards */
body.qt-desktop-mode #body-content .qt-invoice-tabs{
 border-bottom:0!important;margin-bottom:0!important;padding:0!important;gap:3px!important
}
body.qt-desktop-mode #body-content .qt-invoice-tabs+*{
 border-top-right-radius:0!important;margin-top:0!important;border-top:2px solid #0071E3!important
}
body.qt-desktop-mode #body-content .qt-invoice-filters{
 padding:7px 10px!important;gap:8px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-filters>button:nth-of-type(1){
 background:#0071E3!important;border-color:#0071E3!important;color:#fff!important;
 padding:0 12px 0 12px!important;min-width:120px!important;height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content .qt-invoice-filters>button:nth-of-type(1)::before{
 content:"⟳ "!important;font-size:13px!important;margin-inline-end:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-filters>button:nth-of-type(2){
 background:#fff5f5!important;border:1px solid #f5c2c7!important;color:#c62828!important;
 padding:0 12px!important;min-width:78px!important;height:34px!important;min-height:34px!important
}
body.qt-desktop-mode #body-content .qt-invoice-filters>button:nth-of-type(2)::before{
 content:"✕ "!important;font-size:11px!important;margin-inline-end:3px!important
}
body.qt-desktop-mode #body-content .qt-sales-scope-hint{
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
 font-size:11px!important;padding:4px 10px!important;max-width:255px!important;margin-inline-start:auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-totals .qt-invoice-metric-card{
 min-height:66px!important;padding:8px 10px!important
}

/* 4. Invoice Entry (Sales & Purchases): Unified Row 1, Oval Pill Switches, Pure Stage 3, Card 3 Cashbox */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-search-row{
 border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-customer-card .form-grid,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid{
 gap:6px!important;align-items:center!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .form-grid{
 grid-template-columns:minmax(460px,2.4fr) minmax(220px,1fr)!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-details-card .qt-entry-toggles{
 display:inline-flex!important;align-items:center!important;gap:6px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)) .qt-entry-pill.is-active{
 position:relative!important;height:26px!important;min-height:26px!important;width:auto!important;min-width:72px!important;
 display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
 padding:0 12px 0 28px!important;border-radius:999px!important;
 background:#dbe3ed!important;border:1px solid #c3cedc!important;color:#1e293b!important;font-size:11.5px!important;font-weight:700!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills:not(:has(.qt-entry-switch)) .qt-entry-pill.is-active::after{
 content:""!important;position:absolute!important;top:4px!important;left:4px!important;right:auto!important;
 width:16px!important;height:16px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.22)!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill{
 position:relative!important;height:26px!important;min-height:26px!important;width:auto!important;min-width:76px!important;
 display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
 border-radius:999px!important;padding:0 12px 0 28px!important;font-size:11.5px!important;font-weight:700!important;white-space:nowrap!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill::after{
 content:""!important;position:absolute!important;top:4px!important;left:4px!important;right:auto!important;
 width:16px!important;height:16px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.22)!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill.is-active{
 background:#18A957!important;border-color:#15944c!important;color:#fff!important;
 padding:0 28px 0 12px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill.is-active::after{
 left:auto!important;right:4px!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-sales-product-controls{
 grid-template-columns:34px minmax(180px,2.2fr) auto auto auto auto auto auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-quick-bar{
 grid-template-columns:34px minmax(180px,2.2fr) auto auto auto auto auto auto!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-quick-submit,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-purchase-quick-bar>button.light,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-redundant-add{
 display:none!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-purchase-cashbox-field{
 display:flex!important;align-items:center!important;gap:8px!important;flex-direction:row!important;margin:2px 0 0!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-purchase-cashbox-field>span{
 flex:0 0 auto!important;white-space:nowrap!important;font-size:12.5px!important;font-weight:700!important;color:#475569!important
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-purchase-cashbox-field>select{
 flex:1 1 auto!important;min-width:0!important;height:32px!important;min-height:32px!important
}

/* 5. Customers & Suppliers KPIs (Top-Right Title / Bottom-Left Number) + Search Width */
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-summary-card{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 justify-content:space-between!important;min-height:66px!important;padding:9px 14px!important;gap:4px!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-summary-card>span,
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-summary-card>small{
 text-align:right!important;align-self:flex-start!important;width:auto!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-summary-card>strong{
 text-align:left!important;align-self:flex-end!important;font-size:20px!important;line-height:1.1!important
}
body.qt-desktop-mode #body-content :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters input[type="search"]{
 flex:2 1 400px!important;min-width:385px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-filters select{
 max-width:104px!important;padding-inline:5px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-native-customers .qt-native-filters>button{
 padding-inline:10px!important
}

/* 6. Products / Inventory Wide Search, Compact KPIs & RTL Metadata Order */
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="search"]{
 flex:2 1 380px!important;min-width:345px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters input[type="date"]{
 width:114px!important;min-width:110px!important;max-width:116px!important;flex:0 0 114px!important;font-size:11.5px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-filters select{
 max-width:100px!important;font-size:11.5px!important;padding-inline:4px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-metadata{
 direction:rtl!important;justify-content:flex-start!important;gap:8px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card{
 display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;
 grid-template-rows:auto auto!important;align-items:center!important;
 min-height:58px!important;padding:8px 12px!important;gap:2px 8px!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card>svg,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card>i{
 grid-column:1!important;grid-row:1 / span 2!important;margin:0!important;justify-self:center!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card>span,
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card>small{
 grid-column:2!important;grid-row:1!important;text-align:right!important;justify-self:start!important
}
body.qt-desktop-mode #body-content .qt-native-products .qt-native-summary-card>strong{
 grid-column:2!important;grid-row:2!important;text-align:right!important;justify-self:start!important;font-size:19px!important
}

/* 7. Expenses, Treasury, Reports, Settings, Users Dialog 1:1 Final Fidelity */
body.qt-desktop-mode #body-content :is(.qt-expenses,.qt-expenses-window) table td[colspan],
body.qt-desktop-mode #body-content :is(.qt-expenses,.qt-expenses-window) .qt-expense-results>p.muted{
 text-align:center!important;padding:28px 16px!important;color:#64748b!important;width:100%!important
}
body.qt-desktop-mode #body-content .qt-expense-totals{
 justify-content:flex-start!important;direction:rtl!important;gap:8px!important
}
body.qt-desktop-mode #body-content :is(.qt-cash,.qt-treasury,.qt-treasury-window) .qt-treasury-scope-actions>button:last-child,
body.qt-desktop-mode #body-content :is(.qt-cash,.qt-treasury,.qt-treasury-window) .qt-cash-clear-btn{
 background:#475569!important;border-color:#475569!important;color:#fff!important
}
body.qt-desktop-mode .qt-report-main-actions{
 margin-inline-start:6px!important
}
body.qt-desktop-mode .qt-report-native-tabs{
 justify-content:flex-start!important
}
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) .qt-settings-logo-panel,
body.qt-desktop-mode #body-content :is(.qt-settings,.qt-settings-window) fieldset:first-of-type>div:first-of-type:has(.qt-settings-logo-box){
 background:#f3f4f6!important;padding:12px!important;border-radius:4px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog{
 background:#f0f0f0!important;border:1px solid #94a3b8!important;border-radius:4px!important;
 max-width:1180px!important;width:min(1180px,96vw)!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions{
 background:#f0f0f0!important;padding:8px 10px!important;gap:8px!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions button[type="submit"]{
 background:#ffffff!important;color:#111827!important;border:1px solid #cbd5e1!important;font-weight:700!important
}
body.qt-desktop-mode .qt-users-tabbed-dialog .qt-users-dialog-actions button[type="button"]{
 background:#ffffff!important;color:#111827!important;border:1.5px solid #0078d7!important;font-weight:700!important
}


/* 2026-11-22 CLOUD invoice header: readable 14px switches and truthful status colors. */
/* The cloud invoice editor is separate from the offline demo.
   Color only actual purchase type choices and sale's server-backed unpaid badge. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-options-strip{
 min-height:54px!important;padding:8px 12px!important;gap:9px 12px!important;
 flex-wrap:wrap!important;align-items:center!important;overflow:visible!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills{
 min-height:40px!important;gap:8px!important;flex-wrap:wrap!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-label{
 font-size:14px!important;font-weight:800!important;line-height:1.45!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill{
 box-sizing:border-box;min-height:38px!important;height:auto!important;
 min-width:82px!important;padding:7px 12px!important;border-radius:19px!important;
 font:800 14px/1.35 Arial,Tahoma,sans-serif!important;
 justify-content:center!important;text-align:center!important;
 white-space:normal!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind="cash"]{
 background:#159447!important;border-color:#0d7535!important;color:#fff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind="credit"]{
 background:#d93232!important;border-color:#ab2424!important;color:#fff!important;
}
/* Active purchase mode is marked with an inner ring in addition to its fixed semantic color. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind].is-active:not(.qt-entry-pill-static){
 box-shadow:inset 0 0 0 2px #ffffffd9,0 2px 7px #17385d30!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind]:not(.is-active):not(.qt-entry-pill-static){
 filter:saturate(.75);opacity:.82;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind]:focus-visible{
 outline:3px solid #277cdb!important;outline-offset:3px!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-pill[data-payment-kind]:disabled{
 opacity:.5!important;cursor:not-allowed!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill{
 box-sizing:border-box;min-height:40px!important;gap:8px!important;
 padding:5px 11px!important;max-width:100%;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill small{
 font:700 13px/1.4 Arial,Tahoma,sans-serif!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill strong{
 font:800 16px/1.35 Arial,Tahoma,sans-serif!important;font-variant-numeric:tabular-nums;
}
/* Display only persisted sale delivery statuses (not a fake editable switch). */
body.qt-desktop-mode #body-content .qt-sales-window td.qt-sales-delivery-state:is(
 [data-delivery-status="تسليم فوري"],[data-delivery-status="فوري"],[data-delivery-status="instant"]){
 background:#e2f7e8!important;color:#147d3d!important;font-weight:800!important;
}
body.qt-desktop-mode #body-content .qt-sales-window td.qt-sales-delivery-state:is(
 [data-delivery-status="حجز"],[data-delivery-status="محجوز"],[data-delivery-status="reservation"]){
 background:#fff1c2!important;color:#856100!important;font-weight:800!important;
}
body.qt-desktop-mode .qt-sales-reservations-table td[data-delivery-status="حجز"]{
 background:#fff1c2!important;color:#856100!important;font-weight:800!important;
}
body.qt-desktop-mode .qt-sales-reservations-table td[data-delivery-status="تم التسليم"]{
 background:#e2f7e8!important;color:#147d3d!important;font-weight:800!important;
}
@media(max-width:700px){
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-options-strip{
   padding:8px!important;gap:7px!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills{flex:1 1 100%}
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-balance-pill{flex:1 1 130px}
}


/* 2026-11-22 Cloud actual sales toggle markup: active-mode green/red/yellow. */
/* Existing deployed Cloud uses one visible active pill and hides the inactive
   alternative. Match the actual buttons rather than depending on new data attrs. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-mode-pills:not(.qt-entry-delivery-pills):not(.qt-entry-toggles):not(.qt-entry-sales-meta)
 > button.qt-entry-pill.is-active{
 min-height:38px!important;height:38px!important;
 min-width:92px!important;font:800 14px/1.3 Arial,Tahoma,sans-serif!important;
 padding:0 14px 0 36px!important;border-radius:21px!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-mode-pills:not(.qt-entry-delivery-pills):not(.qt-entry-toggles):not(.qt-entry-sales-meta)
 > button.qt-entry-pill:first-of-type.is-active{
 background:#159447!important;border-color:#0d7535!important;color:#fff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-mode-pills:not(.qt-entry-delivery-pills):not(.qt-entry-toggles):not(.qt-entry-sales-meta)
 > button.qt-entry-pill:nth-of-type(2).is-active{
 background:#d93232!important;border-color:#ab2424!important;color:#fff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-delivery-pills>button.qt-entry-pill.is-active{
 min-height:38px!important;height:38px!important;
 min-width:92px!important;font:800 14px/1.3 Arial,Tahoma,sans-serif!important;
 padding:0 14px 0 36px!important;border-radius:21px!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-delivery-pills>button.qt-entry-pill:first-of-type.is-active{
 background:#159447!important;border-color:#0d7535!important;color:#fff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-delivery-pills>button.qt-entry-pill:nth-of-type(2).is-active{
 background:#f3c846!important;border-color:#d4a324!important;color:#453300!important;
}
/* Existing 3-D toggles: same slightly increased height and font as the mode pills. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-switch.qt-entry-pill{
 min-height:38px!important;height:38px!important;min-width:92px!important;
 font:800 14px/1.3 Arial,Tahoma,sans-serif!important;border-radius:21px!important;
 padding:0 14px 0 36px!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 :is(.qt-entry-switch.qt-entry-pill,.qt-entry-delivery-pills>button.qt-entry-pill.is-active,
  .qt-entry-mode-pills>button.qt-entry-pill.is-active)::after{
 top:7px!important;left:6px!important;width:23px!important;height:23px!important;
 border-radius:50%!important;background:#fff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog .qt-entry-mode-pills>input[type=date]{
 min-height:36px!important;height:36px!important;font-size:14px!important;
}
/* Prevent a hidden inactive choice from occupying horizontal room. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-entry-mode-pills:not(:has(.qt-entry-switch))>button.qt-entry-pill:not(.is-active){
 display:none!important;
}


/* 2026-11-22 CLOUD sales invoice strip alignment: five balanced groups. */
/* Layout-only: the five existing children are previous balance, new balance,
   sale type, delivery type, and the two operational toggles. */
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip{
 box-sizing:border-box!important;
 width:100%!important;
 min-height:64px!important;
 padding:9px 12px!important;
 margin:0!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 flex-wrap:wrap!important;
 gap:10px 12px!important;
 border:1px solid #d7e2ef!important;
 border-radius:9px!important;
 background:#fafcff!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-balance-pill{
 box-sizing:border-box!important;
 flex:1 1 160px!important;
 min-width:150px!important;
 max-width:none!important;
 width:auto!important;
 min-height:44px!important;
 padding:6px 11px!important;
 margin:0!important;
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:12px!important;
 border-radius:7px!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-mode-pills{
 display:flex!important;
 flex:0 0 auto!important;
 min-height:44px!important;
 align-items:center!important;
 justify-content:center!important;
 gap:8px!important;
 min-width:0!important;
 margin:0!important;
 padding:0!important;
 white-space:nowrap!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip .qt-entry-mode-label{
 margin:0!important;
 line-height:1.4!important;
 font-size:14px!important;
 font-weight:800!important;
 white-space:nowrap!important;
}
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip .qt-entry-pill.is-active,
body.qt-desktop-mode #body-content .qt-invoice-form-dialog
 .qt-sales-customer-card > .qt-entry-options-strip .qt-entry-switch{
 flex-shrink:0!important;
 margin:0!important;
 min-height:38px!important;
}
/* On wide screens, distribute all five groups evenly, removing the empty
   space on the left while keeping RTL ordering and equal vertical alignment. */
@media(min-width:780px) and (max-width:1249px){
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-balance-pill{
  flex-grow:1!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-toggles{
  flex:1 1 340px!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
 }
}
@media(max-width:779px){
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  padding:8px!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-balance-pill{
  min-width:0!important;
  width:100%!important;
  padding:5px 7px!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-mode-pills{
  justify-content:center!important;
  flex-wrap:wrap!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-toggles{
  grid-column:1/-1!important;
  gap:7px 9px!important;
  justify-content:center!important;
 }
}
@media(max-width:470px){
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip{
  grid-template-columns:minmax(0,1fr)!important;
 }
 body.qt-desktop-mode #body-content .qt-invoice-form-dialog
  .qt-sales-customer-card > .qt-entry-options-strip > .qt-entry-toggles{
  grid-column:1!important;
 }
}
