/* Phone-only progressive layout; desktop tables and calculations stay intact. */
#mobile-nav,#mobile-menu-backdrop,.mobile-cell-label,.mobile-quote-list{display:none}
.mobile-group-title{display:none}
/* All app dialogs must sit above both the sticky header and phone navigation. */
.modal-backdrop{z-index:2200!important}.modal{display:flex;flex-direction:column;overflow:hidden;min-height:0}.modal-head,.modal-foot{flex:0 0 auto}.modal-body{min-height:0;overflow:auto;overscroll-behavior:contain}.modal-head button{display:grid;place-items:center;min-width:44px;min-height:44px;flex-shrink:0;border-radius:50%}.modal-head button:hover{background:#e8eef4}.modal-head h2{min-width:0;overflow-wrap:anywhere}#toast{z-index:2400}
.pwa-install{font-size:12px}#pwa-help{max-width:420px;width:calc(100% - 32px);border:1px solid #dce4ed;border-radius:20px;padding:24px;color:#172033;font:16px/1.7 system-ui,"Microsoft YaHei",sans-serif}#pwa-help::backdrop{background:#17203380}#pwa-help h2{font-size:20px;margin:0 0 16px}#pwa-help p{font-size:14px;color:#526278}#pwa-help button{width:100%;padding:12px;border:0;border-radius:10px;background:#0f766e;color:#fff;font:inherit;cursor:pointer}
#pwa-network{position:fixed;left:12px;right:12px;top:12px;z-index:10000;padding:14px;border:1px solid #dfb371;background:#fff5df;color:#713f12;border-radius:12px;font:14px/1.5 system-ui,sans-serif}#pwa-network[hidden]{display:none}.is-offline .online{color:#a23a20}.is-offline .online i{background:#b42318}
@media(max-width:760px){
  html{font-size:16px;scroll-padding-top:100px;scroll-padding-bottom:150px}body{display:block!important;min-width:0!important;padding-bottom:calc(78px + env(safe-area-inset-bottom));background:#f4f7fb}main{margin:0!important;width:100%!important;min-width:0}body button{touch-action:manipulation}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #0e7490;outline-offset:3px}
  .sidebar{display:none!important}.mobile-menu-open .sidebar{display:flex!important;position:fixed!important;inset:0 0 calc(70px + env(safe-area-inset-bottom)) auto!important;width:min(310px,88vw)!important;height:auto!important;z-index:1200;padding:calc(24px + env(safe-area-inset-top)) 20px 20px!important;overflow:auto}.mobile-menu-open .sidebar .brand,.mobile-menu-open .sidebar .profile{display:flex!important}.mobile-menu-open .sidebar nav{display:flex;flex-direction:column;overflow:visible}.mobile-menu-open #nav button{display:flex;align-items:center;gap:8px;white-space:normal;min-height:46px}.mobile-menu-open #nav button[hidden],.mobile-menu-open [data-admin-only][hidden]{display:none!important}.mobile-menu-open #mobile-menu-backdrop{display:block;position:fixed;inset:0;border:0;background:#17203370;z-index:1199}
  #mobile-nav{display:grid!important;grid-template-columns:repeat(4,1fr);position:fixed;inset:auto 0 0;height:calc(70px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce4ed;z-index:1300;gap:4px;box-shadow:0 -4px 24px #17203309}#mobile-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;border:0;border-radius:12px;background:none;color:#526278;font-size:11px;box-shadow:none;padding:5px;min-width:0;min-height:48px}#mobile-nav button.active{background:#e8f6f3;color:#0f766e}#mobile-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .topbar{position:sticky!important;top:0!important;padding:calc(12px + env(safe-area-inset-top)) 16px 12px!important;min-height:88px;gap:12px;align-items:center;background:#f4f7fbf5;z-index:50}.topbar h1{font-size:24px!important}.topbar .crumb{font-size:10px;margin-bottom:3px}.topbar p,.top-actions>.online,.top-actions>[data-page="editor"]{display:none!important}.top-actions{gap:6px;flex-shrink:0}.top-actions .btn{font-size:12px;min-height:40px;padding:8px}.top-actions #refresh{display:none}.pwa-install{max-width:105px;white-space:normal}
  #app{padding:16px 12px 30px!important;max-width:none!important}.card{border-radius:16px}.form-card{padding:16px}.form-grid,.line-grid,.suite-grid,.suite-summary-grid,.two-col,.three-col,.suite-form-grid{grid-template-columns:minmax(0,1fr)!important;gap:14px}.form-grid>.field,.form-grid>.span-2,.form-grid>.span-4{grid-column:1/-1!important;min-width:0}.field label{font-size:13px!important}.field input,.field select,.field textarea,input[data-decimal-input],.sheet-number{font-size:16px!important;min-height:44px;max-width:100%}.field textarea{min-height:80px}.btn{min-height:44px}.btn:hover{transform:none}.section-head,.quote-toolbar{flex-wrap:wrap;gap:12px;margin-top:20px}.section-head h2,.quote-toolbar h2{font-size:18px}.actions,.pill-row{flex-wrap:wrap;gap:8px}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.kpi{padding:16px!important}.kpi strong{font-size:26px}.kpi-label,.kpi-foot{font-size:12px!important}.role-welcome{padding:18px!important}.quote-workflow-guide,.privacy-notice,.quote-context-bar{position:static!important;font-size:12px}.quote-context-bar{flex-wrap:wrap}.quote-toolbar .actions{width:100%}.quote-toolbar .actions>.btn{flex:1}
  .quote-sheet-shell:has(.mobile-card-table){border:0;background:transparent;box-shadow:none;overflow:visible}.quote-sheet-shell:has(.mobile-card-table)>.quote-sheet-guide{padding:12px 4px;background:none;border:0}.quote-sheet-scroll:has(.mobile-card-table){height:auto!important;max-height:none!important;resize:none!important;overflow:visible!important}.quote-sheet-scroll:has(.mobile-card-table) .quote-sheet{min-width:0!important;width:100%!important;table-layout:auto!important}.mobile-card-table,.mobile-card-table tbody{display:block!important;width:100%!important}.mobile-card-table thead,.mobile-card-table colgroup{display:none!important}.mobile-card-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px;padding:16px!important;background:white!important;border:1px solid #dce4ed;border-radius:16px;height:auto!important;min-height:0!important;box-shadow:0 4px 16px #17203304}.mobile-card-table tbody td{position:static!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;min-width:0!important;max-width:none!important;width:auto!important;height:auto!important;padding:0!important;border:0!important;background:transparent!important;text-align:left!important;box-shadow:none!important;white-space:normal!important;overflow-wrap:anywhere}.mobile-card-table td[style*="display: none"]{display:none!important}.mobile-cell-label{display:block;color:#64748b;font-size:12px;font-weight:500;line-height:1.4;margin-bottom:7px}.mobile-card-table .sheet-number,.mobile-card-table select{width:100%!important}.mobile-card-table input[type="checkbox"]{width:18px!important;height:18px!important;min-height:18px;flex-shrink:0}.mobile-card-table .image-combobox,.mobile-card-table .sheet-model-picker{width:100%;min-width:0}.mobile-card-table .image-combobox-input,.mobile-card-table input[role="combobox"]{min-width:0!important;font-size:16px!important}.mobile-card-table .quote-row-drag-handle,.mobile-card-table .quote-column-resize,.mobile-card-table .quote-row-resize{display:none!important}.mobile-card-table .quote-row-order-controls{display:flex;gap:8px}.mobile-card-table .quote-row-order-controls button{min-width:40px;min-height:40px}
  .mobile-card-table td[data-mobile-column="sequence"],.mobile-card-table td[data-mobile-column="model"],.mobile-card-table td[data-mobile-column="product"],.mobile-card-table td[data-mobile-column="handle"],.mobile-card-table td[data-mobile-column="ear"],.mobile-card-table td[data-mobile-column="lid"],.mobile-card-table td[data-mobile-column="knob"],.mobile-card-table td[data-mobile-column="otherAccessory"],.mobile-card-table td[data-mobile-column="packaging"],.mobile-card-table td[data-mobile-column="actions"],.mobile-card-table td[data-mobile-column="status"],.mobile-card-table td[data-mobile-column="specialProcessNote"],.mobile-card-table td[data-mobile-column="note"]{grid-column:1/-1}.mobile-card-table td[data-mobile-column="sequence"]{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px!important;border-bottom:1px solid #edf2f7!important}.mobile-card-table td[data-mobile-column="sequence"]>.mobile-cell-label{display:none}.mobile-card-table [data-mobile-column="actions"]>.pill-row{display:flex}.mobile-card-table [data-mobile-column="actions"] .btn{flex:1}.mobile-card-table .sheet-dual-money{align-items:flex-start!important;font-size:14px!important}.mobile-cost-details{margin:16px 0;border:1px solid #dce4ed;background:#fff;border-radius:16px;padding:4px 12px}.mobile-cost-details>summary{padding:16px 4px;font-weight:700;cursor:pointer;min-height:48px}.mobile-cost-details[open]>.quote-sheet-shell{margin-top:8px}.mobile-cost-details .quote-sheet-guide{display:none}.mobile-cost-details .mobile-card-table tr{padding:12px!important;background:#f8fafc!important}.mobile-cost-details:where(:not([open]))>.quote-sheet-shell{display:none}
  .sticky-actions{position:sticky!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;display:flex;flex-direction:column;gap:10px;padding:12px!important;border-radius:14px;z-index:40;margin-top:18px}.sticky-actions .summary{font-size:12px;align-self:flex-start}.sticky-actions>.actions{display:flex;flex-wrap:wrap;width:100%}.sticky-actions>.actions .btn{flex:1;font-size:12px;padding:9px}.single-extra-packaging-grid,.suite-extra-packaging-grid,.suite-manual-packaging-grid{grid-template-columns:1fr!important}.suite-price-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.suite-price-cards .quote-total{grid-column:1/-1}.quote-list-toolbar{flex-wrap:wrap;gap:12px}.quote-list-toolbar p{display:none}.quote-list-table-wrap{display:none!important}.mobile-quote-list{display:block}.mobile-list-filters{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(100px,1fr);gap:10px}.mobile-list-filters label{font-size:12px;color:#526278}.mobile-list-filters input,.mobile-list-filters select{display:block;width:100%;font-size:16px;padding:12px;margin-top:6px;border:1px solid #dce4ed;border-radius:10px;background:#fff;color:#172033;min-height:46px}.mobile-list-count{font-size:12px;color:#64748b;margin:14px 2px}.mobile-quote-card{border:1px solid #dce4ed;background:#fff;border-radius:16px;padding:16px;margin-bottom:12px}.mobile-quote-card header{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#64748b}.mobile-quote-card h3{font-size:18px;margin:14px 0 8px}.mobile-quote-card p{font-size:13px;line-height:1.6;margin:6px 0;color:#526278;overflow-wrap:anywhere}.mobile-quote-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:16px 0;font-size:12px;color:#64748b}.mobile-quote-meta strong{font-size:22px;color:#0f766e;font-variant-numeric:tabular-nums}.mobile-quote-card .quote-list-actions{display:flex}.mobile-quote-card .quote-list-actions .btn{flex:1}.quote-list-toolbar>.btn{width:100%}.mobile-quote-list>[data-mobile-more-records]{width:100%}
  .modal{width:calc(100% - 16px)!important;max-width:none!important;max-height:calc(100dvh - 32px)!important;margin:8px!important}.modal-body{padding:16px!important}.modal .form-grid{grid-template-columns:1fr!important}.modal-footer{flex-wrap:wrap;gap:8px}.modal-footer>.btn{flex:1}.image-combobox-popover{max-width:calc(100vw - 24px)!important}.customer-preview-panel{min-width:0}.quotation-builder-layout,.quotation-builder-layout-v2{grid-template-columns:minmax(0,1fr)!important}.quotation-preview-panel{position:static!important;min-width:0;overflow:auto}.quotation-builder-toolbar,.quotation-builder-toolbar{flex-wrap:wrap}.quotation-product-grid,.quotation-document-grid{grid-template-columns:1fr!important}.quotation-suite-summary-scroll{max-width:100%;overflow:auto}.master-data-table-wrap{max-width:100%;overflow:auto}.form-card,.suite-card,.quote-type-card{min-width:0}.pwa-install{border-color:#badbd5;color:#0f766e}.login-shell{min-height:100dvh}.login-card>.pwa-install{width:100%;max-width:none;margin-top:12px}
  .mobile-card-table[data-mobile-type="product"] tbody tr:not([data-line-key]){display:none!important}
  .mobile-card-table .quote-table-scroll-tail,.mobile-card-table .quote-row-resizer,.mobile-card-table .quote-column-resizer{display:none!important}
  .mobile-card-table[data-mobile-type="product"] tr[data-mobile-expanded="false"] td:not([data-mobile-column="sequence"]):not([data-mobile-column="model"]):not([data-mobile-column="coatingType"]):not([data-mobile-column="quantity"]):not([data-mobile-column="totalCost"]):not([data-mobile-column="salesPrice"]):not([data-mobile-column="margin"]):not([data-mobile-column="status"]):not([data-mobile-column="actions"]){display:none!important}
  .mobile-expand{margin-left:auto;color:#0f766e;font-size:12px!important}.mobile-card-table td[hidden],.mobile-card-table td[style*="display: none"]{display:none!important}
  /* Clear, consistent card sections. Controls remain the original table inputs. */
  .mobile-card-table tbody tr{gap:14px 12px;padding:18px!important;border-color:#dce5ed;border-radius:20px;box-shadow:0 4px 18px #17203304}.mobile-card-table td[data-mobile-column="sequence"]{padding-bottom:14px!important;gap:8px;min-height:48px}.mobile-card-table .line-no{width:30px;height:30px;font-size:13px;border-radius:9px}.mobile-card-table .quote-row-order-controls{margin-left:0}.mobile-card-table .quote-row-order-controls button{min-width:32px;min-height:36px}.mobile-expand,.mobile-cost-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px!important;padding:9px 12px!important;border:1px solid #cce3df;border-radius:11px;background:#f1f9f7!important;color:#116b64;font-size:12px!important;font-weight:650;box-shadow:none;cursor:pointer}.mobile-expand svg,.mobile-cost-toggle svg,.mobile-cost-details>summary>svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.mobile-expand[aria-expanded="true"] svg,.mobile-cost-toggle[aria-expanded="true"] svg,.mobile-cost-details[open]>summary>svg{transform:rotate(180deg)}
  .mobile-card-table .mobile-cell-label{font-size:12px;line-height:1.5;margin-bottom:7px;color:#5d6e83}.mobile-card-table td.mobile-group-start{grid-column:1/-1}.mobile-group-title{display:block;font-size:13px;line-height:1.5;font-weight:750;color:#253d52;margin:8px 0 14px;padding:12px 0 9px;border-top:1px solid #e6edf3;letter-spacing:.02em}.mobile-card-table[data-mobile-type="product"] td[data-mobile-column="handle"],.mobile-card-table[data-mobile-type="product"] td[data-mobile-column="ear"],.mobile-card-table[data-mobile-type="product"] td[data-mobile-column="knob"]{background:#f8fafc!important;border:1px solid #e5edf3!important;padding:12px!important;border-radius:12px}.mobile-card-table td[data-mobile-column="totalCost"],.mobile-card-table td[data-mobile-column="salesPrice"],.mobile-card-table td[data-mobile-column="costNoTax"],.mobile-card-table td[data-mobile-column="saleNoTax"]{padding:13px!important;border-radius:12px;border:1px solid #dce9e6!important;background:#f0f8f6!important;min-height:76px;font-size:17px;font-weight:750;font-variant-numeric:tabular-nums}.mobile-card-table td[data-mobile-column="totalCost"],.mobile-card-table td[data-mobile-column="costNoTax"]{background:#f5f7fb!important;border-color:#e3e9f1!important;color:#263d57}.mobile-card-table td[data-mobile-column="margin"],.mobile-card-table td[data-mobile-column="profitMargin"]{grid-column:1/-1;padding:12px!important;background:#fafbfd!important;border:1px solid #e7edf3!important;border-radius:12px}.mobile-card-table td[data-mobile-column="actions"]{padding-top:12px!important;border-top:1px solid #edf1f5!important}.mobile-card-table td[data-mobile-column="actions"] .btn{min-height:40px;min-width:68px}.mobile-card-table td[data-mobile-column="status"] .mobile-cell-label{display:none}.mobile-card-table .image-combobox-control{min-height:48px;border-radius:11px!important}.mobile-card-table td[data-mobile-column="packaging"] .sheet-packaging-options{gap:12px}.mobile-card-table [data-mobile-column="quantity"] input{font-weight:650;text-align:center}
  .mobile-cost-details{padding:0 12px 12px;border-radius:20px}.mobile-cost-details>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;list-style:none;padding:18px 4px}.mobile-cost-details>summary::-webkit-details-marker{display:none}.mobile-cost-details>summary small{display:block;color:#6b7e8e;font-size:11px;font-weight:500;margin-bottom:5px}.mobile-cost-details>summary strong{display:block;font-size:17px;color:#1e354b}.mobile-cost-details .mobile-card-table tbody tr{background:#fff!important;padding:15px!important;border:1px solid #e0e8ef;border-radius:15px;box-shadow:none}.mobile-cost-toggle{float:right;margin:8px 0 0 8px}.mobile-card-table[data-mobile-type="cost"] td[data-mobile-column="product"]{font-size:15px;font-weight:700;padding-bottom:10px!important;border-bottom:1px solid #e6edf3!important}.mobile-card-table[data-mobile-type="cost"] tr[data-mobile-cost-expanded="false"] td:not([data-mobile-column="sequence"]):not([data-mobile-column="product"]):not([data-mobile-column="costNoTax"]):not([data-mobile-column="costWithTax"]):not([data-mobile-column="costTax"]):not([data-mobile-column="domesticTaxFactor"]):not([data-mobile-column="saleNoTax"]):not([data-mobile-column="profitMargin"]):not([data-mobile-column="pricingMethod"]):not([data-mobile-column="pricingValue"]):not([data-mobile-column="exchangeRate"]):not([data-mobile-column="usdSale"]):not([data-mobile-column="note"]){display:none!important}.mobile-cost-total{background:#f1f7f6!important}.mobile-card-table .sheet-dual-money{gap:6px!important;align-items:flex-start!important;line-height:1.5}.mobile-card-table td[data-mobile-column="note"] input,.mobile-card-table td[data-mobile-column="specialProcessNote"] input{min-height:48px;width:100%}
  .mobile-quote-card{padding:18px;border-radius:20px;border-color:#dee6ee;box-shadow:0 3px 18px #17203303}.mobile-quote-card header{min-height:26px;gap:12px}.mobile-quote-number{font-size:11px;letter-spacing:.025em;overflow-wrap:anywhere}.mobile-quote-card header>.badge{font-size:11px;padding:5px 9px;gap:5px;background:#f0f3f7;color:#526278}.mobile-quote-card header>.badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.mobile-quote-card[data-quote-status="PENDING_APPROVAL"] header>.badge{background:#fff4df;color:#88530d}.mobile-quote-card[data-quote-status="APPROVED"] header>.badge,.mobile-quote-card[data-quote-status="PUBLISHED"] header>.badge{background:#e9f6f1;color:#176950}.mobile-quote-card[data-quote-status="REJECTED"] header>.badge{background:#fff0ed;color:#a93827}.mobile-quote-card h3{font-size:18px;line-height:1.5;margin:16px 0 10px}.mobile-quote-identity{display:flex;align-items:baseline;gap:8px}.mobile-quote-identity>span{font-size:10px;color:#496778;background:#eff4f7;padding:3px 7px;border-radius:6px;white-space:nowrap}.mobile-quote-identity>p{margin:0;font-size:13px;color:#4f6579}.mobile-model-block{margin-top:16px;padding:12px;background:#f7f9fc;border:1px solid #eaf0f5;border-radius:11px}.mobile-model-block>small{font-size:10px;color:#718096}.mobile-model-block .mobile-models{font-size:13px;margin:4px 0 0;color:#2f465f;font-weight:550}.mobile-quote-meta{margin:16px 0;align-items:flex-start;color:#334c61;font-size:13px}.mobile-quote-meta>span:first-child>small{display:block;color:#718096;font-size:10px;margin-top:6px}.mobile-quote-quantity{text-align:right;font-size:10px;color:#718096}.mobile-quote-quantity>b{display:block;margin-top:4px;font-size:16px;color:#253f53}.mobile-quote-amount{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#edf7f4;border:1px solid #daece6;padding:15px 12px;border-radius:12px;margin:0 0 16px}.mobile-quote-amount>span{font-size:12px;color:#366c60}.mobile-quote-amount>strong{font-size:24px;color:#0c6b60;font-weight:750;line-height:1.25;font-variant-numeric:tabular-nums}.mobile-quote-card .quote-list-actions{gap:8px}.mobile-quote-card .quote-list-actions .btn{min-height:43px;font-size:13px;border-radius:10px}.mobile-quote-card .quote-list-actions .btn:first-child{background:#eff7f5;color:#0f6d64;border-color:#cbe2db}.mobile-list-filters input,.mobile-list-filters select{border-radius:12px}.quote-workflow-guide{display:none!important}
  .modal-backdrop{padding:calc(12px + env(safe-area-inset-top)) 0 0!important;align-items:end;justify-items:stretch;background:#142b4266;backdrop-filter:blur(5px)}.modal{width:100%!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top))!important;margin:0!important;border-radius:24px 24px 0 0!important;border:1px solid #e3eaf1!important;box-shadow:0 -14px 60px #122b4324}.modal-head{padding:17px 18px!important;gap:12px;background:#fff!important;z-index:1}.modal-head h2{font-size:16px;line-height:1.5}.modal-head button{background:#f0f4f8;color:#3b5268;font-size:25px;min-width:44px;min-height:44px}.modal-body{padding:18px!important;max-height:none!important}.modal-foot{padding:12px 18px calc(16px + env(safe-area-inset-bottom))!important;background:#fff;border-top:1px solid #e6edf3}.modal-foot .btn{min-height:46px;flex:1}.quotation-menu-section{padding:14px!important;border-radius:14px!important;background:#f7f9fc!important;border:1px solid #e6edf3!important}.quotation-menu-section>b{font-size:13px;margin-bottom:5px}.quotation-menu-section>.btn{width:100%;min-height:46px;text-align:left;background:#fff;border-color:#e1e8f0;white-space:normal}.quotation-menu-section>.btn.primary{color:white;background:#0f766e;border-color:#0f766e}.quotation-menu-actions{gap:14px}
  body:not(:has(#app)){padding-bottom:0!important}.review-decision-actions{display:flex;flex-direction:column;gap:12px}.review-decision-actions>div{display:flex;gap:8px}.review-decision-actions .btn{flex:1;font-size:13px}
  @media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
}
