/* Browser counterpart of ui/styles/modern_main_window.css and the module UI
 * methods in the Offline source. Loaded LAST: generic Cloud .panel rules must
 * not override a module's title, dimensions, or table. Customer portals only.
 * Specialized invoice/POS/inventory controls keep their own source styling.
 */
body.qt-desktop-mode {
 --qt-ink:#244875;--qt-border:#b8ccdf;--qt-surface:#fff;
 --qt-selected:#e8f0f7;--qt-hover:#f5f9fc;
}
body.qt-desktop-mode #body-content{padding:0;background:#fff}
body.qt-desktop-mode .qt-render-root{min-height:0;padding:8px 10px 10px;gap:8px}
body.qt-desktop-mode .qt-render-root>*{max-width:100%;min-width:0}
body.qt-desktop-mode .qt-render-root>.panel{margin:0}
body.qt-desktop-mode .button{
 min-height:32px;padding:8px 16px;border:1px solid var(--qt-border);
 border-radius:6px;background:#fff;color:var(--qt-ink);
 font:500 13px "Segoe UI",Tahoma,Arial,sans-serif;white-space:nowrap;
}
body.qt-desktop-mode .button:hover:not(:disabled){background:var(--qt-selected);border-color:var(--qt-ink)}
body.qt-desktop-mode .button.primary{background:#244875;border-color:#244875;color:#fff;border-radius:6px}
body.qt-desktop-mode .button.danger{background:#ff3b30;border-color:#ff3b30;color:#fff}
body.qt-desktop-mode .button:disabled{background:#e8f0f7;color:#8a98aa;border-color:#b8ccdf;cursor:not-allowed}
body.qt-desktop-mode :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
 box-sizing:border-box;color:#244875;border-color:#b8ccdf;border-radius:5px;
 font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-size:12px;
}
body.qt-desktop-mode :is(input,select,textarea):focus-visible{
 outline:2px solid #244875;outline-offset:1px;background:#f5f9fc;
}
body.qt-desktop-mode :is(input[type=checkbox],input[type=radio]){accent-color:#244875;flex-shrink:0}
body.qt-desktop-mode fieldset{min-width:0;border:1px solid #b8ccdf;border-radius:5px}
body.qt-desktop-mode legend{color:#244875;padding:0 6px;font-weight:700}
body.qt-desktop-mode .table-scroll{min-width:0;border:1px solid #b8ccdf;border-radius:6px;overflow:auto;isolation:isolate}
body.qt-desktop-mode .table-scroll table{width:100%;border-collapse:collapse}
body.qt-desktop-mode .table-scroll thead th{position:sticky;top:0;z-index:1}
body.qt-desktop-mode .table-scroll tr[aria-selected=true]>td{background:#e8f0f7}
/* Native Qt tab pane: white active tab and navy underline. Keep stock's custom
 * blue tabs and invoice-specific styles in qt-shell.css unchanged. */
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers,.qt-native-warehouses) .qt-native-tabs .qt-native-action{
 background:#e8f0f7;color:#244875;border:1px solid #b8ccdf;
 border-bottom:2px solid #b8ccdf;border-radius:0;padding:8px 16px;
}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers,.qt-native-warehouses) .qt-native-tabs .qt-native-action.active{
 background:#fff;color:#244875;border-color:#b8ccdf;border-bottom:3px solid #244875;
}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-command-row .qt-native-action{font-size:11px}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-summary{direction:rtl;flex-shrink:0}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-command-row>.qt-native-action{min-width:95px;background:#244875;border-color:#244875}
body.qt-desktop-mode .qt-native-customers .qt-native-command-row>.qt-native-action:last-child{min-width:125px;background:#4a647f}
body.qt-desktop-mode .qt-native-customers .qt-native-command-row>.qt-native-action:nth-child(2){min-width:115px}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-module-main{background:#fff;padding:6px;border-radius:0}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-pagination{height:52px;flex-shrink:0}
body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-list-options{display:none}
body.qt-desktop-mode .qt-native-page-size{display:flex;align-items:center;gap:7px;margin-inline-end:auto}
body.qt-desktop-mode .qt-native-page-size select{width:75px;min-width:65px}
body.qt-desktop-mode .qt-native-page-label{white-space:nowrap;color:#244875;font-size:11px}
/* WarehousesWindow: native toolbar, authorized list/movements/balances tabs,
 * six-column master list and selected warehouse info strip. */
body.qt-desktop-mode .qt-native-warehouses .qt-native-module-heading{display:none}
body.qt-desktop-mode .qt-native-warehouses .qt-native-module-header{direction:rtl;border:0;padding:0;min-height:40px}
body.qt-desktop-mode .qt-native-warehouses .qt-native-command-row{direction:rtl;flex-wrap:wrap;overflow:visible}
body.qt-desktop-mode .qt-native-warehouses .qt-native-module-main{background:white;border-radius:0}
body.qt-desktop-mode .qt-native-warehouses .qt-native-filters{min-height:44px;padding:4px 8px}
body.qt-desktop-mode .qt-native-warehouses .qt-native-table :is(th,td){height:34px;padding:6px}
body.qt-desktop-mode .qt-native-warehouses .qt-native-list-options{
 direction:rtl;flex-wrap:wrap;gap:8px;justify-content:flex-start;
 background:#f8fbff;border:1px solid #d8e3ed;border-radius:6px;
 padding:7px 10px;min-height:40px
}
body.qt-desktop-mode .qt-native-warehouses .qt-native-list-options .qt-native-action{
 min-height:30px;height:30px;font-size:11px;padding:5px 9px
}
.qt-native-warehouses .qt-native-warehouse-shortcuts{
 font:500 11px Tahoma,Arial,sans-serif;color:#587186;
 white-space:normal;line-height:1.8;margin-inline-start:auto
}
@media(max-width:720px){
 .qt-native-warehouses .qt-native-warehouse-shortcuts{width:100%;margin:0}
}
.qt-native-warehouses .qt-native-column-picker{
 display:flex;flex-wrap:wrap;gap:12px;direction:rtl;align-items:center;
 background:#fff;border:1px solid #dae5ef;padding:9px 12px;border-radius:6px
}
.qt-native-warehouses .qt-native-column-picker.hidden{display:none}
.qt-native-warehouses .qt-native-column-picker .qt-native-column-option{
 display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
 font:600 12px Tahoma,Arial,sans-serif;color:#244875
}
.qt-native-warehouses .qt-native-column-picker input[type=checkbox]{
 width:16px;height:16px;accent-color:#244875
}
body.qt-desktop-mode .qt-native-warehouses .qt-native-table [data-field=code]{min-width:90px}
body.qt-desktop-mode .qt-native-warehouses .qt-native-table [data-field=id]{width:70px}
body.qt-desktop-mode .qt-native-warehouses .qt-native-table [data-field=is_active]{width:115px}
body.qt-desktop-mode .qt-native-warehouse-info{padding:8px;border-radius:4px;background:#e8f0f7;color:#244875;font-size:11pt;flex-shrink:0}
/* WarehousesReportsWindow and WarehousesStatisticsWindow: distinct modal surfaces.
   Context is always obtained from authenticated server RPCs, never inferred from page rows. */
dialog.qt-warehouse-overview{
 width:min(1080px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 max-height:92dvh;overflow:auto;box-sizing:border-box;
 border:1px solid #b8ccdf;border-radius:9px;padding:18px;
 background:#fff;color:#244875;font-family:Tahoma,Arial,sans-serif;
 box-shadow:0 18px 55px rgba(22,42,65,.22);direction:rtl
}
dialog.qt-warehouse-overview::backdrop{background:rgba(15,30,47,.46)}
.qt-warehouse-overview h2{font-size:19px;margin:0 0 10px;text-align:right}
.qt-warehouse-overview-hint{font-size:12px;color:#536578;line-height:1.8}
.qt-warehouse-overview-navigation,.qt-warehouse-overview-tabs,
.qt-warehouse-overview-footer{
 display:flex;gap:8px;align-items:center;flex-wrap:wrap;direction:rtl;
 padding:8px 0
}
.qt-warehouse-overview-actions{
 display:flex;flex-wrap:wrap;gap:8px;align-items:center;
 justify-content:flex-start;padding:9px 0;direction:rtl
}
.qt-warehouse-overview-actions button{
 border:1px solid #b8ccdf;border-radius:5px;padding:8px 12px;
 background:#eef5fb;color:#244875;font:600 12px Tahoma,Arial,sans-serif;
 cursor:pointer
}
.qt-warehouse-overview-actions button:focus-visible{
 outline:2px solid #244875;outline-offset:2px
}
@media(max-width:600px){
 .qt-warehouse-overview-actions{width:100%}
 .qt-warehouse-overview-actions button{flex:1 1 130px}
}
.qt-warehouse-overview-navigation{border-bottom:1px solid #d4e2f0}
.qt-warehouse-overview-tabs{border-bottom:1px solid #d4e2f0}
.qt-warehouse-overview-navigation button,.qt-warehouse-overview-tabs button{
 border:1px solid #b8ccdf;border-radius:5px;padding:8px 12px;
 background:#f1f6fb;color:#244875;font:600 12px Tahoma,Arial,sans-serif;
 cursor:pointer
}
.qt-warehouse-overview-navigation button.active,
.qt-warehouse-overview-tabs button.active{
 color:#fff;background:#244875;border-color:#244875
}
.qt-warehouse-overview-scope{
 display:flex;gap:10px;align-items:center;flex-wrap:wrap;
 padding:10px 0;border-bottom:1px solid #d4e2f0;font:600 12px Tahoma,Arial,sans-serif
}
.qt-warehouse-overview-scope select{
 min-width:190px;max-width:100%;padding:9px 12px;
 border:1px solid #b8ccdf;background:#fff;color:#244875;border-radius:5px;
 font:600 12px Tahoma,Arial,sans-serif
}
.qt-warehouse-overview-scope small{font-size:11px;color:#60748a}
.qt-warehouse-overview-body{padding:12px 0;min-height:180px}
.qt-warehouse-overview-report-panel{min-height:230px}
.qt-warehouse-overview-metrics{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
 gap:12px;margin-top:14px
}
.qt-warehouse-overview-metric{
 display:flex;flex-direction:column;gap:10px;border:1px solid #d5e2f0;
 border-radius:8px;padding:16px 12px;background:#f6faff;min-height:95px
}
.qt-warehouse-overview-metric small{font:600 12px Tahoma,Arial,sans-serif;color:#4a627a}
.qt-warehouse-overview-metric strong{font:800 24px Tahoma,Arial,sans-serif;color:#164c81}
.qt-warehouse-overview-footer{justify-content:flex-end;border-top:1px solid #d4e2f0}
.qt-warehouse-overview-footer button{
 padding:9px 16px;border:1px solid #b8ccdf;border-radius:5px;
 color:#244875;background:#e9f1fa;cursor:pointer
}
@media(max-width:600px){
 dialog.qt-warehouse-overview{padding:10px;max-height:95dvh}
 .qt-warehouse-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* WarehousesReportsWindow.ColumnSettingsDialog — modal, keyboard-accessible. */
dialog.qt-warehouse-columns-dialog{
 width:min(650px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 max-height:88dvh;overflow:auto;box-sizing:border-box;
 background:#fff;color:#244875;border:1px solid #bdd1e5;border-radius:9px;
 padding:18px;direction:rtl;font-family:Tahoma,Arial,sans-serif;
 box-shadow:0 18px 60px rgba(16,32,51,.24)
}
dialog.qt-warehouse-columns-dialog::backdrop{background:rgba(16,31,49,.5)}
.qt-warehouse-columns-dialog h2{font-size:18px;margin:0 0 12px}
.qt-warehouse-columns-hint{font-size:12px;line-height:1.8;color:#536779}
.qt-warehouse-columns-options{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px;margin:14px 0
}
.qt-warehouse-columns-option{
 padding:10px 12px;border:1px solid #d1e1ef;
 border-radius:6px;background:#f6faff;display:flex;gap:10px;
 align-items:center;cursor:pointer;font-size:12px
}
.qt-warehouse-columns-option input{accent-color:#244875;width:16px;height:16px}
.qt-warehouse-columns-actions{
 display:flex;align-items:center;gap:8px;flex-wrap:wrap;
 border-top:1px solid #d1e1ef;padding-top:12px
}
.qt-warehouse-columns-actions button{
 border:1px solid #b4c9df;padding:9px 12px;border-radius:5px;
 background:#eaf2fc;color:#244875;font:700 12px Tahoma,Arial,sans-serif;
 cursor:pointer
}
.qt-warehouse-columns-actions button:disabled{opacity:.55;cursor:not-allowed}
.qt-warehouse-columns-count{color:#5b6e7f}
.qt-warehouse-transfer-commands{
 display:flex;flex-wrap:wrap;align-items:center;gap:8px;
 padding:12px 4px;direction:rtl
}
.qt-warehouse-transfer-commands button{margin:0;min-height:34px}
@media(max-width:560px){
 .qt-warehouse-columns-options{grid-template-columns:1fr}
 dialog.qt-warehouse-columns-dialog{padding:12px}
}
/* WarehousesWindow: read-only verified record details and safe preflight dialog. */
dialog.qt-warehouse-detail-dialog{
 width:min(960px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 max-height:92dvh;overflow:auto;box-sizing:border-box;
 padding:18px 20px;border:1px solid #b8ccdf;border-radius:10px;
 background:#fff;color:#244875;direction:rtl;
 font-family:Tahoma,Arial,sans-serif;box-shadow:0 18px 52px rgba(16,36,58,.2)
}
dialog.qt-warehouse-detail-dialog::backdrop{background:rgba(18,34,50,.5)}
.qt-warehouse-detail-dialog h2{font-size:19px;margin:0 0 10px}
.qt-warehouse-detail-note{font-size:12px;color:#536578;line-height:1.9}
.qt-warehouse-detail-fields{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
 gap:9px;direction:rtl;margin:16px 0
}
.qt-warehouse-detail-field{
 display:flex;flex-direction:column;gap:5px;min-width:0;
 padding:10px;background:#f6f9fc;border:1px solid #d5e2f0;border-radius:7px
}
.qt-warehouse-detail-field dt{font-size:11px;color:#5c7185;font-weight:700}
.qt-warehouse-detail-field dd{font-size:13px;color:#244875;margin:0;
 white-space:pre-wrap;overflow-wrap:anywhere}
.qt-warehouse-detail-actions,.qt-warehouse-detail-footer{
 display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0;direction:rtl
}
.qt-warehouse-detail-actions button,.qt-warehouse-detail-footer button{
 background:#e8f0fa;border:1px solid #afc6dd;border-radius:5px;
 padding:8px 11px;color:#244875;cursor:pointer;
 font:700 12px Tahoma,Arial,sans-serif
}
.qt-warehouse-detail-dependencies{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
 gap:9px;margin-top:12px
}
.qt-warehouse-detail-dependencies>p{grid-column:1/-1;
 margin:0;color:#6a4752;background:#fff8f6;padding:10px;border-radius:5px;font-size:12px}
.qt-warehouse-detail-metric{
 display:flex;flex-direction:column;gap:8px;padding:12px;
 background:#f4faff;border:1px solid #d1dfee;border-radius:7px
}
.qt-warehouse-detail-metric small{color:#516779;font-size:11px}
.qt-warehouse-detail-metric strong{color:#174f85;font-size:22px}
@media(max-width:600px){
 dialog.qt-warehouse-detail-dialog{padding:12px;max-height:95dvh}
 .qt-warehouse-detail-fields{grid-template-columns:1fr}
 .qt-warehouse-detail-dependencies{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* Native EmployeesWindow._create_ui: filters ABOVE actions; a 270–315px
 * information card to the left of the expanding employee table. */
body.qt-desktop-mode .qt-employees-workspace{gap:8px}
body.qt-desktop-mode .qt-employee-filter-row{background:#fff;border:1px solid #d5e1ed;border-radius:7px;padding:10px;align-items:center}
body.qt-desktop-mode .qt-employee-filter-row>label{flex-direction:row;white-space:nowrap;min-width:0}
body.qt-desktop-mode .qt-employee-filter-row>label>select{min-width:100px;width:100%}
body.qt-desktop-mode .qt-employee-columns{grid-template-columns:minmax(0,1fr) clamp(270px,25%,315px);gap:10px;align-items:stretch;min-height:0;flex:1}
body.qt-desktop-mode .qt-employees-list{padding:0;gap:0;overflow:hidden;margin:0}
body.qt-desktop-mode .qt-employees-list>h2{height:44px;flex:0 0 44px;padding:10px 14px;border-bottom:1px solid #d5e1ed;font-size:15px;box-sizing:border-box;background:#f5f8fc}
body.qt-desktop-mode .qt-employees-list>.table-scroll{border:0;border-radius:0;flex:1;min-height:160px}
body.qt-desktop-mode .qt-employees-table{min-width:660px}
body.qt-desktop-mode .qt-employee-statusbar{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #b8ccdf;background:#e8f0f7;padding:4px 10px;font-size:11px;flex-wrap:wrap}
body.qt-desktop-mode .qt-employee-statusbar .qt-employee-total{margin:0}
/* Shared EnhancedTable in Rooms/TableWindow/DeviceWindow uses 55px rows. */
body.qt-desktop-mode :is(.qt-rooms-window,.qt-tables-workspace,.qt-devices-workspace) .qt-rooms-table tbody td{height:55px;box-sizing:border-box;padding:8px}
body.qt-desktop-mode .qt-tables-columns{align-items:stretch;min-height:0;flex:1}
body.qt-desktop-mode .qt-rooms-actions{flex-wrap:wrap;min-width:0}
body.qt-desktop-mode .qt-rooms-actions>span{min-width:0;overflow-wrap:anywhere;white-space:normal}
body.qt-desktop-mode .qt-rooms-actions label{display:flex;gap:6px;min-width:0;max-width:100%;white-space:normal}
body.qt-desktop-mode .qt-rooms-actions label span{min-width:0;overflow-wrap:anywhere;white-space:normal}
body.qt-desktop-mode .qt-devices-list{min-width:0}
body.qt-desktop-mode :is(.qt-rooms-window,.qt-tables-list)>h2{display:none}
body.qt-desktop-mode :is(.qt-tables-list,.qt-devices-list){min-height:0}
body.qt-desktop-mode :is(.qt-tables-list,.qt-devices-list)>.table-scroll{flex:1;min-height:160px}
body.qt-desktop-mode .qt-maintenance-workspace>.table-scroll{flex:1;min-height:160px}
/* Small native management windows keep their own source dimensions. These
 * declarations outrank generic .panel h2, which had made the navy title unreadable. */
body.qt-desktop-mode .qt-branches-window{width:min(900px,100%);padding:9px;min-height:500px;border:0;border-radius:0}
body.qt-desktop-mode .qt-branches-window .qt-branches-toolbar>.button{font:10pt "Segoe UI",sans-serif}
body.qt-desktop-mode .qt-branches-window .qt-branch-edit{background:#244875;color:#fff}
body.qt-desktop-mode .qt-branches-window .qt-branch-delete{background:#b42318;color:#fff}
body.qt-desktop-mode .qt-product-notes{width:min(810px,100%);min-height:475px;padding:11px 12px;background:#f9f9f9}
body.qt-desktop-mode .qt-product-notes>.qt-product-notes-title{height:42px;min-height:42px;margin:0;padding:7px 12px;background:#244875;color:#fff;font-size:13px;font-weight:800;border-radius:7px}
body.qt-desktop-mode .qt-delivery-areas{width:min(1100px,100%);padding:20px;min-height:680px;background:#f9f9f9;gap:15px}
body.qt-desktop-mode .qt-delivery-areas>.qt-delivery-title{font-size:22px;padding:10px;margin:0}
body.qt-desktop-mode .qt-printer-ports{width:min(1000px,100%);padding:20px;min-height:600px;background:#f9f9f9;gap:15px}
body.qt-desktop-mode .qt-printer-ports>.qt-printer-title{font-size:22px;padding:10px;margin:0}
body.qt-desktop-mode :is(.qt-delivery-add,.qt-printer-add){background:#34c759;border-color:#34c759;color:#fff}
body.qt-desktop-mode .qt-delivery-close{background:#757575;border-color:#757575;color:#fff}
body.qt-desktop-mode .qt-printer-refresh{background:#ff9500;border-color:#ff9500;color:#fff}
body.qt-desktop-mode :is(.qt-product-notes,.qt-delivery-areas,.qt-printer-ports)>.table-scroll{flex:1;min-height:180px}
body.qt-desktop-mode :is(.qt-product-notes-footer,.qt-delivery-footer,.qt-printer-footer){flex-shrink:0;flex-wrap:wrap}
body.qt-desktop-mode :is(.qt-delivery-row-actions,.qt-printer-row-actions){display:table-cell;white-space:nowrap}
body.qt-desktop-mode :is(.qt-delivery-row-actions,.qt-printer-row-actions)>.button+.button{margin-inline-start:8px}
/* SettingsWindow: the supported native tabs, scrollable grouped content, and
 * a fixed action row. Checkboxes must remain beside their labels, not below. */
body.qt-desktop-mode .qt-settings{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;border:0;border-radius:0;padding:0}
body.qt-desktop-mode .qt-settings>h2{font-size:18px;margin:0}
body.qt-desktop-mode .qt-settings-tabs{display:flex;gap:0;overflow:auto;flex-shrink:0;border-bottom:1px solid #b8ccdf}
body.qt-desktop-mode .qt-settings-tabs>.button{border-radius:0;background:#e8f0f7;border-bottom:2px solid #b8ccdf;min-height:40px}
body.qt-desktop-mode .qt-settings-tabs>.button[aria-selected=true]{background:#fff;border-bottom:3px solid #244875;font-weight:700}
body.qt-desktop-mode .qt-settings-body{display:flex;flex-direction:column;flex:1;min-height:0}
body.qt-desktop-mode .qt-settings-form{display:flex;flex-direction:column;flex:1;gap:10px;min-height:0;border-radius:0;margin:0}
body.qt-desktop-mode .qt-settings-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:14px 20px;overflow:auto;flex:1;padding:10px;min-height:120px}
body.qt-desktop-mode .qt-settings-field{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;min-height:38px}
body.qt-desktop-mode .qt-settings-field>input:not([type=checkbox]),body.qt-desktop-mode .qt-settings-field>select{width:50%;min-width:80px}
body.qt-desktop-mode .qt-settings-field:has(input[type=checkbox]){flex-direction:row-reverse;justify-content:flex-end}
body.qt-desktop-mode .qt-settings-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:8px;border-top:1px solid #b8ccdf}
/* ShiftsWindow.init_ui: current shift group, then history; cashier shifts have
 * their own dialog, as in Offline, instead of additional controls in the header. */
body.qt-desktop-mode .qt-shifts{display:flex;flex-direction:column;gap:10px;flex:1;padding:0;border:0;border-radius:0;min-height:0}
body.qt-desktop-mode .qt-shift-current{padding:8px 12px;display:flex;flex-direction:column;gap:5px}
body.qt-desktop-mode .qt-shift-current :is(h3,p){margin:0;font-size:12px}
body.qt-desktop-mode .qt-shift-current h3{font:700 16px Arial,sans-serif}
body.qt-desktop-mode .qt-shift-current .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:3px}
body.qt-desktop-mode .qt-shift-history{display:flex;flex-direction:column;gap:8px;flex:1;min-height:180px;padding:10px}
body.qt-desktop-mode .qt-shift-history>.table-scroll{flex:1;min-height:140px}
body.qt-desktop-mode .qt-shift-pager{display:flex;gap:10px;align-items:center;justify-content:center;flex-shrink:0}
body.qt-desktop-mode .qt-shift-history table{min-width:1000px}
body.qt-desktop-mode .qt-shift-history :is(th,td){height:42px;box-sizing:border-box}
body.qt-desktop-mode .qt-shift-status.open{color:#34c759}
body.qt-desktop-mode .qt-shift-status.closed{color:#ff3b30}
/* UsersWindow.setup_ui starts with filters, then the actions card. */
body.qt-desktop-mode .qt-users-window{min-height:0;padding:12px 18px 16px;gap:12px}
body.qt-desktop-mode .qt-users-filters{order:-1;flex-shrink:0}
body.qt-desktop-mode .qt-users-actions{flex-wrap:wrap;flex-shrink:0}
body.qt-desktop-mode .qt-users-table-scroll{min-height:150px;min-width:0;flex:1;overflow:auto}
/* Native modal geometry: all content and footer buttons remain reachable even
 * with browser zoom or a smaller screen. Native <dialog> stays in the top layer. */
body.qt-desktop-mode dialog{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);color:#244875;overflow:auto}
body.qt-desktop-mode dialog::backdrop{background:#10284466}
body.qt-desktop-mode :is(.qt-shift-modal,.qt-cashier-modal){border:1px solid #b8ccdf;border-radius:6px;padding:0;width:min(740px,calc(100vw - 24px));background:#fff}
body.qt-desktop-mode .qt-shift-modal{width:min(520px,calc(100vw - 24px))}
body.qt-desktop-mode .qt-shift-dialog{display:flex;flex-direction:column;gap:12px;padding:18px;margin:0}
body.qt-desktop-mode .qt-shift-dialog>label{display:flex;align-items:center;justify-content:space-between;gap:12px}
body.qt-desktop-mode .qt-shift-dialog input{min-width:0;max-width:65%}
body.qt-desktop-mode :is(.qt-native-edit-backdrop,.qt-maintenance-overlay,.qt-employee-overlay){box-sizing:border-box;overflow:auto;padding:12px}
body.qt-desktop-mode :is(.qt-native-edit-dialog,.qt-rooms-dialog,.qt-employee-dialog,.qt-maintenance-dialog){box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;margin:auto}
@media(min-width:1000px){
 body.qt-desktop-mode #body-content{overflow:auto}
 body.qt-desktop-mode .qt-render-root{flex:1 0 auto;min-height:100%}
 body.qt-desktop-mode .qt-render-root>:is(.qt-native-module,.qt-rooms-window,.qt-tables-workspace,.qt-devices-workspace,.qt-employees-workspace,.qt-maintenance-workspace){flex:1;min-height:0}
 body.qt-desktop-mode .qt-render-root>:is(.qt-branches-window,.qt-product-notes,.qt-delivery-areas,.qt-printer-ports){margin:0 auto;flex:1}
}
@media(max-width:999px){
 body.qt-desktop-mode .qt-render-root{flex:1 0 auto;min-height:100%;padding:8px}
 body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-module-header{flex-wrap:wrap;height:auto;min-height:62px}
 body.qt-desktop-mode .qt-native-module-heading{min-width:0}
 body.qt-desktop-mode .qt-native-command-row{flex-wrap:wrap;overflow:visible}
 body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters{flex-wrap:wrap;height:auto;overflow:visible}
 body.qt-desktop-mode :is(.qt-native-customers,.qt-native-suppliers) .qt-native-filters input:first-child{min-width:160px;flex:1 1 100%}
 body.qt-desktop-mode .qt-employee-columns{grid-template-columns:minmax(0,1fr)}
 body.qt-desktop-mode .qt-employee-filter-row{flex-wrap:wrap}
 body.qt-desktop-mode .qt-employee-filter-row>input{min-width:120px;flex:1 1 100%}
 body.qt-desktop-mode :is(.qt-delivery-areas,.qt-printer-ports,.qt-product-notes,.qt-branches-window){width:100%;min-height:475px;padding:10px}
 body.qt-desktop-mode .qt-native-pagination{flex-wrap:wrap;height:auto;min-height:52px;gap:7px}
 body.qt-desktop-mode .qt-native-page-size{margin:0}
}
@media(max-width:600px){
 body.qt-desktop-mode .qt-settings-fields{grid-template-columns:minmax(0,1fr)}
 body.qt-desktop-mode .qt-native-summary{flex-wrap:wrap;height:auto;min-height:150px}
 body.qt-desktop-mode .qt-native-summary-card{flex:1 1 calc(50% - 8px);box-sizing:border-box}
 body.qt-desktop-mode .qt-native-command-row{gap:5px}
 body.qt-desktop-mode .qt-native-module-header{padding:7px}
 body.qt-desktop-mode .qt-shift-dialog>label{flex-wrap:wrap}
 body.qt-desktop-mode .qt-shift-dialog input{width:100%;max-width:100%}
 body.qt-desktop-mode .qt-users-window{padding:8px}
}

/* Original purchases search dialog: server-paged, seven truthful columns. */
.qt-purchase-search-dialog{width:min(1050px,96vw);max-height:90vh;overflow:auto;direction:rtl}
.qt-purchase-search-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-bottom:10px}
.qt-purchase-search-filters label{display:grid;gap:5px;min-width:190px}
.qt-purchase-search-filters input,.qt-purchase-search-filters select{min-height:36px;padding:6px 8px}
.qt-purchase-search-filters select:disabled{opacity:.7}
.qt-purchase-search-notice{font-size:.83rem;opacity:.75;margin:8px 0}
.qt-purchase-search-scroll{max-height:50vh;overflow:auto}
.qt-purchase-search-table{width:100%;min-width:700px;border-collapse:collapse}
.qt-purchase-search-table th,.qt-purchase-search-table td{padding:8px;border-bottom:1px solid #d8dfe6;text-align:right}
.qt-purchase-search-table tbody tr{cursor:pointer}
.qt-purchase-search-table tbody tr:focus-visible{outline:2px solid #2563eb}
.qt-purchase-search-pager{display:flex;align-items:center;gap:10px;margin:12px 0}


/* Native purchase statistics and advanced reports: the original Qt dialogs are
   separate windows with period, totals, supplier and daily tables. */
.qt-purchase-insights-dialog{direction:rtl;width:min(1110px,97vw);max-height:min(90vh,860px);overflow:auto;display:flex;flex-direction:column;gap:10px}
.qt-purchase-insights-dialog h2{margin:0;color:#244875;font-weight:750}
.qt-purchase-insights-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.qt-purchase-insights-controls>label{display:grid;gap:5px;font-size:13px;font-weight:650;min-width:135px;flex:1}
.qt-purchase-insights-controls input,.qt-purchase-insights-controls select{width:100%;max-width:100%;min-height:36px;padding:6px 9px;border:1px solid #cfd8e3;border-radius:5px;background:white;color:#244875}
.qt-purchase-insights-controls select:disabled{opacity:.6;cursor:not-allowed}
.qt-purchase-insights-controls>button{min-height:37px;flex:none}
.qt-purchase-insights-note{font-size:12px;line-height:1.6;color:#526a83;margin:0}
.qt-purchase-insights-status{min-height:20px;font-size:13px;font-weight:650;color:#244875;margin:0}
.qt-purchase-insights-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:8px;margin:2px 0}
.qt-purchase-insights-metrics .qt-invoice-metric{min-width:0;overflow-wrap:anywhere}
.qt-purchase-insights-dialog h3{font-size:15px;color:#244875;margin:5px 0 0}
.qt-purchase-insights-scroll{min-height:90px;max-height:330px;overflow:auto;border:1px solid #dbe2ea;border-radius:6px}
.qt-purchase-insights-table{width:100%;min-width:620px;border-collapse:collapse}
.qt-purchase-insights-table thead{position:sticky;top:0;z-index:1;background:#244875;color:#fff}
.qt-purchase-insights-table th,.qt-purchase-insights-table td{padding:8px 10px;text-align:right;border-bottom:1px solid #e4eaf0;white-space:normal}
.qt-purchase-insights-table tbody tr:nth-child(even){background:#f7f9fc}
.qt-purchase-insights-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}
.qt-purchase-insights-actions button:disabled{opacity:.45;cursor:not-allowed}
.qt-purchase-filter-note{display:block;flex-basis:100%;font-size:11px;color:#667c91;margin:0}
@media(max-width:680px){
 .qt-purchase-insights-dialog{max-height:95vh;width:99vw;padding:10px}
 .qt-purchase-insights-controls>label{flex-basis:45%;min-width:130px}
 .qt-purchase-insights-scroll{max-height:40vh}
 .qt-purchase-insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* PurchasesWindowUiMixin Qt source contract: no split main window, compact
   toolbar, fixed action columns, two RTL registers and a five-card summary. */
.qt-invoice-purchase{direction:rtl;min-width:0;background:#f7f9fc;color:#244875}
.qt-invoice-purchase .qt-invoice-toolbar{display:flex;align-items:center;gap:7px;
 padding:9px 12px;border:1px solid #d6e0ea;border-radius:7px;background:#fff;flex-wrap:wrap}
.qt-invoice-purchase .qt-invoice-toolbar .qt-invoice-button{min-height:36px;
 padding-inline:13px;border-radius:6px;font-weight:700;white-space:nowrap}
.qt-invoice-purchase .qt-invoice-toolbar .qt-invoice-button:focus-visible{outline:2px solid #2f75c7;outline-offset:2px}
.qt-invoice-purchase .qt-invoice-tabs{direction:rtl;gap:5px}
.qt-invoice-purchase .qt-invoice-tabs [data-qt-invoice-tab]{font-weight:700;min-height:36px}
.qt-invoice-purchase .qt-invoice-register{padding:10px;min-height:0;min-width:0}
.qt-invoice-purchase .qt-invoice-register>.table-scroll{overflow:auto;scrollbar-width:thin;border:1px solid #cbd9e8;border-radius:6px;background:#fff}
.qt-invoice-purchase .qt-invoice-register table{width:100%;min-width:1250px;direction:rtl;border-collapse:separate;border-spacing:0}
.qt-invoice-purchase .qt-invoice-register thead{position:sticky;top:0;z-index:2}
.qt-invoice-purchase .qt-invoice-register th{background:#244875;color:#fff;font-weight:700;
 padding:11px 8px;min-height:40px;white-space:nowrap;text-align:center;border-inline-end:1px solid #4b6c91}
.qt-invoice-purchase .qt-invoice-register td{height:40px;white-space:nowrap;max-width:265px;
 text-overflow:ellipsis;overflow:hidden;text-align:center;border-bottom:1px solid #e4e9f1;padding:5px 7px}
.qt-invoice-purchase .qt-invoice-register tbody tr:nth-child(even){background:#f7faff}
.qt-invoice-purchase .qt-invoice-register tbody tr:hover{background:#edf5ff}
.qt-invoice-purchase .qt-invoice-register tbody tr:focus-within{background:#e5f0ff}
.qt-invoice-purchase .qt-invoice-register td:nth-child(4){text-align:right}
.qt-invoice-purchase .qt-invoice-register td:nth-child(11) button{border-radius:6px;
 background:#eaf2fb;color:#1e5b96;border:1px solid #c8d9ec;font-weight:700}
.qt-invoice-purchase .qt-invoice-register td:nth-child(12) button{border-radius:6px;font-weight:700}
.qt-invoice-purchase .qt-invoice-register td:nth-child(13) button{border-radius:6px;font-weight:700}
.qt-invoice-purchase .qt-invoice-register button:disabled{opacity:.65;cursor:not-allowed}
.qt-invoice-purchase .qt-invoice-summary{direction:rtl;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.qt-invoice-purchase .qt-invoice-metric{min-width:0;padding:9px;border-radius:9px;text-align:center;overflow-wrap:anywhere}
.qt-invoice-purchase .qt-invoice-metric span{font-size:11px;font-weight:700}
.qt-invoice-purchase .qt-invoice-metric strong{font-size:19px;font-weight:800;font-variant-numeric:tabular-nums}
.qt-purchase-search-backdrop,.qt-purchase-insights-backdrop{padding:12px;box-sizing:border-box;overscroll-behavior:contain}
.qt-purchase-search-dialog{width:min(860px,calc(100vw - 24px));min-height:min(560px,calc(100dvh - 24px));
 max-height:calc(100dvh - 24px);display:flex;flex-direction:column;gap:8px;
 box-sizing:border-box;padding:12px;color:#0b2f66;background:#f6f8fb;border:1px solid #cbd9e8;border-radius:8px}
.qt-purchase-search-dialog>h2{font-size:19px;margin:0;color:#244875;font-weight:800}
.qt-purchase-search-filters{align-items:end;gap:8px;background:#fff;padding:7px;border:1px solid #dbe4ee;border-radius:6px}
.qt-purchase-search-filters label{font-size:12px;font-weight:700;min-width:100px;flex:1}
.qt-purchase-search-filters label:first-child{flex:2;min-width:170px}
.qt-purchase-search-filters :is(button,input,select){font-family:Arial,Tahoma,sans-serif}
.qt-purchase-search-filters button{min-height:34px;min-width:76px}
.qt-purchase-search-caption{text-align:right;padding:6px 2px;font-size:11px;color:#5a7797}
.qt-purchase-search-scroll{flex:1;min-height:150px;max-height:none;background:#fff;border:1px solid #d8e0ea;border-radius:5px}
.qt-purchase-search-table{width:100%;min-width:730px}
.qt-purchase-search-table thead{position:sticky;top:0;background:#244875;color:#fff}
.qt-purchase-search-table th{height:40px;background:#244875;color:#fff;border-inline-end:1px solid #4c6987}
.qt-purchase-search-table td{height:36px;text-align:center;font-variant-numeric:tabular-nums}
.qt-purchase-search-table tbody tr:nth-child(even){background:#f9fbfd}
.qt-purchase-search-table tbody tr:hover:not(.qt-purchase-return-ineligible){background:#e4f1ff}
.qt-purchase-search-table tbody tr.qt-purchase-return-ineligible{background:#f3f5f7;color:#8793a3;cursor:not-allowed}
.qt-purchase-search-table tbody tr[aria-disabled="true"]{outline:none}
.qt-purchase-search-pager{flex-wrap:wrap;justify-content:center;margin:6px 0;min-height:34px}
.qt-purchase-search-status{font-size:12px;color:#244875;font-weight:700;margin-inline:10px}
.qt-purchase-insights-dialog[data-report-mode="statistics"]{width:min(970px,96vw);padding:20px}
.qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics{
 grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics article{min-height:82px;padding:15px}
.qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-scroll{max-height:230px}
.qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-table th{font-weight:700}
.qt-purchase-insights-dialog[data-report-mode="reports"]{width:min(1250px,97vw);padding:18px}
.qt-purchase-insights-dialog[data-report-mode="reports"] .qt-purchase-insights-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.qt-purchase-insights-dialog[data-report-mode="reports"] .qt-purchase-insights-scroll{max-height:50vh}
.qt-purchase-insights-dialog :is(button,input,select):focus-visible{outline:2px solid #3178bb;outline-offset:2px}
.qt-purchase-insights-dialog .qt-purchase-insights-actions{padding-top:9px;border-top:1px solid #d5e0eb}
.qt-purchase-insights-dialog .qt-purchase-insights-actions button{min-height:35px;padding-inline:12px}
.qt-purchase-columns-backdrop{position:sticky;inset:0;z-index:5;background:#061d3580;display:flex;
 align-items:center;justify-content:center;min-height:200px;max-height:45vh;border-radius:7px;padding:8px}
.qt-purchase-columns-dialog{min-width:min(500px,90%);max-width:100%;max-height:40vh;overflow:auto;
 background:#fff;border:1px solid #bbcede;border-radius:8px;box-shadow:0 12px 35px #0e29443b;padding:13px}
.qt-purchase-columns-dialog h3{margin:0 0 9px;font-size:15px;color:#244875}
.qt-purchase-column-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px}
.qt-purchase-column-choices label{display:flex;align-items:center;gap:7px;font-size:12px;min-height:32px;cursor:pointer}
.qt-purchase-column-choices input{width:16px;height:16px;accent-color:#244875}
.qt-purchase-column-buttons{display:flex;flex-wrap:wrap;justify-content:end;gap:6px}
.qt-purchase-column-warning{color:#b91c1c;font-size:12px}
@media(max-width:1000px){
 .qt-invoice-purchase .qt-invoice-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
 .qt-purchase-insights-dialog[data-report-mode="reports"] .qt-purchase-insights-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 .qt-invoice-purchase .qt-invoice-toolbar{gap:5px;padding:6px}
 .qt-invoice-purchase .qt-invoice-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-purchase-insights-dialog[data-report-mode="reports"] .qt-purchase-insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-purchase-search-dialog{width:calc(100vw - 12px);padding:8px;max-height:calc(100dvh - 12px)}
 .qt-purchase-search-filters label:first-child{flex-basis:100%}
 .qt-purchase-column-choices{grid-template-columns:minmax(0,1fr)}
}


/* Offline source parity: PurchasesSettingsDialog 620x420,
   PurchasesHelpDialog 760x560, Qt purchase invoice maximized. */
body.qt-desktop-mode .qt-purchase-info-backdrop{
 z-index:130;direction:rtl;box-sizing:border-box;
 padding:12px;overflow:auto;align-items:center;justify-content:center;
}
body.qt-desktop-mode .qt-purchase-info-dialog{
 display:flex;flex-direction:column;gap:10px;min-height:0;max-height:calc(100dvh - 24px);
 margin:auto;overflow:auto;box-sizing:border-box;padding:14px;background:#f6f8fb;color:#0b2f66;
 border:1px solid #cfd8e3;border-radius:7px;box-shadow:0 15px 45px #061e3c52;
}
body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-settings-dialog{
 width:min(620px,calc(100vw - 24px));height:min(420px,calc(100dvh - 24px));
}
body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-help-dialog{
 width:min(760px,calc(100vw - 24px));height:min(560px,calc(100dvh - 24px));
}
body.qt-desktop-mode .qt-purchase-info-title{
 margin:0;color:#244875;font:700 16px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-settings-group{
 border:1px solid #cfd8e3;border-radius:6px;background:#fff;
 padding:12px 14px;min-width:0;margin:0;direction:rtl;
}
body.qt-desktop-mode .qt-purchase-settings-group legend{
 color:#244875;font-size:13px;font-weight:800;padding:0 7px;
}
body.qt-desktop-mode .qt-purchase-settings-group p{
 margin:4px 0;font-size:12px;line-height:1.85;color:#0b2f66;
}
body.qt-desktop-mode .qt-purchase-help-text{
 display:block;resize:none;flex:1;min-width:0;min-height:130px;width:100%;
 box-sizing:border-box;background:#fff;border:1px solid #cfd8e3;
 border-radius:6px;padding:10px;color:#0b2f66;direction:rtl;
 font:12px/1.95 Arial,Tahoma,sans-serif;text-align:right;
 white-space:pre-wrap;overflow:auto;
}
body.qt-desktop-mode .qt-purchase-help-text:focus-visible{
 outline:2px solid #277bb9;outline-offset:2px;
}
body.qt-desktop-mode .qt-purchase-info-actions{
 display:flex;align-items:center;justify-content:flex-end;margin-top:auto;padding-top:6px;
}
body.qt-desktop-mode .qt-purchase-info-actions button{
 min-width:100px;min-height:34px;border:0;background:#244875;color:#fff;
 border-radius:5px;font-weight:700;
}
body.qt-desktop-mode .qt-purchase-info-actions button:hover{
 background:#1b3658;
}
body.qt-desktop-mode .qt-purchase-settings-dialog .qt-purchase-info-actions{
 padding-top:9px;
}
body.qt-desktop-mode .qt-purchase-help-dialog .qt-purchase-info-note{
 font-size:11px;line-height:1.6;color:#705626;margin:0;
}
body.qt-desktop-mode .qt-purchase-entry-backdrop{
 box-sizing:border-box;z-index:119;padding:8px;overflow:auto;
 align-items:center;justify-content:center;
}
body.qt-desktop-mode .qt-purchase-entry-backdrop>.panel{
 width:calc(100vw - 18px);max-width:none;min-width:0;
 height:calc(100dvh - 18px);max-height:calc(100dvh - 18px);
 box-sizing:border-box;margin:auto;overflow:auto;padding:13px 16px;
 border:1px solid #b8ccdf;border-radius:6px;background:#fff;
}
body.qt-desktop-mode .qt-purchase-entry-backdrop .form-grid{
 gap:9px 12px;
}
body.qt-desktop-mode .qt-purchase-entry-backdrop .qt-purchase-invoice-actions{
 position:sticky;bottom:0;z-index:3;background:#fff;
 border-top:1px solid #dbe4ee;padding-top:9px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters{
 display:flex;flex-wrap:wrap;align-items:center;gap:8px;
 min-height:62px;box-sizing:border-box;padding:9px 14px;
 background:#fff;border:1px solid #d8e2ec;border-radius:7px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters>label{
 font:700 12px Arial,Tahoma,sans-serif;color:#244875;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters>input[type=search]{
 min-width:180px;max-width:430px;flex:1 1 310px;
 height:34px;border:1px solid #cfd8e3;border-radius:5px;
 background:#fff;color:#244875;padding:4px 8px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters select{
 min-width:105px;max-width:165px;min-height:34px;
 padding:4px 7px;border:1px solid #cfd8e3;border-radius:5px;background:#fff;color:#244875;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters select:disabled{
 opacity:.55;cursor:not-allowed;background:#f4f6f9;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters button{
 min-height:34px;min-width:85px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-page-status{
 font-weight:650;color:#244875;font-size:12px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-filter-note{
 margin-inline-start:0;flex-basis:100%;
}
body.qt-desktop-mode .qt-invoice-purchase [role=status]{
 line-height:1.5;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-search-dialog{
 box-shadow:0 12px 42px #091f3d40;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-pager{
 margin-top:auto;
}
body.qt-desktop-mode .qt-purchase-insights-dialog{
 box-sizing:border-box;max-height:calc(100dvh - 22px);
}
body.qt-desktop-mode .qt-purchase-insights-controls input:invalid{
 border-color:#b42318;
}
body.qt-desktop-mode .qt-invoice-purchase [role=dialog] button:focus-visible{
 outline:2px solid #2b78c6;outline-offset:2px;
}
@media(max-width:850px){
 body.qt-desktop-mode .qt-purchase-entry-backdrop>.panel{
  width:calc(100vw - 8px);height:calc(100dvh - 8px);max-height:calc(100dvh - 8px);
  padding:9px 10px;
 }
 body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters>input[type=search]{
  max-width:none;flex-basis:100%;
 }
 body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-settings-dialog,
 body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-help-dialog{
  max-height:calc(100dvh - 16px);
 }
}
@media(max-width:520px){
 body.qt-desktop-mode .qt-purchase-info-backdrop{padding:4px}
 body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-settings-dialog,
 body.qt-desktop-mode .qt-purchase-info-dialog.qt-purchase-help-dialog{
  width:calc(100vw - 10px);height:calc(100dvh - 10px);padding:11px;
 }
 body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters select{
  max-width:150px;
 }
 body.qt-desktop-mode .qt-purchase-entry-backdrop .form-grid{
  grid-template-columns:minmax(0,1fr);
 }
}

/* CustomerDialog: native Qt four tabs, grouped RTL form, not a split-pane editor. */
.qt-native-edit-dialog:has(.qt-customer-edit-tabs) {
 width:min(920px,calc(100vw - 32px));
 max-width:min(920px,calc(100vw - 32px));
 max-height:calc(100vh - 48px);
 overflow-y:auto;
 direction:rtl;
 background:#f7f9fc;
}
.qt-customer-edit-tabs {
 display:flex; flex-wrap:wrap; gap:4px; padding:0 0 8px;
 border-bottom:1px solid #d8e0ec;
}
.qt-customer-edit-tabs .qt-customer-edit-tab {
 border:1px solid #d8e0ec; border-radius:6px 6px 0 0;
 background:#edf2f8; color:#244875; padding:8px 13px;
 min-height:36px; cursor:pointer;
}
.qt-customer-edit-tabs .qt-customer-edit-tab.active {
 background:white; border-bottom:2px solid #244875; font-weight:700;
}
.qt-customer-edit-panel { background:white; border:1px solid #d8e0ec;
 border-radius:6px; padding:12px; }
.qt-customer-edit-panel[hidden],.qt-customer-edit-group[hidden] {display:none!important;}
.qt-customer-edit-group {
 margin:0 0 12px; border:1px solid #d8e0ec; border-radius:7px;
 background:#fbfcfe; min-width:0; padding:12px;
}
.qt-customer-edit-group legend { color:#244875; font-weight:700; padding:0 7px; }
.qt-customer-edit-grid {
 display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px;
 align-items:center; direction:rtl;
}
.qt-customer-edit-grid .qt-native-field {min-width:0; margin:0;}
.qt-customer-edit-grid input:not([type=checkbox]),
.qt-customer-edit-grid textarea,
.qt-customer-edit-grid select {max-width:100%; min-width:0;}
.qt-customer-edit-group .qt-customer-edit-grid label:has(input[type=checkbox]){
 display:flex; align-items:center; flex-wrap:wrap; gap:8px;
}
.qt-customer-edit-extras {margin:4px 0 12px;}
.qt-customer-edit-extras summary {cursor:pointer; color:#244875; font-weight:600;}
.qt-customer-edit-extras .qt-customer-edit-grid {padding:10px 0;}
/* Original CustomerDialog toolbar label, editable fields and compact spacing.
   Only the CustomerDialog is affected; supplier/POS/financial dialogs are untouched. */
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-identity-heading{
 display:flex;align-items:center;justify-content:flex-start;
 min-height:34px;margin-bottom:8px;color:#244875;font-size:13px;font-weight:800
}
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-panel{
 background:#fff;border-color:#d8e0ec
}
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-group{
 background:#fbfcfe;border-color:#d8e0ec;border-radius:7px
}
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid input:not([type=checkbox]),
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid select,
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid textarea{
 min-height:32px;border:1px solid #c8d1e1;border-radius:5px;
 background:#fff;padding:5px 8px;color:#24354b
}
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid textarea{
 max-height:66px;min-height:60px;resize:vertical
}
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid input:focus-visible,
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid select:focus-visible,
body.qt-desktop-mode .qt-native-customer-dialog .qt-customer-edit-grid textarea:focus-visible{
 border-color:#244875;outline:1px solid #244875;outline-offset:0
}
@media(max-width:640px){
 .qt-customer-edit-grid{grid-template-columns:1fr;}
 .qt-customer-edit-panel{padding:8px;}
 .qt-customer-edit-tabs .qt-customer-edit-tab{flex:1 1 45%;font-size:12px;padding:7px 6px;}
}


/* Qt customer POS secondary tab and authorized financial snapshot. */
.qt-customer-pos-group {border:1px solid #d8e0ec;border-radius:6px;margin:10px 0;padding:12px;background:#fff}
.qt-customer-pos-group legend{font-weight:700;color:#244875;padding:0 7px}
.qt-customer-pos-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.qt-customer-pos-field input,.qt-customer-pos-field select,
.qt-customer-pos-field textarea {width:100%;box-sizing:border-box;min-width:0}
.qt-customer-pos-field input[readonly]{background:#f6f7f9;color:#525e6e}
.qt-customer-pos-group:has(.qt-customer-pos-address-row) {border-color:#8bd1a3}
.qt-customer-pos-address-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.15fr) minmax(70px,.65fr);align-items:end;gap:12px;margin:10px 0}
.qt-customer-financial-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}
.qt-customer-financial-card{display:flex;flex-direction:column;border:1px solid #d8e0ec;border-radius:6px;padding:12px;gap:6px}
.qt-customer-financial-card strong{font-size:1.15em;color:#244875;overflow-wrap:anywhere}
@media(max-width:640px){
 .qt-customer-pos-address-row{grid-template-columns:1fr}
 .qt-customer-financial-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* CustomerWindow Qt auxiliary dialogs: categories, reports, statistics, campaign preview. */
.qt-customer-manager-dialog{width:min(1020px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:92dvh;overflow:auto;border:1px solid #cad8e7;border-radius:8px;padding:16px 20px;background:#fff;color:#24354b;box-shadow:0 18px 50px #142d4950}
.qt-customer-manager-dialog::backdrop{background:#101d2b99}
.qt-customer-manager-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:2px solid #cbd8e5;padding-bottom:8px;margin-bottom:12px}
.qt-customer-manager-heading h2{margin:0;color:#244875;font-size:1.3rem}
.qt-customer-manager-content{display:flex;flex-direction:column;gap:12px}
.qt-customer-manager-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:7px 0}
.qt-customer-category-list{display:block;width:100%;min-height:180px;border:1px solid #cad5e2;border-radius:5px;padding:7px}
.qt-customer-category-list option{padding:5px 10px}
.qt-customer-report-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#f5f8fc;padding:10px;border:1px solid #dae3ed;border-radius:6px}
.qt-customer-report-filters input,.qt-customer-report-filters select{padding:8px;max-width:100%;min-width:95px;border:1px solid #ced9e6;border-radius:4px}
.qt-customer-report-filters input[placeholder]{min-width:min(240px,100%)}
.qt-customer-stat-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.qt-customer-stat-card{display:flex;flex-direction:column;gap:12px;background:#f8fbff;border:1px solid #dde6f1;border-radius:7px;padding:14px}
.qt-customer-stat-card span{color:#516887;font-weight:700}.qt-customer-stat-card strong{font-size:1.35rem;color:#244875}
.qt-customer-preview-recipients{max-height:340px;overflow:auto}
.qt-customer-manager-dialog textarea{width:100%;max-width:100%;box-sizing:border-box}
@media(max-width:670px){
 .qt-customer-stat-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-customer-manager-dialog{padding:12px}
}


/* Purchase source-backed v2: real cash/credit/legacy status filters and
 * sortable standalone report columns. No changes to the sales window. */
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters label:has(select){
 display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters label select{
 width:auto;min-width:130px;max-width:240px;cursor:pointer;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters label select:focus-visible{
 outline:2px solid #1677c9;outline-offset:2px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register tbody tr[data-status=pending]{
 background:#fff8e9;color:#7c2d12;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-register tbody tr[data-status=draft]{
 background:#f2f6fc;color:#52677e;
}
.qt-purchase-insights-table th.qt-purchase-sortable-column{
 cursor:pointer;user-select:none;position:relative;padding-left:20px;
}
.qt-purchase-insights-table th.qt-purchase-sortable-column:hover{
 background:#355f91;
}
.qt-purchase-insights-table th.qt-purchase-sortable-column:focus-visible{
 outline:2px solid #f0b94c;outline-offset:-2px;
}
.qt-purchase-insights-table th.qt-purchase-sortable-column[aria-sort=ascending]::after{
 content:"▲";position:absolute;left:5px;color:#f4ca72;font-size:9px;
}
.qt-purchase-insights-table th.qt-purchase-sortable-column[aria-sort=descending]::after{
 content:"▼";position:absolute;left:5px;color:#f4ca72;font-size:9px;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters select{
 min-width:115px;border:1px solid #cbd9e6;background:white;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters select:not(:disabled){
 cursor:pointer;
}
body.qt-desktop-mode .qt-purchase-search-table td:nth-child(7){
 font-weight:700;
}
.qt-purchase-insights-dialog .qt-purchase-column-buttons button{
 min-height:32px;white-space:nowrap;
}
.qt-purchase-insights-dialog .qt-purchase-insights-status{
 overflow-wrap:anywhere;max-width:100%;
}
@media(max-width:700px){
 body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters label:has(select){
  flex:1 1 170px;
 }
 body.qt-desktop-mode .qt-invoice-purchase .qt-invoice-filters label select{
  min-width:100px;max-width:none;flex:1;
 }
 .qt-purchase-insights-dialog .qt-purchase-column-buttons button{
  flex:1 1 110px;
 }
}


/* Source: modules/purchases/views/pending_purchases_window.py
   Qt suspended purchase orders, per-user volatile memory, not SQL rows. */
.qt-pending-purchases-backdrop{z-index:150;padding:12px;box-sizing:border-box;direction:rtl}
.qt-pending-purchases-dialog{position:relative;width:min(1200px,calc(100vw - 24px));height:min(680px,calc(100dvh - 24px));
 max-height:calc(100dvh - 24px);max-width:none;padding:15px;background:#f5f7fa;
 border:1px solid #fdba74;border-radius:10px;display:flex;flex-direction:column;gap:11px;direction:rtl;
 box-sizing:border-box;overflow:auto;color:#7c2d12;box-shadow:0 20px 65px #351e1238;
 font:12px/1.5 Arial,Tahoma,sans-serif}
.qt-pending-header{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.qt-pending-header h2{margin:0;color:#7c2d12;font:700 20px Arial,Tahoma,sans-serif}
.qt-pending-header-stats{background:#fed7aa;border-radius:5px;padding:8px 14px;font-size:12px;font-weight:700}
.qt-pending-search{margin:0;padding:12px 14px;border:1px solid #fdba74;border-radius:8px;min-width:0;background:#fff}
.qt-pending-search legend{font-size:13px;font-weight:800;color:#7c2d12;padding:0 8px}
.qt-pending-search-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end}
.qt-pending-filter{display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:11px;color:#7c2d12;min-width:0}
.qt-pending-filter input,.qt-pending-filter select{box-sizing:border-box;width:100%;min-width:0;
 min-height:36px;border:1px solid #dfc4a6;background:white;border-radius:6px;color:#7c2d12;padding:6px 9px;
 font:12px Arial,Tahoma,sans-serif}
.qt-pending-filter input:focus-visible,.qt-pending-filter select:focus-visible{
 outline:2px solid #ea580c;outline-offset:1px}
.qt-pending-action{display:inline-flex;gap:6px;align-items:center;justify-content:center;
 border:1px solid #d97706;border-radius:5px;padding:9px 14px;background:#f97316;color:white;
 white-space:nowrap;font-weight:750;cursor:pointer;min-height:38px;font-size:12px}
.qt-pending-action:hover{background:#c2410c;border-color:#c2410c;color:white}
.qt-pending-action.secondary{background:#475569;border-color:#475569}
.qt-pending-action.secondary:hover{background:#334155}
.qt-pending-action.danger{background:#b91c1c;border-color:#b91c1c}
.qt-pending-action.danger:hover{background:#991b1b;border-color:#991b1b}
.qt-pending-action:disabled{opacity:.5;cursor:not-allowed}
.qt-pending-action:focus-visible,.qt-pending-sortable:focus-visible{outline:2px solid #0ea5e9;outline-offset:2px}
.qt-pending-body{display:grid;grid-template-columns:minmax(0,3fr) minmax(210px,1fr);
 min-height:260px;flex:1;gap:12px;overflow:hidden}
.qt-pending-register,.qt-pending-statistics{display:flex;flex-direction:column;gap:6px;min-height:0;min-width:0}
.qt-pending-register h3,.qt-pending-statistics h3{margin:0;font-size:15px;color:#7c2d12}
.qt-pending-scroll{min-height:140px;max-height:none;flex:1;overflow:auto;border:1px solid #fdba74;
 border-radius:6px;background:white;scrollbar-width:thin}
.qt-pending-table{min-width:820px;border-collapse:collapse;width:100%;background:#fff}
.qt-pending-table thead{position:sticky;top:0;z-index:1}
.qt-pending-table th{background:#7c2d12;color:white;font-size:12px;min-height:37px;
 padding:11px 8px;text-align:center;border:1px solid #fdba74;cursor:pointer;user-select:none}
.qt-pending-table td{text-align:center;padding:9px 7px;white-space:nowrap;border:1px solid #fed7aa;
 overflow:hidden;text-overflow:ellipsis;max-width:215px;color:#7c2d12}
.qt-pending-table td:nth-child(2),.qt-pending-table td:last-child{text-align:right}
.qt-pending-table tbody tr:nth-child(even){background:#fff7ed}
.qt-pending-table tbody tr:hover{background:#ffedd5}
.qt-pending-table tbody tr[aria-selected="true"]{background:#f97316;outline:2px solid #ea580c;outline-offset:-2px}
.qt-pending-table tbody tr[aria-selected="true"] td{font-weight:700;color:#fff}
.qt-pending-table-info{background:#ffedd5;border-radius:4px;padding:7px;color:#7c2d12;font-weight:700}
.qt-pending-statistics{padding-inline-start:10px;border-inline-start:1px solid #fed7aa;overflow:auto}
.qt-pending-stat{display:flex;flex-direction:column;gap:3px;background:#ffedd5;border:1px solid #fed7aa;
 border-radius:8px;padding:10px 12px;min-height:58px;box-sizing:border-box}
.qt-pending-stat span{font-size:11px;color:#a16207}
.qt-pending-stat strong{font-size:17px;color:#7c2d12;font-weight:800;direction:ltr;text-align:right;
 font-variant-numeric:tabular-nums}
.qt-pending-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.qt-pending-buttons .qt-pending-action:last-child{margin-inline-start:auto}
.qt-pending-message{font-size:11px;line-height:1.7;color:#9a3412;margin:0;min-height:15px}
.qt-pending-detail-backdrop{position:absolute;inset:0;z-index:2;background:#1c1917ba;
 display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box;border-radius:8px}
.qt-pending-detail-dialog{width:min(700px,100%);max-height:85%;overflow:auto;display:flex;flex-direction:column;
 gap:9px;background:#f5f7fa;color:#7c2d12;border-radius:9px;padding:17px;border:1px solid #fdba74}
.qt-pending-detail-dialog h3{font-size:16px;margin:0}
.qt-pending-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.qt-pending-detail-cell{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid #fed7aa;
 padding:8px;border-radius:5px;overflow-wrap:anywhere}
.qt-pending-detail-cell small{font-size:11px;color:#9a3412}
.qt-pending-detail-cell strong{font-size:12px}
.qt-pending-detail-dialog .table-scroll{min-height:150px;max-height:40vh;overflow:auto}
.qt-pending-detail-table{width:100%;min-width:580px;border-collapse:collapse}
.qt-pending-detail-table th{background:#9a3412;color:white}
.qt-pending-detail-table :is(th,td){padding:8px;border:1px solid #fdba74;text-align:right}
body.qt-desktop-mode .qt-purchase-entry-backdrop .invoice-lines+.toolbar .button:has(+.qt-pending-action){min-height:36px}
body.qt-desktop-mode .qt-purchase-entry-backdrop .toolbar:has(.qt-pending-action){display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body.qt-desktop-mode .qt-purchase-entry-backdrop .qt-pending-action{border-color:#ea580c;background:#fff7ed;
 color:#9a3412;font-weight:800;padding:7px 14px;border-radius:6px}
body.qt-desktop-mode .qt-purchase-entry-backdrop .qt-pending-action:hover{background:#fed7aa}
@media(max-width:1100px){.qt-pending-search-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .qt-pending-body{grid-template-columns:minmax(0,2fr) minmax(180px,1fr)}}
@media(max-width:760px){.qt-pending-body{grid-template-columns:minmax(0,1fr);overflow:visible}
 .qt-pending-statistics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0;
 border:0;overflow:visible}
 .qt-pending-statistics h3{grid-column:1/-1}
 .qt-pending-search-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-pending-purchases-dialog{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);
 width:calc(100vw - 12px);padding:9px;gap:8px}
 .qt-pending-header h2{font-size:17px}
 .qt-pending-scroll{max-height:280px}
 .qt-pending-buttons .qt-pending-action:last-child{margin-inline-start:0}}
@media(max-width:450px){.qt-pending-search-grid{grid-template-columns:1fr}
 .qt-pending-detail-grid{grid-template-columns:minmax(0,1fr)}
 .qt-pending-statistics{grid-template-columns:minmax(0,1fr)}
 .qt-pending-header-stats{width:100%}}


/* Original SettingsWindow appearance and contract: grouped controls and live preview */
body.qt-desktop-mode .qt-settings-group{min-width:0;border:1px solid #ccd7e3;border-radius:6px;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:#fff}
body.qt-desktop-mode .qt-settings-group legend{padding:0 6px;color:#244875;font-weight:700}
body.qt-desktop-mode .qt-settings-group .qt-settings-field:has(textarea){grid-column:1/-1;align-items:stretch;flex-direction:column}
body.qt-desktop-mode .qt-settings-group textarea{width:100%;min-height:170px;resize:vertical;font:inherit;box-sizing:border-box}
body.qt-desktop-mode .qt-settings-theme-preview{grid-column:1/-1;border:1px solid;border-radius:7px;padding:15px;display:flex;gap:10px;flex-direction:column}
body.qt-desktop-mode .qt-settings-theme-preview input{max-width:360px;border:1px solid;padding:8px}
body.qt-desktop-mode .qt-settings-theme-preview button{align-self:flex-start;border:0;border-radius:6px;padding:9px 15px;color:#fff;font-weight:700}
body.qt-desktop-mode .qt-settings-note{grid-column:1/-1;color:#345b7e;font-size:12px}
@media(max-width:760px){body.qt-desktop-mode .qt-settings-group{grid-template-columns:1fr}}

/* CustomerDialog: one transactional Save, financial controls and responsive Qt subtabs. */
.qt-customer-financial-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:9px 0;padding:9px;background:#f7f9fc;border:1px solid #d6e0eb;border-radius:7px}
.qt-customer-financial-filters input,.qt-customer-financial-filters select{border:1px solid #cbd8e5;border-radius:5px;padding:7px;min-height:34px;max-width:100%;box-sizing:border-box}
.qt-customer-financial-filters input[type=search]{flex:1 1 160px;min-width:130px}
.qt-customer-financial-filters input[type=date]{width:150px}
.qt-customer-financial-result{max-width:100%;overflow:hidden}
.qt-customer-financial-result .qt-native-table-scroll{max-height:320px;overflow:auto}
.qt-customer-pos-group .qt-customer-pos-address-row textarea{resize:vertical}
.qt-customer-edit-panel[hidden],.qt-customer-edit-group[hidden]{display:none!important}
@media(max-width:680px){
 .qt-customer-financial-filters{gap:6px;padding:6px}
 .qt-customer-financial-filters input[type=date]{width:calc(50% - 30px)}
 .qt-customer-financial-filters input[type=search]{width:100%;flex-basis:100%}
}


/* Purchases Qt: PurchaseInvoiceDialog inherits the 12-column table
   from SalesInvoiceEntryMixin._create_table_section (offline source).
   Scope exclusively to the purchases child editor, not the sales/POS UI. */
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table-scroll{
 overflow:auto;max-width:100%;width:100%;height:auto;min-height:200px;
 max-height:min(50dvh,530px);margin:4px 0 10px;border:1px solid #a1a1a6;
 border-radius:5px;background:#fff;overscroll-behavior:contain;
 scrollbar-width:thin;scrollbar-color:#244875 #f9f9f9;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table-scroll:focus-visible{
 outline:2px solid #1675b9;outline-offset:2px;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table{
 display:table;width:100%;min-width:1290px;table-layout:fixed;
 border-spacing:0;border-collapse:collapse;background:#fff;
 font:700 12px/1.5 Arial,Tahoma,sans-serif;direction:rtl;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead{
 position:sticky;top:0;z-index:2;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th{
 height:42px;box-sizing:border-box;padding:8px 6px;text-align:center;
 border:0;border-inline-end:1px solid #1a252f;
 background:#244875;color:#fff;font-size:12px;font-weight:800;white-space:nowrap;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(1){width:36px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(2){width:78px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(3){width:290px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(4){width:64px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(5){width:62px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(6){width:76px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(7){width:68px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(8){width:82px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(9){width:92px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(10){width:140px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(11){width:135px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table thead th:nth-child(12){width:80px}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table tbody.qt-purchase-entry-items-body{
 display:table-row-group;width:auto;background:transparent;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table tbody tr.qt-purchase-entry-row{
 display:table-row;grid-template-columns:none;align-items:initial;
 height:40px;background:#fff;border:0;border-radius:0;padding:0;
 box-shadow:none;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table tbody tr.qt-purchase-entry-row:nth-child(even){
 background:#f9f9f9;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table tbody tr.qt-purchase-entry-row:hover{
 background:#eaf2f8;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table td{
 display:table-cell;box-sizing:border-box;vertical-align:middle;height:40px;
 padding:4px 5px;color:#244875;text-align:center;
 background:transparent;border-bottom:1px solid #f0f2f6;
 font-weight:700;font-size:12px;overflow:visible;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table td.qt-purchase-entry-product{
 min-width:290px;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table :is(input,select){
 min-width:0;width:100%;max-width:100%;height:30px;min-height:30px;box-sizing:border-box;
 padding:3px 5px;border:1px solid #b8ccdf;border-radius:4px;
 background:#fff;color:#244875;font-size:12px;font-weight:650;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table input[type=number]{
 font-variant-numeric:tabular-nums;text-align:center;direction:ltr;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table :is(input,select):focus-visible{
 outline:2px solid #1675b9;outline-offset:1px;border-color:#1675b9;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table .qt-purchase-row-code,
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table .qt-purchase-row-unit{
 display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
 text-align:center;color:#244875;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table .qt-purchase-row-value{
 color:#175ea8;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table .qt-purchase-row-value.qt-purchase-invalid-value{
 color:#c2410c;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table .qt-purchase-entry-action .button{
 min-width:55px;min-height:29px;padding:4px 7px;border-radius:5px;font-size:11px;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop form>h3{
 color:#244875;font:800 15px Arial,Tahoma,sans-serif;margin:14px 0 5px;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .toolbar:has(.qt-pending-action){
 position:sticky;bottom:44px;z-index:3;background:#fff;border-top:1px solid #dbe4ee;
 padding:7px 4px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .toolbar strong{
 font-variant-numeric:tabular-nums;
}
body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop form>button[type=submit]{
 min-width:180px;min-height:38px;display:block;margin-inline-start:auto;
}
@media(max-width:850px){
 body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table-scroll{
  max-height:45dvh;
 }
 body.qt-desktop-mode #body-content .qt-purchase-entry-backdrop .qt-purchase-entry-table{
  min-width:1250px;
 }
}


/* Native purchase report body paging: all server-authorized rows remain
   accessible; the 250-row DOM window is only a presentation optimization. */
body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-pager{
 display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;
 width:100%;min-height:38px;border-top:1px solid #e0e8f2;padding:7px 8px;
 background:#f8fbfe;box-sizing:border-box;
}
body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-pager button{
 min-width:86px;min-height:32px;padding:5px 12px;border:1px solid #aac2dc;
 border-radius:5px;background:#fff;color:#244875;font-weight:700;
}
body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-pager button:disabled{
 opacity:.55;cursor:not-allowed;background:#f0f4f9;
}
body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-pager button:hover:not(:disabled){
 border-color:#1769c2;background:#e9f2fd;
}
body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-page-count{
 color:#244875;font-size:12px;font-weight:700;
 min-width:180px;text-align:center;font-variant-numeric:tabular-nums;
}
@media(max-width:560px){
 body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-pager{
  gap:6px;padding:6px 3px;
 }
 body.qt-desktop-mode .qt-purchase-insights-dialog .qt-purchase-insights-page-count{
  flex-basis:100%;order:-1;
 }
}

/* SettingsWindow source-aligned groups, footer actions and controlled tenant theme */
body.qt-desktop-mode .qt-settings{direction:rtl}
body.qt-desktop-mode .qt-settings-tabs{scrollbar-width:thin}
body.qt-desktop-mode .qt-settings-tabs>.button{white-space:nowrap;padding:7px 12px}
body.qt-desktop-mode .qt-settings-fields{grid-template-columns:1fr;gap:10px}
body.qt-desktop-mode .qt-settings-fields>.qt-settings-group{grid-column:1/-1}
body.qt-desktop-mode .qt-settings-field:focus-within{outline:2px solid #9dc2e6;outline-offset:2px}
body.qt-desktop-mode .qt-settings-pending{margin-inline-end:auto;color:#a46a12;font-size:12px}
body.qt-desktop-mode .qt-settings-actions{position:sticky;bottom:0;background:#fff;padding:9px;z-index:2}
body.qt-desktop-mode.qt-business-theme{background:var(--qt-live-background,#f5f7fa);color:var(--qt-live-text,#102033)}
body.qt-desktop-mode.qt-business-theme :is(.panel,.qt-settings-form){background:var(--qt-live-surface,#fff);color:var(--qt-live-text,#102033)}
body.qt-desktop-mode.qt-business-theme .button.primary{background:var(--qt-live-accent,#0071e3);border-color:var(--qt-live-accent,#0071e3);color:white}
@media print{
 body.qt-print-invoice-preview .qt-a4-print-hide{display:none!important}
 body.qt-print-invoice-preview .qt-contract-print{white-space:pre-line;break-inside:avoid;margin:8mm 0}
 body.qt-print-invoice-preview .qt-a4-footer-print{text-align:center;white-space:pre-line;margin-top:8mm}
}

/* Qt PurchaseReturnDialog._configure_return_table_columns(linked_invoice=True)
   visual-order: [0,1,2,3,12,13,14,4,5,6,7,8,9,10,11].
   The purchase-only source editor is independent of the sales return dialog. */
body.qt-desktop-mode .qt-purchase-return-native-dialog{
 width:min(1500px,calc(100vw - 16px));max-width:none;
 max-height:calc(100dvh - 16px);height:min(810px,calc(100dvh - 16px));
 box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;
 padding:14px 16px;border:1px solid #b8ccdf;border-radius:7px;
 background:#f4f7fb;color:#173a63;direction:rtl;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog>.qt-purchase-return-sourcebar{
 display:flex;align-items:center;gap:10px;flex-wrap:wrap;
 background:#f1f6fd;border:1px solid #d0dff0;border-radius:6px;padding:10px 12px;
 color:#244875;font:700 12px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog>.qt-purchase-return-sourcebar strong{
 white-space:nowrap;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog>.qt-purchase-return-sourcebar input{
 width:min(265px,100%);min-height:34px;padding:4px 10px;
 border:1px solid #bacde0;border-radius:5px;background:#eaf0f6;
 color:#173a63;font-weight:750;text-align:center;direction:ltr;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog>.qt-purchase-return-sourcebar small{
 flex:1;min-width:220px;color:#677f98;font-size:11px;font-weight:500;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog form{
 display:flex;flex-direction:column;min-height:0;flex:1;gap:10px;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-table-wrap{
 min-height:170px;max-height:min(56dvh,540px);height:auto;
 overflow:auto;overscroll-behavior:contain;border:1px solid #b7c9dd;
 border-radius:6px;background:#fff;scrollbar-width:thin;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table{
 width:100%;min-width:1450px;table-layout:fixed;border-collapse:collapse;
 border-spacing:0;background:white;font:700 12px/1.4 Arial,Tahoma,sans-serif;
 direction:rtl;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table thead{
 position:sticky;top:0;z-index:2;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table th{
 height:42px;box-sizing:border-box;background:#244875;color:#fff;
 border:1px solid #1a3556;padding:7px 5px;text-align:center;
 font-size:11px;font-weight:800;white-space:nowrap;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(1){width:36px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(2){width:68px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(3){width:250px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(4){width:55px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(5){width:84px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(6){width:78px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(7){width:72px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(8){width:92px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(9){width:62px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(10){width:62px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(11){width:70px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(12){width:92px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(13){width:110px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(14){width:145px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(th,td):nth-child(15){width:58px}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table td{
 box-sizing:border-box;height:40px;vertical-align:middle;text-align:center;
 padding:4px 5px;border:1px solid #e3eaf3;font-size:11px;
 color:#244875;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table tbody tr:nth-child(even) td{
 background:#f9fbfe;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table tr.qt-purchase-return-active td{
 background:#fff7dd;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(input,select){
 box-sizing:border-box;width:100%;min-width:0;max-width:100%;
 min-height:30px;height:30px;font:650 12px Arial,Tahoma,sans-serif;
 padding:4px;border:1px solid #b7c9dd;border-radius:4px;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table .qt-purchase-return-qty input{
 direction:ltr;text-align:center;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table :is(input,button):focus-visible{
 outline:2px solid #267ad1;outline-offset:1px;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table .qt-purchase-return-available{
 color:#00723a;font-weight:800;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table .qt-purchase-return-warehouse{
 color:#244875;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-linked-table .qt-purchase-return-action button{
 min-width:48px;min-height:28px;padding:3px 6px;font-size:11px;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-accuracy-note{
 color:#657a92;font:600 11px/1.7 Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .dialog-actions{
 display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;
 position:sticky;bottom:0;z-index:3;background:#f4f7fb;
 padding:8px;border-top:1px solid #cbd9e8;
}
body.qt-desktop-mode .qt-purchase-return-native-dialog .dialog-actions button{
 min-height:36px;min-width:115px;
}
@media(max-width:850px){
 body.qt-desktop-mode .qt-purchase-return-native-dialog{padding:10px}
 body.qt-desktop-mode .qt-purchase-return-native-dialog .qt-purchase-return-table-wrap{
  max-height:47dvh;
 }
}


/* Authorized purchase return history source-linked preview.
   Display source code/unit when available, never counterfeit missing metadata. */
body.qt-desktop-mode .qt-invoice-preview:has(.qt-purchase-return-history-lines)>.qt-invoice-dialog{
 width:min(1120px,calc(100vw - 24px));
 max-width:1120px;max-height:calc(100dvh - 24px);
 overflow:auto;box-sizing:border-box;background:#f4f7fb;
 border:1px solid #bdcde0;color:#244875;
}
body.qt-desktop-mode .qt-purchase-return-history-lines{
 max-height:340px;overflow:auto;overscroll-behavior:contain;
 background:white;border:1px solid #d7e2ee;border-radius:6px;
}
body.qt-desktop-mode .qt-purchase-return-history-lines table{
 min-width:1170px;width:100%;table-layout:auto;border-collapse:collapse;
 direction:rtl;background:#fff;font:700 11px/1.5 Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-return-history-lines thead{
 position:sticky;top:0;z-index:1;
}
body.qt-desktop-mode .qt-purchase-return-history-lines th{
 background:#244875;color:#fff;white-space:nowrap;padding:8px 7px;
 text-align:center;font-size:11px;border:1px solid #193b67;
}
body.qt-desktop-mode .qt-purchase-return-history-lines td{
 box-sizing:border-box;white-space:nowrap;text-align:center;padding:7px 7px;
 border-bottom:1px solid #dfe8f3;color:#244875;font-size:11px;
}
body.qt-desktop-mode .qt-purchase-return-history-lines tbody tr:nth-child(even){
 background:#f7fafd;
}
body.qt-desktop-mode .qt-purchase-return-history-lines :is(th,td):nth-child(3){
 min-width:180px;text-align:right;
}
body.qt-desktop-mode .qt-purchase-return-history-lines :is(th,td):nth-child(12){
 min-width:120px;text-align:right;
}
body.qt-desktop-mode .qt-purchase-return-history-note{
 display:block;margin:7px 3px;color:#516984;font:600 11px/1.6 Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-invoice-preview:has(.qt-purchase-return-history-lines) .dialog-actions{
 position:sticky;bottom:0;z-index:2;
 background:#f4f7fb;border-top:1px solid #d9e3ef;
 padding:8px 0;display:flex;justify-content:flex-end;gap:8px;
}
@media(max-width:780px){
 body.qt-desktop-mode .qt-invoice-preview:has(.qt-purchase-return-history-lines)>.qt-invoice-dialog{
  width:calc(100vw - 10px);max-width:none;padding:10px;
 }
 body.qt-desktop-mode .qt-purchase-return-history-lines{max-height:36dvh}
}

/* CustomersWindow: Qt payment tab, invoice-linked collection and receipt register. */
.qt-customer-cash-history-container{display:flex;flex-direction:column;gap:10px;min-width:0;margin-top:12px}
.qt-customer-cash-history-container h3{margin:0;color:#244875;font-size:17px;font-weight:800}
.qt-customer-cash-history-tools{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:11px;
 border:1px solid #d7e1ee;border-radius:7px;background:#f8fafd}
.qt-customer-cash-history-tools>:is(input,select){box-sizing:border-box;min-height:34px;max-width:100%;padding:7px;
 border:1px solid #c6d5e4;border-radius:5px;color:#244875;background:white}
.qt-customer-cash-history-tools input[type=date]{width:155px}
.qt-customer-cash-history-tools input[type=search]{flex:1 1 165px}
.qt-customer-cash-history-table{min-width:0;width:100%;overflow:auto}
.qt-customer-cash-history-pages,.qt-customer-cash-history-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.qt-customer-cash-history-pages{justify-content:center}
.qt-customer-cash-history-actions{padding:10px 0;border-top:1px solid #dae4ee}
.qt-customer-cash-history-actions button[disabled]{opacity:.55;cursor:not-allowed}
@media(max-width:640px){
 .qt-customer-cash-history-tools input[type=date]{width:calc(50% - 24px)}
 .qt-customer-cash-history-tools input[type=search]{flex-basis:100%}
}


/* CustomersReportsWindow ColumnSettingsDialog and CustomerBulkMessageDialog preview */
.qt-customer-columns-dialog{width:min(420px,calc(100vw - 22px));max-height:85dvh;overflow:auto;
 direction:rtl;padding:18px;color:#244875;background:white;border:1px solid #c9d6e5;border-radius:8px;
 box-shadow:0 14px 50px #17335455}
.qt-customer-columns-dialog::backdrop{background:#10243c80}
.qt-customer-column-choices{display:flex;flex-direction:column;gap:7px;max-height:50dvh;overflow:auto;
 padding:9px;border:1px solid #d7e1ec;border-radius:6px}
.qt-customer-column-choice{display:flex;align-items:center;gap:8px;min-height:32px;padding:6px;
 cursor:pointer;border-radius:5px}
.qt-customer-column-choice:hover{background:#f3f7fc}
.qt-customer-column-choice input{accent-color:#0071e3;width:17px;height:17px}
.qt-customer-message-sample{background:#f2f7fd;border:1px solid #cdddee;border-radius:6px;
 color:#244875;padding:11px;white-space:pre-wrap;overflow-wrap:anywhere;min-height:54px;
 font-family:inherit;font-size:13px;line-height:1.8}
.qt-customer-campaign-history{padding:12px 0;border-top:1px solid #d9e2ef}
.qt-customer-campaign-history h3{font-size:15px;margin:0}
.qt-customer-campaign-history-row{display:flex;justify-content:space-between;align-items:center;
 flex-wrap:wrap;gap:9px;margin:6px 0;padding:10px;border:1px solid #d9e2ef;border-radius:6px}
.qt-customer-campaign-history-row>span{overflow-wrap:anywhere;flex:1 1 220px}
@media print{
 body.qt-customer-report-printing *{visibility:hidden!important}
 body.qt-customer-report-printing .qt-customer-report-print-target,
 body.qt-customer-report-printing .qt-customer-report-print-target *{visibility:visible!important}
 body.qt-customer-report-printing .qt-customer-report-print-target{
  position:static!important;display:block!important;overflow:visible!important;
  max-height:none!important;max-width:none!important;width:100%!important;
  border:0!important;box-shadow:none!important;margin:0!important;padding:0!important}
 body.qt-customer-report-printing .qt-customer-report-print-target
 :is(.qt-customer-report-filters,.qt-customer-manager-heading button,.qt-customer-manager-actions,
 .qt-native-form-note){display:none!important}
}

/* Source Qt SettingsWindow toolbar; visible even with large numbers of tabs. */
body.qt-desktop-mode .qt-settings-toolbar{display:flex;align-items:center;gap:12px;padding:12px 18px;
 background:linear-gradient(125deg,#244875,#2d3748);color:#fff;border-bottom:4px solid #0071e3;
 min-height:50px;box-sizing:border-box}
body.qt-desktop-mode .qt-settings-toolbar strong{font-size:16px;margin-inline-end:auto}
body.qt-desktop-mode .qt-settings-toolbar .button{background:#244875;color:white;border-color:#547da1}
body.qt-desktop-mode .qt-settings-help-dialog{width:min(550px,calc(100vw - 26px));border:1px solid #99a9bb;
 border-radius:7px;padding:18px;line-height:1.8;direction:rtl}
body.qt-desktop-mode .qt-settings-fields .qt-settings-note{grid-column:1/-1}
body.qt-desktop-mode .qt-settings-group .qt-settings-field:has(textarea){grid-column:1/-1}
body.qt-desktop-mode.qt-business-theme .qt-render-root{font-size:var(--qt-ui-font-size,12px)}
body.qt-desktop-mode.qt-business-theme .qt-settings :is(input,select,textarea,button,label){
 font-size:var(--qt-ui-font-size,12px)}
.qt-a4-print-only{display:none!important}
@media print{
 body.qt-print-invoice-preview .qt-a4-print-only{display:block!important}
 body.qt-print-invoice-preview .qt-a4-brand{padding:5mm 3mm;border-bottom:1px solid #333;margin-bottom:4mm;font-size:11pt}
 body.qt-print-invoice-preview .qt-a4-business-line{margin:2mm 0}
 body.qt-print-invoice-preview .qt-a4-custom-title{text-align:center;margin:5mm 0;font-size:16pt}
 body.qt-print-invoice-preview .qt-a4-signatures{display:flex!important;justify-content:space-between;gap:12mm;break-inside:avoid;margin:12mm 0 5mm;font-size:11pt}
 body.qt-print-invoice-preview .qt-a4-footer-print{text-align:center;white-space:pre-line;border-top:1px solid #999;margin-top:8mm;padding-top:3mm}
 body.qt-print-invoice-preview .qt-a4-print-hide{display:none!important}
}


/* 2026-11-17 purchases_window_ui_mixin.py : original Qt 3-tab
   PurchaseInvoicePreview (items, financial summary, read-only notes).
   Scope only the purchase saved-invoice modal; sales and POS are untouched. */
.qt-invoice-preview .qt-purchase-native-preview-dialog{
 width:min(1100px,calc(100vw - 24px));max-width:1100px;
 height:min(850px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);
 box-sizing:border-box;display:flex;flex-direction:column;gap:0;
 padding:0;overflow:auto;background:#f9f9f9;border:1px solid #c8d1dc;
 border-radius:7px;color:#244875;direction:rtl;
 box-shadow:0 12px 40px #102b4c35;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>h2{
 order:-2;margin:0;padding:12px 24px 10px;
 color:#fff;background:#244875;font:800 20px/1.5 Arial,Tahoma,sans-serif;
 border-bottom:3px solid #ff9500;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-purchase-print-header{
 order:-1;box-sizing:border-box;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-invoice-preview-grid{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
 gap:10px;box-sizing:border-box;margin:0;padding:17px 24px;
 background:#fff;border-bottom:2px solid #f0f0f0;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-invoice-preview-grid .qt-invoice-preview-field{
 min-height:57px;display:flex;flex-direction:column;
 padding:8px 12px;gap:7px;border:1px solid #e7ebf0;border-radius:6px;
 background:#f9fbfd;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-invoice-preview-grid small{
 color:#6b7280;font-size:11px;font-weight:700;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-invoice-preview-grid strong{
 color:#244875;font-size:13px;font-weight:800;overflow-wrap:anywhere;
 font-variant-numeric:tabular-nums;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tabs{
 flex:1;display:flex;flex-direction:column;min-height:240px;
 max-height:none;background:white;border:1px solid #f0f0f0;box-sizing:border-box;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tabbar{
 display:flex;align-items:stretch;gap:0;flex:0 0 auto;min-height:42px;
 background:#d1d1d6;box-sizing:border-box;direction:rtl;
 border-bottom:1px solid #b9bec6;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tab{
 appearance:none;cursor:pointer;padding:9px 20px;min-height:42px;
 background:#d1d1d6;color:#244875;border:0;border-bottom:3px solid transparent;
 font:800 12px/1.6 Arial,Tahoma,sans-serif;
 white-space:nowrap;transition:background .12s linear;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tab:hover{
 background:#e9edf2;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tab[aria-selected=true]{
 background:#244875;color:#fff;border-bottom-color:#ff9500;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tab:focus-visible{
 outline:2px solid #ff9500;outline-offset:-2px;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-contents{
 display:flex;flex:1;flex-direction:column;min-height:0;padding:16px 20px;
 overflow:auto;box-sizing:border-box;background:#fff;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane{
 display:flex;flex-direction:column;gap:10px;min-height:185px;
 overflow:visible;box-sizing:border-box;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane[hidden]{
 display:none!important;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane>h3{
 color:#244875;margin:0 0 8px;font:800 16px Arial,Tahoma,sans-serif;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane>.table-scroll{
 max-height:43dvh;min-height:165px;overflow:auto;border:1px solid #f0f0f0;
 border-radius:5px;background:#fff;scrollbar-width:thin;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table{
 width:100%;min-width:950px;border-collapse:collapse;direction:rtl;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table thead{
 position:sticky;top:0;z-index:1;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table th{
 background:#244875;color:#fff;padding:8px;border:1px solid #1f4069;
 text-align:center;white-space:nowrap;font-size:12px;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table td{
 padding:8px 7px;border:1px solid #f0f0f0;text-align:center;
 color:#244875;font-size:11px;white-space:nowrap;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table tbody tr:nth-child(even){
 background:#f9f9f9;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane .qt-purchase-saved-preview-table tbody tr:hover{
 background:#eaf2f8;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-financial-summary{
 display:flex;flex-direction:column;gap:16px;padding:14px 10px;background:#fff;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-financial-summary>h3{
 font:800 17px Arial,Tahoma,sans-serif;color:#244875;margin:0;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-financial-summary .qt-sales-saved-financial-grid{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-financial-summary .qt-invoice-preview-field{
 background:#eff5fc;border:1px solid #d3e4f4;border-radius:8px;
 box-sizing:border-box;min-height:90px;padding:15px 18px;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-financial-summary .qt-invoice-preview-field strong{
 font-size:19px;color:#244875;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-invoice-notes{
 display:flex;flex:1;flex-direction:column;gap:10px;
 min-height:260px;margin:0;padding:12px;background:white;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-invoice-notes h3{
 margin:0;color:#244875;font:800 16px Arial,Tahoma,sans-serif;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-notes-text{
 display:block;box-sizing:border-box;width:100%;min-height:225px;
 max-height:45dvh;resize:vertical;padding:12px 14px;border:1px solid #e0e5ed;
 border-radius:6px;background:#f9f9f9;color:#244875;
 white-space:pre-wrap;font:14px/1.75 Arial,Tahoma,sans-serif;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-notes-print{
 display:none;white-space:pre-wrap;overflow-wrap:anywhere;
 padding:10px 12px;margin:6px 0;border:1px solid #dee5ec;border-radius:5px;
 background:white;color:#244875;font:13px/1.75 Arial,Tahoma,sans-serif;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px;
 margin:0;padding:13px 20px;border-top:1px solid #e1e5eb;
 background:#f9f9f9;position:sticky;bottom:0;z-index:2;box-sizing:border-box;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions .button{
 min-width:110px;min-height:38px;padding:6px 12px;
 border-radius:6px;white-space:nowrap;
}
.qt-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions .button:disabled{
 opacity:.45;cursor:not-allowed;
}
@media(max-width:800px){
 .qt-invoice-preview .qt-purchase-native-preview-dialog{
  width:calc(100vw - 12px);max-height:calc(100dvh - 12px);height:calc(100dvh - 12px);
 }
 .qt-invoice-preview .qt-purchase-native-preview-dialog>.qt-invoice-preview-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:6px;
 }
 .qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tab{
  padding:8px 10px;font-size:11px;flex:1;
 }
 .qt-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-contents{
  padding:10px;
 }
 .qt-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions{
  gap:5px;padding:8px;
 }
 .qt-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions .button{
  flex:1 1 115px;min-width:100px;
 }
}
@media print{
 /* Qt prints all source-backed tab contents, not just the currently visible
    screen tab. Respect separately hidden A4 policy items/totals/notes. */
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog{
  display:block!important;height:auto!important;max-height:none!important;
  overflow:visible!important;width:100%!important;max-width:none!important;
  background:white!important;box-shadow:none!important;border:0!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tabbar{
  display:none!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-contents,
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-tabs{
  display:block!important;height:auto!important;max-height:none!important;
  overflow:visible!important;padding:0!important;border:0!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane,
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane[hidden]{
  display:block!important;height:auto!important;min-height:0!important;
  overflow:visible!important;break-inside:auto;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane>.table-scroll{
  height:auto!important;max-height:none!important;min-height:0!important;
  overflow:visible!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-preview-pane>h3{
  margin:12px 0 7px!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-invoice-notes{
  min-height:0!important;height:auto!important;display:block!important;padding:4px!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-notes-text{
  display:none!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-notes-print{
  display:block!important;break-inside:auto;white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;height:auto!important;max-height:none!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog .qt-purchase-saved-invoice-notes.qt-a4-print-hide{
  display:none!important;
 }
 body.qt-print-invoice-preview .qt-purchase-native-preview-dialog>.dialog-actions{
  display:none!important;
 }
}

/* Offline 13-tab parity: safe ZATCA onboarding draft and cloud backup boundaries. */
body.qt-desktop-mode .qt-settings-zatca-intro{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;
  background:#f3f8fc;border:1px solid #b8ccdf;border-radius:7px;padding:13px;line-height:1.75}
body.qt-desktop-mode .qt-settings-zatca-intro .button{align-self:flex-start}
body.qt-desktop-mode .qt-settings-backup-panel{padding:20px;background:#f9fbfd;display:flex;flex-direction:column;
  align-items:flex-start;gap:12px;border:1px solid #ccd9e6;border-radius:8px;line-height:1.8}
body.qt-desktop-mode .qt-settings-backup-panel :is(h3,h4,p){margin:0}
body.qt-desktop-mode .qt-settings-backup-warning{color:#895712;background:#fff7e5;padding:12px;border-radius:7px}
body.qt-desktop-mode .qt-settings-zatca-intro p{margin:0}

/* Print source-backed Qt thermal sales receipt; never print unsaved fields. */
.qt-thermal-invoice{display:none;background:#fff;color:#000;direction:rtl;line-height:1.45}
.qt-thermal-field{display:flex;align-items:baseline;gap:5px}
.qt-thermal-items{width:100%;border-collapse:collapse;table-layout:fixed}
.qt-thermal-items :is(td,th){padding:3px 2px;border-bottom:1px dotted #666;overflow-wrap:anywhere;text-align:right}
.qt-thermal-footer{white-space:pre-wrap;overflow-wrap:anywhere}
@media print{
 body.qt-print-thermal-invoice *{visibility:hidden!important}
 body.qt-print-thermal-invoice .qt-thermal-invoice,
 body.qt-print-thermal-invoice .qt-thermal-invoice *{visibility:visible!important}
 body.qt-print-thermal-invoice .qt-thermal-invoice{display:block!important;position:absolute;inset:0;max-width:var(--qt-thermal-mm,80mm);
   width:var(--qt-thermal-mm,80mm);box-sizing:border-box;margin:0 auto;padding:3mm 2mm;border:0;background:#fff;color:#000;direction:rtl;font:12px Arial,sans-serif}
 body.qt-print-thermal-invoice .qt-thermal-invoice :is(.qt-thermal-header,.qt-thermal-meta,.qt-thermal-customer,.qt-thermal-summary,.qt-thermal-footer){padding:3mm 0;break-inside:avoid}
 body.qt-print-thermal-invoice .qt-thermal-text-company-name{font-size:var(--thermal-company-name-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-address{font-size:var(--thermal-address-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-tax-number{font-size:var(--thermal-tax-number-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-phone{font-size:var(--thermal-phone-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-invoice-number{font-size:var(--thermal-invoice-number-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-date{font-size:var(--thermal-date-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-invoice-type{font-size:var(--thermal-invoice-type-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-time{font-size:var(--thermal-time-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-cashier{font-size:var(--thermal-cashier-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-payment-method{font-size:var(--thermal-payment-method-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-customer-name{font-size:var(--thermal-customer-name-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-customer-phone{font-size:var(--thermal-customer-phone-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-customer-address{font-size:var(--thermal-customer-address-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-invoice :is(th){font-size:var(--thermal-items-header-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-invoice :is(td){font-size:var(--thermal-items-body-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-subtotal{font-size:var(--thermal-subtotal-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-discount{font-size:var(--thermal-discount-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-tax{font-size:var(--thermal-tax-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-total{font-size:var(--thermal-total-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-text-paid{font-size:var(--thermal-paid-size,12px)}
 body.qt-print-thermal-invoice .qt-thermal-invoice.qt-thermal-no-dividers :is(td,th){border-bottom:0}
 body.qt-print-pos-receipt .qt-pos-print-hide{display:none!important}
 body.qt-print-pos-receipt .qt-pos-receipt{width:var(--qt-pos-print-width,80mm)!important}
 body.qt-print-pos-receipt .qt-pos-print-footer{visibility:visible!important;text-align:center;white-space:pre-line;padding-top:3mm}
 body.qt-print-pos-receipt .qt-pos-print-footer *{visibility:visible!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-company-name .qt-thermal-text-company-name{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-address .qt-thermal-text-address{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-tax-number .qt-thermal-text-tax-number{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-phone .qt-thermal-text-phone{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-invoice-number .qt-thermal-text-invoice-number{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-date .qt-thermal-text-date{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-invoice-type .qt-thermal-text-invoice-type{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-time .qt-thermal-text-time{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-cashier .qt-thermal-text-cashier{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-payment-method .qt-thermal-text-payment-method{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-customer-name .qt-thermal-text-customer-name{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-customer-phone .qt-thermal-text-customer-phone{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-customer-address .qt-thermal-text-customer-address{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-items-header th{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-items-body td{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-subtotal .qt-thermal-text-subtotal{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-discount .qt-thermal-text-discount{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-tax .qt-thermal-text-tax{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-total .qt-thermal-text-total{font-weight:800!important}
 body.qt-print-thermal-invoice .qt-thermal-bold-paid .qt-thermal-text-paid{font-weight:800!important}
}

/* Source SettingsWindow tools: no invoice data in the local print calibration page. */
.qt-settings-print-sample{display:none;background:#fff;color:#000;direction:rtl}
@media print{
 body.qt-print-settings-sample *{visibility:hidden!important}
 body.qt-print-settings-sample .qt-settings-print-sample,
 body.qt-print-settings-sample .qt-settings-print-sample *{visibility:visible!important}
 body.qt-print-settings-sample .qt-settings-print-sample{display:block!important;position:absolute;top:0;left:0;
  margin:0 auto;padding:4mm 2mm;max-width:var(--qt-sample-paper-width,80mm);
  width:var(--qt-sample-paper-width,80mm);font:12px Arial,sans-serif;text-align:center;
  white-space:normal;overflow-wrap:anywhere}
}


/* PurchasesStatisticsWindow.setup_ui original 2x3 card layout and top 10
   supplier register, now supplied by one authenticated scoped SQL aggregate.
   Apply only to statistics; do not affect the purchase reports sub-window. */
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]{
 width:min(1040px,calc(100vw - 20px));min-height:540px;
 max-height:calc(100dvh - 20px);box-sizing:border-box;
 padding:17px 20px;background:#f9f9f9;border:1px solid #bfcbd9;
 border-radius:8px;color:#244875;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] h2{
 font:800 23px/1.5 Arial,Tahoma,sans-serif;line-height:1.5;
 border-bottom:1px solid #d1d1d6;padding-bottom:10px;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-controls{
 display:flex;gap:9px;align-items:end;padding:7px 0;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;
 margin:10px 0 15px;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric{
 min-width:0;min-height:97px;box-sizing:border-box;
 display:flex;flex-direction:column;justify-content:center;gap:7px;
 padding:14px;border-radius:9px;
 background:#fff;border:1px solid #dce4ed;
 border-inline-start:5px solid #0071e3;
 box-shadow:0 2px 9px #1531500a;text-align:center;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric:nth-child(1){
 border-inline-start-color:#34c759;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric:nth-child(3){
 border-inline-start-color:#ff9500;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric:nth-child(4){
 border-inline-start-color:#ff3b30;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric:nth-child(5){
 border-inline-start-color:#244875;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric span{
 color:#536779;font:700 12px/1.5 Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric strong{
 color:#244875;font:800 20px/1.35 Arial,Tahoma,sans-serif;
 font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]>.qt-purchase-insights-scroll{
 min-height:130px;max-height:225px;overflow:auto;border:1px solid #d1d1d6;
 background:white;border-radius:5px;scrollbar-width:thin;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]>.qt-purchase-insights-scroll .qt-purchase-insights-table{
 width:100%;min-width:660px;border-collapse:collapse;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]>.qt-purchase-insights-scroll .qt-purchase-insights-table th{
 color:#fff;background:#244875;padding:10px 8px;text-align:center;
 border:1px solid #1d3e68;font-weight:800;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]>.qt-purchase-insights-scroll .qt-purchase-insights-table td{
 padding:10px 8px;text-align:center;border-bottom:1px solid #e1e5ec;
 font-variant-numeric:tabular-nums;color:#244875;
}
@media(max-width:760px){
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"]{
  width:calc(100vw - 10px);max-height:calc(100dvh - 10px);padding:10px;
 }
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
 }
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric{
  min-height:76px;padding:9px;
 }
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics .qt-invoice-metric strong{
  font-size:16px;
 }
}
@media(max-width:400px){
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="statistics"] .qt-purchase-insights-metrics{
  grid-template-columns:1fr;
 }
}

/* Advanced CustomersWindowReportsMixin Qt account/payment drilldown */
.qt-customer-advanced-dialog{direction:rtl;width:min(1250px,calc(100vw - 30px));
 max-width:calc(100vw - 30px);max-height:92dvh;overflow:auto;
 border:1px solid #c7d7e7;border-radius:9px;padding:16px 20px;
 background:#fff;color:#244875;box-shadow:0 14px 60px #192b4555}
.qt-customer-advanced-dialog::backdrop,.qt-customer-advanced-invoice::backdrop{background:#0f253d99}
.qt-customer-advanced-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;
 border-bottom:1px solid #d5dfe8;margin-bottom:9px;padding-bottom:10px}
.qt-customer-advanced-heading h2{margin:0;font-size:20px;line-height:1.4;font-weight:800}
.qt-customer-advanced-client{background:#f8fafd;border:1px solid #dce4ee;
 border-radius:5px;padding:9px 12px;color:#61728a}
.qt-customer-advanced-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;
 padding:12px;border:1px solid #d3e0ed;border-radius:7px;background:#f8fbff}
.qt-customer-advanced-filters>input,.qt-customer-advanced-filters>select{
 min-height:35px;padding:7px;max-width:100%;border:1px solid #bfcfe0;border-radius:5px;
 background:white;color:#244875}
.qt-customer-advanced-filters input[type=date]{width:152px}
.qt-customer-advanced-filters input[type=search]{flex:1 1 175px}
.qt-customer-advanced-actions{display:flex;gap:9px;flex-wrap:wrap;padding:10px 0}
.qt-customer-advanced-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:10px 0}
.qt-customer-advanced-stat{display:flex;flex-direction:column;gap:7px;padding:11px;
 background:#f5f9ff;border:1px solid #d3e0f0;border-radius:7px}
.qt-customer-advanced-stat span{font-size:12px;color:#506b8c}
.qt-customer-advanced-stat strong{font-size:18px;color:#1d4873;overflow-wrap:anywhere}
.qt-customer-advanced-scroll{overflow:auto;max-height:45vh;border:1px solid #d8e2ed;border-radius:5px}
.qt-customer-advanced-scroll .qt-native-table{width:100%;border-collapse:collapse}
.qt-customer-advanced-pagination{display:flex;justify-content:center;align-items:center;
 flex-wrap:wrap;gap:10px;padding:12px 0}
.qt-customer-advanced-invoice{direction:rtl;width:min(760px,calc(100vw - 30px));
 max-width:calc(100vw - 30px);max-height:85dvh;overflow:auto;padding:16px;
 color:#244875;background:white;border:1px solid #cad9e6;border-radius:8px}
.qt-customer-advanced-invoice h3{margin:0 0 12px;font-size:18px}
@media(max-width:760px){
 .qt-customer-advanced-dialog{padding:12px}
 .qt-customer-advanced-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-customer-advanced-filters input[type=search]{flex-basis:100%}
 .qt-customer-advanced-filters input[type=date]{width:calc(50% - 22px)}
}
@media print{
 body.qt-customer-advanced-printing *{visibility:hidden!important}
 body.qt-customer-advanced-printing .qt-customer-advanced-print,
 body.qt-customer-advanced-printing .qt-customer-advanced-print *{visibility:visible!important}
 body.qt-customer-advanced-printing .qt-customer-advanced-print{position:static!important;display:block!important;
 width:100%!important;max-width:none!important;max-height:none!important;overflow:visible!important;
 border:0!important;box-shadow:none!important;padding:0!important}
 body.qt-customer-advanced-printing .qt-customer-advanced-print
 :is(.qt-customer-advanced-filters,.qt-customer-advanced-actions,
 .qt-customer-advanced-pagination,.qt-customer-advanced-heading button,
 .qt-native-form-note,.qt-customer-advanced-scroll button){display:none!important}
 body.qt-customer-advanced-printing .qt-customer-advanced-scroll{max-height:none;overflow:visible}
}


/* CustomerStatisticsWindow: six-card (2 rows x 3 columns) + top-ten 5 columns. */
.qt-customer-stat-heading{font-size:16px;font-weight:800;color:#244875;margin:8px 0}
.qt-customer-stat-table{overflow:hidden}
.qt-customer-stat-table .table-scroll{max-height:235px;overflow:auto;border:1px solid #d3deeb;border-radius:6px}
.qt-customer-stat-table table{width:100%;border-collapse:collapse}
.qt-customer-stat-table tbody tr:nth-child(even){background:#f9f9f9}
.qt-customer-stat-card small{font-size:11px;color:#526b87;font-weight:600}
.qt-customer-report-filters input[type=date]{width:154px}
@media(max-width:560px){
 .qt-customer-stat-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .qt-customer-stat-card strong{font-size:1.05rem}
}

/* Settings offline Save All and printer paper presets. */
body.qt-desktop-mode .qt-settings-toolbar{flex-wrap:wrap}
body.qt-desktop-mode .qt-settings-save-all-status{font-size:12px;color:#f1f6ff;font-weight:600;flex-basis:100%}
body.qt-desktop-mode .qt-settings-paper-presets{grid-column:1/-1;display:flex;gap:12px;align-items:center;
 padding:10px 14px;background:#f5f9fc;border:1px solid #c8d9e8;border-radius:7px;flex-wrap:wrap}
body.qt-desktop-mode .qt-settings-paper-presets .button{min-width:86px}


/* PurchasesWindowUiMixin._create_returns_filters: native source styling.
   Only the original persisted status filter is enabled. Current Cloud return
   writer does not save 'return_reason', so the reason control stays disabled. */
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-filters{
 margin:8px 0 9px;background:#fff;border:1px solid #cfd8e3;
 border-radius:8px;padding:9px 14px;min-height:62px;
 direction:rtl;box-sizing:border-box;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar{
 display:flex;flex-wrap:wrap;align-items:end;gap:9px;
 width:100%;box-sizing:border-box;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label{
 display:flex;flex-direction:column;gap:4px;min-width:110px;
 font:700 12px/1.5 Arial,Tahoma,sans-serif;color:#244875;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label:first-child{
 flex:1 1 310px;min-width:210px;max-width:430px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label:nth-child(2){
 min-width:145px;max-width:165px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label:nth-child(3){
 min-width:125px;max-width:155px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar :is(input,select){
 box-sizing:border-box;height:34px;min-height:34px;width:100%;
 border:1px solid #cfd8e3;border-radius:5px;background:#fff;
 color:#244875;padding:5px 9px;font:650 12px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar :is(input,select):focus-visible{
 outline:2px solid #0071e3;outline-offset:1px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar select:disabled{
 opacity:.65;cursor:not-allowed;background:#f5f7fb;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar button{
 box-sizing:border-box;min-height:34px;padding:7px 10px;
 white-space:nowrap;border-radius:5px;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar button[type=submit]{
 background:#244875;color:#fff;font-weight:750;
}
body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-classification-note{
 display:block;margin:7px 0 4px;color:#596f86;
 font:600 11px/1.75 Arial,Tahoma,sans-serif;
}
@media(max-width:850px){
 body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label{
  flex:1 1 140px;min-width:125px;max-width:none;
 }
 body.qt-desktop-mode .qt-invoice-purchase .qt-purchase-returns-toolbar>label:first-child{
  flex-basis:100%;max-width:none;
 }
}

/* SettingsWindow original choose_logo / remove_logo 100px preview and print logo. */
body.qt-desktop-mode .qt-settings-logo-widget{grid-column:1/-1;min-height:128px;display:flex;gap:12px;
 align-items:center;justify-content:center;flex-wrap:wrap;background:#fff;border:1px solid #c5d5e4;
 padding:14px;border-radius:7px;box-sizing:border-box}
body.qt-desktop-mode .qt-settings-logo-preview{width:100px;height:100px;object-fit:contain;background:#fff;
 border:1px solid #cbd5df;border-radius:3px;padding:4px}
body.qt-desktop-mode .qt-settings-logo-placeholder{display:grid;place-items:center;width:100px;height:100px;
 background:#f4f7fa;border:1px dashed #b8c9d9;border-radius:3px;font-size:12px;color:#516a80}
body.qt-desktop-mode .qt-settings-logo-file{display:none}
body.qt-desktop-mode .qt-settings-logo-note{flex-basis:100%;text-align:center;margin:0;
 font-size:12px;color:#33506c;line-height:1.65}
.qt-pos-print-addon{display:none}
@media print{
 body.qt-print-invoice-preview .qt-a4-brand-logo{display:block;max-width:30mm;max-height:26mm;
 width:auto;height:auto;object-fit:contain;margin:0 auto 4mm;break-inside:avoid}
 body.qt-print-thermal-invoice .qt-thermal-brand-logo{display:block;max-width:28mm;max-height:24mm;
 width:auto;height:auto;object-fit:contain;margin:0 auto 3mm;break-inside:avoid}
 body.qt-print-pos-receipt .qt-pos-print-logo{display:block!important;visibility:visible!important;
 max-width:28mm;max-height:24mm;object-fit:contain;margin:0 auto 3mm;break-inside:avoid}
}

/* Native SettingsWindow shift-print and preparation controls. */
body.qt-desktop-mode .qt-preparation-preview{grid-column:1/-1;border:1px solid #afc6da;border-radius:7px;
 background:#f4f8fc;padding:14px;display:grid;gap:12px;direction:rtl}
body.qt-desktop-mode .qt-preparation-preview-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
body.qt-desktop-mode .qt-preparation-preview-heading small{color:#637d94;font-size:11px}
body.qt-desktop-mode .qt-preparation-preview-paper{width:min(380px,100%);background:#fff;border:1px solid #cbd5e1;
 padding:14px;margin:auto;text-align:center;box-shadow:0 3px 10px #0013;direction:rtl;overflow-wrap:anywhere}
body.qt-desktop-mode .qt-preparation-preview-paper :is(p,h3){margin:8px 0}
body.qt-desktop-mode .qt-preparation-preview-paper .qt-preparation-preview-logo{max-height:85px;max-width:120px;object-fit:contain;margin:0 auto}
body.qt-desktop-mode .qt-preparation-preview :is(button){justify-self:start}
.qt-shift-print-modal{border:1px solid #a9c4dc;border-radius:9px;width:min(520px,calc(100vw - 28px));max-height:90vh;
 overflow:auto;padding:17px;direction:rtl;background:white;color:#142a40}
.qt-shift-preview-header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center}
.qt-shift-preview-note{color:#5b7085;font-size:12px;line-height:1.7}
.qt-shift-preview-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:12px}
.qt-shift-print-table{border-collapse:collapse;width:100%}
.qt-shift-print-table :is(th,td){text-align:right;padding:7px 10px;border-bottom:1px solid #d8e2ed}
.qt-shift-print-table th{width:40%;font-weight:700}
.qt-shift-print-header{text-align:center;margin:8px 0 12px}
.qt-shift-print-footer{text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;margin:15px 0 0}
.qt-shift-print-host{display:none}
@media print{
 body.qt-print-shift-report *{visibility:hidden!important}
 body.qt-print-shift-report .qt-shift-report-print,body.qt-print-shift-report .qt-shift-report-print *{visibility:visible!important}
 body.qt-print-shift-report .qt-shift-report-print{display:block!important;position:fixed;top:0;left:0;
  box-sizing:border-box;padding:7mm 5mm;width:80mm;max-width:100%;margin-left:var(--qt-shift-print-offset,0mm);
  font:12px Arial,Tahoma,sans-serif;background:#fff;color:#000;direction:rtl}
 body.qt-print-shift-report .qt-shift-report-print .qt-shift-print-table :is(td,th){font-size:11px;border-bottom:1px dotted #aaa}
 body.qt-print-preparation-sample *{visibility:hidden!important}
 body.qt-print-preparation-sample .qt-preparation-preview-paper,
 body.qt-print-preparation-sample .qt-preparation-preview-paper *{visibility:visible!important}
 body.qt-print-preparation-sample .qt-preparation-preview-paper{display:block!important;position:absolute;inset:0;
  margin:0 auto;padding:5mm;border:0;box-shadow:none;background:#fff;color:#000;width:80mm;max-width:100%}
}

/* The print-only host is hidden in normal UI, but must become visible while printing. */
@media print{
 body.qt-print-shift-report .qt-shift-print-host{display:block!important;visibility:visible!important}
 body.qt-print-shift-report .qt-shift-print-modal{overflow:visible!important;max-height:none!important}
}

/* Qt SettingsWindow Backup tab: factual scoped settings snapshots/history. */
body.qt-desktop-mode .qt-settings-backup-panel{width:100%;min-width:0;align-items:stretch}
body.qt-desktop-mode .qt-settings-snapshots{width:100%;min-width:0;display:flex;flex-direction:column;gap:12px}
body.qt-desktop-mode .qt-settings-snapshots-head{padding:12px;border:1px solid #d8e0ea;border-radius:6px;background:#fff}
body.qt-desktop-mode .qt-settings-snapshots-head :is(h4,p){margin:0}
body.qt-desktop-mode .qt-settings-snapshots-head p{font-size:12px;margin-top:6px;color:#536a80}
body.qt-desktop-mode .qt-settings-snapshot-cards{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:10px}
body.qt-desktop-mode .qt-settings-snapshot-card{min-width:0;padding:11px 15px;background:#fff;border:1px solid #d8e0ea;
 border-radius:6px;display:grid;gap:8px}
body.qt-desktop-mode .qt-settings-snapshot-card small{font-weight:700;color:#244875}
body.qt-desktop-mode .qt-settings-snapshot-card strong{color:#0b2f66;font-size:16px}
body.qt-desktop-mode .qt-settings-snapshot-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
body.qt-desktop-mode .qt-settings-snapshot-actions input{flex:1 1 220px;max-width:580px;min-width:160px;padding:8px 10px}
body.qt-desktop-mode .qt-settings-snapshot-status{font-size:12px;min-height:18px;color:#315b83;margin:0}
body.qt-desktop-mode .qt-settings-snapshot-list{border:1px solid #d8e0ea;border-radius:6px;min-height:100px;
 background:#fff;padding:10px;max-height:320px;overflow-y:auto}
body.qt-desktop-mode .qt-settings-snapshot-row{display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:8px;border-bottom:1px solid #e1e8f0;padding:9px 3px}
body.qt-desktop-mode .qt-settings-snapshot-row:last-child{border-bottom:0}
body.qt-desktop-mode .qt-settings-snapshot-meta{display:grid;gap:5px;min-width:120px;flex:1 1 170px}
body.qt-desktop-mode .qt-settings-snapshot-meta small{font-size:11px;color:#657a90}
body.qt-desktop-mode .qt-settings-snapshot-row-actions{display:flex;gap:6px;flex-wrap:wrap}
body.qt-desktop-mode .qt-settings-snapshot-warning{color:#795312;background:#fff7e9;
 border:1px solid #ead9b0;border-radius:6px;padding:10px;font-size:12px;line-height:1.8}
@media(max-width:660px){body.qt-desktop-mode .qt-settings-snapshot-cards{grid-template-columns:1fr}}

/* PrinterSettingsWindow: native three sub-tabs, RTL keyboard navigation. */
body.qt-desktop-mode .qt-settings-printer-tabs{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:3px;
 border-bottom:1px solid #bdd2e6;padding:4px 2px 0;background:transparent;direction:rtl}
body.qt-desktop-mode .qt-settings-printer-tabs button{min-height:39px;border-radius:4px 4px 0 0;
 border:1px solid #cfdae6;background:#f4f6f8;color:#244875;font-weight:650;padding:8px 15px}
body.qt-desktop-mode .qt-settings-printer-tabs button[aria-selected=true]{background:#2196f3;color:#fff;border-color:#2196f3}
body.qt-desktop-mode .qt-settings-printer-panel{grid-column:1/-1;min-width:0}
body.qt-desktop-mode .qt-settings-printer-panel[hidden]{display:none!important}
body.qt-desktop-mode .qt-settings-printer-tabs button:focus-visible{outline:3px solid #1d7dc1;outline-offset:2px}
body.qt-desktop-mode .qt-settings-print-preview{grid-column:1/-1;min-width:0;padding:16px;
 border:1px solid #aec8dd;border-radius:9px;background:#f3f8fc;direction:rtl}
body.qt-desktop-mode .qt-settings-print-preview-heading{display:flex;align-items:center;justify-content:space-between;
 gap:12px;flex-wrap:wrap;margin:0 0 13px;font-size:13px}
body.qt-desktop-mode .qt-settings-print-preview-heading small{color:#5e778d;font-size:11px}
body.qt-desktop-mode .qt-settings-print-preview-paper{background:#fff;color:#172a3e;direction:rtl;
 padding:16px;margin:auto;max-height:520px;overflow:auto;border:1px solid #d2dae1;
 box-shadow:0 2px 12px #18324a16;font:12px Arial,Tahoma,sans-serif;line-height:1.7}
body.qt-desktop-mode .qt-settings-sample-a4{width:min(570px,100%);min-height:280px}
body.qt-desktop-mode .qt-settings-sample-thermal{width:min(310px,100%);min-height:240px}
body.qt-desktop-mode .qt-settings-print-sample-head{display:flex;align-items:center;
 justify-content:center;gap:5px;flex-direction:column;white-space:pre-line;text-align:center}
body.qt-desktop-mode .qt-settings-print-preview-logo{max-width:100px;max-height:72px;object-fit:contain}
body.qt-desktop-mode .qt-settings-example-row{display:flex;justify-content:space-between;align-items:baseline;
 gap:10px;border-bottom:1px dashed #d3d3d3;padding:3px 0;font-size:11px}
body.qt-desktop-mode .qt-settings-print-preview-paper h3{text-align:center;margin:9px auto;font-size:16px}
body.qt-desktop-mode .qt-settings-preview-table{border-collapse:collapse;width:100%;margin:12px 0}
body.qt-desktop-mode .qt-settings-preview-table :is(td,th){padding:4px;border:1px solid #ddd;text-align:right;font-size:11px}
body.qt-desktop-mode .qt-settings-print-preview-paper footer{text-align:center;white-space:pre-wrap;border-top:1px solid #eee;padding:10px 0}
body.qt-desktop-mode .qt-settings-print-preview-notice{color:#88651b;display:block;font-size:10px;margin-top:10px}

/* Native GeneralSettings: print switches mirror the Printing tab, not a second DB value. */
body.qt-desktop-mode .qt-settings-general-printing{grid-column:1/-1;min-width:0}
body.qt-desktop-mode .qt-settings-general-print-switch{display:flex;gap:12px;align-items:center;
 justify-content:space-between;border-bottom:1px solid #e0e8f0;padding:8px 4px}
body.qt-desktop-mode .qt-settings-general-print-switch input[type=checkbox]{width:18px;height:18px;cursor:pointer}
body.qt-desktop-mode .qt-settings-general-print-switch:last-of-type{border-bottom:0}

/* CustomersWindow accessible Qt details and inline category dialog */
.qt-customer-category-input{display:block;width:min(100%,560px);box-sizing:border-box;
 min-height:38px;margin:8px 0 10px;padding:8px 11px;border:1px solid #aabed4;
 border-radius:6px;background:#fff;color:#25394d;font:inherit;direction:rtl}
.qt-customer-category-input:focus-visible,.qt-customer-category-list:focus-visible{
 outline:2px solid #2563eb;outline-offset:2px}
.qt-customer-edit-tabs .qt-customer-edit-tab:focus-visible{
 outline:3px solid #2563eb;outline-offset:-3px;position:relative;z-index:1}
.qt-customer-edit-tab[aria-selected="true"]{font-weight:800}
.qt-customer-edit-panel[role="tabpanel"]{min-width:0}
.qt-customer-manager-dialog [role="status"]{white-space:pre-wrap;overflow-wrap:anywhere}
.qt-customer-manager-dialog :is(.qt-customer-category-input,.qt-customer-category-list){
 color-scheme:light}
.qt-customer-column-choices+ .qt-native-form-note{min-height:14px}
.qt-customer-columns-dialog .qt-customer-manager-actions{display:flex;flex-wrap:wrap;gap:7px}
.qt-customer-sessions-result,.qt-customer-financial-result,.qt-customer-cash-history-table{
 min-width:0;max-width:100%;overflow-x:auto}
@media(max-width:600px){
 .qt-customer-manager-dialog{max-height:calc(100dvh - 12px);padding:10px}
 .qt-customer-manager-dialog .qt-customer-manager-actions{gap:6px}
 .qt-customer-category-input{width:100%}
 .qt-customer-edit-tabs .qt-customer-edit-tab{min-height:42px}
}

/* SalesWindowUIMixin source: 13-column native register, separate sales return editor. */
body.qt-desktop-mode .qt-sales-window{direction:rtl;min-width:0;background:#fff}
body.qt-desktop-mode .qt-sales-window .qt-invoice-workarea{min-height:0;min-width:0}
body.qt-desktop-mode .qt-sales-window .qt-invoice-register .table-scroll{max-width:100%;overflow:auto}
body.qt-desktop-mode .qt-sales-window .qt-invoice-register table{min-width:1240px;table-layout:auto}
body.qt-desktop-mode .qt-sales-window .qt-invoice-register thead th{
 min-height:44px;vertical-align:middle;text-align:center;white-space:nowrap}
body.qt-desktop-mode .qt-sales-window .qt-invoice-register tbody td{
 height:44px;padding:5px 8px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}
body.qt-desktop-mode .qt-sales-window .qt-invoice-register tbody tr:focus-visible{
 outline:2px solid #175ea8;outline-offset:-2px}
body.qt-desktop-mode .qt-sales-window :is(.qt-sales-data-scope,.qt-invoice-filters){min-width:0;flex-wrap:wrap}
body.qt-desktop-mode .qt-sales-window .qt-sales-scope-status{overflow-wrap:anywhere}
body.qt-desktop-mode .qt-sales-return-native-dialog .qt-sales-return-selection-status{
 display:block;color:#244875;padding:8px 10px;background:#eef5fb;border:1px solid #bfd4e8;
 border-radius:5px;font-size:12px;line-height:1.7}
body.qt-desktop-mode .qt-sales-return-native-dialog .qt-sales-return-linked-table th{
 position:sticky;top:0;z-index:1;white-space:nowrap}
body.qt-desktop-mode .qt-sales-return-native-dialog .qt-sales-return-linked-row input[type=number]{
 min-width:88px;width:110px;text-align:center}
@media(max-width:800px){
 body.qt-desktop-mode .qt-sales-window .qt-invoice-register table{min-width:1180px}
 body.qt-desktop-mode .qt-sales-window .qt-invoice-toolbar{flex-wrap:wrap}
}
/* SettingsWindow: bounded, accessible review of 100+ pending native print settings. */
.qt-settings-import-review{position:fixed;inset:0;margin:auto;box-sizing:border-box;
 width:min(900px,calc(100vw - 24px));max-width:900px;max-height:88dvh;
 padding:0;border:1px solid #9cb7cf;border-radius:9px;
 color:#18334b;background:#fff;box-shadow:0 16px 50px #0d2e4855;
 direction:rtl;text-align:right;overflow:hidden}
.qt-settings-import-review::backdrop{background:rgba(12,27,43,.52)}
.qt-settings-import-review-content{display:flex;flex-direction:column;gap:10px;
 max-height:88dvh;padding:16px;box-sizing:border-box;min-height:0}
.qt-settings-import-review-content>h3{margin:0;color:#244875;font-size:1.12rem}
.qt-settings-import-review-content>p{margin:0;line-height:1.65;color:#345269}
.qt-settings-import-diffs{min-height:0;overflow:auto;overscroll-behavior:contain;
 border:1px solid #d7e4ef;border-radius:6px;background:#f7fafc}
.qt-settings-import-diff-section{margin:8px;padding:8px;background:#fff;
 border:1px solid #dce6f0;border-radius:6px}
.qt-settings-import-diff-section h4{margin:0 0 8px;padding:0 0 7px;
 border-bottom:1px solid #e6edf4;color:#244875}
.qt-settings-import-diff-row{display:grid;grid-template-columns:minmax(120px,1fr) 1fr 1fr;
 gap:8px;padding:7px 4px;border-bottom:1px solid #ecf1f6;align-items:start}
.qt-settings-import-diff-row:last-child{border-bottom:0}
.qt-settings-import-diff-row>strong{color:#203f5d}
.qt-settings-import-diff-row>span{overflow-wrap:anywhere;unicode-bidi:plaintext}
.qt-settings-import-diff-row>span:last-child{color:#08714b}
.qt-settings-import-review .qt-settings-actions{display:flex;justify-content:flex-end;
 flex-wrap:wrap;gap:8px;flex-shrink:0;padding-top:10px;border-top:1px solid #d7e4ef}
.qt-settings-import-review button:focus-visible{outline:3px solid #1b75d0;outline-offset:2px}
@media(max-width:650px){
 .qt-settings-import-review{max-height:94dvh}
 .qt-settings-import-review-content{padding:12px;max-height:94dvh}
 .qt-settings-import-diff-row{grid-template-columns:1fr;gap:3px}
 .qt-settings-import-review .qt-settings-actions button{width:100%}
}

/* Original Qt CustomerDialog: phone and calling code share the same form cell. */
.qt-customer-phone-inputs{
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(145px,215px);
 gap:6px;
 align-items:center;
 width:100%;
 min-width:0;
 direction:rtl;
}
.qt-customer-phone-inputs > input,
.qt-customer-phone-inputs > select{min-width:0;width:100%;box-sizing:border-box;}
.qt-customer-opening-direction{
 display:inline-flex;align-items:center;min-height:32px;
 color:#244875;font-weight:700;white-space:nowrap;
 padding-inline:8px;
}
@media (max-width:600px){
 .qt-customer-phone-inputs{grid-template-columns:minmax(0,1fr);}
 .qt-customer-opening-direction{white-space:normal;}
}

/* Original SalesReturnDialog source-number bar, responsive desktop controls. */
body.qt-desktop-mode .qt-sales-source-dialog{
 width:min(940px,calc(100vw - 24px));max-height:90dvh;overflow:auto;direction:rtl}
body.qt-desktop-mode .qt-sales-source-form{
 display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;background:#eef5fc;
 border:1px solid #cbdcf0;border-radius:8px;padding:12px}
body.qt-desktop-mode .qt-sales-source-form label{
 flex:1 1 280px;display:flex;flex-direction:column;gap:8px;font-weight:700}
body.qt-desktop-mode .qt-sales-source-form input{
 min-height:38px;max-width:280px;min-width:140px}
body.qt-desktop-mode .qt-sales-source-form button{min-height:40px}
body.qt-desktop-mode .qt-sales-source-note{overflow-wrap:anywhere;color:#244875}
body.qt-desktop-mode .qt-sales-source-results{display:grid;gap:8px}
body.qt-desktop-mode .qt-sales-source-candidate{
 display:flex;align-items:center;flex-wrap:wrap;gap:12px;
 border:1px solid #cbdcf0;border-radius:8px;padding:9px;background:#fff}
body.qt-desktop-mode .qt-sales-source-candidate span{margin-inline-end:auto}
body.qt-desktop-mode .qt-sales-return-history-dialog{
 width:min(1180px,calc(100vw - 24px));max-height:90dvh;overflow:auto;direction:rtl}
body.qt-desktop-mode .qt-sales-return-history-lines{max-height:52dvh;margin-top:10px;overflow:auto}
body.qt-desktop-mode .qt-sales-return-history-lines table{min-width:970px}
body.qt-desktop-mode .qt-sales-return-history-lines th{
 position:sticky;top:0;z-index:1;white-space:nowrap;background:#edf3fa}
@media(max-width:600px){
 body.qt-desktop-mode .qt-sales-source-dialog{padding:10px}
 body.qt-desktop-mode .qt-sales-source-form{align-items:stretch}
 body.qt-desktop-mode .qt-sales-source-form input{max-width:100%}
}

/* CustomersWindow Qt receipt summary and readonly double-click receipt detail. */
.qt-customer-receipt-stats{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:10px;margin-block:10px;
}
.qt-customer-receipt-stat{
 display:flex;flex-direction:column;gap:6px;padding:12px;
 border:2px solid #244875;border-radius:6px;background:#fff;color:#244875;
}
.qt-customer-receipt-stat:nth-child(2){border-color:#34c759;}
.qt-customer-receipt-stat strong{font-size:1.2em;overflow-wrap:anywhere;}
.qt-customer-cash-history-table tbody tr{cursor:pointer;}
.qt-customer-cash-history-table tbody tr:is(:focus-visible,:hover){
 outline:2px solid #0071e3;outline-offset:-2px;background:#ebf3ff;
}
.qt-customer-receipt-details{
 width:min(620px,calc(100vw - 28px));max-width:calc(100vw - 28px);
 max-height:90dvh;overflow:auto;border:1px solid #c8d9ea;border-radius:8px;
 background:white;color:#244875;padding:20px;box-shadow:0 15px 50px #19324c4d;
}
.qt-customer-receipt-details::backdrop{background:#0d22398c;}
.qt-customer-receipt-details h3{margin:0 0 14px;color:#244875;}
.qt-customer-receipt-details-grid{
 display:grid;grid-template-columns:minmax(140px,36%) minmax(0,1fr);
 border:1px solid #dce5f0;border-radius:6px;overflow:hidden;margin:0 0 16px;
}
.qt-customer-receipt-details-grid>:is(dt,dd){
 margin:0;padding:9px 12px;min-width:0;overflow-wrap:anywhere;
 border-bottom:1px solid #e1e8f1;
}
.qt-customer-receipt-details-grid dt{font-weight:700;background:#f5f8fd;}
.qt-customer-receipt-details-grid dd{background:white;}
@media(max-width:600px){
 .qt-customer-receipt-stats{grid-template-columns:1fr;}
 .qt-customer-receipt-details-grid{grid-template-columns:minmax(100px,42%) minmax(0,1fr);}
 .qt-customer-receipt-details{padding:12px;}
}
/* Original Qt SettingsWindow QGroupBox layout: visible section boundaries and
   full-width groups with two-column fields for the A4/thermal/program tabs. */
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-fields,
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-fields,
body.qt-desktop-mode #qt-settings-page-program .qt-settings-fields{
 display:flex;flex-direction:column;gap:14px;align-items:stretch;
}
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-group,
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group,
body.qt-desktop-mode #qt-settings-page-program .qt-settings-group{
 box-sizing:border-box;width:100%;min-width:0;flex:0 0 auto;align-content:start;
}
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-group legend,
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group legend,
body.qt-desktop-mode #qt-settings-page-program .qt-settings-group legend{
 color:#244875;font-weight:700;padding-inline:9px;white-space:normal;
}
@media(max-width:680px){
 body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-group,
 body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group,
 body.qt-desktop-mode #qt-settings-page-program .qt-settings-group{
  grid-template-columns:minmax(0,1fr);
 }
}

/* Original SettingsWindow: Qt logo preview, editable multiline receipt, color
   swatches, dark toggle and read-only cloud database context. */
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-widget{
 grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;
 gap:9px;min-width:0;text-align:center
}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-preview{
 width:100px;height:100px;max-width:100px;max-height:100px;object-fit:contain;
 border:1px solid #b8ccdf;background:#fff
}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-actions{
 display:flex;flex-wrap:wrap;gap:9px;align-items:center;justify-content:center
}
body.qt-desktop-mode #qt-settings-page-general [name=receipt_footer]{
 min-height:65px;resize:vertical;white-space:pre-wrap
}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-placeholder{
 min-height:100px;min-width:100px;box-sizing:border-box;display:flex;align-items:center;
 justify-content:center;border:1px dashed #c3d1de;padding:10px
}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-placeholder[hidden]{display:none}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-file{display:none}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-swatch{
 box-sizing:border-box;width:46px;min-width:46px;height:35px;padding:2px;
 border:1px solid #a7bfd5;border-radius:5px;cursor:pointer
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-dark-toggle{
 width:22px;height:22px;min-width:22px;accent-color:#244875;cursor:pointer
}
body.qt-desktop-mode #qt-settings-page-appearance [name=theme_mode][hidden]{display:none}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-preview-group{
 grid-column:1/-1;min-width:0;max-width:100%;box-sizing:border-box;
 display:flex;flex-direction:column;padding:12px
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-theme-preview{
 width:100%;min-height:155px;box-sizing:border-box;display:flex;
 flex-direction:column;align-items:start;justify-content:center;
 gap:9px;padding:14px;border:1px solid #b8ccdf
}
body.qt-desktop-mode #qt-settings-page-system .qt-settings-db-context{
 grid-column:1/-1;max-width:100%;min-width:0;box-sizing:border-box
}
body.qt-desktop-mode #qt-settings-page-system .qt-settings-db-context input[readonly]{
 background:#f4f6f9;color:#45596b;cursor:default
}
body.qt-desktop-mode .qt-settings-pending:not(:empty){font-weight:700;color:#9a5b06}
@media(max-width:680px){
 body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-swatch{width:40px;min-width:40px}
 body.qt-desktop-mode #qt-settings-page-system .qt-settings-db-context{grid-template-columns:minmax(0,1fr)}
 body.qt-desktop-mode #qt-settings-page-general .qt-settings-logo-actions .button{min-width:90px}
}

/* Native SalesSearchDialog keeps the original four columns. */
body.qt-desktop-mode .qt-sales-advanced-table tr[aria-selected="true"]{
 background:#e7f1fb;outline:2px solid #2b679c;outline-offset:-2px
}
body.qt-desktop-mode .qt-sales-advanced-table tbody tr{cursor:pointer}
body.qt-desktop-mode .qt-sales-advanced-table tbody tr:focus-visible{
 outline:2px solid #1f609c;outline-offset:-2px
}
body.qt-desktop-mode .qt-sales-advanced-search-dialog button:disabled{
 opacity:.55;cursor:not-allowed
}

/* Original CustomersWindow Qt six-column account ledger: keyboard/row details. */
.qt-customer-manager-ledger tbody tr[tabindex="0"]{cursor:pointer}
.qt-customer-manager-ledger tbody tr[tabindex="0"]:is(:focus-visible,:hover){
 outline:2px solid #0071e3;outline-offset:-2px;background:#eaf3ff
}
.qt-customer-ledger-event-dialog{
 direction:rtl;width:min(620px,calc(100vw - 28px));
 max-width:calc(100vw - 28px);max-height:90dvh;overflow:auto;
 padding:20px;border:1px solid #b8cde2;border-radius:8px;
 background:white;color:#244875;box-shadow:0 15px 45px #0f2b4c55
}
.qt-customer-ledger-event-dialog::backdrop{background:#101e3599}
.qt-customer-ledger-event-dialog h3{margin:0 0 14px;font-size:18px;color:#244875}
.qt-customer-ledger-event-details{
 display:grid;grid-template-columns:minmax(145px,38%) minmax(0,1fr);
 margin:0 0 14px;border:1px solid #dce5f1;border-radius:6px;overflow:hidden
}
.qt-customer-ledger-event-details>:is(dt,dd){
 margin:0;padding:9px 11px;border-bottom:1px solid #dce5f1;
 min-width:0;overflow-wrap:anywhere
}
.qt-customer-ledger-event-details dt{font-weight:700;background:#f1f6fc}
.qt-customer-ledger-event-details dd{background:#fff}
@media(max-width:600px){
 .qt-customer-ledger-event-dialog{padding:12px}
 .qt-customer-ledger-event-details{grid-template-columns:minmax(110px,40%) minmax(0,1fr)}
}

/* Offline CustomerDialog subscriptions QGroupBox, without fabricating legacy usage. */
.qt-customer-sessions-data .qt-customer-subscription-group{
 border:2px solid #0071e3;border-radius:6px;padding:10px 14px;
 margin:10px 0 14px;direction:rtl;background:#fff
}
.qt-customer-sessions-data .qt-customer-subscription-group h4{
 color:#244875;font-weight:800;margin:0 0 8px;font-size:15px
}
.qt-customer-sessions-data .qt-customer-subscription-group p{
 color:#495d75;line-height:1.7;margin:0
}

/* CustomerDialog original Qt POS groups + historical-area reconciliation. */
.qt-customer-edit-panel[data-customer-panel="pos"] .qt-customer-pos-group{
 border:2px solid #0071e3;border-radius:5px;min-width:0;
}
.qt-customer-edit-panel[data-customer-panel="pos"] .qt-customer-pos-group:has(.qt-customer-pos-address-row){
 border-color:#34c759;
}
.qt-customer-edit-panel[data-customer-panel="pos"] [data-qt-pos-attention="missing-area"]{
 border-inline-start:4px solid #ae6b00;padding:9px 12px;
 background:#fff6e7;color:#704500;line-height:1.65;font-weight:650;
}
.qt-customer-edit-panel[data-customer-panel="pos"] .qt-customer-pos-field select option:disabled{
 color:#8c5c29;background:#fff0dd;
}
.qt-customer-edit-panel[data-customer-panel="pos"] .qt-customer-pos-field input[readonly]{
 background:#f9f9f9;
}
@media(max-width:640px){
 .qt-customer-edit-panel[data-customer-panel="pos"] .qt-customer-pos-group{padding:10px}
}

/* Native SalesWindow._on_preview_return: red header, white details, balanced actions. */
body.qt-desktop-mode .qt-sales-return-history-dialog>h2{
 background:#ff3b30;color:#fff;border-bottom:4px solid #a93226;
 padding:20px 24px;min-height:72px;display:flex;align-items:center;
 margin:-16px -16px 14px;font-size:22px;font-weight:800
}
body.qt-desktop-mode .qt-sales-return-history-dialog .qt-sales-return-history-body{
 background:#fff;color:#244875;min-width:0
}
body.qt-desktop-mode .qt-sales-return-history-dialog .dialog-actions{
 display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap
}
body.qt-desktop-mode .qt-sales-return-history-dialog .dialog-actions button:disabled{
 opacity:.55;cursor:not-allowed
}
@media(max-width:650px){
 body.qt-desktop-mode .qt-sales-return-history-dialog>h2{
  min-height:56px;padding:12px;font-size:18px
 }
 body.qt-desktop-mode .qt-sales-return-history-dialog .dialog-actions button{
  flex:1 1 42%;min-width:115px
 }
}

/* SettingsWindow original Qt print preview: seven selectable A4 columns,
   separate safe ZATCA placeholders and native thermal/POS option badges. */
body.qt-desktop-mode .qt-settings-print-preview-paper.qt-settings-sample-a4{
 width:min(700px,100%);max-width:100%;box-sizing:border-box
}
body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-table{
 table-layout:auto;max-width:100%;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-table th{
 font-weight:700;white-space:normal
}
body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-printer-notice{
 display:block;margin:12px 0 3px;padding:8px 10px;border-top:1px dashed #b6c9d9;
 background:#f3f7fb;color:#475e72;font-size:10px;line-height:1.8
}
body.qt-desktop-mode .qt-settings-print-preview-paper :is(
 .qt-settings-preview-contract,.qt-settings-preview-customer,
 .qt-settings-preview-payments,.qt-settings-preview-table-info){
 display:block;white-space:pre-line;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-drawing{
 display:block;margin:8px 0;padding:9px;border:1px dashed #a0b5c8;
 text-align:center;min-height:36px
}
body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-divider{
 border:0;border-top:1px dashed #9d9d9d;margin:7px 0
}
@media(max-width:660px){
 body.qt-desktop-mode .qt-settings-print-preview-paper.qt-settings-sample-a4{
  width:100%;padding:9px
 }
 body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-table{
  font-size:10px
 }
 body.qt-desktop-mode .qt-settings-print-preview-paper .qt-settings-preview-table :is(td,th){
  padding:3px 2px
 }
}

/* Original SalesSearchDialog Qt 900x600: localized amount fields and keyboard parity (2026-11-17). */
body.qt-desktop-mode .qt-sales-advanced-search-dialog{
 box-sizing:border-box;width:min(900px,calc(100vw - 28px));
 max-width:900px;max-height:92dvh;overflow:auto;
 background:#f9f9f9;color:#244875;direction:rtl
}
body.qt-desktop-mode .qt-sales-advanced-layout{min-width:0}
body.qt-desktop-mode .qt-sales-advanced-criteria,
body.qt-desktop-mode .qt-sales-advanced-results{min-width:0}
body.qt-desktop-mode .qt-sales-advanced-criteria{
 border:2px solid #a1a1a6;border-radius:6px
}
body.qt-desktop-mode .qt-sales-advanced-field input[data-sales-search-field="amount_min"],
body.qt-desktop-mode .qt-sales-advanced-field input[data-sales-search-field="amount_max"]{
 text-align:left;direction:ltr;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode .qt-sales-advanced-field input:focus-visible{
 outline:2px solid #0071e3;outline-offset:0;border-color:#0071e3
}
body.qt-desktop-mode .qt-sales-advanced-table{
 font-variant-numeric:tabular-nums;table-layout:auto
}
body.qt-desktop-mode .qt-sales-advanced-table th{
 background:#244875;color:#fff;font-weight:700
}
body.qt-desktop-mode .qt-sales-advanced-table th:nth-child(1){
 min-width:96px
}
body.qt-desktop-mode .qt-sales-advanced-table tbody tr[tabindex="0"]{
 cursor:pointer
}
body.qt-desktop-mode .qt-sales-advanced-table tbody tr:focus-visible{
 outline:3px solid #0071e3;outline-offset:-3px
}
body.qt-desktop-mode .qt-sales-advanced-status,
body.qt-desktop-mode .qt-sales-advanced-pager{
 overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-advanced-search-dialog .qt-sales-reference-actions{
 display:flex;align-items:center;justify-content:flex-end;
 gap:8px;flex-wrap:wrap
}
body.qt-desktop-mode .qt-sales-settings-dialog button:disabled{
 opacity:.55;cursor:not-allowed
}
@media(max-width:750px){
 body.qt-desktop-mode .qt-sales-advanced-search-dialog{
  width:calc(100vw - 16px);padding:12px;max-height:96dvh
 }
 body.qt-desktop-mode .qt-sales-advanced-layout{
  grid-template-columns:minmax(0,1fr);gap:10px
 }
 body.qt-desktop-mode .qt-sales-advanced-table-scroll{
  max-width:100%;overflow-x:auto
 }
 body.qt-desktop-mode .qt-sales-advanced-search-dialog .qt-sales-reference-actions button{
  flex:1 1 145px
 }
}
@media(prefers-reduced-motion:reduce){
 body.qt-desktop-mode .qt-sales-advanced-table tr{scroll-behavior:auto}
}

/* Qt SalesReportsWindow source parity: verified-only report table and nested print dialog, batch 10. */
body.qt-desktop-mode .qt-sales-reports-dialog{
 width:min(1180px,calc(100vw - 24px));max-height:93dvh;min-width:0;
 padding:12px 14px;overflow:auto;direction:rtl;background:#fff
}
body.qt-desktop-mode .qt-sales-reports-dialog h2{
 color:#244875;font-size:20px;font-weight:800;line-height:1.4
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-filters{
 border:2px solid #d1d1d6;border-radius:8px;gap:12px;
 padding:16px;box-sizing:border-box
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-field{
 min-width:0;max-width:100%;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-field input,
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-field select{
 min-width:0;max-width:100%;box-sizing:border-box
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-field :is(input,select):focus-visible{
 outline:3px solid #0071e3;outline-offset:1px
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-scroll{
 min-width:0;max-width:100%;max-height:55dvh;overflow:auto;
 border:1px solid #d8e1eb;border-radius:5px
}
body.qt-desktop-mode .qt-sales-report-table{font-variant-numeric:tabular-nums}
body.qt-desktop-mode .qt-sales-report-table tbody tr[tabindex="0"]{cursor:pointer}
body.qt-desktop-mode .qt-sales-report-table tbody tr[aria-selected="true"] td{
 background:#e3efff
}
body.qt-desktop-mode .qt-sales-report-table tbody tr:focus-visible{
 outline:3px solid #0071e3;outline-offset:-3px
}
body.qt-desktop-mode .qt-sales-report-pager{
 min-width:0;justify-content:space-between;gap:10px
}
body.qt-desktop-mode .qt-sales-report-pager span{
 min-width:0;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-report-metric strong{
 font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-status{
 overflow-wrap:anywhere;line-height:1.7
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-reference-actions{
 display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px
}
body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-reference-actions button:focus-visible{
 outline:3px solid #0071e3;outline-offset:2px
}
body.qt-desktop-mode .qt-sales-reports-dialog button:disabled{
 opacity:.63;cursor:not-allowed
}
@media(max-width:750px){
 body.qt-desktop-mode .qt-sales-reports-dialog{
  width:calc(100vw - 12px);max-height:96dvh;padding:10px
 }
 body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-filters{
  padding:10px;gap:9px
 }
 body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-report-scroll{
  max-height:41dvh
 }
 body.qt-desktop-mode .qt-sales-reports-dialog .qt-sales-reference-actions button{
  flex:1 1 130px;min-height:40px
 }
}
@media print{
 body.qt-sales-report-print-mode .qt-sales-report-print-actions{display:none!important}
 body.qt-sales-report-print-mode .qt-sales-report-print-sheet{
  overflow:visible!important;box-shadow:none!important;border:none!important
 }
 body.qt-sales-report-print-mode .qt-sales-report-print-sheet table{
  border-collapse:collapse;break-inside:auto
 }
 body.qt-sales-report-print-mode .qt-sales-report-print-sheet table tr{
  break-inside:avoid
 }
}


/* SettingsWindow native edit-state parity. Changes stay local until RPC save. */
body.qt-desktop-mode .qt-settings-group .qt-settings-field-dirty{
 border-inline-start:3px solid #2474a4;
 border-radius:4px;
 padding-inline-start:8px;
 background:rgba(36,116,164,.065);
}
body.qt-desktop-mode.qt-business-theme .qt-settings-group .qt-settings-field-dirty{
 border-inline-start-color:var(--qt-live-accent,#2474a4);
}
body.qt-desktop-mode .qt-settings-tabs>.button[data-qt-dirty-count]:not([data-qt-dirty-count="0"])::after{
 content:attr(data-qt-dirty-count);
 display:inline-block;
 min-width:1.2em;
 margin-inline-start:6px;
 padding:1px 5px;
 border-radius:999px;
 background:#f2dba9;
 color:#6e4906;
 font-size:11px;
 line-height:1.3;
 font-variant-numeric:tabular-nums;
}
body.qt-desktop-mode .qt-settings-field-dirty:focus-within{
 outline:2px solid #2474a4;
 outline-offset:1px;
}


/* 2026-11-18 — WarehousesWindow geometry from the supplied Windows/Qt source.
   The only native primary tabs are warehouse master and movements. */
.qt-native-warehouses .qt-native-command-row{
 display:flex;flex-wrap:wrap;gap:8px;align-items:center;direction:rtl
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action{
 min-width:96px;min-height:38px;padding:6px 14px;border-radius:4px;
 font-family:Tahoma,Arial,sans-serif;font-weight:700;font-size:13px;
 background:#244875;border:1px solid #244875;color:#fff
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action:hover:not(:disabled){
 background:#1a3558;border-color:#1a3558
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action:active:not(:disabled){
 background:#102844
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action.danger{
 background:#b42318;border-color:#b42318;color:#fff
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action.danger:hover:not(:disabled){
 background:#9f1f16;border-color:#9f1f16
}
.qt-native-warehouses .qt-native-command-row>.qt-native-action:disabled{
 background:#eef2f6;color:#8a98aa;border-color:#dce5ee
}
.qt-native-warehouses .qt-native-table-scroll{
 width:100%;overflow:auto;border:1px solid #b8ccdf;
 background:#fff;min-height:180px
}
.qt-native-warehouses .qt-native-table{
 width:100%;min-width:650px;border-collapse:collapse;
 direction:rtl;background:#fff;color:#244875;table-layout:fixed
}
.qt-native-warehouses .qt-native-table th{
 background:#244875;color:#fff;text-align:right;padding:7px 8px;
 font-weight:700;font-family:Tahoma,Arial,sans-serif;
 border-inline-start:1px solid #1a3558
}
.qt-native-warehouses .qt-native-table td{
 min-height:34px;box-sizing:border-box;padding:6px 8px;
 border:1px solid #b8ccdf;white-space:nowrap;overflow:hidden;
 text-overflow:ellipsis;text-align:right
}
.qt-native-warehouses .qt-native-table tbody tr:nth-child(even){background:#f6f9fc}
.qt-native-warehouses .qt-native-table tbody tr:hover{background:#edf4fa}
.qt-native-warehouses .qt-native-table tbody tr.selected,
.qt-native-warehouses .qt-native-table tbody tr[aria-selected=true]{
 background:#e8f0f7;color:#244875
}
.qt-native-warehouses .qt-native-table tbody tr:focus-visible,
.qt-native-warehouses .qt-native-command-row button:focus-visible,
.qt-native-warehouses .qt-native-warehouse-extras summary:focus-visible{
 outline:2px solid #244875;outline-offset:2px
}
.qt-native-warehouses .qt-native-table [data-field=id]{width:70px}
.qt-native-warehouses .qt-native-table [data-field=is_active]{width:115px}
.qt-native-warehouses .qt-native-table [data-field=name],
.qt-native-warehouses .qt-native-table [data-field=location],
.qt-native-warehouses .qt-native-table [data-field=manager_name]{width:auto}
.qt-native-warehouses .qt-native-warehouse-state-label{
 display:inline-block;font-weight:700;white-space:nowrap
}
.qt-native-warehouses .qt-native-warehouse-state-label.inactive{color:#a62521}
.qt-native-warehouses .qt-native-warehouse-state-label.active{color:#225c3a}
.qt-native-warehouses .qt-native-warehouse-info{
 direction:rtl;display:flex;align-items:center;min-height:40px;
 padding:8px 10px;margin:0;border-radius:4px;background:#e8f0f7;
 color:#244875;font:normal 14px Tahoma,Arial,sans-serif;white-space:normal;
 overflow-wrap:anywhere
}
.qt-native-warehouses .qt-native-warehouse-info[hidden]{display:none!important}
.qt-native-warehouses .qt-native-warehouse-extras{
 position:relative;display:inline-flex;align-items:center
}
.qt-native-warehouses .qt-native-warehouse-extras>summary{
 list-style:none;min-height:38px;box-sizing:border-box;padding:8px 12px;
 border:1px solid #b8ccdf;border-radius:4px;background:#e8f0f7;
 color:#244875;cursor:pointer;font:700 12px Tahoma,Arial,sans-serif
}
.qt-native-warehouses .qt-native-warehouse-extras>summary::-webkit-details-marker{display:none}
.qt-native-warehouses .qt-native-warehouse-extras-actions{
 position:absolute;top:100%;right:0;z-index:12;min-width:220px;
 display:flex;flex-direction:column;gap:6px;padding:10px;
 border:1px solid #b8ccdf;border-radius:6px;background:#fff;
 box-shadow:0 8px 24px rgba(25,50,76,.17)
}
.qt-native-warehouses .qt-native-warehouse-extras:not([open]) .qt-native-warehouse-extras-actions{display:none}
.qt-native-warehouses .qt-native-warehouse-extras-actions button{
 text-align:right;white-space:nowrap;min-height:34px
}
.qt-native-warehouses .qt-native-warehouse-movement-advanced{
 width:100%;border-top:1px solid #d7e4ef;padding-top:8px;box-sizing:border-box
}
.qt-native-warehouses .qt-native-warehouse-movement-advanced summary{
 cursor:pointer;font-weight:700;color:#244875
}
.qt-native-warehouses .qt-native-warehouse-movement-extra-filters{
 display:flex;gap:8px;align-items:end;flex-wrap:wrap;padding:10px 0
}
@media(max-width:650px){
 .qt-native-warehouses .qt-native-command-row>.qt-native-action{
  min-width:105px;flex:1 1 auto;font-size:12px
 }
 .qt-native-warehouses .qt-native-warehouse-extras{flex:1 1 auto}
 .qt-native-warehouses .qt-native-warehouse-extras>summary{text-align:center}
 .qt-native-warehouses .qt-native-warehouse-extras-actions{right:auto;left:0}
 .qt-native-warehouses .qt-native-table{min-width:610px}
}

/* SettingsWindowUiMixin: thermal font-size spinbox and Bold switch share one row. */
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-native-font-row{
 grid-column:1 / -1;
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(80px,145px);
 align-items:center;
 gap:12px;
 border-bottom:1px solid #e2eaf1;
 padding:6px 2px;
 min-width:0;
}
body.qt-desktop-mode .qt-settings-native-font-row>.qt-settings-field{
 min-width:0;
 width:100%;
 margin:0;
}
body.qt-desktop-mode .qt-settings-native-font-row>.qt-settings-font-bold{
 display:flex;
 flex-direction:row-reverse;
 justify-content:flex-end;
 align-items:center;
 gap:8px;
 font-weight:600;
 white-space:nowrap;
}
body.qt-desktop-mode .qt-settings-native-font-row>.qt-settings-font-bold input{
 width:auto;
 min-width:0;
}
body.qt-desktop-mode #qt-settings-page-system .qt-settings-unit-suffix{
 font-size:12px;
 color:#46637c;
 flex:none;
}
@media(max-width:620px){
 body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-native-font-row{
  grid-template-columns:minmax(0,1fr) 78px;
  gap:6px;
 }
}


/* Warehouse TransferProductsDialog: original five data columns + row selection,
   printed-only line/general notes, truthful decimal draft totals, RTL density. */
.qt-warehouse-transfer-form{
 display:flex;flex-direction:column;gap:14px;direction:rtl;
 font-family:Tahoma,Arial,sans-serif
}
.qt-warehouse-transfer-warehouses,
.qt-warehouse-transfer-general-notes{
 border:1px solid #d1d1d6;border-radius:6px;background:#fff;
 margin:0;min-width:0;padding:12px 15px
}
.qt-warehouse-transfer-warehouses legend,
.qt-warehouse-transfer-general-notes legend{
 color:#244875;font-weight:700;font-size:14px;padding:0 6px
}
.qt-warehouse-transfer-warehouse-fields{
 display:flex;gap:20px;align-items:flex-end;flex-wrap:wrap
}
.qt-warehouse-transfer-warehouse-fields>label{
 display:flex;align-items:center;gap:10px;flex:1 1 260px;color:#244875;
 font-weight:700;font-size:13px;min-width:0
}
.qt-warehouse-transfer-warehouse-fields select{min-height:36px;min-width:160px;max-width:100%;flex:1}
.qt-warehouse-transfer-draft-area{
 display:flex;flex-direction:column;gap:12px;border:1px solid #d1d1d6;
 border-radius:6px;padding:14px;background:#fff;overflow:auto;max-width:100%;
}
.qt-warehouse-transfer-draft-area h3{
 margin:0;color:#218b49;font-size:15px;text-align:right
}
.qt-warehouse-transfer-summary{
 display:flex;flex-wrap:wrap;gap:16px;align-items:center;
 min-height:35px;color:#244875;font-size:13px
}
.qt-warehouse-transfer-summary .qt-warehouse-transfer-total-qty{color:#248344}
.qt-warehouse-transfer-table-head,
.qt-warehouse-transfer-row{
 display:grid!important;
 grid-template-columns:minmax(56px,70px) minmax(230px,2fr) minmax(80px,110px)
  minmax(110px,135px) minmax(145px,1.2fr) minmax(90px,110px);
 min-width:880px;gap:8px;align-items:center;
}
.qt-warehouse-transfer-table-head{
 background:#f5f5f5;color:#333;font-size:12px;font-weight:700;
 padding:10px 8px;border-bottom:2px solid #34c759
}
.qt-warehouse-transfer-row{
 border:1px solid #e8e8e8;border-radius:5px;background:#fff;
 padding:8px;box-sizing:border-box;margin-bottom:8px;
}
.qt-warehouse-transfer-row:nth-child(even){background:#f6f9fc}
.qt-warehouse-transfer-row>label{
 display:flex;flex-direction:column;gap:5px;min-width:0;
 font-size:11px;color:#244875
}
.qt-warehouse-transfer-row>label:nth-of-type(1){grid-column:1;grid-row:1}
.qt-warehouse-transfer-row>label:nth-of-type(2){grid-column:2;grid-row:1}
.qt-warehouse-transfer-row>label:nth-of-type(3){grid-column:3;grid-row:1}
.qt-warehouse-transfer-row>label:nth-of-type(4){grid-column:4;grid-row:1}
.qt-warehouse-transfer-row>label:nth-of-type(5){grid-column:5;grid-row:1}
.qt-warehouse-transfer-row>p.hint{grid-column:2 / 6;grid-row:2;margin:0;font-size:11px}
.qt-warehouse-transfer-row>button{grid-column:6;grid-row:1}
.qt-warehouse-transfer-row>label:nth-of-type(1)>input{
 align-self:center;width:18px;height:18px
}
.qt-warehouse-transfer-row input[type=number],
.qt-warehouse-transfer-row input[type=text]{
 width:100%;min-width:0;box-sizing:border-box;min-height:36px;padding:7px
}
.qt-warehouse-transfer-code{
 display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;font-weight:600;min-height:36px;padding:8px;
 background:#f7f9fc;border-radius:4px;direction:ltr;text-align:right
}
.qt-warehouse-transfer-row .qt-stock-product-picker{max-width:100%;min-width:0}
.qt-warehouse-transfer-general-notes textarea{
 box-sizing:border-box;width:100%;min-height:70px;max-height:110px;
 resize:vertical;border-radius:5px;padding:10px
}
.qt-warehouse-transfer-notes-warning{
 margin:0;padding:9px 11px;border-inline-start:4px solid #c98216;
 background:#fff9ed;color:#7b4d09;font-size:12px;line-height:1.8
}
.qt-warehouse-transfer-commands{
 display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-top:5px
}
.qt-warehouse-transfer-commands button{min-height:42px}
.qt-warehouse-transfer-commands button[type=submit]{min-width:150px}
.qt-warehouse-transfer-row :is(button,input,select):focus-visible,
.qt-warehouse-transfer-commands button:focus-visible,
.qt-warehouse-transfer-general-notes textarea:focus-visible{
 outline:2px solid #244875;outline-offset:2px
}
@media(max-width:840px){
 .qt-warehouse-transfer-draft-area{overflow-x:auto}
 .qt-warehouse-transfer-commands button{flex:1 1 130px}
 .qt-warehouse-transfer-warehouse-fields>label{flex-wrap:wrap}
}

/* sales_statistics.py native period, cards and read-only breakdown parity — wave 11 */
body.qt-desktop-mode .qt-sales-stat-dialog{
 width:min(1040px,calc(100vw - 28px));
 max-width:1040px;max-height:94dvh;box-sizing:border-box;
 min-width:0;overflow:auto;direction:rtl
}
body.qt-desktop-mode .qt-sales-stat-dialog h2{
 color:#244875;font-size:20px;font-weight:800;line-height:1.4
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls{
 align-items:end;flex-wrap:wrap;gap:10px;min-width:0
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls label{
 min-width:145px;flex:1 1 145px;color:#244875;
 line-height:1.5
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls label:first-child{
 flex:1.15 1 180px
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls :is(select,input){
 box-sizing:border-box;min-width:0;width:100%;font-size:13px
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls :is(select,input):focus-visible{
 outline:3px solid #0071e3;outline-offset:1px;border-color:#0071e3
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls :is(input,select):disabled{
 opacity:.72;background:#edf1f6;color:#506982;cursor:not-allowed
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls button{
 min-height:38px;min-width:125px
}
body.qt-desktop-mode .qt-sales-stat-dialog button:disabled{
 opacity:.56;cursor:not-allowed
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-note{
 overflow-wrap:anywhere;color:#244875;line-height:1.75
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards{
 grid-template-columns:repeat(3,minmax(0,1fr));gap:10px
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric{
 min-width:0;min-height:78px;padding:12px;
 border:1px solid #c5d8ed;border-radius:7px;
 background:#fff
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric span{
 display:block;color:#244875;font-weight:700
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric strong{
 display:block;margin-top:7px;font-size:19px;
 direction:ltr;unicode-bidi:plaintext;font-variant-numeric:tabular-nums;
 overflow-wrap:anywhere;color:#1b5b92
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric:nth-child(1){
 border-top:3px solid #34c759
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric:nth-child(4){
 border-top:3px solid #ff3b30
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards .qt-invoice-metric:nth-child(5){
 border-top:3px solid #0071e3
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-breakdown{
 overflow:auto;max-width:100%
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-table{
 min-width:460px;table-layout:fixed;font-variant-numeric:tabular-nums
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-table :is(th,td){
 text-align:right;white-space:normal;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-table th{
 position:sticky;top:0;z-index:1
}
body.qt-desktop-mode .qt-sales-stat-dialog>button:last-child{
 min-width:100px;min-height:38px
}
body.qt-desktop-mode .qt-sales-stat-dialog>button:last-child:focus-visible{
 outline:3px solid #0071e3;outline-offset:2px
}
@media(max-width:700px){
 body.qt-desktop-mode .qt-sales-stat-dialog{
  padding:10px;width:calc(100vw - 16px);max-height:96dvh
 }
 body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:8px
 }
 body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls{
  padding:8px
 }
}
@media(max-width:420px){
 body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-cards{
  grid-template-columns:minmax(0,1fr)
 }
 body.qt-desktop-mode .qt-sales-stat-dialog .qt-sales-stat-controls label{
  flex:1 1 100%
 }
}
@media(prefers-reduced-motion:reduce){
 body.qt-desktop-mode .qt-sales-stat-dialog *{
  scroll-behavior:auto
 }
}


/* SettingsWindowUiMixin.init_printer_tab: one visible nested tab at a time.
   Fieldset's author-level grid display otherwise overrides the UA [hidden]. */
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-panel[hidden]{
 display:none!important;
}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-panel:not([hidden]){
 min-width:0;
}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-tabs{
 display:flex;
 flex-wrap:wrap;
 gap:4px;
 grid-column:1/-1;
 border-bottom:1px solid #b8ccdf;
 padding:4px 0 7px;
}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-tabs>[role=tab][aria-selected=true]{
 border-bottom:3px solid #244875;
 background:#fff;
 color:#244875;
 font-weight:700;
}
body.qt-desktop-mode .qt-settings-validation-message:not(:empty){
 color:#a02121;
 font-size:12px;
 font-weight:600;
}
body.qt-desktop-mode .qt-settings-field:has(:invalid):focus-within{
 outline:2px solid #ba3941;
 outline-offset:2px;
}

/* SalesReservationsMixin.on_reservations — dedicated source-matched reservation dialog (wave 12) */
body.qt-desktop-mode .qt-sales-reservations-dialog{
 box-sizing:border-box;width:min(950px,calc(100vw - 28px));
 max-width:950px;max-height:94dvh;min-width:0;
 padding:10px;overflow:auto;background:#fff;color:#244875;
 direction:rtl;text-align:right
}
body.qt-desktop-mode .qt-sales-reservations-dialog h2{
 color:#244875;font-family:Arial,sans-serif;font-size:20px;
 font-weight:800;line-height:1.4;margin:0 0 9px
}
body.qt-desktop-mode .qt-sales-reservations-warning{
 color:#6e4e18;background:#fff9e6;border:1px solid #e5d7af;
 padding:7px 10px;line-height:1.6;font-size:12px;
 margin:0 0 9px;border-radius:5px;overflow-wrap:anywhere
}
body.qt-desktop-mode .qt-sales-reservations-filters{
 display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;
 margin:0 0 8px;padding:0;min-width:0
}
body.qt-desktop-mode .qt-sales-reservations-filters label{
 display:flex;flex-direction:column;gap:4px;font-size:12px;
 font-weight:700;color:#244875;min-width:115px;flex:0 1 155px
}
body.qt-desktop-mode .qt-sales-reservations-filters label:first-child{
 flex:1 1 200px
}
body.qt-desktop-mode .qt-sales-reservations-filters input,
body.qt-desktop-mode .qt-sales-reservations-filters select{
 height:34px;min-width:0;max-width:100%;width:100%;
 box-sizing:border-box;border:1px solid #d1d5db;
 border-radius:5px;background:#fff;color:#244875;
 padding:5px 8px;font-size:13px;font-family:Arial,sans-serif
}
body.qt-desktop-mode .qt-sales-reservations-filters input:focus-visible,
body.qt-desktop-mode .qt-sales-reservations-filters select:focus-visible,
body.qt-desktop-mode .qt-sales-reservations-dialog button:focus-visible{
 outline:3px solid #0071e3;outline-offset:2px
}
body.qt-desktop-mode .qt-sales-reservations-filters button{
 min-height:34px;min-width:135px;white-space:normal
}
body.qt-desktop-mode .qt-sales-reservations-summary{
 border:1px solid #d6deeb;background:#eef3f9;
 border-radius:5px;padding:7px;color:#244875;
 font-size:12px;line-height:1.7;font-weight:700;
 margin:0 0 9px;overflow-wrap:anywhere;
 font-variant-numeric:tabular-nums
}
body.qt-desktop-mode .qt-sales-reservations-scroll{
 min-width:0;max-width:100%;max-height:56dvh;
 border:1px solid #d1d5db;overflow:auto;background:#fff
}
body.qt-desktop-mode .qt-sales-reservations-table{
 border-collapse:collapse;direction:rtl;
 min-width:1150px;width:100%;table-layout:auto;
 font-family:Arial,sans-serif;font-size:11px
}
body.qt-desktop-mode .qt-sales-reservations-table th{
 position:sticky;top:0;z-index:1;
 background:#244875;color:#fff;
 padding:9px 7px;font-weight:700;border:1px solid #244875;
 text-align:center;white-space:nowrap
}
body.qt-desktop-mode .qt-sales-reservations-table td{
 background:#fff;color:#233c57;
 border:1px solid #e5e7eb;padding:9px 7px;
 white-space:nowrap;text-align:center;max-width:210px;
 overflow:hidden;text-overflow:ellipsis;
 font-variant-numeric:tabular-nums
}
body.qt-desktop-mode .qt-sales-reservations-table td:nth-child(4){
 text-align:right;min-width:155px
}
body.qt-desktop-mode .qt-sales-reservations-table tbody tr:nth-child(even) td{
 background:#f9f9f9
}
body.qt-desktop-mode .qt-sales-reservations-table tbody tr[tabindex="0"]{
 cursor:pointer;height:34px
}
body.qt-desktop-mode .qt-sales-reservations-table tbody tr:is(:hover,[aria-selected="true"]) td{
 background:#e8f2ff
}
body.qt-desktop-mode .qt-sales-reservations-table tbody tr:focus-visible{
 outline:3px solid #0071e3;outline-offset:-3px
}
body.qt-desktop-mode .qt-sales-reservations-table tbody td:nth-child(9){
 font-weight:700
}
body.qt-desktop-mode .qt-sales-reservations-actions{
 display:flex;align-items:center;gap:8px;
 flex-wrap:wrap;justify-content:flex-start;margin-top:10px
}
body.qt-desktop-mode .qt-sales-reservations-actions button{
 min-height:34px;min-width:110px;white-space:normal
}
body.qt-desktop-mode .qt-sales-reservations-actions button:last-child{
 margin-inline-start:auto
}
body.qt-desktop-mode .qt-sales-reservations-dialog button:disabled{
 opacity:.55;cursor:not-allowed
}
@media(max-width:780px){
 body.qt-desktop-mode .qt-sales-reservations-dialog{
  width:calc(100vw - 14px);max-height:96dvh;padding:9px
 }
 body.qt-desktop-mode .qt-sales-reservations-filters label{
  flex:1 1 135px
 }
 body.qt-desktop-mode .qt-sales-reservations-filters label:first-child{
  flex:1 1 100%
 }
 body.qt-desktop-mode .qt-sales-reservations-scroll{max-height:49dvh}
}
@media(max-width:480px){
 body.qt-desktop-mode .qt-sales-reservations-filters label{
  flex:1 1 100%
 }
 body.qt-desktop-mode .qt-sales-reservations-actions button{
  flex:1 1 130px
 }
 body.qt-desktop-mode .qt-sales-reservations-actions button:last-child{
  margin-inline-start:0
 }
}

/* Original reserved-invoice payment colors (Qt green/red), read-only rows. */
body.qt-desktop-mode .qt-sales-reservations-table tbody td[data-payment-status="paid"]{
 color:#188442;font-weight:800
}
body.qt-desktop-mode .qt-sales-reservations-table tbody td[data-payment-status="unpaid"]{
 color:#bd2531;font-weight:800
}
body.qt-desktop-mode .qt-sales-reservations-table tbody tr:focus-visible td[data-payment-status]{
 text-decoration:underline;text-underline-offset:2px
}


/* 2026-11-18: PurchasesSearchDialog Qt source-match.
   Source: ERPSYSTEM/modules/purchases/views/search_dialog.py.
   Native 860 x 560, RTL, inline Search/Close, seven equal-stretch columns.
   Scope all overrides to the purchase search overlay: sales and other ERP
   forms, the purchase ledger, return totals and stored data stay untouched. */
body.qt-desktop-mode .qt-purchase-search-backdrop{
 box-sizing:border-box;
 padding:12px;
 overscroll-behavior:contain;
}
body.qt-desktop-mode .qt-purchase-search-backdrop>.qt-purchase-search-dialog{
 width:min(860px,calc(100vw - 24px));
 min-width:0;
 height:min(560px,calc(100dvh - 24px));
 min-height:0;
 max-height:calc(100dvh - 24px);
 box-sizing:border-box;
 padding:12px;
 gap:8px;
 overflow:hidden;
 background:#f6f8fb;
 color:#0b2f66;
 border:1px solid #cfd8e3;
 border-radius:7px;
 direction:rtl;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters{
 display:flex;
 flex-direction:row;
 flex-wrap:nowrap;
 align-items:center;
 gap:8px;
 padding:0;
 margin:0;
 min-width:0;
 min-height:44px;
 background:transparent;
 border:0;
 box-shadow:none;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters>label{
 display:flex;
 flex-direction:row;
 align-items:center;
 gap:8px;
 flex:0 0 auto;
 min-width:0;
 margin:0;
 font:700 12px/1.45 Arial,Tahoma,sans-serif;
 color:#0b2f66;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters>label:first-child{
 flex:1 1 auto;
 min-width:140px;
 max-width:none;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters input[type=search]{
 flex:1 1 auto;
 width:100%;
 min-width:110px;
 max-width:none;
 min-height:34px;
 height:34px;
 box-sizing:border-box;
 padding:4px 8px;
 border:1px solid #cfd8e3;
 border-radius:5px;
 background:#fff;
 color:#0b2f66;
 font:12px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters select{
 flex:0 0 auto;
 width:115px;
 min-width:115px;
 min-height:34px;
 height:34px;
 padding:4px 8px;
 box-sizing:border-box;
 background:#fff;
 border:1px solid #cfd8e3;
 border-radius:5px;
 font:12px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters button{
 flex:0 0 auto;
 min-height:34px;
 height:34px;
 min-width:90px;
 border:0;
 border-radius:5px;
 box-sizing:border-box;
 padding:5px 12px;
 background:#244875;
 color:#fff;
 font:700 12px Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters button:hover:not(:disabled){
 background:#1b3658;
}
body.qt-desktop-mode .qt-purchase-search-dialog :is(button,input,select):focus-visible{
 outline:2px solid #2f80c7;
 outline-offset:2px;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-scroll{
 flex:1 1 auto;
 min-height:95px;
 max-height:none;
 overflow:auto;
 border:1px solid #d8e0ea;
 border-radius:2px;
 background:#fff;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table{
 width:100%;
 min-width:720px;
 table-layout:fixed;
 border-collapse:collapse;
 background:#fff;
 color:#0b2f66;
 font:12px/1.5 Arial,Tahoma,sans-serif;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table caption{
 caption-side:top;
 padding:4px 8px;
 text-align:right;
 color:#5a7797;
 font-size:11px;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table th{
 padding:8px 5px;
 height:35px;
 background:#244875;
 border:1px solid #244875;
 color:#fff;
 text-align:center;
 font-weight:700;
 white-space:nowrap;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table td{
 padding:6px 5px;
 height:34px;
 background:#fff;
 border:1px solid #d8e0ea;
 color:#0b2f66;
 text-align:center;
 vertical-align:middle;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
 font-variant-numeric:tabular-nums;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table tr[data-qt-purchase-search-row]{
 cursor:pointer;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table tr[data-qt-purchase-search-row]:hover td{
 background:#eff6fd;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table tr[aria-selected=true] td{
 background:#dceafa;
 color:#153f70;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table tr[aria-disabled=true]{
 cursor:not-allowed;
 opacity:.64;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table tr[data-qt-purchase-search-row]:focus-visible{
 outline:2px solid #2f80c7;
 outline-offset:-2px;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-status{
 font:12px/1.5 Arial,Tahoma,sans-serif;
 color:#0b2f66;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-pager{
 flex:0 0 auto;
 display:flex;
 align-items:center;
 gap:8px;
 margin:0;
 padding:3px 0;
}
body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-notice{
 flex:0 0 auto;
 margin:0;
 font:11px/1.45 Arial,Tahoma,sans-serif;
 color:#657b92;
}
@media(max-width:760px){
 body.qt-desktop-mode .qt-purchase-search-backdrop>.qt-purchase-search-dialog{
  width:calc(100vw - 14px);
  height:min(560px,calc(100dvh - 12px));
  max-height:calc(100dvh - 12px);
  padding:9px;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters{
  flex-wrap:wrap;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters>label:first-child{
  flex-basis:100%;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters select{
  width:110px;
  min-width:110px;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters button{
  min-width:82px;
 }
}
@media(max-width:480px){
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters>label:first-child{
  flex:1 1 100%;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters>label:nth-child(2){
  flex:1 1 auto;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters input[type=search]{
  min-width:0;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-filters button{
  flex:1 1 0;
 }
 body.qt-desktop-mode .qt-purchase-search-dialog .qt-purchase-search-table{
  min-width:700px;
 }
}


/* 2026-11-18 Warehouse NewWarehouseDialog/EditWarehouseDialog Qt layout.
 * Name/location/manager/notes retain source order; cloud code stays accessible. */
.qt-native-warehouse-dialog{
 box-sizing:border-box;direction:rtl;text-align:right;
 background:#f9f9f9;color:#244875;border-radius:6px;
 width:min(610px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 max-height:90dvh;overflow-y:auto;
 font:normal 14px Tahoma,Arial,sans-serif
}
.qt-native-warehouse-dialog h2{
 color:#244875;font-size:19px;margin:0 0 16px;font-weight:750
}
.qt-native-warehouse-dialog .qt-native-edit-form{
 display:flex;flex-direction:column;gap:12px
}
.qt-native-warehouse-dialog .form-grid{
 display:flex!important;flex-direction:column;gap:12px;
 grid-template-columns:1fr!important
}
.qt-native-warehouse-dialog .qt-native-field{
 display:grid;grid-template-columns:146px minmax(0,1fr);
 align-items:center;gap:10px;min-width:0;margin:0
}
.qt-native-warehouse-dialog .qt-native-field-label{
 display:block;color:#244875;font-weight:700;
 font-size:13px;text-align:right
}
.qt-native-warehouse-dialog :is(input[type=text],textarea){
 box-sizing:border-box;min-width:0;width:100%;
 background:#fff;color:#244875;border:1px solid #ddd;border-radius:4px;
 padding:8px;min-height:38px;font-family:Tahoma,Arial,sans-serif;font-size:13px
}
.qt-native-warehouse-dialog textarea{
 min-height:90px;max-height:150px;resize:vertical
}
.qt-native-warehouse-dialog input[type=checkbox]{
 justify-self:start;width:18px;height:18px;accent-color:#244875
}
.qt-native-warehouse-dialog :is(input,textarea):focus-visible,
.qt-native-warehouse-dialog button:focus-visible,
.qt-native-warehouse-dialog summary:focus-visible{
 outline:2px solid #244875;outline-offset:2px
}
.qt-native-warehouse-dialog .qt-native-warehouse-cloud-details{
 display:block;border:1px solid #d1dce8;border-radius:5px;
 background:#fff;padding:8px 12px;margin:0
}
.qt-native-warehouse-dialog .qt-native-warehouse-cloud-details summary{
 color:#244875;cursor:pointer;font-size:12px;font-weight:700;
 padding:4px 0
}
.qt-native-warehouse-dialog .qt-native-warehouse-cloud-body{
 display:flex;flex-direction:column;gap:10px;margin-top:10px;
 padding-top:10px;border-top:1px solid #e7eef5
}
.qt-native-warehouse-dialog .qt-native-warehouse-cloud-details:not([open])
 .qt-native-warehouse-cloud-body{display:none}
.qt-native-warehouse-dialog .dialog-actions{
 display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;
 padding-top:8px
}
.qt-native-warehouse-dialog .dialog-actions button{
 min-width:110px;min-height:38px;border-radius:4px;
 padding:8px 16px;background:#244875;color:white;
 border:0;font-weight:700
}
.qt-native-warehouse-dialog .dialog-actions button:hover:not(:disabled){background:#1a3456}
.qt-native-warehouse-dialog .dialog-actions button:active:not(:disabled){background:#0f1a2a}
.qt-native-warehouse-dialog .dialog-actions button:disabled{
 background:#eef2f6;color:#8a98aa
}
@media(max-width:550px){
 .qt-native-warehouse-dialog .qt-native-field{
  grid-template-columns:minmax(0,1fr);gap:6px
 }
 .qt-native-warehouse-dialog .qt-native-field-label{text-align:right}
 .qt-native-warehouse-dialog .dialog-actions button{flex:1 1 auto}
}


/* SettingsWindowUiMixin native layout: title/help/close stay in the Qt toolbar;
 * cloud-only batch controls live below the active tab and never hide its save. */
body.qt-desktop-mode .qt-settings-toolbar{gap:10px;flex-wrap:nowrap}
body.qt-desktop-mode .qt-settings-toolbar strong{margin-inline-end:0;font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-size:17px;white-space:nowrap}
body.qt-desktop-mode .qt-settings-toolbar-icon{font-size:24px;color:#0071e3;line-height:1;flex:none}
body.qt-desktop-mode .qt-settings-toolbar-spacer{flex:1;min-width:8px}
body.qt-desktop-mode .qt-settings-toolbar-separator{display:block;flex:none;height:30px;border-inline-start:2px solid rgba(0,212,255,.3);margin-inline:5px}
body.qt-desktop-mode .qt-settings-toolbar>.button{min-height:32px;border-radius:5px;padding:7px 12px;font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-size:14px}
body.qt-desktop-mode .qt-settings-batch-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0;border-top:1px solid #b8ccdf;background:#f7f9fc;padding:8px 18px}
body.qt-desktop-mode .qt-settings-batch-actions .qt-settings-save-all-status{color:#244875;flex:1;flex-basis:auto;margin-inline-start:8px;min-width:120px;font-size:12px}
body.qt-desktop-mode .qt-settings-batch-actions .button{border-radius:5px;padding:8px 12px;min-height:34px}
body.qt-desktop-mode .qt-settings-business-separator{grid-column:1/-1;width:100%;height:0;border:0;border-top:1px solid #d1d1d6;margin:3px 0 9px}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget){grid-template-columns:minmax(0,1fr);gap:10px}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field{display:grid;grid-template-columns:minmax(130px,30%) minmax(0,1fr);align-items:center;gap:10px}
body.qt-desktop-mode #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field>input:not([type=checkbox]),
body.qt-desktop-mode #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field>textarea{width:100%;max-width:100%;box-sizing:border-box}
@media(max-width:700px){
 body.qt-desktop-mode .qt-settings-toolbar{gap:7px;padding-inline:10px}
 body.qt-desktop-mode .qt-settings-toolbar strong{font-size:14px;white-space:normal}
 body.qt-desktop-mode .qt-settings-toolbar>.button{padding:6px 8px;font-size:12px}
 body.qt-desktop-mode .qt-settings-toolbar-separator{margin-inline:1px}
 body.qt-desktop-mode .qt-settings-batch-actions{padding:8px 10px}
 body.qt-desktop-mode .qt-settings-batch-actions .qt-settings-save-all-status{order:3;flex-basis:100%;margin:0}
 body.qt-desktop-mode #qt-settings-page-general .qt-settings-group:has(.qt-settings-logo-widget)>.qt-settings-field{grid-template-columns:minmax(0,1fr)}
}

/* Qt Save/Cancel footers use green/grey controls (general, system, program,
 * POS and preparation), not the generic cloud primary-blue buttons. */
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-save{background:#28a745;color:#fff;border:0;border-radius:5px;min-height:36px;padding:8px 15px;font-weight:700}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-save:hover:not(:disabled){background:#218838}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-save:active:not(:disabled){background:#1e7e34}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-cancel{background:#6c757d;color:#fff;border:0;border-radius:5px;min-height:36px;padding:8px 15px;font-weight:700}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-cancel:hover:not(:disabled){background:#5a6268}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-cancel:active:not(:disabled){background:#495057}
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-save:focus-visible,
body.qt-desktop-mode .qt-settings-actions .qt-settings-native-cancel:focus-visible{outline:3px solid #9dc2e6;outline-offset:2px}


/* Second settings parity wave: native QFormLayout and QGroupBoxes are shown
   before the Cloud-only extension fields, which remain editable on demand. */
body.qt-desktop-mode .qt-settings-cloud-extras{grid-column:1/-1;min-width:0;background:#f9fbfd;border:1px solid #cbd8e5;border-radius:6px;padding:8px 12px}
body.qt-desktop-mode .qt-settings-cloud-extras>summary{cursor:pointer;color:#244875;font-weight:700;padding:6px 3px;list-style-position:inside}
body.qt-desktop-mode .qt-settings-cloud-extras>.qt-settings-group{margin:8px 0 4px;box-sizing:border-box;width:100%;max-width:100%}
body.qt-desktop-mode .qt-settings-cloud-extras .qt-settings-field{min-width:0}
body.qt-desktop-mode .qt-settings-cloud-extras:focus-within{outline:2px solid #9dc2e6;outline-offset:2px}
body.qt-desktop-mode .qt-settings-logo-remove{background:#dc3545!important;color:#fff!important;border:0}
body.qt-desktop-mode .qt-settings-logo-remove:hover{background:#bd2130!important}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-dark-label{color:#244875;font-size:12px;font-weight:600}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-dark-toggle){display:flex;align-items:center;justify-content:flex-start;gap:12px}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-field:has(.qt-settings-dark-toggle)>input[type=checkbox]{margin:0;width:20px;height:20px}
/* Printing: printer/size configuration and nested original footer sections. */
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-fields{display:flex;flex-direction:column;gap:0;align-items:stretch}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-panel{display:flex;flex-direction:column;flex:none;gap:14px;min-width:0;padding:15px}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-panel>.qt-settings-field{flex:none}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-device,
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-paper-options,
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-subgroup{min-width:0;border:1px solid #d1d1d6;border-radius:5px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:10px}
body.qt-desktop-mode #qt-settings-page-printing :is(.qt-settings-printer-device,.qt-settings-paper-options,.qt-settings-printer-subgroup)>legend{color:#244875;font-weight:700;padding:0 8px}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-device-label{display:flex;flex-direction:column;gap:6px;align-items:stretch;font-weight:700;color:#244875}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-device select{max-width:450px;min-height:32px;opacity:.78}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-paper-choice{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:30px;cursor:pointer;color:#244875}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-paper-choice input[type=radio]{height:18px;width:18px;min-height:18px;flex:none;margin:0;accent-color:#244875}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-custom-field[hidden]{display:none!important}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-custom-field{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-custom-field input{width:min(200px,100%)}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-subgroup .qt-settings-field{min-width:0}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-subgroup .qt-settings-field:has(input[type=checkbox]){flex-direction:row-reverse;justify-content:flex-end}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-subgroup .qt-settings-field:not(:has(input[type=checkbox])){display:flex;flex-direction:column;align-items:stretch;gap:6px}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-subgroup .qt-settings-field:not(:has(input[type=checkbox]))>input{width:100%;max-width:100%}
body.qt-desktop-mode #qt-settings-page-printing .qt-settings-paper-presets{grid-column:1/-1}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-group legend{font-weight:700}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-printing .qt-settings-printer-panel{padding:10px}
 body.qt-desktop-mode .qt-settings-cloud-extras{padding:7px}
}


/* Desktop native QSpinBox suffix and A4 printer selector presentation.
   These are display-only units; the bound numeric inputs remain unchanged. */
body.qt-desktop-mode .qt-settings-with-unit{gap:8px;min-width:0}
body.qt-desktop-mode .qt-settings-with-unit .qt-settings-unit{color:#435b75;font-size:12px;white-space:nowrap;direction:ltr}
body.qt-desktop-mode .qt-settings-with-unit>input{max-width:180px}
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-a4-printer{grid-column:1/-1;display:flex;align-items:center;gap:14px;color:#244875;font-weight:700;min-width:0}
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-a4-printer select{width:min(410px,100%);min-height:32px;color:#42536a}
body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-a4-printer-note{grid-column:1/-1;margin:0;font-size:12px}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-a4_invoices .qt-settings-a4-printer{flex-direction:column;align-items:stretch;gap:5px}
 body.qt-desktop-mode .qt-settings-with-unit{flex-wrap:wrap}
}


/* Wave 3: Qt appearance QLineEdit + 34x28 QColor swatch + Choose button.
   All 6 selectors retain the same validated theme_* keys and permissions. */
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor{
 display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 60%;
 max-width:min(540px,100%);position:relative
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor>input[type=text]{
 flex:1 1 130px;min-width:90px;max-width:none;width:auto;direction:ltr;text-align:left;
 font-variant-numeric:tabular-nums
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor>.qt-settings-color-swatch{
 display:block!important;flex:none;box-sizing:border-box;width:34px!important;min-width:34px!important;
 height:28px!important;min-height:28px!important;background-color:#fff;
 border:1px solid #8a9aae!important;border-radius:4px!important;pointer-events:none;
 padding:0!important
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor>.qt-settings-choose-color{
 flex:none;min-width:64px;max-width:80px;min-height:32px;
 padding:5px 8px;border:1px solid #b8ccdf;border-radius:4px;
 background:#e8f0f7;color:#244875;font-weight:600
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor>.qt-settings-choose-color:hover:not(:disabled){
 background:#d8e8f6;border-color:#244875
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor>.qt-settings-color-picker{
 position:absolute!important;left:0;bottom:0;width:1px!important;height:1px!important;
 min-height:0!important;padding:0!important;border:0!important;opacity:0;pointer-events:none
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-group:has(.qt-settings-color-editor){
 grid-template-columns:minmax(0,1fr);gap:10px
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-group:has(.qt-settings-color-editor)>.qt-settings-field{
 display:flex;gap:12px;align-items:center;min-height:43px
}
body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-actions>.qt-settings-native-save{margin-inline-start:0}
body.qt-desktop-mode #qt-settings-page-contract .qt-settings-fields{display:flex;flex-direction:column;gap:12px}
body.qt-desktop-mode #qt-settings-page-contract .qt-settings-fields>.qt-settings-group{width:100%;display:flex;flex-direction:column;gap:10px}
body.qt-desktop-mode #qt-settings-page-contract .qt-settings-field:has([name=contract_clauses_text]){
 display:flex;flex-direction:column;align-items:stretch;gap:9px
}
body.qt-desktop-mode #qt-settings-page-contract textarea[name=contract_clauses_text]{
 width:100%;max-width:100%;box-sizing:border-box;min-height:220px;resize:vertical;
 border:1px solid #ccd6e2;border-radius:6px;padding:8px;background:#fff;font-size:13px
}
body.qt-desktop-mode #qt-settings-page-contract textarea[name=contract_clauses_text]:focus{
 outline:none;border:2px solid #244875
}
body.qt-desktop-mode #qt-settings-page-contract .qt-settings-contract-note{
 font-weight:700;color:#244875;margin:1px 0 4px;line-height:1.7
}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-group:has(.qt-settings-color-editor)>.qt-settings-field{
  display:flex;flex-direction:column;align-items:stretch;gap:6px
 }
 body.qt-desktop-mode #qt-settings-page-appearance .qt-settings-color-editor{flex-basis:auto}
}


/* Wave 3: original Program tab has a parent Sales QGroupBox with nested policy
   groups; the other groups (staff, salon, prices, input, discounts) are siblings. */
body.qt-desktop-mode #qt-settings-page-program .qt-settings-fields{
 display:flex;flex-direction:column;align-items:stretch;gap:14px
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-fields>.qt-settings-group{
 display:flex;flex-direction:column;gap:11px;min-width:0;width:100%;
 padding:12px 16px;background:#fff
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested{
 display:flex;flex-direction:column;min-width:0;margin:7px 0 2px;
 padding:13px;border:1px solid #d1d1d6;border-radius:5px;background:#fff
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-basket>.qt-settings-field:has(input[type=checkbox]),
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested>.qt-settings-field:has(input[type=checkbox]){
 flex-direction:row-reverse;justify-content:flex-end
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested>.qt-settings-field:not(:has(input[type=checkbox])){
 display:flex;flex-wrap:wrap;align-items:center;gap:10px;justify-content:flex-start
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested>.qt-settings-field>select,
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested>.qt-settings-field>input:not([type=checkbox]){
 width:min(390px,100%);min-width:130px;max-width:100%
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-local{
 background:#f9fbfd;border-style:dashed;gap:5px
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-local p{margin:2px 0 4px}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-linked{
 display:flex;flex-direction:column;gap:8px;padding:10px 14px;
 background:#f6f9fc;border:1px solid #ccd6e2;border-radius:5px;min-width:0
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-linked legend{color:#244875;font-weight:700}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-linked-row{
 display:flex;align-items:center;gap:10px;min-height:24px;
 color:#244875;font-size:12px;font-weight:600;cursor:default
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-linked-row input[type=checkbox]{
 width:18px;height:18px;min-height:18px;flex:none;margin:0;opacity:.8;accent-color:#244875
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-linked-open{
 align-self:flex-start;background:#e8f0f7;color:#244875;border:1px solid #b8ccdf
}
body.qt-desktop-mode #qt-settings-page-program .qt-settings-with-unit .qt-settings-unit{direction:ltr}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-program .qt-settings-fields>.qt-settings-group{padding:10px}
 body.qt-desktop-mode #qt-settings-page-program .qt-settings-program-nested{padding:9px}
}


/* Offline ThermalReceiptSettingsWindow.init_ui uses QVBoxLayout for visibility,
   financial summary, extra elements, footer and printer controls; QFormLayout
   is used only for fonts and custom text. Do not show every group as 2 columns. */
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-fields{
 display:flex;flex-direction:column;align-items:stretch;gap:14px
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-fields>.qt-settings-group{
 width:100%;min-width:0;box-sizing:border-box;flex:none;
 display:flex;flex-direction:column;gap:10px;align-items:stretch;
 padding:12px 16px;background:#fff
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:has(input[type=checkbox]){
 display:flex;flex-direction:row-reverse;align-items:center;
 justify-content:flex-end;min-height:28px;gap:10px
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field input[type=checkbox]{
 width:18px;height:18px;min-height:18px;flex:none;margin:0;accent-color:#244875
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:not(:has(input[type=checkbox])){
 display:flex;gap:12px;align-items:center;justify-content:flex-start
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:not(:has(input[type=checkbox])) :is(input,select,textarea){
 width:min(380px,100%);max-width:100%;min-width:90px
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:has(textarea){
 flex-direction:column;align-items:stretch
}
body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:has(textarea)>textarea{
 width:100%;max-width:100%;min-height:100px
}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-fields>.qt-settings-group{padding:10px}
 body.qt-desktop-mode #qt-settings-page-thermal_invoices .qt-settings-group>.qt-settings-field:not(:has(input[type=checkbox])){
  flex-direction:column;align-items:stretch;gap:6px
 }
}


/* Original POSThermalReceiptSettingsUiMixin.init_ui: Qt vertical scroll
   area with seven full-width groups and source-defined border hierarchy.
   POS and Sales receipt printing remain independent settings sections. */
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-fields{
 display:flex;flex-direction:column;align-items:stretch;gap:12px;
 overflow:auto;min-height:0;padding:10px;
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-title{
 font-family:"Arabic Typesetting",Tahoma,"Segoe UI",sans-serif;font-size:19px;
 font-weight:700;text-align:right;color:#244875;margin:4px 0 0
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-divider{
 border:0;border-top:1px solid #ddd;margin:0 0 5px
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group{
 box-sizing:border-box;display:flex;flex-direction:column;
 flex:0 0 auto;gap:9px;min-width:0;width:100%;padding:13px 16px;
 border:2px solid #244875;border-radius:6px;background:#fff
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group[data-qt-pos-group="1"]{border-color:#0071e3}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group[data-qt-pos-group="2"]{border-color:#34c759}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group[data-qt-pos-group="4"]{border-color:#ff3b30}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group[data-qt-pos-group="5"]{border-color:#ff9500}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group legend{
 color:#244875;font-weight:700;padding-inline:8px;white-space:normal
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group>.qt-settings-field:has(input[type=checkbox]){
 display:flex;flex-direction:row-reverse;align-items:center;justify-content:flex-end;
 gap:10px;min-height:26px;width:100%;
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group input[type=checkbox]{
 width:18px;height:18px;min-height:18px;flex:none;margin:0;accent-color:#244875
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-unavailable{
 line-height:1.8;margin:0;font-size:12px;color:#56697e;
 border-inline-start:3px solid #bac7d5;padding-inline-start:10px
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-scope{
 font-size:12px;margin:0;padding:9px 12px;background:#f4f7fa;border:1px solid #d6e0ea;border-radius:5px
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-print-preview{
 width:100%;box-sizing:border-box;flex:none;margin-top:4px
}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-fields{padding:7px}
 body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-group{padding:10px}
}

/* Missing Qt POS font/footer controls: original-sized presentation only.
   All fields are disabled and have no name, so no persistence occurs. */
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-subheading{
 font-size:13px;font-weight:700;color:#244875;margin:9px 0 1px
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row{
 display:flex;flex-wrap:wrap;align-items:center;gap:12px;
 min-height:34px;justify-content:flex-start;font-size:12px;color:#526478
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row>span{
 min-width:min(240px,45%);max-width:100%
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row>input[type=number]{
 width:90px;min-height:30px;height:32px;padding:4px 7px
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row>input[type=checkbox]{
 width:18px;min-height:18px;height:18px;margin:0;opacity:.5
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row>textarea{
 width:min(540px,100%);min-height:70px;padding:8px;resize:none
}
body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row :disabled{
 background:#f0f3f6;color:#768594;cursor:not-allowed
}
@media(max-width:680px){
 body.qt-desktop-mode #qt-settings-page-thermal_pos .qt-settings-pos-offline-row>span{min-width:100%}
}


/* Qt ShiftPrintSettings: 12px margins, one QFormLayout, 80px QPlainTextEdit.
   The footer stays a real tenant-authorized field; paper/device selection
   remains a browser dialog action rather than silent Windows printing. */
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-shift-native{
 display:flex;flex-direction:column;gap:12px;padding:12px;
 width:100%;box-sizing:border-box;align-items:stretch
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-shift-native>.qt-settings-group{
 display:flex;flex-direction:column;gap:10px;width:100%;min-width:0;
 padding:12px;background:#fff;border:1px solid #d1d1d6;border-radius:5px
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field{
 display:grid;grid-template-columns:minmax(170px,32%) minmax(0,1fr);
 align-items:center;column-gap:12px;row-gap:6px;min-height:35px
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field:has(input[type=checkbox]){
 display:flex;align-items:center;gap:12px;justify-content:flex-start;
 flex-direction:row-reverse
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field:has(input[type=checkbox]) input{
 width:18px;height:18px;min-height:18px;flex:none;margin:0
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field>input:not([type=checkbox]){
 width:min(480px,100%);min-width:0;min-height:32px;box-sizing:border-box
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field:has(textarea){
 align-items:start
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group textarea[name=shift_footer_text]{
 width:100%;min-width:0;max-width:100%;box-sizing:border-box;
 min-height:80px;resize:vertical;padding:8px;border:1px solid #b8ccdf;border-radius:4px
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-shift-note{
 color:#5f6b7a;line-height:1.8;font-weight:400;margin:1px 0 6px
}
body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-actions :is(.qt-settings-native-save,.qt-settings-native-cancel){
 width:120px;max-width:120px
}
/* Qt PreparationPrintSettings: vertical QGroupBoxes, 20px content inset,
   15px gaps, SpinBox units and 120px Save/Cancel footer controls. */
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native{
 display:flex;flex-direction:column;align-items:stretch;gap:15px;
 padding:20px;width:100%;min-width:0;box-sizing:border-box
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group{
 display:flex;flex-direction:column;gap:10px;padding:13px 15px;
 width:100%;min-width:0;box-sizing:border-box;border:1px solid #d1d1d6;
 border-radius:5px;background:#fff
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field{
 display:flex;align-items:center;gap:10px;min-height:33px;min-width:0
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field:has(input[type=checkbox]){
 flex-direction:row-reverse;justify-content:flex-end
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field input[type=checkbox]{
 width:18px;height:18px;min-height:18px;flex:none;margin:0;accent-color:#244875
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field:has(input[type=number]){
 display:grid;grid-template-columns:minmax(190px,34%) minmax(0,180px) auto;column-gap:10px
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field input[type=number]{
 width:100%;min-width:70px;max-width:150px;min-height:32px;box-sizing:border-box
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field input[name=prep_selected_printer]{
 width:min(540px,100%);min-width:0;min-height:32px;box-sizing:border-box
}
body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-actions :is(.qt-settings-native-save,.qt-settings-native-cancel){
 width:120px;max-width:120px
}
@media(max-width:700px){
 body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-shift-native,
 body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native{padding:9px}
 body.qt-desktop-mode #qt-settings-page-shift_printing .qt-settings-group>.qt-settings-field{grid-template-columns:1fr}
 body.qt-desktop-mode #qt-settings-page-preparation .qt-settings-preparation-native>.qt-settings-group>.qt-settings-field:has(input[type=number]){grid-template-columns:1fr auto}
}


/* PurchasesReportsWindow source parity: report filter reset and native action bar.
   Source: ERPSYSTEM/modules/purchases/views/purchases_reports.py; isolated to
   reports only, preserving separate purchase statistics and sales dialogs. */
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-report-reset-dates{
 min-height:38px;
 padding:7px 13px;
 border:1px solid #cad8e7;
 background:#f5f8fd;
 color:#244875;
 border-radius:6px;
 font:700 12px Arial,Tahoma,sans-serif;
 white-space:nowrap;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-report-reset-dates:hover:not(:disabled){
 background:#e8f0fa;
 border-color:#244875;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-insights-actions{
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 justify-content:flex-end;
 gap:10px;
 padding-top:10px;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-insights-actions button{
 min-width:104px;
 min-height:40px;
 padding:7px 10px;
 white-space:nowrap;
}
body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-insights-controls label{
 color:#244875;
}
@media(max-width:740px){
 body.qt-desktop-mode .qt-purchase-insights-dialog[data-report-mode="reports"]
 .qt-purchase-insights-actions button{
  flex:1 1 115px;
 }
}
