/* Shared visual rhythm. No operation, permission or ledger changes. */
/* One scroll area for fields; confirmation actions remain within reach. */
#modal.has-fixed-actions[open]{display:flex;flex-direction:column;overflow:hidden;max-height:90vh;max-height:90dvh;background:var(--white)}
#modal.has-fixed-actions>.modal-head{position:static;flex:none;background:var(--white)}
#modal.has-fixed-actions>.modal-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0}
#modal.has-fixed-actions .ui-dialog-layout{display:flex;flex-direction:column;flex:1;min-height:0;max-height:100%;margin:0}
#modal.has-fixed-actions .ui-dialog-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 20px;scroll-padding-block:12px}
#modal.has-fixed-actions .ui-dialog-layout>.modal-foot{position:static;flex:none;gap:8px;align-items:center;flex-wrap:wrap;margin:0;padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--white);z-index:3;box-shadow:0 -5px 16px #103d3506}
#modal.has-fixed-actions .ui-dialog-layout>.modal-foot>.btn{min-height:44px;white-space:normal}
#modal.has-fixed-actions>.modal-body>.actions{flex:none;padding:10px 20px 0;margin:0}
@media(max-width:600px){#modal.has-fixed-actions .ui-dialog-scroll{padding:16px}#modal.has-fixed-actions .ui-dialog-layout>.modal-foot{padding-inline:16px}#modal.has-fixed-actions .ui-dialog-layout>.modal-foot>.btn{flex:1 1 110px}}
@media print{#modal.has-fixed-actions[open],#modal.has-fixed-actions>.modal-body,#modal.has-fixed-actions .ui-dialog-layout,#modal.has-fixed-actions .ui-dialog-scroll{display:block;max-height:none;height:auto;overflow:visible}#modal.has-fixed-actions .modal-foot{display:none}}
@media(max-width:700px){
 .product-catalogue-table.mobile-cards-table tbody{padding:8px}
 .product-catalogue-table.mobile-cards-table tr{padding:10px 12px;margin-bottom:8px}
 .product-catalogue-table.mobile-cards-table td{padding-block:4px}
 .product-catalogue-table.mobile-cards-table td.catalogue-detail-cell,.movement-history-table.mobile-cards-table td.movement-detail-cell{display:none}
 .product-catalogue-table.mobile-cards-table .product-cell{gap:9px}
 .product-catalogue-table.mobile-cards-table .text-button{font-size:.8125rem;min-height:40px}
 .product-catalogue-table.mobile-cards-table td:last-child{display:flex;gap:14px;flex-wrap:wrap}
 .movement-history-table.mobile-cards-table td{padding-block:4px}
 .movement-history-table.mobile-cards-table .tiny,.movement-history-table.mobile-cards-table .date-stamp{font-size:.75rem}
}

/* Stock catalogue: keep the search, filters and core values in view on a
   phone, without changing the table used on the other stock screens. */
@media(max-width:600px){
 .stock-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:6px;margin:-8px 0 10px}
 .stock-toolbar .stock-tool-group{display:contents}
 .stock-toolbar .stock-tool-group>.btn:only-child{grid-column:auto}
 .stock-toolbar .btn{min-height:44px;padding:5px 4px;gap:4px;font-size:.75rem;line-height:1.2}
 .stock-toolbar .btn .icon{width:15px;height:15px;flex:none}
 .stock-toolbar+.panel .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px}
 .stock-toolbar+.panel .filters .search{grid-column:1/-1;width:100%;min-width:0;min-height:44px}
 .stock-toolbar+.panel .filters .filter-select{grid-column:auto;width:100%;min-width:0;min-height:44px;padding:6px;font-size:16px}
 .stock-toolbar+.panel .filters .search input{min-width:0;min-height:44px;font-size:16px}
}
/* The QR action remains visible among the compact stock tools in both themes. */
.stock-toolbar .btn[data-commerce="scan"]{background:#cbe7f8;border-color:#80b2d2;color:#123c58;font-weight:750}
.stock-toolbar .btn[data-commerce="scan"] .icon{width:18px;height:18px;stroke-width:2}
.stock-toolbar .btn[data-commerce="scan"]:hover:not(:disabled){background:#b9ddf3;border-color:#568fae}
.stock-toolbar .btn[data-commerce="scan"]:focus-visible{outline:3px solid #386f91;outline-offset:2px}
/* Match the table's mobile-card breakpoint, including wide phones/tablets.
   Long codes and authorship are available in Details for each product. */
@media(max-width:700px){
 #product-results .product-catalogue-table.mobile-cards-table tbody{padding:6px}
 #product-results .product-catalogue-table.mobile-cards-table tr{display:grid;grid-template-columns:minmax(58px,.8fr) minmax(80px,1.2fr) minmax(94px,100px);align-items:center;gap:0 4px;padding:4px 7px;margin-bottom:4px}
 #product-results .product-catalogue-table.mobile-cards-table td{min-width:0;width:auto;padding:1px 0}
 #product-results .product-catalogue-table.mobile-cards-table td:first-child{grid-column:1/3;grid-row:1}
 /* Full code and authorship remain in the product's Details; keeping them
    there avoids expanding every row for long generated SKUs and names. */
 #product-results .product-catalogue-table.mobile-cards-table .product-cell{align-items:center;gap:8px}
 #product-results .product-catalogue-table.mobile-cards-table .product-cell>div{display:flex;align-items:center;flex-wrap:wrap;gap:3px 6px;flex:1;min-width:0}
 #product-results .product-catalogue-table.mobile-cards-table .product-cell>div>.product-type-labels{margin:0;flex:none}
 #product-results .product-catalogue-table.mobile-cards-table .product-cell>div>strong{flex:1 1 125px;max-width:none;min-width:0;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
 #product-results .product-catalogue-table.mobile-cards-table .product-cell>div>small,
 #product-results .product-catalogue-table.mobile-cards-table .product-cell>div>.action-authors{display:none}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label="Stock"]{grid-column:1;grid-row:2}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label="Venda"]{grid-column:2;grid-row:2}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label="Estado"]{grid-column:3;grid-row:1;justify-self:end;text-align:right}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label]:not(:first-child):before{display:block;min-width:0;padding:0;font-size:.6875rem;line-height:1.15}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label="Estado"] .pill{font-size:.75rem;padding:3px 5px;line-height:1.2;max-width:100%}
 #product-results .product-catalogue-table.mobile-cards-table td[data-label="Estado"]:before{display:none!important}
 #product-results .product-catalogue-table.mobile-cards-table td:last-child{grid-column:3;grid-row:2;display:flex;justify-content:flex-end;gap:3px;padding:0;flex-wrap:nowrap}
 #product-results .product-catalogue-table.mobile-cards-table .text-button{min-height:44px;min-width:44px;width:auto;justify-content:center;font-size:.75rem;white-space:nowrap}
 #product-results .product-catalogue-table.mobile-cards-table .text-button .icon{display:none}
 #product-results .product-catalogue-table .product-cell strong,#product-results .product-catalogue-table .product-cell small{overflow-wrap:anywhere}
}
:root{--ui-body:.875rem;--ui-label:.8125rem;--ui-note:.75rem;--ui-note-ink:#52685c;--ui-radius:10px;--ui-paid:#176b3a;--ui-partial:#8a5a16;--ui-returned:#ba2222;--ui-exchanged:#185dba}
:root[data-theme=dark]{--ui-note-ink:#b3c5ba;--ui-paid:#86efac;--ui-partial:#ffd38a;--ui-returned:#ff7777;--ui-exchanged:#8abbff}
.tiny{font-size:var(--ui-note);line-height:1.45;color:var(--ui-note-ink)}
.page-heading h1{font-size:1.5rem;line-height:1.25;letter-spacing:-.5px}
.page-heading .sub,.panel-body>.sub{font-size:var(--ui-body);line-height:1.5}
.panel-head h2,.panel-head h3{font-size:1rem;line-height:1.35}
.actions{gap:8px}
.btn{min-height:44px;border-radius:var(--ui-radius);font-size:var(--ui-label);line-height:1.35;padding:10px 14px;gap:7px}
.btn.small{font-size:var(--ui-note);padding:8px 11px;min-height:44px}
.btn.primary{background:var(--action);border-color:var(--action);color:#fff;font-weight:650}
.btn .icon{width:18px;height:18px;flex:none}
.text-button{min-height:44px;font-size:var(--ui-label);line-height:1.35}
.btn:focus-visible,.text-button:focus-visible,.close:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.counter-launcher.quick-actions{gap:8px}
.counter-launcher .quick-action{border-radius:12px;min-height:70px;padding:10px 5px;box-shadow:none}
.counter-launcher .quick-action>span{font-size:.875rem;font-weight:650;line-height:1.2}
.counter-launcher .quick-action small{font-size:var(--ui-note);font-weight:400;line-height:1.4;margin-top:5px}
.counter-launcher .quick-action[data-commerce=collect],.counter-launcher .quick-action[data-notebook-open]{border-color:var(--focus);background:var(--action-soft);color:var(--action-ink)}
.counter-secondary .text-button{font-size:var(--ui-label)}
.counter-topbar .counter-tools{gap:6px}
.counter-topbar .operator-header strong{font-size:.9375rem;line-height:1.3}
.counter-topbar .operator-header>span{font-size:var(--ui-note);line-height:1.35}
.counter-topbar .operator-header .text-button{font-size:var(--ui-note)}
.counter-connection .badge{font-size:var(--ui-note);line-height:1.4}
#modal{border-radius:14px}
#modal>.modal-head,.action-confirmation>.modal-head{padding:16px 20px;gap:10px}
#modal>.modal-head h2,.action-confirmation>.modal-head h2{font-size:1.125rem;line-height:1.3;letter-spacing:-.3px;min-width:0;overflow-wrap:anywhere}
.modal-head>.close{flex:none;min-width:44px;min-height:44px;width:44px;height:44px;font-size:22px;border-radius:50%}
#modal>.modal-body,.action-confirmation>.modal-body{padding:18px 20px;font-size:var(--ui-body);line-height:1.5}
.modal-body p{line-height:1.5}
.modal-body .sub,.modal-body .tiny{font-size:var(--ui-note);line-height:1.45}
.modal-body .field{font-size:var(--ui-label);line-height:1.4;gap:6px;margin-bottom:14px}
.modal-body .field input,.modal-body .field select,.modal-body .field textarea{border-radius:8px;min-height:44px;padding:10px 11px}
.modal-body .field textarea{min-height:84px}
.modal-body .form-grid{column-gap:14px}
.modal-body .modal-foot{gap:8px;padding-top:16px;margin-top:16px;align-items:center;flex-wrap:wrap}
.modal-body .modal-foot .btn{min-height:44px;white-space:normal}
#checkout-form .payment-choice label{min-height:44px}
#checkout-form .payment-method-buttons label,#payment-form .payment-method-buttons label{min-height:44px;border-radius:8px;font-size:var(--ui-label);line-height:1.35}
.product-paid-mark{color:var(--ui-paid)}
.product-partial-mark{color:var(--ui-partial)}
.paid-check{color:var(--ui-paid)}
.client-history-returned{color:var(--ui-returned)}
.notebook-drawer .nb-head h2{font-size:1.125rem;line-height:1.3}
.notebook-drawer .nb-product-marks{font-size:.6875rem;line-height:1.3}
.notebook-drawer .nb-money .partial-payment-mark{font-size:.6875rem;line-height:1.2;gap:1px}
.notebook-drawer .nb-product-marks .product-paid-mark{color:var(--ui-paid)}
.notebook-drawer .nb-product-marks .product-partial-mark{color:var(--ui-partial)}
.notebook-drawer .nb-product-marks .nb-product-returned{color:var(--ui-returned)}
.notebook-drawer .nb-product-marks .nb-product-exchanged{color:var(--ui-exchanged)}
[data-stock-push-status]{padding:12px 0;border-bottom:1px solid var(--line);margin-bottom:12px}
[data-stock-push-status] p{margin:0 0 8px}
[data-stock-push-status] p:last-child{margin:8px 0 0}
[data-stock-push-status] .actions{gap:6px 14px;align-items:center}
[data-stock-push-status] .text-button{font-size:var(--ui-note)}
.notification-settings>summary{font-size:var(--ui-label);min-height:44px;line-height:1.4;padding:12px 0;cursor:pointer;color:var(--muted)}
.notification-group>summary{font-size:var(--ui-body);line-height:1.4;min-height:48px}
.notification-item strong{font-size:var(--ui-body);line-height:1.4}
.notification-item small{font-size:var(--ui-note);line-height:1.45}
.restock-sources .btn{font-size:var(--ui-body);min-height:46px;padding:11px 13px;white-space:normal}
.restock-candidate strong{font-size:var(--ui-body);line-height:1.4}
.restock-candidate small{font-size:var(--ui-note);line-height:1.45}
.restock-candidate>:is(span,b),.nb-money b,.table td[data-label=Valor]{font-variant-numeric:tabular-nums}
@media(max-width:600px){
 #modal>.modal-head,.action-confirmation>.modal-head{padding:14px 16px}
 #modal>.modal-body,.action-confirmation>.modal-body{padding:16px}
 .modal-body .field input,.modal-body .field select,.modal-body .field textarea{font-size:16px}
 .page-heading h1{font-size:1.375rem}
 .counter-launcher .quick-action{min-height:68px;padding:8px 3px}
 .counter-launcher .quick-action>span{font-size:.8125rem}
 .counter-launcher .quick-action small{font-size:var(--ui-note)}
 .modal-body .modal-foot>.btn{flex:1 1 120px}
}
@media(max-width:360px){
 #modal>.modal-head,.action-confirmation>.modal-head{gap:6px;padding-inline:12px}
 #modal>.modal-body,.action-confirmation>.modal-body{padding-inline:12px}
 .counter-launcher.quick-actions{gap:6px}
 .counter-launcher .quick-action{padding:8px 2px}
 .counter-launcher .quick-action>span{font-size:.75rem}
 .restock-sources .btn{font-size:var(--ui-label);padding:10px}
}

.modal-body .sub,.modal-body .field small,.restock-candidate small{color:var(--ui-note-ink)}
.tech-requests-shortcut{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:10px 14px;margin:0 0 14px;background:var(--white);color:inherit;border:1px solid var(--line);border-radius:12px;text-align:left;font:inherit;cursor:pointer}
.tech-requests-shortcut>.icon{flex:none;color:var(--action,var(--green))}
.tech-requests-shortcut>span:not(.tech-requests-arrow){flex:1;min-width:0;font-size:.875rem;font-weight:650;line-height:1.45}
.tech-requests-shortcut>[data-tech-count]{flex:none;font-size:.75rem;font-variant-numeric:tabular-nums;color:var(--action-ink,var(--green));background:var(--action-soft,#edf3e8);border-radius:12px;padding:3px 7px;line-height:1.4}
.tech-requests-shortcut>[data-tech-count]:empty{display:none}
.tech-requests-arrow{flex:none;font-size:22px;line-height:1;color:var(--muted)}
.tech-requests-shortcut:focus-visible{outline:2px solid var(--action,var(--green));outline-offset:2px}

/* Acquisition helpers remain optional and scroll with the product fields. */
#product-form .acquisition-picker{padding:10px 12px;margin:0 0 14px}
#product-form .acquisition-calculator{padding:10px 12px;margin:14px 0 0;border:1px solid var(--line);border-radius:10px;color:inherit}
#product-form :is(.acquisition-picker,.acquisition-calculator) summary{cursor:pointer;font-size:var(--ui-label);font-weight:600;line-height:1.5}
#product-form :is(.acquisition-picker,.acquisition-calculator) summary small{display:inline;font-size:var(--ui-note);font-weight:400;color:var(--ui-note-ink);margin-left:5px}
#product-form .acquisition-calculator-body{padding-top:12px}
#product-form .acquisition-calculator-body>small{font-size:var(--ui-note);line-height:1.5;color:var(--ui-note-ink)}

/* Backup health: keep the action readable on narrow phones. */
.backup-health-banner>button{flex:0 0 auto;white-space:nowrap}.backup-health-banner>span{min-width:0;overflow-wrap:anywhere}

/* Compact main-app rhythm. Special workspaces and transactional controls keep their own layouts. */
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main)>.counter-topbar.topbar{min-height:0;padding-top:6px;padding-bottom:6px;row-gap:4px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .counter-tools{gap:4px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .counter-tools>.counter-lock{top:6px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .counter-connection{gap:5px;flex-wrap:wrap}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .counter-connection #sync-status{padding:5px 7px;font-size:11px;line-height:1.3}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content){padding-top:12px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.ecac-ai-strip{margin:0 0 7px;border-radius:10px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.ecac-ai-strip>button{min-height:44px;gap:7px;padding:6px 10px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.ecac-ai-strip .ecac-ai-strip-note{font-size:11px;line-height:1.3}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-navigation{margin:0 0 10px;border-radius:10px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-navigation>summary{min-height:44px;gap:8px;padding:7px 10px;line-height:1.3}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-navigation>summary>span{font-size:11px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-navigation>summary>strong{font-size:12px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-navigation>.section-tabs{padding:8px 10px;gap:5px}

/* Related pages stay in one compact scrollable row. */
#app .content > .section-navigation{display:flex;align-items:center;gap:4px;min-width:0;padding:0 4px 0 9px;margin:0 0 10px;border-radius:10px;overflow:hidden}
#app .content > .section-navigation > .section-navigation-label{flex:none;max-width:92px;color:var(--muted);font-size:.6875rem;line-height:1.15}
#app .content > .section-navigation > .section-tabs{display:flex;flex:1 1 auto;align-items:center;flex-wrap:nowrap;gap:4px;min-width:0;max-width:100%;margin:0;padding:3px 0;border:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
#app .content > .section-navigation > .section-tabs > button{flex:0 0 auto;min-height:44px;margin:0;padding:6px 10px;border-radius:9px;font-size:.75rem;line-height:1.2;white-space:nowrap}
#app .content > .section-navigation > .section-tabs > button[aria-current="page"]{font-weight:700}
#app .content > .section-navigation > .section-navigation-hint{flex:none;color:var(--action-ink);font-size:1.2rem;line-height:1;padding:0 2px}
@media(max-width:360px){#app .content > .section-navigation > .section-navigation-label{max-width:68px;font-size:.625rem}#app .content > .section-navigation > .section-tabs > button{padding-inline:8px}}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:7px 10px;margin:0 0 12px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading>div:first-child{flex:1 1 180px;min-width:0}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading h1{margin:0;font-size:20px;line-height:1.25;letter-spacing:-.4px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading .eyebrow{font-size:9px;line-height:1.3;letter-spacing:.12em;margin:0 0 3px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading .eyebrow:empty,:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading p.sub:empty{display:none}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading p.sub{margin:4px 0 0;font-size:12px;line-height:1.4}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading>.actions{display:flex;flex:0 1 auto;flex-wrap:wrap;gap:6px;width:auto;min-width:0;margin:0}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)) .content .page-heading>.actions>.btn{flex:0 1 auto;min-width:0;min-height:44px;padding:7px 10px;border-radius:9px;font-size:12px;line-height:1.3}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.panel>.panel-head{padding:12px 14px;gap:8px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.panel>.panel-body{padding:12px 14px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>.section-gap{margin-top:12px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>:is(.settings-grid,.dashboard-grid,.insight-grid,.menu-grid){gap:12px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>:is(.settings-grid,.dashboard-grid)>.panel>.panel-head{padding:12px 14px;gap:8px}
:where(#app>.layout:not(.online-workspace):not(.restock-workspace)>.main>.content)>:is(.settings-grid,.dashboard-grid)>.panel>.panel-body{padding:12px 14px}

/* Preserve the fixed confirmation footer and the native 44px input/action targets. */
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal))>.modal-head{padding:11px 14px;gap:8px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal))>.modal-head h2{font-size:17px;line-height:1.3}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(.has-fixed-actions):not(:has(#checkout-form,.online-finance-modal))>.modal-body{padding:12px 14px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal.has-fixed-actions:not(:has(#checkout-form,.online-finance-modal)) .ui-dialog-scroll{padding:12px 14px;scroll-padding-block:10px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal)) .modal-body .field{margin-bottom:10px;gap:4px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal)) .modal-body .field :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea){min-height:44px;padding:8px 10px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal)) .modal-body .field textarea{min-height:84px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal)) .modal-body .form-grid{column-gap:12px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal.has-fixed-actions:not(:has(#checkout-form,.online-finance-modal)) .ui-dialog-layout>.modal-foot{gap:8px;padding:9px 14px max(9px,env(safe-area-inset-bottom));margin:0}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(.has-fixed-actions):not(:has(#checkout-form,.online-finance-modal)) .modal-body .modal-foot{padding-top:10px;margin-top:10px;gap:8px}

/* Priced references stay beside the model, without expanding optional helpers. */
#product-form .product-reference-suggestions{max-height:240px;margin:4px 0 6px}
#product-form .acquisition-inline-note{display:block;padding:4px 8px;font-size:11px;color:var(--ui-note-ink)}
#product-form .acquisition-inline-option{position:relative;gap:3px;padding:8px 10px;min-height:44px;border-radius:8px;margin:3px 0}
#product-form .acquisition-inline-option>strong{padding-right:112px;font-size:13px;line-height:1.4}
#product-form .acquisition-inline-option>small{font-size:11px;line-height:1.4}
#product-form .acquisition-inline-price{position:absolute;right:10px;top:9px;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
#product-form .acquisition-inline-price b{font-size:14px;line-height:1.4}
#product-form .acquisition-inline-price small{font-size:11px}
#product-form [data-model-alternative]{margin-top:3px;border-top:1px solid var(--line)}
#product-form [data-model-alternative] summary{padding:7px 8px;min-height:44px;display:list-item;align-content:center;font-size:12px}

/* Compact workspaces share the same task groups and keep comfortable touch areas. */
.menu-organized .daily-details{margin:8px 0;border-radius:13px}
.menu-organized .daily-details>summary{min-height:48px;padding:11px 14px}
.menu-organized .daily-details-body{padding:8px 12px 12px}
.menu-organized .menu-grid{gap:7px}
.menu-organized .menu-card{min-height:48px;padding:9px 10px;gap:8px;border-radius:10px}
.menu-organized .menu-card strong{font-size:13px;line-height:1.3}
.menu-organized .menu-card small{font-size:11px;line-height:1.35;margin-top:3px}
.menu-organized .compact-actions{margin-top:8px;display:block}
.menu-organized .compact-actions>summary{min-height:44px;padding:9px 8px}
.menu-organized .compact-actions-list{position:static;box-shadow:none;width:auto;max-height:none;padding:7px 0;border:0;background:transparent}
.menu-organized .menu-appearance{grid-column:1/-1;margin-top:5px}

/* Keep the optional coverage notice compact while preserving a clear tap target. */
.backup-health-banner .backup-health-actions{display:flex;align-items:center;gap:.15rem;flex:0 0 auto;flex-wrap:nowrap}.backup-health-banner [data-backup-health-dismiss]{min-height:44px;min-width:44px;padding:.35rem;font-size:1.35rem;line-height:1;border-radius:.65rem;opacity:.8}.backup-health-banner [data-backup-health-dismiss]:hover,.backup-health-banner [data-backup-health-dismiss]:focus-visible{opacity:1;background:var(--surface-2,rgba(0,0,0,.06))}

/* Compact sales list, without changing the customer account or other cards. */
@media (max-width:700px){
 .orders-page .page-heading{margin-bottom:10px;gap:8px}
 .orders-page .page-heading h1{margin:2px 0;font-size:1.35rem;line-height:1.15}
 .orders-page .page-heading .sub{margin:3px 0;font-size:.8rem;line-height:1.3}
 .orders-page .page-heading .actions{gap:5px}
 .orders-page .page-heading .btn{min-height:44px;padding:7px 10px}
 .orders-page .metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:10px}
 .orders-page .metric{min-width:0;min-height:0;padding:9px 10px;border-radius:10px}
 .orders-page .metric-top{gap:4px;font-size:.75rem;line-height:1.2}
 .orders-page .metric-icon{width:22px;height:22px;flex-shrink:0}
 .orders-page .metric-value{margin:5px 0 2px;font-size:1.15rem;line-height:1.15;overflow-wrap:anywhere}
 .orders-page .metric-value small{font-size:.68em}
 .orders-page .metric-foot{font-size:.7rem;line-height:1.25}
 .orders-page .panel.section-gap{margin-top:8px}
 .orders-page .panel-head{padding:9px 11px}
 .orders-page .panel-head h2{font-size:1rem}
 .orders-page .filters{padding:7px 10px}
 .orders-page .filters .field{margin:0;gap:3px;font-size:.75rem}
 .orders-page .filters select{min-height:44px}
 .orders-page .sale-cards{padding:6px;gap:6px}
 .orders-page .sale-card{min-width:0;padding:9px;border-radius:10px}
 .orders-page .sale-card>.row{gap:6px;align-items:flex-start}
 .orders-page .sale-owner-title{min-width:0;font-size:.95rem;line-height:1.25;overflow-wrap:anywhere}
 .orders-page .sale-card .pill{flex-shrink:0}
 .orders-page .sale-card p{margin:3px 0;line-height:1.3;overflow-wrap:anywhere}
 .orders-page .sale-reference,.orders-page .record-dates,.orders-page .sale-attribution{margin:3px 0;font-size:.76rem;line-height:1.3;overflow-wrap:anywhere}
 .orders-page .debt-products{margin:5px 0;padding:5px 7px}
 .orders-page .debt-products ul{margin:0;gap:3px}
 .orders-page .debt-products li{min-width:0;line-height:1.3;overflow-wrap:anywhere}
 .orders-page .sale-values{gap:5px;margin:5px 0;padding:5px 0}
 .orders-page .sale-values>div{min-width:0}
 .orders-page .sale-values dt{font-size:.68rem;line-height:1.2}
 .orders-page .sale-values dd{font-size:.8rem;line-height:1.25;overflow-wrap:anywhere}
 .orders-page .sale-card .actions{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0 0}
 .orders-page .sale-card .actions .btn{min-height:44px;flex:1 1 105px;padding:6px 8px}
 .orders-page .gesture-hint{display:none}
}

/* One compact, keyboard-accessible entry; the complete sale opens on touch. */
.orders-page .sale-card-compact{padding:5px 9px;cursor:pointer}
.orders-page .sale-compact-open{display:flex;align-items:center;gap:6px;width:100%;min-height:44px;padding:2px 0;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.orders-page .sale-compact-open:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:5px}
.orders-page .sale-compact-open .sale-owner-title{display:flex;align-items:center;gap:5px;flex:1 1 auto;min-width:0;margin:0;font-size:.9rem;line-height:1.2}
.orders-page .sale-compact-open .sale-owner-title>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.orders-page .sale-compact-open .pill{flex:0 0 auto;font-size:.7rem}
.orders-page .sale-compact-amount{flex:0 0 auto;font-size:.8rem;font-weight:700;white-space:nowrap}
.orders-page .sale-compact-arrow{flex:0 0 auto;font-size:1.35rem;line-height:1}
.orders-page .sale-card-compact .debt-products{margin:-2px 0 4px;padding:0;border:0;background:transparent;font-size:.76rem;line-height:1.2}
.orders-page .sale-card-compact .debt-products ul{margin:0;padding:0;list-style:none}
.orders-page .sale-card-compact .debt-products li{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.orders-page .sale-card-compact .debt-products li~li{display:none}

/* Store tools share one compact, touch-friendly entry point. */
.store-hub-grid{display:grid;gap:8px}
.store-hub-grid .menu-card{width:100%;min-height:52px;padding:8px 10px;gap:9px;align-items:center;text-align:left;text-decoration:none;cursor:pointer}
.store-hub-grid .menu-card .icon{width:20px;height:20px;margin:0;flex:none}
.store-hub-grid .menu-card strong{font-size:.875rem;line-height:1.25}
.store-hub-grid .menu-card small{font-size:.75rem;line-height:1.3;margin-top:2px}
.home-stores-shortcut{margin-top:8px}
