/* Restore fluid sizing after legacy desktop-only overrides. Desktop retains its rails and tables. */
body{min-width:0}.shell{grid-template-columns:232px minmax(0,1fr)}.workspace,.content,.panel,.document-workspace,.record-workspace{min-width:0;max-width:100%}.content{width:100%}button,input,select,textarea{touch-action:manipulation}textarea{font:inherit;max-width:100%}.table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap:focus-visible{outline:2px solid var(--green);outline-offset:-2px}.record-tabs{max-width:100%;overscroll-behavior-x:contain}.context{min-width:0}.context select{max-width:100%}.topbar{gap:12px}.top-actions{flex-shrink:0}.manage-record:focus-visible{outline-offset:-3px}.skip-workspace{position:fixed;top:8px;left:8px;transform:translateY(-150%);z-index:10000;background:var(--green);color:white;padding:12px 18px;border-radius:8px}.skip-workspace:focus{transform:none}[hidden]{display:none!important}
@media(max-width:1180px){.content{padding:24px 20px}.topbar{padding:14px 20px}.home-main-grid{grid-template-columns:minmax(0,1fr)}.home-side{grid-column:auto;grid-row:auto}.home-main-grid>.recent-stream{grid-column:auto;grid-row:auto}.home-side{display:grid;grid-template-columns:1fr 1fr;gap:20px}.quick-directory{padding-top:0}.document-location-field{flex-wrap:wrap}.document-location-field label{min-width:0;flex:1 1 220px}.manage-split.has-selection{grid-template-columns:minmax(240px,.7fr) minmax(0,1.3fr)}.manage-split.has-selection .manage-record{flex-direction:column;gap:8px}.manage-split.has-selection .manage-record>span:last-child{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px}.record-layout{min-width:0}}
@media(max-width:960px){.shell{display:block}.shell>aside{display:none!important}#menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;flex-shrink:0}.topbar{position:sticky;top:0;z-index:15;padding:12px 16px;background:var(--surface,#fff);flex-wrap:wrap;min-height:68px}.context{flex:1}.top-actions{gap:4px}.top-actions .badge{display:none}.top-actions button{padding:10px;font-size:13px}.context select{width:100%;max-width:240px}.workspace-scope-badge{display:none}.content{padding:20px 16px}.record-workspace{grid-template-columns:minmax(200px,.6fr) minmax(0,1.4fr)}.record-rail{min-width:0}.home-scoreboard{grid-template-columns:repeat(3,minmax(0,1fr))}.home-scoreboard section{padding:18px}.home-intro{gap:20px;flex-wrap:wrap}.manage-metrics>div{padding:18px}.manage-heading{align-items:flex-start}.manage-heading .buttons{justify-content:flex-end}.list-toolbar{flex-wrap:wrap}.list-toolbar label{min-width:140px;flex:1}.inventory-toolbar{flex-wrap:wrap}body.editor-open .workspace{grid-column:auto}body.editor-open #editor[open],body.editor-open #editor.with-record-list[open],.authorizing #authorize[open]{margin:0;width:100%;padding:16px;min-height:calc(100dvh - 68px);max-width:100%;grid-template-columns:minmax(0,1fr)}.editor-record-list{display:none}body.editor-open #editor.with-record-list form{border-radius:10px}body.editor-open .dialog-head,body.editor-open #editor.with-record-list .dialog-head{border-radius:10px 10px 0 0}.authorizing #authorize[open]{max-height:100dvh;overflow:auto}.login .welcome{padding:36px}.login-form{padding:32px}.welcome h1{font-size:40px}#navigation-drawer{background:#17362d;overflow-y:auto;padding-bottom:max(20px,env(safe-area-inset-bottom));overscroll-behavior:contain}#navigation-drawer .nav-item{min-height:44px}#navigation-drawer .nav-create{min-height:36px;width:36px}.nav-group .nav-item{margin-left:0;width:100%}}
@media(max-width:700px){h1,.title-row h1{font-size:26px}.content{padding:16px 12px}.topbar{gap:8px;padding:10px 12px}.top-actions{margin-left:auto}.top-actions button{min-height:40px}.context{flex-basis:calc(100% - 60px)}.context select{max-width:none}.topbar:has(.context select) .top-actions{width:100%;justify-content:flex-end}.topbar .context strong{overflow-wrap:anywhere}.banner{font-size:12px;line-height:1.5;margin-bottom:16px}.home-intro,.title-row,.module-head,.manage-heading{display:flex;flex-direction:column;align-items:stretch;gap:16px}.home-intro>*{max-width:100%}.home-launch,.launch-secondary{width:100%;min-width:0}.home-scoreboard,.stats,.manage-metrics{grid-template-columns:minmax(0,1fr);gap:10px}.home-scoreboard section{border-right:0;border-bottom:1px solid var(--border)}.home-scoreboard section:last-child{border-bottom:0}.home-side{display:block}.quick-directory{padding-top:20px}.home-main-grid,.split{display:block}.attention-tabs{overflow:auto}.attention-tabs button{flex-shrink:0}.attention-row{flex-wrap:wrap;gap:12px}.attention-row>button{margin-left:auto}.stream-grid,.home-main-grid .stream-grid{grid-template-columns:1fr}.recent-stream>header{align-items:flex-start;gap:10px;flex-wrap:wrap}.manage-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.manage-metrics>div:last-child{grid-column:1/-1}.manage-metrics strong{font-size:23px}.manage-heading .buttons{justify-content:flex-start}.manage-split.has-selection{grid-template-columns:minmax(0,1fr)}.manage-split.has-selection .manage-register{display:none}.manage-detail-head{padding:20px}.manage-detail-head h2{font-size:21px}.manage-section,.manage-facts,.manage-detail-actions{padding:18px}.manage-toolbar{padding:16px}.manage-toolbar label:first-child{flex-basis:100%}.manage-toolbar button{flex:1}.manage-record{padding:18px 16px;gap:10px}.manage-record b{font-size:15px}.manage-record>span:last-child{max-width:48%}.manage-detail-amount strong{font-size:25px}.record-workspace{display:block}.record-rail{display:none}.document-workspace{width:100%}.record-summary,.module-head{padding:18px}.record-tabs{gap:4px}.record-tabs button{padding:12px;min-height:44px}.document-header-refined,.document-identity{flex-wrap:wrap;gap:16px}.document-bottom,.detail-grid,.customer-profile-details,.customer-balance-cards{grid-template-columns:minmax(0,1fr)!important}.document-metric{min-width:0}.document-totals{width:100%;max-width:100%}.document-item-table{min-width:0}.document-item{overflow-wrap:anywhere}.detail,.panel-title{padding:18px}.panel-title{flex-wrap:wrap;gap:12px}.record-row{grid-template-columns:minmax(0,1fr);gap:12px}.record-amount{text-align:left}.list-row,.balance-document-row{flex-wrap:wrap}.balance-drilldown{padding:16px}.balance-drilldown .record-summary>div:last-child{text-align:left}.buttons>button{min-height:44px}.list-toolbar{gap:10px;padding:16px}.list-toolbar label:first-child{flex-basis:100%}.list-pagination{gap:8px;flex-wrap:wrap;padding:12px!important}.list-pagination select{min-height:40px}.list-pagination button{min-height:40px}.table-wrap table{white-space:normal;min-width:580px}.table-wrap table th,.table-wrap table td{padding:14px 12px}.mobile-record-table{display:block!important;min-width:0!important;width:100%!important}.mobile-record-table thead{display:none}.mobile-record-table tbody{display:block}.mobile-record-table tr{display:block;padding:14px 16px;border-bottom:1px solid var(--border)}.mobile-record-table td{display:grid;grid-template-columns:minmax(90px,.65fr) minmax(0,1.35fr);gap:6px 14px;text-align:left!important;white-space:normal!important;border:0;padding:8px 0!important;min-width:0!important;max-width:none!important;overflow-wrap:anywhere}.mobile-record-table td:before{content:attr(data-column);font-size:12px;color:var(--muted);font-weight:500;grid-column:1}.mobile-record-table td>*{grid-column:2;min-width:0}.mobile-record-table td[colspan]{display:block}.mobile-record-table td[colspan]:before{display:none}.mobile-record-table td:first-child{font-weight:600}.mobile-record-table td .buttons{gap:8px}.mobile-record-table td button{white-space:normal;text-align:left}.mobile-record-table td:empty{display:none}.fields{grid-template-columns:minmax(0,1fr)}.dialog-body input,.dialog-body select,.dialog-body textarea,.smart-select input,.login-card input{font-size:16px!important}.dialog-head{gap:12px}body.editor-open #editor[open],body.editor-open #editor.with-record-list[open]{padding:8px}body.editor-open .dialog-head,body.editor-open #editor.with-record-list .dialog-head{padding:18px 16px}body.editor-open .dialog-body,body.editor-open #editor.with-record-list .dialog-body{padding:18px 16px}body.editor-open .dialog-foot,body.editor-open #editor.with-record-list .dialog-foot{padding:14px 16px;padding-bottom:max(14px,env(safe-area-inset-bottom));flex-wrap:wrap}body.editor-open .dialog-head h2{font-size:23px}.form-kind-icon{display:none}.document-location-field,.document-location-context{padding:14px;gap:12px}.document-location-field label{flex-basis:100%}.dialog-body .line,.dialog-body .po-line,.dialog-body .compact-item,.dialog-body #lines>.compact-item,.dialog-body .compact-item.quantity-only,.dialog-body .po-line.compact-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;padding:14px!important;gap:12px!important}.dialog-body .compact-item>label:first-child,.dialog-body #lines>.compact-item>label:first-child,.dialog-body .line>div:first-child{grid-column:1/-1!important}.dialog-body .compact-item .line-amount,.dialog-body #lines>.compact-item .line-amount{grid-column:auto!important;grid-row:auto!important;text-align:left}.dialog-body .compact-item>button,.dialog-body #lines>.compact-item>button{grid-column:auto!important;grid-row:auto!important}.form-totals>label,.form-totals>label:has(select){grid-template-columns:minmax(0,1fr)!important;gap:8px}.dialog-body .form-totals{padding:18px}.journal-editor-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;padding:14px}.journal-editor-row>label:first-child{grid-column:1/-1}.dialog-body:has(#refund-source)>label{grid-template-columns:1fr}.discard-inline{flex-wrap:wrap;padding:14px!important}.login{grid-template-columns:1fr}.welcome{display:none}.login-form{min-height:100dvh;padding:28px 20px}.login-card{max-width:420px}#authorize{width:100%;max-height:100dvh}.smart-select-menu{max-width:100%;min-width:0!important}.manage-overview .stats{grid-template-columns:1fr}.manage-overview .stat .value{font-size:26px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(max-width:700px){.sales-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0}.sales-metrics>div{min-width:0;padding:18px!important;border-bottom:1px solid var(--border)}.sales-metrics strong{font-size:22px!important;overflow-wrap:anywhere}.sales-heading{display:flex;flex-wrap:wrap;gap:16px}.sales-heading>div{min-width:0}.document-metrics{grid-template-columns:minmax(0,1fr)!important;margin:0 16px 16px}.document-header-refined{padding:18px}.bank-workspace .module-head{align-items:stretch}#bank-switch{min-width:0;font-size:19px;width:100%}.bank-account-summary{flex-direction:column;align-items:stretch;padding:18px}.bank-account-tools{flex-wrap:wrap}.bank-columns.has-detail{display:flex;flex-direction:column-reverse}.bank-columns.has-detail .bank-register{display:none}.bank-detail{position:static;width:100%;max-height:none;box-shadow:none;padding:18px}.bank-detail header{position:static}.bank-facts>div{grid-template-columns:minmax(80px,.7fr) minmax(0,1.3fr);gap:12px}body.bank-pane-open #editor[open]{position:fixed;inset:0;margin:0;width:100%;max-width:100%;padding:0;min-height:0;height:100dvh;max-height:100dvh}body.bank-pane-open #editor form{height:100dvh;min-height:0}body.bank-pane-open #editor .dialog-body{overflow:auto;flex:1;min-height:0}body.bank-pane-open #editor .dialog-foot{position:static}body.bank-pane-open #editor .payment-part,body.bank-pane-open #editor .payment-correction{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){.inventory-detail{display:block!important}.inventory-rail{display:none!important}.inventory-detail>aside{display:none!important}.inventory-form-grid,.inventory-info-grid{grid-template-columns:minmax(0,1fr)!important}.transfer-item-row,.transfer-receive-row,.form-item-row,.credit-entry-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;padding:16px!important}.transfer-item-row>label:first-child,.transfer-receive-row>div:first-child,.form-item-row>div:first-child{grid-column:1/-1}.transfer-route-cards{grid-template-columns:minmax(0,1fr)!important;gap:12px}.transfer-route-cards>span{transform:rotate(90deg);justify-self:center}.stock-count-preview{grid-template-columns:minmax(0,1fr)!important}.inventory-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-metrics>div{min-width:0}.inventory-metrics strong{overflow-wrap:anywhere}.profile-card-grid{grid-template-columns:minmax(0,1fr)!important}}
