/* Shared record/modal foundation for tenant and master workspaces. */
.customer-dialog{width:650px;max-width:calc(100% - 28px);max-height:calc(100dvh - 32px);padding:26px;border-radius:28px;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
.customer-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:20px}
.mobile-feedback{width:430px;max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:28px;border-radius:26px;animation:feedback-enter .18s ease-out;color:var(--text-primary)}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden}
dialog.mobile-scroll-shell{padding:12px;overflow:hidden;max-height:calc(100dvh - 32px)}
.mobile-dialog-scroll{box-sizing:border-box;max-height:calc(100dvh - 62px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:14px;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
.mobile-dialog-scroll::-webkit-scrollbar{width:6px;height:6px}.mobile-dialog-scroll::-webkit-scrollbar-track{background:transparent}.mobile-dialog-scroll::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:8px}
@media(max-width:600px){dialog.mobile-scroll-shell{padding:10px}.mobile-dialog-scroll{padding:12px 8px;max-height:calc(100dvh - 58px)}}
.mobile-notifications{position:fixed;right:24px;bottom:max(24px,env(safe-area-inset-bottom));width:min(380px,calc(100vw - 32px));z-index:1000;display:grid;gap:10px;pointer-events:none}
.mobile-toast{display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:20px;pointer-events:auto;animation:feedback-enter .2s ease-out;color:var(--text-primary);transition:opacity .16s,transform .16s;box-shadow:0 12px 36px #10203924}.mobile-toast.is-leaving{opacity:0;transform:translateY(8px);pointer-events:none}.mobile-toast-icon{flex:0 0 34px;height:34px;display:grid;place-items:center;border-radius:12px;background:#329c751c;color:#267254;font-size:20px;font-weight:600}:root[data-theme=dark] .mobile-toast-icon{color:#98ddbb}.mobile-toast-text{flex:1;min-width:0;align-self:center}.mobile-toast strong{font-size:13px;line-height:1.4;display:block;overflow-wrap:anywhere}.mobile-toast p{font-size:12px;color:var(--text-secondary);line-height:1.5;margin:4px 0 0;overflow-wrap:anywhere}.mobile-toast-close{flex:0 0 32px;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:var(--text-secondary);font-size:22px;padding:0;cursor:pointer}.mobile-toast-close:hover{background:var(--surface-field)}.mobile-toast-close:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
@media(max-width:600px){.mobile-notifications{right:16px;bottom:max(16px,env(safe-area-inset-bottom))}.mobile-toast-close{width:44px;height:44px;flex-basis:44px}}
@media(prefers-reduced-motion:reduce){.mobile-toast{animation:none;transition:none}}
.mobile-feedback-symbol{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;background:var(--surface-field);color:var(--text-link);font-size:24px;font-weight:600;margin-bottom:18px;border:1px solid var(--line)}
.mobile-feedback h2{font-size:22px;margin:0 0 12px;line-height:1.25;overflow-wrap:anywhere}.mobile-feedback p{font-size:14px;color:var(--text-secondary);margin:0;white-space:pre-line;overflow-wrap:anywhere}
.mobile-feedback-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}.mobile-feedback-actions button{min-height:44px;font-size:13px;flex:1;padding:12px 16px;margin:0;width:auto}.mobile-feedback-actions .mobile-feedback-danger{background:var(--surface-error);color:var(--text-error);border:1px solid var(--border-error);box-shadow:none}.mobile-feedback button:focus-visible{outline:3px solid var(--text-link);outline-offset:3px}
@keyframes feedback-enter{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.mobile-feedback{animation:none}}
@media(max-width:380px){.mobile-feedback{padding:22px}.mobile-feedback-actions{flex-direction:column}}

/* Compact feedback shares the mobile navigation rhythm. */
@media(max-width:700px){
 .mobile-feedback{box-sizing:border-box;max-width:calc(100vw - 24px);padding:18px;border-radius:20px}
 .mobile-feedback-symbol{width:36px;height:36px;border-radius:12px;margin-bottom:12px;font-size:21px}
 .mobile-feedback h2{font-size:20px;margin-bottom:8px}
 .mobile-feedback p{font-size:13px;line-height:1.5}
 .mobile-feedback-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
 .mobile-feedback-actions:has(>button:only-child){grid-template-columns:minmax(0,1fr)}
 .mobile-feedback-actions button{min-width:0;min-height:44px;padding:10px;font-size:12px;white-space:normal;overflow-wrap:anywhere;border-radius:12px}
 .mobile-toast{padding:12px;gap:8px;border-radius:16px}.mobile-toast-copy{min-width:0;overflow-wrap:anywhere}
}
/* In-place recovery keeps the result area's height while retrying. */
.listing-error{position:sticky;top:12px;align-self:flex-start;display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;min-width:0;padding:22px 16px;text-align:center;border:1px solid var(--line);border-radius:14px;background:var(--surface-field);color:var(--text-secondary)}
.listing-error h3{margin:0;color:var(--text-primary);font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.listing-error p{margin:0;max-width:420px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.listing-error .listing-error-retry{min-height:44px;margin-top:4px;padding:8px 14px;max-width:100%;white-space:normal;border-radius:10px;box-shadow:none;color:var(--text-link);font-size:12px}
@media(max-width:700px){.listing-error{padding:18px 12px;gap:6px}.listing-error h3{font-size:14px}.listing-error p{font-size:11px}}
/* Preserve rows during updates; only the first load needs neutral placeholders. */
.listing-updating{opacity:.6;pointer-events:none}
.listing-placeholder{width:100%;min-width:0;display:grid;gap:8px;padding:12px}
.listing-placeholder-row{display:grid;align-content:center;gap:10px;min-height:70px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}
.listing-placeholder-row>span{display:block;height:10px;width:42%;border-radius:5px;background:var(--line)}
.listing-placeholder-row>span+span{width:68%;height:8px}
.module-summary[aria-busy=true]{opacity:.6}
@media(max-width:700px){.listing-placeholder{padding:8px;gap:6px}.listing-placeholder-row{min-height:64px;padding:12px}}
/* Minimal shared pagination: two actions and one page indicator. */
.customer-pagination.listing-pagination,.os-kanban-pagination.listing-pagination{display:grid;grid-template-columns:44px minmax(64px,auto) 44px;align-items:center;gap:var(--space-inline,8px);width:fit-content;max-width:100%;margin:var(--space-fields,12px) 0 0 auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}
.listing-pagination[hidden]{display:none!important}
.customer-pagination.listing-pagination>button,.os-kanban-pagination.listing-pagination>button{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;gap:0;margin:0;padding:var(--action-padding-block,8px);border:1px solid var(--line);border-radius:var(--action-radius,10px);background:var(--surface-glass);box-shadow:none;color:var(--text-primary);font-size:var(--type-action);line-height:1}
.listing-pagination>button>svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.customer-pagination.listing-pagination>span,.os-kanban-pagination.listing-pagination>small{padding:0;min-width:0;text-align:center;color:var(--text-secondary);font-size:var(--type-body);font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums;white-space:nowrap}
.listing-pagination .listing-pagination-page{display:block;font:inherit;white-space:nowrap}
.listing-pagination>button:hover:not(:disabled){background:var(--surface-hover);border-color:var(--text-subtle)}.listing-pagination>button:active:not(:disabled){background:var(--surface-pressed)}
.listing-pagination>button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
.listing-pagination>button:disabled{opacity:.35;cursor:default}
.os-kanban-pagination.listing-pagination{margin-top:auto}
.selector-keyboard-results button:focus-visible{outline:2px solid var(--text-link)!important;outline-offset:-2px;background:var(--surface-hover)!important;box-shadow:inset 4px 0 0 var(--text-link)!important;color:var(--text-primary);position:relative;z-index:1}
.selector-keyboard-hint{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;margin:6px 0 0;color:var(--text-secondary);font-size:11px;line-height:1.4}
.selector-keyboard-hint>span{display:inline-flex;align-items:center;gap:5px;min-width:0}
.selector-keyboard-hint kbd{padding:1px 4px;border:1px solid var(--line);border-radius:4px;background:var(--surface-field);color:var(--text-primary);font:inherit;font-size:10px;white-space:nowrap}
@media(max-width:700px){.selector-keyboard-hint{gap:4px 8px;font-size:10px;margin-top:4px}.selector-keyboard-hint kbd{font-size:10px;padding:0 3px}}


/* Shared compact controls for every operational listing. */
.listing-control-bar{min-width:0;padding:12px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--surface-field) 82%,transparent);box-shadow:0 3px 12px #00000004;margin:0 0 12px}
.listing-control-bar .customer-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0}
.listing-control-bar .customer-toolbar .customer-search{flex:1 1 240px;min-width:0;margin:0}
.listing-control-bar .customer-toolbar .customer-search input{height:44px;min-height:44px;font-size:14px;border-radius:10px}
.listing-control-bar .customer-toolbar .customer-new{width:auto;min-height:44px;margin:0;padding:9px 14px;font-size:13px;border-radius:11px;white-space:normal}
.listing-control-bar .customer-toolbar .catalog-scan{width:44px;min-width:44px;height:44px;min-height:44px;padding:8px;margin:0;border-radius:10px}
.listing-control-bar .listing-size-control{display:flex;align-items:center;flex-direction:row;gap:6px;margin:0;white-space:nowrap;font-size:11px}
.listing-control-bar .listing-size-control select{height:44px;min-height:44px;min-width:68px}
.listing-control-bar .customer-filter{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 0;padding:8px 0 0;border-top:1px solid var(--line)}
.listing-control-bar .customer-filter button{min-height:44px;margin:0;padding:7px 10px;border-radius:9px;font-size:12px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.listing-control-bar .customer-filter .customer-count{width:auto;margin:0 0 0 auto;font-size:11px}
.listing-control-bar>.listing-size-error{flex-basis:100%;margin:6px 0 0;font-size:12px}
.listing-control-bar [hidden]{display:none!important}
.stock-center .stock-center-controls.listing-control-bar{margin:0;align-items:center}
.stock-center .stock-list-toolbar.listing-control-bar{margin:12px 0 0;gap:10px;align-items:center}
.stock-center .stock-list-toolbar.listing-control-bar>input{flex:1 1 240px;width:auto;min-width:0;height:44px}
.stock-list-toolbar.listing-control-bar .stock-list-count{margin-left:auto}
@media(max-width:700px){
 .listing-control-bar{padding:10px;border-radius:13px}
 .listing-control-bar .customer-toolbar{gap:8px}
 .listing-control-bar .customer-toolbar .customer-search{flex-basis:100%;width:100%;order:0}
 .listing-control-bar .customer-toolbar .customer-search input{font-size:16px}
 .listing-control-bar .customer-toolbar .listing-size-control{order:1;font-size:10px}
 .listing-control-bar .customer-toolbar .customer-new{order:2;flex:1;min-width:0;padding:8px;font-size:12px}
 .listing-control-bar .customer-toolbar .catalog-scan{order:3}
 .listing-control-bar .listing-size-control select{font-size:16px;min-width:60px;padding:6px}
 .listing-control-bar .customer-filter{gap:4px;margin-top:8px;padding-top:6px}
 .listing-control-bar .customer-filter button{font-size:11px;padding:6px 8px}
 .listing-control-bar .customer-filter .category-filter-button{flex:1 1 130px;text-align:left}
 .listing-control-bar .customer-filter .customer-count{font-size:10px}
 .stock-center .stock-list-toolbar.listing-control-bar>input{flex-basis:100%;font-size:16px}
 .stock-center-controls.listing-control-bar .stock-period-controls{min-width:0;flex-wrap:wrap}
}

/* Modal selectors reuse the operational bar without moving footer actions. */
.listing-control-bar.modal-listing-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 8px;padding:10px;border-radius:12px;box-shadow:none}
.modal-listing-toolbar>.input-wrap,.modal-listing-toolbar>.os-field{flex:1 1 200px;min-width:0;margin:0}
.modal-listing-toolbar input:not([type=checkbox]):not([type=radio]){box-sizing:border-box;min-width:0;width:100%;min-height:44px;margin:0;border-radius:9px;font-size:14px}
.modal-listing-toolbar>input[type=search]{flex:1 1 180px}
.listing-control-bar.modal-listing-toolbar button{min-height:44px;font-size:12px;border-radius:9px;margin:0;white-space:normal;max-width:100%;overflow-wrap:anywhere}
.listing-control-bar.modal-listing-toolbar>.submit-button{width:auto;padding:9px 12px}
.modal-listing-toolbar .category-picker-header{display:contents}
.modal-listing-toolbar .category-picker-header p{flex-basis:100%;margin:0;font-size:11px;color:var(--text-secondary)}
.modal-listing-toolbar .category-picker-new{order:2;padding:8px 12px}
.category-manager .modal-listing-toolbar .category-manager-toolbar{display:flex;flex-wrap:wrap;flex:1 1 100%;gap:8px;margin:0;min-width:0}
.category-manager .modal-listing-toolbar .category-manager-toolbar>.input-wrap{flex:1 1 180px;width:auto;min-width:0}
.category-manager .modal-listing-toolbar .category-new{width:auto;padding:9px 12px}
.modal-listing-toolbar>.customer-filter{flex:1 1 100%;min-width:0;margin:0;padding-top:6px}
@media(max-width:700px){
 .listing-control-bar.modal-listing-toolbar{padding:8px;gap:6px;border-radius:11px}
 .modal-listing-toolbar input:not([type=checkbox]):not([type=radio]){font-size:16px}
 .modal-listing-toolbar>.os-field{flex-basis:100%}
 .os-picker-toolbar.modal-listing-toolbar>.submit-button{width:100%;padding:8px 12px}
 .category-manager .modal-listing-toolbar .category-manager-toolbar>.input-wrap{flex-basis:100%}
 .category-manager .modal-listing-toolbar .category-new{width:100%}
 .modal-listing-toolbar .category-picker-new{flex:1}
 .inventory-toolbar.modal-listing-toolbar>button{flex:1 1 120px;padding:8px}
}

/* Shared footer: a reserved flex row, never a layer over form content. */
dialog.mobile-scroll-shell.has-modal-footer{overflow:hidden}
dialog.has-modal-footer .modal-footer-path:not([hidden]){display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;flex:1}
dialog.has-modal-footer>.mobile-dialog-scroll{max-height:calc(100dvh - 64px)}
dialog.has-modal-footer .modal-footer-path> :not(.modal-footer-path):not(.modal-content-scroll){flex-shrink:0}
dialog.has-modal-footer .modal-content-scroll{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent;padding:2px 4px 8px 2px}
dialog.has-modal-footer .modal-action-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:stretch;gap:8px;flex-shrink:0;position:static;margin:8px 0 0;padding:10px 0 0;border-top:1px solid var(--line);background:transparent}
dialog.has-modal-footer .modal-action-footer>button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;max-width:100%;width:auto;min-height:44px;height:auto;margin:0;padding:10px 16px;border-radius:10px;font-size:12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
dialog.has-modal-footer .modal-action-footer>.glass-button{box-shadow:none;border:1px solid var(--line)}
@media(max-width:600px){
 dialog.has-modal-footer>.mobile-dialog-scroll{max-height:calc(100dvh - 58px)}
 dialog.has-modal-footer .modal-action-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-top:8px;padding-bottom:env(safe-area-inset-bottom,0px)}
 dialog.has-modal-footer .modal-action-footer>button{width:100%;padding:9px 8px}
 dialog.has-modal-footer .modal-action-footer>button:only-child{grid-column:1/-1}
 dialog.has-modal-footer .modal-action-footer>button:nth-child(3):last-child{grid-column:1/-1}
}
dialog.has-modal-footer .modal-action-footer>[hidden]{display:none!important}
dialog.has-modal-footer .modal-content-scroll{display:grid;align-content:start;gap:12px}

/* Shared modal heading: readable copy and an independent close target. */
:root dialog.mobile-scroll-shell .modal-compact-header:not(.os-order-header){display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;position:static;min-width:0}
:root dialog.mobile-scroll-shell .modal-compact-header>div{min-width:0;flex:1}
:root dialog.mobile-scroll-shell .modal-compact-header h2{min-width:0;margin:0;font-size:20px;line-height:1.3;letter-spacing:-.35px;white-space:normal;overflow-wrap:anywhere;color:var(--text-primary)}
:root dialog.mobile-scroll-shell .modal-compact-header>h2{flex:1}
:root dialog.mobile-scroll-shell .modal-compact-header p{margin:5px 0 0;font-size:12px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;color:var(--text-secondary)}
:root dialog.mobile-scroll-shell .modal-compact-header .eyebrow{margin:0 0 4px;font-size:9px;line-height:1.4;letter-spacing:1.2px;color:var(--text-subtle)}
:root dialog.mobile-scroll-shell .modal-compact-header>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:44px;min-height:44px;max-width:100%;height:auto;width:auto;margin:0;padding:10px;border:1px solid var(--line);border-radius:12px;box-shadow:none;font-size:12px;line-height:1.3;white-space:normal;color:var(--text-secondary);background:transparent}
:root dialog.mobile-scroll-shell .modal-compact-header>button:hover{color:var(--text-primary);background:var(--surface-hover)}
:root dialog.mobile-scroll-shell .modal-compact-header>button:active{background:var(--surface-pressed)}
:root dialog.mobile-scroll-shell .modal-compact-header>button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
:root dialog.mobile-scroll-shell .modal-compact-header>button .icon{width:18px;height:18px;flex-shrink:0}
:root dialog.mobile-scroll-shell .modal-compact-header>:is(.preference-symbol,.unit-dialog-icon){display:none}
:root dialog.mobile-scroll-shell :is(.os-order-header,.os-wizard .os-dialog-header){margin-bottom:0}
@media(max-width:600px){
 :root dialog.mobile-scroll-shell .modal-compact-header:not(.os-order-header){gap:10px;margin-bottom:12px}
 :root dialog.mobile-scroll-shell .modal-compact-header h2{font-size:18px;line-height:1.3}
 :root dialog.mobile-scroll-shell .modal-compact-header p{font-size:11px}
}
/* The unit picker has legacy ID rules; keep its heading on the shared grid. */
#unit-dialog .unit-dialog-head.modal-compact-header{position:static;margin:0 0 12px}
#unit-dialog .modal-compact-header h2{font-size:20px;margin:0;line-height:1.3}
#unit-dialog .modal-compact-header #unit-dialog-description{margin:5px 0 0;font-size:12px}
#unit-dialog .modal-compact-header .eyebrow{margin:0 0 4px}
#unit-dialog .modal-compact-header #close-units{width:44px;height:44px;padding:10px;border-radius:12px}
@media(max-width:600px){#unit-dialog .modal-compact-header h2{font-size:18px}}

/* Modal fields share density and feedback without changing validation rules. */
:root dialog.mobile-scroll-shell :is(.customer-fields,.os-grid,.os-quote-fields){gap:12px}
:root dialog.mobile-scroll-shell :is(.customer-fields label,.os-field,form>label,.modal-content-scroll>label){min-width:0;max-width:100%;font-size:12px;font-weight:500;line-height:1.4;white-space:normal;overflow-wrap:anywhere;color:var(--text-secondary)}
:root dialog.mobile-scroll-shell .os-field{gap:5px}
:root dialog.mobile-scroll-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]),select,textarea){box-sizing:border-box;min-width:0;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:14px;line-height:1.4;color:var(--text-primary);background:var(--surface-field);--field-fill:var(--surface-field)}
:root dialog.mobile-scroll-shell .customer-fields :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select){margin-top:5px}
:root dialog.mobile-scroll-shell textarea{min-height:84px;resize:vertical}
:root dialog.mobile-scroll-shell :is(input,textarea)::placeholder{color:var(--text-placeholder);opacity:1}
:root dialog.mobile-scroll-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea):focus{outline:none;border-color:var(--text-link);box-shadow:0 0 0 2px var(--accent-ring)}
:root dialog.mobile-scroll-shell :is(input,select,textarea)[aria-invalid=true]{border-color:var(--text-error)!important}
:root dialog.mobile-scroll-shell :is(input,select,textarea)[aria-invalid=true]:focus{box-shadow:0 0 0 2px var(--border-error)}
:root dialog.mobile-scroll-shell :is(.field-validation,.field-hint,.inventory-field-hint,.customer-form-hint,.cep-status){display:block;min-width:0;max-width:100%;font-size:11px;font-weight:400;line-height:1.45;white-space:normal;overflow-wrap:anywhere;margin:4px 0 0}
:root dialog.mobile-scroll-shell :is(.field-hint,.inventory-field-hint,.customer-form-hint,.cep-status){color:var(--text-secondary)}
:root dialog.mobile-scroll-shell .customer-form-hint{margin:0!important}
:root dialog.mobile-scroll-shell .field-validation{color:var(--text-error)}
:root dialog.mobile-scroll-shell :is(.field-validation,.field-hint,.inventory-field-hint,.cep-status):empty{display:none}
:root dialog.mobile-scroll-shell .feedback{box-sizing:border-box;min-width:0;max-width:100%;padding:10px 12px;margin:8px 0;font-size:12px;line-height:1.45;border-radius:10px;white-space:normal;overflow-wrap:anywhere}
:root dialog.mobile-scroll-shell :is(.feedback,.field-validation,.field-hint,.inventory-field-hint,.customer-form-hint,.cep-status)[hidden]{display:none!important}
@media(max-width:600px){
 :root dialog.mobile-scroll-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]),select,textarea){font-size:16px;padding:9px 10px}
 :root dialog.mobile-scroll-shell :is(.customer-fields,.os-grid,.os-quote-fields){gap:10px}
}
/* Search fields already have a surface and icon supplied by their wrapper. */
:root dialog.mobile-scroll-shell .input-wrap>input{border:0;border-radius:0;background:transparent;padding:9px 0;box-shadow:none}
:root dialog.mobile-scroll-shell .input-wrap:focus-within{border-color:var(--text-link);box-shadow:0 0 0 2px var(--accent-ring)}

/* Selection controls: native semantics, compact rows and full-label touch targets. */
:root dialog.mobile-scroll-shell select{width:100%;min-width:0;max-width:100%;min-height:44px;padding:9px 32px 9px 10px;cursor:pointer;text-overflow:ellipsis}
:root dialog.mobile-scroll-shell select option{background:var(--surface-field);color:var(--text-primary)}
:root[data-theme=dark] dialog.mobile-scroll-shell select{color-scheme:dark}
:root[data-theme=light] dialog.mobile-scroll-shell select{color-scheme:light}
:root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]):not([role=switch])){box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%;min-height:44px;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-secondary);font-size:12px;line-height:1.4;overflow-wrap:anywhere;cursor:pointer}
:root dialog.mobile-scroll-shell input:is([type=checkbox],[type=radio]):not([role=switch]){flex:0 0 18px;width:18px;height:18px;min-width:18px;min-height:18px;max-width:18px;margin:0;padding:0;accent-color:var(--text-link);box-shadow:none;cursor:inherit}
:root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]):not([role=switch]):checked){border-color:var(--accent-ring);background:var(--accent-soft);color:var(--text-primary)}
:root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]):not([role=switch]))>.field-validation{flex-basis:100%;margin:0}
:root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]))>span:not(.category-switch-track){min-width:0}
:root dialog.mobile-scroll-shell label:has(>input[role=switch]){min-height:44px;box-sizing:border-box;gap:8px;cursor:pointer}
:root dialog.mobile-scroll-shell input:is([type=checkbox],[type=radio]):focus-visible{outline:2px solid var(--text-link);outline-offset:3px}
:root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]):disabled){cursor:default;opacity:.65}
:root dialog.mobile-scroll-shell select:disabled{cursor:default;opacity:.65}
:root dialog.mobile-scroll-shell .person-type{gap:6px}
:root dialog.mobile-scroll-shell button.category-tag{box-sizing:border-box;min-height:44px;max-width:100%;padding:8px 10px;border-radius:10px;font-size:12px;line-height:1.4;white-space:normal;text-align:left}
:root dialog.mobile-scroll-shell button.category-tag[aria-pressed=true]{background:var(--accent-soft);color:var(--text-link);border-color:var(--accent-ring);font-weight:600}
:root dialog.mobile-scroll-shell button.category-tag[aria-pressed=true]::before{content:'✓';display:inline-block;margin-right:6px}
@media(hover:hover){
 :root dialog.mobile-scroll-shell label:has(>input:is([type=checkbox],[type=radio]):not([role=switch]):not(:disabled)):hover{background:var(--surface-hover)}
 :root dialog.mobile-scroll-shell button.category-tag:not(:disabled):hover{background:var(--surface-hover)}
}
@media(max-width:700px){:root dialog.mobile-scroll-shell select{font-size:16px}}
@media(max-width:360px){:root dialog.mobile-scroll-shell .person-type{grid-template-columns:1fr}}

/* Shared spacing rhythm inside dialogs; keep specialized camera/gallery layouts. */
:root dialog.mobile-scroll-shell{--modal-field-gap:12px;--modal-section-gap:14px}
:root dialog.mobile-scroll-shell :is(.customer-fields,.os-grid,.os-quote-fields){gap:var(--modal-field-gap)}
:root dialog.mobile-scroll-shell :is(.modal-content-scroll,.os-section,.os-equipment-block,.os-quote-items){gap:var(--modal-section-gap)}
:root dialog.mobile-scroll-shell .customer-fields legend:not(.sr-only){margin-bottom:8px}
:root dialog.mobile-scroll-shell .customer-fields .address-heading{margin-top:0;padding-top:10px}
:root dialog.mobile-scroll-shell :is(.inventory-context,.category-edit-note){margin-bottom:10px}
:root dialog.mobile-scroll-shell :is(.category-back,.category-manager-toolbar){margin-bottom:12px}
:root dialog.mobile-scroll-shell :is(.os-communication-card,.os-settings-item){padding:12px;gap:var(--modal-field-gap)}
:root dialog.mobile-scroll-shell .os-communication-card{margin-block:0 12px}
:root dialog.mobile-scroll-shell :is(.os-note,.inventory-field-hint){line-height:1.45}
@media(max-width:700px){:root dialog.mobile-scroll-shell{--modal-field-gap:10px;--modal-section-gap:12px}}
/* Page quantity is a compact toolbar control, not a data-entry field. */
:root .listing-size-control select,:root dialog.mobile-scroll-shell .listing-size-control select{font-size:13px;font-weight:500;line-height:1.3;min-height:44px;height:44px;min-width:64px;width:auto;padding:7px 9px}
:root .listing-size-control select option{font-size:13px;font-weight:400}
:root dialog.mobile-scroll-shell:not(.os-camera-dialog):not(.os-gallery-dialog) .os-body{gap:var(--modal-section-gap)}
:root dialog.mobile-scroll-shell form{gap:var(--modal-field-gap)}
:root dialog.mobile-scroll-shell form.modal-footer-path{gap:0}

/* Inline modal states use one compact surface; AppLoading owns progress. */
:root dialog.mobile-scroll-shell :is(.modal-state,.customer-editor-loading,.category-list-empty,.part-supplier-results>p,.os-picker>p,.category-options>p){box-sizing:border-box;min-width:0;max-width:100%;width:100%;margin:0;padding:14px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-field);color:var(--text-secondary);font-size:12px;font-weight:400;line-height:1.5;text-align:center;white-space:normal;overflow-wrap:anywhere}
:root dialog.mobile-scroll-shell :is(.category-list-empty,.listing-error) :is(h2,h3,strong){font-size:13px;line-height:1.4;color:var(--text-primary);margin:0;overflow-wrap:anywhere}
:root dialog.mobile-scroll-shell :is(.category-list-empty,.listing-error) p{margin:5px 0 0;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
:root dialog.mobile-scroll-shell .listing-error{min-height:0;padding:14px 12px;gap:8px}
:root dialog.mobile-scroll-shell :is(.modal-state-retry,.listing-error-retry,.inventory-body>button:only-child,.inventory-body>.feedback+button){min-height:44px;max-width:100%;width:auto;margin:8px 0 0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;box-shadow:none;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
:root dialog.mobile-scroll-shell :is(.modal-state,.customer-editor-loading)[hidden]{display:none!important}
:root dialog.mobile-scroll-shell .category-catalog:has(>.modal-state){border:0;background:transparent}
@media(max-width:700px){
 :root dialog.mobile-scroll-shell :is(.modal-state,.customer-editor-loading,.category-list-empty,.part-supplier-results>p,.os-picker>p,.category-options>p){padding:12px 10px}
 :root dialog.mobile-scroll-shell :is(.modal-state-retry,.listing-error-retry){width:100%;margin-top:6px}
}

/* Compact confirmations with a separate, always reachable action row. */
:root dialog.mobile-feedback.mobile-scroll-shell{box-sizing:border-box;width:420px;max-width:calc(100vw - 24px);padding:8px;border-radius:20px}
:root dialog.mobile-feedback .mobile-dialog-scroll{padding:12px;scrollbar-gutter:auto}
:root dialog.mobile-feedback .modal-content-scroll{gap:10px;padding:0 2px 4px;scrollbar-gutter:auto}
.mobile-feedback-heading{display:flex;align-items:center;gap:10px;min-width:0}
:root dialog.mobile-feedback .mobile-feedback-symbol{flex:0 0 32px;width:32px;height:32px;margin:0;border-radius:10px;font-size:18px;background:var(--accent-soft);color:var(--text-link);border-color:var(--accent-ring)}
:root dialog.mobile-feedback h2{min-width:0;margin:0;font-size:18px;line-height:1.3;letter-spacing:-.25px;color:var(--text-primary)}
:root dialog.mobile-feedback p{margin:0;font-size:13px;line-height:1.5;white-space:pre-line;color:var(--text-secondary)}
:root dialog.mobile-feedback .mobile-feedback-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;padding-top:10px}
:root dialog.mobile-feedback .mobile-feedback-actions>button{min-height:44px;width:100%;min-width:0;padding:9px 10px;font-size:12px;line-height:1.35;border-radius:10px;white-space:normal;overflow-wrap:anywhere}
:root dialog.mobile-feedback .mobile-feedback-actions>button:only-child{grid-column:1/-1}
:root dialog.mobile-feedback .mobile-feedback-actions>.glass-button{background:transparent;color:var(--text-secondary);box-shadow:none;border:1px solid var(--line)}
:root dialog.mobile-feedback .mobile-feedback-actions>.glass-button:hover{background:var(--surface-hover);color:var(--text-primary)}
:root dialog.mobile-feedback.is-danger .mobile-feedback-symbol,:root dialog.mobile-feedback .mobile-feedback-actions>.mobile-feedback-danger{background:var(--surface-error);color:var(--text-error);border:1px solid var(--border-error);box-shadow:none}
:root dialog.mobile-feedback .mobile-feedback-actions>.mobile-feedback-danger{font-weight:600}
:root dialog.mobile-feedback button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
@media(max-width:600px){:root dialog.mobile-feedback .mobile-dialog-scroll{padding:10px}:root dialog.mobile-feedback h2{font-size:17px}}

/* Compact notifications with readable copy and a stable close target. */
:root .mobile-notifications{box-sizing:border-box;width:min(380px,calc(100vw - 24px));max-height:calc(100dvh - 32px);gap:8px;padding:3px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
:root .mobile-toast{box-sizing:border-box;display:grid;grid-template-columns:28px minmax(0,1fr) 44px;align-items:start;gap:8px;padding:10px;border-radius:14px;min-width:0}
:root .mobile-toast-icon{width:28px;height:28px;min-width:0;margin-top:8px;border-radius:9px;font-size:17px;background:var(--accent-soft);color:var(--text-link)}
:root .mobile-toast[data-type=success] .mobile-toast-icon{background:var(--surface-success);color:var(--text-success);border-color:var(--line)}
:root .mobile-toast[data-type=warning] .mobile-toast-icon{background:var(--surface-warning);color:var(--text-warning)}
:root .mobile-toast-text{min-width:0;align-self:center;padding:2px 0}
:root .mobile-toast strong{font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
:root .mobile-toast p{font-size:12px;line-height:1.45;margin:3px 0 0;white-space:pre-line;overflow-wrap:anywhere}
:root .mobile-toast p[hidden]{display:none!important}
:root .mobile-toast-close{box-sizing:border-box;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:1px solid var(--line);border-radius:10px;background:transparent;box-shadow:none;font-size:22px;line-height:1;color:var(--text-secondary)}
:root .mobile-toast-close:hover{background:var(--surface-hover);color:var(--text-primary)}
:root .mobile-toast-close:active{background:var(--surface-pressed)}
:root .mobile-toast-close:focus-visible{outline:2px solid var(--text-link);outline-offset:1px}
@media(max-width:700px){:root .mobile-notifications{right:max(9px,env(safe-area-inset-right));bottom:max(9px,env(safe-area-inset-bottom));width:calc(100vw - 18px - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));gap:6px}:root .mobile-toast{padding:9px;gap:7px}}
:root dialog.mobile-feedback.is-success .mobile-feedback-symbol{background:var(--surface-success);color:var(--text-success)}.mobile-feedback-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.mobile-feedback-metrics>div{padding:10px;border-radius:10px;background:var(--surface-success);color:var(--text-success);min-width:0}.mobile-feedback-metrics dt{font-size:11px;overflow-wrap:anywhere}.mobile-feedback-metrics dd{font-size:20px;font-weight:700;margin:4px 0 0}.mobile-feedback-metrics>.is-warning{background:var(--surface-warning);color:var(--text-warning)}.mobile-feedback-details{margin:10px 0 14px;border:1px solid var(--line);border-radius:10px;padding:0 10px}.mobile-feedback-details summary{padding:12px 0;min-height:44px;cursor:pointer;font-size:12px;font-weight:600}.mobile-feedback-results{margin:0}.mobile-feedback-results>div{display:grid;gap:4px;padding:9px 0;border-top:1px solid var(--line)}.mobile-feedback-results dt{font-size:12px;font-weight:600;overflow-wrap:anywhere}.mobile-feedback-results dd{font-size:11px;color:var(--text-secondary);margin:0;overflow-wrap:anywhere}.mobile-feedback-results>.is-warning dd{color:var(--text-warning)}.mobile-feedback-details summary:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}

/* Neutral confirmation summary with wrapping for long names. */
.mobile-feedback-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:2px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}
.mobile-feedback-summary>div{min-width:0}.mobile-feedback-summary>div:first-child{grid-column:1/-1}.mobile-feedback-summary dt{font-size:11px;line-height:1.4;color:var(--text-secondary)}.mobile-feedback-summary dd{margin:3px 0 0;font-size:13px;line-height:1.4;font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}.mobile-feedback-summary>.is-emphasis dd{font-size:16px;color:var(--text-link)}

.listing-filter-panel[hidden]{display:none!important}.listing-disclosure .listing-filters-toggle{width:auto;flex:none;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-secondary);box-shadow:none;font-size:12px;white-space:nowrap}.listing-disclosure .listing-filters-toggle:hover{background:var(--surface-hover)}.listing-disclosure .listing-filters-toggle:active{background:var(--surface-pressed)}.listing-disclosure .listing-filters-toggle:is(.has-filters,[aria-expanded=true]){color:var(--text-link);border-color:var(--text-link)}.listing-filters-toggle:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}.listing-filter-panel>.listing-size-control{display:flex;justify-content:flex-end;margin-top:8px}.listing-active-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.listing-active-filters:has(.listing-filter-summary:not([hidden])){margin-top:8px;border-top:1px solid var(--line);padding-top:8px}.listing-active-filters .listing-filter-summary{flex:1;min-width:0;margin:0}.listing-active-filters .listing-reset{width:auto;margin:0;font-size:11px;min-height:36px;padding:6px 8px;border:1px solid var(--line);border-radius:9px;background:var(--surface-field);color:var(--text-secondary);box-shadow:none}.listing-active-filters .listing-reset:hover{background:var(--surface-hover)}.listing-active-filters .listing-reset:active{background:var(--surface-pressed)}.listing-active-filters .listing-reset:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.listing-disclosure .listing-disclosure-toolbar>.listing-filters-toggle{order:1;flex:1}.listing-disclosure .listing-disclosure-toolbar>.customer-new{order:2;flex:1}.listing-active-filters .listing-reset{min-height:44px}}
.listing-filter-panel,.listing-active-filters{flex-basis:100%;min-width:0;width:100%;box-sizing:border-box}.listing-filter-panel>.stock-center-controls{margin:8px 0;padding:8px;box-shadow:none}.listing-disclosure-toolbar>.listing-filter-panel{grid-column:1/-1}.listing-disclosure-toolbar>.listing-active-filters{grid-column:1/-1}
.listing-control-bar .listing-search-field,.os-kanban-toolbar .listing-search-field{display:flex;align-items:center;gap:10px;flex:1;min-width:0;height:44px;min-height:44px;margin:0;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-field);box-sizing:border-box}.listing-search-icon{display:flex;flex:0 0 18px;color:var(--text-secondary)}.listing-search-icon svg{width:18px;height:18px}.listing-control-bar .listing-search-field>input,.os-kanban-toolbar .listing-search-field>input{width:100%;min-width:0;height:42px;min-height:0;margin:0;padding:0;border:0!important;border-radius:0;background:transparent;box-shadow:none!important;outline:none;font-size:14px;color:var(--text-primary)}.listing-control-bar .listing-search-field:focus-within,.os-kanban-toolbar .listing-search-field:focus-within{border-color:var(--text-link);box-shadow:0 0 0 2px var(--accent-ring)}.listing-disclosure-toolbar{align-items:center}.stock-list-toolbar>.listing-search-field{flex:1 1 240px}@media(max-width:700px){.listing-control-bar .listing-search-field,.os-kanban-toolbar .listing-search-field{flex-basis:100%;width:100%}.listing-control-bar .listing-search-field>input,.os-kanban-toolbar .listing-search-field>input{font-size:16px}}

.listing-control-bar .customer-toolbar .listing-search-field{flex:1 1 160px}.listing-control-bar .customer-toolbar .listing-search-field>input{min-height:0;height:42px;border-radius:0}.os-kanban-toolbar>.listing-search-field{grid-column:1}@media(max-width:700px){.listing-control-bar .customer-toolbar .listing-search-field{flex-basis:100%}.os-kanban-toolbar>.listing-search-field{grid-column:1/-1}}
:root dialog.mobile-scroll-shell .listing-search-field>input{background:transparent!important;border:0!important;box-shadow:none!important;outline:none;border-radius:0;padding:0;font-weight:400}
:root dialog.mobile-scroll-shell .category-manager-toolbar .input-wrap>input,:root dialog.category-manager .input-wrap>input{border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;outline:none;padding-inline:0;min-width:0;font-weight:400}
.listing-disclosure .listing-filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.listing-disclosure .listing-filter-row>.listing-size-control{flex:0 0 auto;align-self:center;margin:0;gap:6px;justify-content:flex-start}.listing-disclosure .listing-filter-fields{align-items:flex-end}.listing-disclosure .listing-filter-fields>.listing-size-control{flex-direction:column;align-items:flex-start;align-self:flex-end;gap:6px;font-size:12px;line-height:1.4}.listing-disclosure .listing-filter-fields>.listing-size-control select{margin:0}.listing-disclosure .listing-filter-row>.customer-count{order:2}.listing-disclosure .listing-filter-panel.listing-filter-row{margin-top:8px}.listing-disclosure .listing-filter-panel>.listing-size-error{flex-basis:100%}@media(max-width:700px){.listing-disclosure .listing-filter-fields>.os-field{flex:1 1 130px;min-width:0;max-width:100%}.listing-disclosure .listing-filter-fields>.os-field select{max-width:100%;min-width:0}.listing-disclosure .listing-filter-fields>.listing-size-control{flex:0 0 auto}.listing-disclosure .listing-filter-row>.listing-size-control{max-width:100%}}
.listing-disclosure .listing-filter-fields>.os-field{margin:0;gap:6px}.listing-disclosure .listing-filter-fields>.os-field select{height:44px;min-height:44px;box-sizing:border-box;margin:0;padding-block:7px;line-height:1.3}

/* One dismissal control for every modal header. */
:root dialog.mobile-scroll-shell .modal-compact-header>button.modal-close-control{width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:10px;border-radius:12px;background:var(--surface-field)}
:root dialog.mobile-scroll-shell .modal-compact-header>button.modal-close-control:hover{background:var(--surface-hover)}
:root dialog.mobile-scroll-shell .modal-compact-header>button.modal-close-control:active{background:var(--surface-pressed)}
/* Optional notification action uses the existing toast lifecycle and touch target. */
:root .mobile-toast-action{display:block;width:100%;min-height:44px;margin:0;padding:2px;border:0;border-radius:7px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-shadow:none}
:root .mobile-toast-action>span{display:block;margin-top:6px;font-size:11px;font-weight:600;color:var(--text-link)}
:root .mobile-toast-action:hover{background:var(--surface-hover)}
:root .mobile-toast-action:active{background:var(--surface-pressed)}
:root .mobile-toast-action:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
/* Chat notices use the sender avatar and a bounded, readable excerpt. */
:root .mobile-toast.has-avatar{grid-template-columns:40px minmax(0,1fr) 44px}
:root .mobile-toast .mobile-toast-avatar{width:40px;height:40px;margin-top:3px;border-radius:50%;overflow:hidden;background:var(--accent-soft);color:var(--text-link);font-size:16px;line-height:1}
:root .mobile-toast-avatar img{display:block;width:100%;height:100%;object-fit:cover}
:root .mobile-toast.has-avatar p:not([hidden]){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;overflow-wrap:anywhere}
:root dialog>.mobile-notifications.is-dialog-notifications{position:absolute;right:8px;bottom:8px;width:calc(100% - 16px);max-width:380px;max-height:calc(100% - 16px);box-sizing:border-box}
:root .mobile-toast.has-secondary-action{display:grid;grid-template-columns:24px minmax(0,1fr) 44px;column-gap:8px;row-gap:5px}
:root .mobile-toast.has-secondary-action>.mobile-toast-icon{width:24px;height:24px}
:root .mobile-toast-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
:root .mobile-toast-actions>.mobile-toast-action{min-width:0;min-height:44px;padding:7px 5px;font-size:11px;font-weight:600;color:var(--text-link);text-align:center;border:1px solid var(--line);border-radius:8px;white-space:normal;overflow-wrap:anywhere}

/* Shared, compact chart data consultation. The dashboard itself never expands. */
:root .glass-button.chart-data-trigger{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;margin-top:var(--space-inline);min-height:var(--control-target);padding:var(--action-padding-block) var(--action-padding-inline);border-radius:var(--action-radius);font-size:var(--type-action);text-align:center;color:var(--text-secondary);background:var(--accent-soft);border-color:var(--accent-ring);box-shadow:none}
:root .glass-button.chart-data-trigger:hover{background:var(--surface-hover)}
:root .glass-button.chart-data-trigger:active{background:var(--surface-pressed)}
.chart-data-dialog{width:680px;max-width:calc(100vw - 24px)}.chart-data-dialog .customer-dialog-header p{margin:4px 0 0;color:var(--text-secondary);font-size:var(--type-meta);overflow-wrap:anywhere}.chart-data-body{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
.chart-data-table{width:100%;table-layout:auto;border-collapse:collapse;font-size:var(--type-body);font-variant-numeric:tabular-nums}
.chart-data-caption{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.chart-data-table th,.chart-data-table td{padding:var(--action-padding-block) var(--space-inline);border-bottom:1px solid var(--line);text-align:left;line-height:1.5;overflow-wrap:anywhere;vertical-align:top}
.chart-data-table th{font-size:var(--type-label);font-weight:600;background:var(--surface-field);color:var(--text-secondary);position:sticky;top:0;z-index:1}.chart-data-table td{font-size:var(--type-body);color:var(--text-primary)}.chart-data-table .chart-data-number{text-align:right;white-space:nowrap}.chart-data-table td:first-child{white-space:nowrap}.chart-data-empty{font-size:var(--type-body);color:var(--text-secondary);padding-block:var(--space-section)}

:root dialog.chart-data-dialog.has-modal-footer .modal-action-footer{display:flex;gap:var(--space-inline);flex-wrap:wrap;align-items:center}
:root dialog.chart-data-dialog.has-modal-footer .modal-action-footer>button{width:auto;margin-left:auto}
.chart-data-exports{display:flex;gap:var(--space-inline);margin-right:auto;min-width:0}
.chart-data-exports .glass-button{min-width:var(--control-target);min-height:var(--control-target);padding:var(--action-padding-block) var(--action-padding-inline);font-size:var(--type-action);border-radius:var(--action-radius)}
.chart-data-export-error{margin:0;font-size:var(--type-body)}
@media(max-width:400px){.chart-data-exports{width:100%;flex:1 0 100%}.chart-data-exports .glass-button{flex:1}}

:root dialog.chart-data-dialog.has-modal-footer .modal-action-footer .chart-data-share{font-size:var(--type-action);margin-left:0}
@media(max-width:600px){:root dialog.chart-data-dialog.has-modal-footer .modal-action-footer .chart-data-exports{width:100%;flex:1 0 100%}.chart-data-exports .glass-button{flex:1}:root dialog.chart-data-dialog.has-modal-footer .modal-action-footer .chart-data-share{flex:1}}

/* Financial chart consultation: summary, daily accordions and compact ledger rows. */
.finance-chart-dialog{width:840px;max-width:calc(100vw - 24px)}.finance-chart-dialog .customer-dialog-header .eyebrow{color:var(--text-link);margin:0 0 var(--space-inline)}.finance-chart-dialog .chart-data-body{scrollbar-gutter:stable}
.finance-chart-explorer{display:grid;gap:var(--space-fields);min-width:0}.finance-explorer-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;border:1px solid var(--line);border-radius:var(--action-radius);background:var(--surface-field);padding:var(--space-fields)}.finance-explorer-total{min-width:0;padding-inline:var(--space-fields);border-left:1px solid var(--line)}.finance-explorer-total:first-child{border:0;padding-left:0}.finance-explorer-total:last-child{padding-right:0}.finance-explorer-total dt{font-size:var(--type-label);color:var(--text-secondary)}.finance-explorer-total dd{margin:var(--space-inline) 0 0;font-size:var(--type-section-title);font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.finance-explorer-total.incoming dd{color:var(--text-success)}.finance-explorer-total.outgoing dd{color:var(--text-error)}.finance-explorer-scope{margin:0;font-size:var(--type-meta);color:var(--text-secondary)}
.finance-chart-data-tools{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:var(--space-inline);min-width:0}.finance-chart-data-tools h3{margin:0;font-size:var(--type-section-title)}.finance-chart-zero-toggle{display:inline-flex;align-items:center;gap:var(--space-inline);min-height:var(--control-target);font-size:var(--type-meta);color:var(--text-secondary);cursor:pointer}.finance-chart-zero-toggle input{width:18px;height:18px;accent-color:var(--text-link);margin:0}
.finance-chart-days{display:grid;gap:var(--space-inline);min-width:0}.finance-chart-day{border:1px solid var(--line);border-radius:var(--action-radius);overflow:hidden;min-width:0}.finance-chart-day.is-expanded{border-color:var(--accent-ring)}.finance-chart-date-toggle{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,1fr) 18px;align-items:center;gap:var(--space-fields);width:100%;min-width:var(--control-target);min-height:var(--control-target);padding:var(--space-fields);border:0;background:transparent;color:var(--text-primary);font:inherit;font-size:var(--type-action);cursor:pointer;text-align:left}.finance-chart-date-toggle:hover{background:var(--surface-hover)}.finance-chart-date-toggle:active{background:var(--surface-pressed)}.finance-chart-date-toggle:focus-visible{outline:2px solid var(--text-link);outline-offset:-3px}.finance-day-date{display:flex;align-items:center;gap:var(--space-inline);min-width:0}.finance-day-calendar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--action-radius);background:var(--surface-hover);color:var(--text-secondary)}.finance-day-date>span:last-child{display:grid;gap:4px;min-width:0}.finance-day-date time{font-size:var(--type-body);font-weight:600}.finance-day-date small{font-size:var(--type-meta);color:var(--text-secondary)}.finance-day-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-fields);min-width:0}.finance-day-values>span{display:grid;gap:4px;min-width:0;text-align:right}.finance-day-values small{font-size:var(--type-meta);color:var(--text-secondary)}.finance-day-values strong{font-size:var(--type-body);font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.finance-day-values .incoming strong{color:var(--text-success)}.finance-day-values .outgoing strong{color:var(--text-error)}.finance-day-calendar .icon,.finance-day-arrow .icon{width:16px;height:16px}.finance-day-arrow{display:flex;align-items:center;justify-content:center;color:var(--text-secondary)}.finance-day-arrow .icon{transform:rotate(-90deg)}.finance-chart-date-toggle[aria-expanded=true] .finance-day-arrow .icon{transform:rotate(90deg)}
.finance-chart-expanded[hidden]{display:none}.finance-chart-expanded{border-top:1px solid var(--line);padding:var(--space-fields);min-width:0}.finance-chart-day-details{display:grid;gap:var(--space-inline);min-width:0}.finance-chart-day-details>p{margin:0;white-space:normal}.finance-chart-entry-list{display:grid;min-width:0}.finance-chart-entry{border-bottom:1px solid var(--line);padding-block:var(--space-fields);padding-left:var(--space-inline);border-left:2px solid var(--text-success);min-width:0}.finance-chart-entry[data-direction=outgoing]{border-left-color:var(--text-error)}.finance-chart-entry:first-child{padding-top:var(--space-inline)}.finance-chart-entry:last-child{border-bottom:0}.finance-chart-entry-heading{display:grid;grid-template-columns:minmax(0,1fr) max-content var(--control-target);gap:var(--space-inline);align-items:center;min-width:0}.finance-chart-entry-heading>div:first-child{display:grid;gap:4px;min-width:0}.finance-chart-entry-heading strong{font-size:var(--type-body);overflow-wrap:anywhere}.finance-chart-entry-heading small{font-size:var(--type-meta);color:var(--text-secondary);overflow-wrap:anywhere}.finance-chart-entry-amount{display:grid;text-align:right;gap:4px}.finance-chart-entry-amount>span{font-size:var(--type-meta);color:var(--text-secondary)}.finance-chart-entry-amount>strong{white-space:nowrap;font-variant-numeric:tabular-nums}.finance-chart-entry .record-row-action{min-width:var(--control-target);min-height:var(--control-target);margin:0;box-shadow:none}.finance-chart-entry-meta{margin:var(--space-inline) 0 0;font-size:var(--type-meta);color:var(--text-secondary);white-space:normal;overflow-wrap:anywhere}.finance-entry-tags{display:flex;align-items:center;flex-wrap:wrap;gap:4px var(--space-inline)}.finance-entry-tags>span:not(:first-child)::before{content:'·';margin-right:var(--space-inline)}.finance-entry-tags .finance-entry-state{color:var(--text-primary)}.finance-chart-day-details .customer-pagination[hidden]{display:none}.finance-chart-change-note{font-size:var(--type-meta);padding:var(--space-inline);border-left:2px solid var(--text-link);background:var(--surface-hover);white-space:normal}.finance-chart-breakdown-totals{margin:0;font-size:var(--type-meta);font-variant-numeric:tabular-nums;white-space:normal}
:root dialog.finance-chart-dialog .modal-action-footer .glass-button{box-shadow:none}.finance-chart-dialog .chart-data-exports{gap:var(--space-inline)}
@media(max-width:500px){.finance-explorer-summary{padding:var(--space-inline)}.finance-explorer-total{padding-inline:var(--space-inline)}.finance-explorer-total dt{font-size:var(--type-meta)}.finance-explorer-total dd{font-size:var(--type-body)}.finance-chart-date-toggle{grid-template-columns:minmax(0,1fr) 18px;gap:var(--space-inline);padding:var(--space-fields)}.finance-day-date{grid-column:1}.finance-day-arrow{grid-column:2;grid-row:1}.finance-day-values{grid-column:1/-1;gap:var(--space-inline)}.finance-day-values>span{text-align:left;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px var(--space-inline)}.finance-chart-entry-heading{grid-template-columns:minmax(0,1fr) var(--control-target)}.finance-chart-entry-heading>div:first-child{grid-column:1}.finance-chart-entry-heading>.finance-chart-entry-amount{grid-column:1;display:flex;flex-wrap:wrap;align-items:baseline;text-align:left;gap:var(--space-inline)}.finance-chart-entry-heading>.record-row-action{grid-column:2;grid-row:1/span 2;align-self:center}.finance-chart-entry-heading>.finance-chart-entry-amount>strong{white-space:normal;overflow-wrap:anywhere}.finance-chart-expanded{padding:var(--space-inline)}}

:root dialog.chart-data-dialog.finance-chart-dialog{width:840px;max-width:calc(100vw - 24px)}.finance-export-mobile{display:none}.finance-chart-dialog .chart-data-exports button,.finance-chart-dialog .chart-data-share{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-inline)}.finance-chart-dialog .chart-data-exports .icon,.finance-chart-dialog .chart-data-share .icon{width:18px;height:18px}
@media(max-width:600px){:root dialog.chart-data-dialog.finance-chart-dialog.has-modal-footer .modal-action-footer{flex-wrap:nowrap}:root dialog.chart-data-dialog.finance-chart-dialog.has-modal-footer .modal-action-footer .chart-data-exports{width:auto;flex:1 1 auto;gap:var(--space-inline)}.finance-chart-dialog .finance-export-desktop,.finance-chart-dialog .finance-footer-share-label{display:none}.finance-export-mobile{display:inline}:root dialog.chart-data-dialog.finance-chart-dialog.has-modal-footer .modal-action-footer .chart-data-share{flex:0 0 var(--control-target);width:var(--control-target);min-width:var(--control-target);padding:var(--action-padding-block)}:root dialog.chart-data-dialog.finance-chart-dialog.has-modal-footer .modal-action-footer>button:last-child{flex:0 0 auto;margin:0}.finance-chart-dialog .chart-data-exports button{padding-inline:var(--space-inline)}}

/* Checkbox labels are plain in every module; retain existing geometry and native focus.
   This shared rule intentionally overrides selected/hover decoration on these labels. */
:root body label:has(>input[type=checkbox]:not([role=switch])){background:transparent!important;border-color:transparent!important;box-shadow:none!important}



/* Approved action notice: compact neutral surface, explicit actions, timed dismissal. */
:root .mobile-notifications{right:var(--space-panel,16px);bottom:calc(max(var(--space-panel,16px),env(safe-area-inset-bottom)) + var(--notice-keyboard,0px));width:min(380px,calc(100vw - 24px));gap:var(--space-inline,8px);max-height:calc(100dvh - 120px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
:root .mobile-toast{position:relative;box-sizing:border-box;display:grid;grid-template-columns:28px minmax(0,1fr) 44px;align-items:start;gap:var(--space-inline,8px);padding:12px 8px 12px 12px;min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--surface-field);color:var(--text-primary);box-shadow:0 8px 26px color-mix(in srgb,var(--text-primary) 13%,transparent);backdrop-filter:none}
:root .mobile-toast .mobile-toast-icon:not(.mobile-toast-avatar){display:grid;place-items:center;width:28px;height:28px;flex:none;margin:0;border-radius:9px;background:var(--accent-soft);color:var(--text-link)}
:root .mobile-toast[data-type=success] .mobile-toast-icon:not(.mobile-toast-avatar){background:color-mix(in srgb,var(--text-success,#178264) 12%,transparent);color:var(--text-success,#178264)}
:root .mobile-toast[data-type=warning] .mobile-toast-icon:not(.mobile-toast-avatar){background:color-mix(in srgb,var(--text-warning) 12%,transparent);color:var(--text-warning)}
:root .mobile-toast[data-type=error] .mobile-toast-icon:not(.mobile-toast-avatar){background:color-mix(in srgb,var(--text-error) 10%,transparent);color:var(--text-error)}
:root .mobile-toast .icon{width:18px;height:18px;flex:none}
:root .mobile-toast .mobile-toast-text{min-width:0;align-self:center}
:root .mobile-toast .mobile-toast-text>strong{display:block;font-size:var(--type-body,13px);font-weight:600;line-height:1.4;color:var(--text-primary);margin:0;overflow-wrap:anywhere}
:root .mobile-toast .mobile-toast-text>p{font-size:var(--type-label,12px);font-weight:400;line-height:1.5;color:var(--text-secondary);margin:4px 0 0;overflow-wrap:anywhere;white-space:pre-line}
:root .mobile-toast .mobile-toast-close{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;flex:none;margin:-8px 0 0;padding:8px;border:0;border-radius:10px;background:transparent;color:var(--text-secondary);box-shadow:none}
:root .mobile-toast .mobile-toast-close:hover{background:var(--surface-hover)}
:root .mobile-toast .mobile-toast-close:active{background:var(--surface-pressed)}
:root .mobile-toast .mobile-toast-action{display:flex;align-items:center;justify-content:flex-start;gap:var(--space-inline,8px);width:fit-content;max-width:100%;min-width:44px;min-height:44px;margin:4px 0 -4px;padding:8px 4px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-link);font-size:var(--type-action,12px);font-weight:600;line-height:1.4;text-align:left;white-space:normal;overflow-wrap:anywhere}
:root .mobile-toast .mobile-toast-action>span{display:block;margin:0;font:inherit;color:inherit}
:root .mobile-toast .mobile-toast-action>span:has(svg){display:flex}
:root .mobile-toast .mobile-toast-action:hover{background:var(--surface-hover)}
:root .mobile-toast .mobile-toast-action:active{background:var(--surface-pressed)}
:root .mobile-toast :is(.mobile-toast-action,.mobile-toast-close):focus-visible{outline:2px solid var(--text-link);outline-offset:-2px}
:root .mobile-toast.has-secondary-action{grid-template-columns:28px minmax(0,1fr) 44px;gap:var(--space-inline,8px)}
:root .mobile-toast .mobile-toast-actions{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:var(--space-inline,8px);min-width:0}
:root .mobile-toast .mobile-toast-actions>.mobile-toast-action{width:auto;flex:1;justify-content:center;margin:0;min-width:44px;padding:8px;border:1px solid var(--line);font-size:var(--type-action,12px)}
:root .mobile-toast-time{position:absolute;left:12px;right:12px;bottom:0;height:2px;background:color-mix(in srgb,var(--text-primary) 6%,transparent);overflow:hidden;pointer-events:none}
:root .mobile-toast-time>span{display:block;width:100%;height:100%;background:color-mix(in srgb,var(--text-primary) 32%,transparent);transform-origin:left}
:root .mobile-toast.is-leaving{opacity:0;transform:translateY(8px);pointer-events:none}
:root dialog>.mobile-notifications.is-dialog-notifications{position:absolute;right:8px;bottom:calc(var(--notice-footer,0px) + 8px);width:calc(100% - 16px);max-width:380px;max-height:calc(100% - var(--notice-footer,0px) - 24px)}
:root .mobile-toast.has-avatar{grid-template-columns:40px minmax(0,1fr) 44px}
:root .mobile-toast.has-avatar .mobile-toast-icon{width:40px;height:40px}
/* Field correction stays in context without the former red banner. */
:root .feedback{box-sizing:border-box;max-width:100%;padding:0;margin:var(--space-inline,8px) 0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:var(--type-label,12px);font-weight:400;line-height:1.5;color:var(--text-error);overflow-wrap:anywhere}
:root .feedback[hidden]{display:none!important}
@media(max-width:700px){:root body.in-workspace>.mobile-notifications{bottom:calc(max(var(--mobile-nav-height,64px),env(safe-area-inset-bottom)) + 12px + var(--notice-keyboard,0px))}:root .mobile-notifications{right:12px;max-height:calc(100dvh - var(--mobile-nav-height,0px) - 130px)}:root .mobile-toast{padding:10px 8px 10px 10px;gap:8px;border-radius:14px}}
@media(prefers-reduced-motion:reduce){:root .mobile-toast{animation:none;transition:none}}

:root .listing-error{position:static;align-items:flex-start;gap:8px;min-height:0;padding:12px 0;border:0;border-radius:0;background:transparent;text-align:left;box-shadow:none}
:root .listing-error h3{font-size:var(--type-body,13px)}
:root .listing-error p{font-size:var(--type-label,12px);color:var(--text-secondary)}

:root dialog>.mobile-notifications.is-dialog-notifications[data-floating=true]{position:fixed;inset:auto;right:var(--notice-right,12px);bottom:var(--notice-bottom,12px);width:min(380px,var(--notice-width,calc(100vw - 24px)));max-height:calc(100dvh - var(--notice-bottom,12px) - 12px);padding:0;margin:0;border:0;border-radius:0;background:transparent;overflow-y:auto;grid-auto-rows:max-content}
:root .mobile-notifications[popover]::backdrop{background:transparent;pointer-events:none}

:root body .feedback{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:var(--type-label,12px);line-height:1.5}

@media(prefers-reduced-motion:reduce){:root .mobile-toast-time{display:none}}
