/* Logic Gate ERP — mobile and tablet layout refinements */
:root{--lgt-mobile-gutter:16px}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--erp-nav-header-height,76px) + 12px)}
body{min-width:320px;overflow-x:hidden}
.erp-navigation-shell,.erp-navigation-shell>.workspace,.erp-navigation-shell main,.erp-navigation-shell .panel,.erp-navigation-shell .quotation-page{min-width:0;max-width:100%}
.erp-navigation-shell .workspace>*{max-width:100%}
.erp-navigation-shell .workspace h1,.erp-navigation-shell .workspace h2,.erp-navigation-shell .workspace h3{overflow-wrap:anywhere}
.erp-navigation-shell .tablewrap,.erp-navigation-shell .purchase-document-table,.erp-navigation-shell .product-adjustment-serials,.erp-navigation-shell .purchase-return-serials{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.erp-navigation-shell .tablewrap table{min-width:620px}
.erp-navigation-shell input,.erp-navigation-shell select,.erp-navigation-shell textarea,.erp-navigation-shell button,.erp-navigation-shell .button{max-width:100%}
.erp-navigation-shell input,.erp-navigation-shell select,.erp-navigation-shell textarea{min-width:0}
.erp-navigation-shell .formgrid>*{min-width:0}
.erp-navigation-shell .formgrid input,.erp-navigation-shell .formgrid select,.erp-navigation-shell .formgrid textarea{width:100%}
.erp-navigation-shell .workspace img,.erp-navigation-shell .workspace svg{max-width:100%}
.erp-navigation-shell .customer-toolbar,.erp-navigation-shell .product-section-title,.erp-navigation-shell .quote-heading,.erp-navigation-shell .quote-toolbar,.erp-navigation-shell .product-inline-actions,.erp-navigation-shell .product-form-footer{min-width:0}
.erp-navigation-shell .product-form-footer,.erp-navigation-shell .quote-actions,.erp-navigation-shell .quote-view-actions{flex-wrap:wrap}
.erp-navigation-shell .erp-support-button,.erp-navigation-shell button,.erp-navigation-shell .button{touch-action:manipulation}
body>footer{display:flex;align-items:center;justify-content:center;gap:12px 20px;flex-wrap:wrap;padding:24px 16px;margin-top:24px;background:#fff;border-top:1px solid #e8ebef;color:#647084;text-align:center;line-height:1.5}
.erp-app-download{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 16px;border:1px solid #f97316;border-radius:10px;background:#111827;color:#fff!important;font-size:13px;font-weight:750;line-height:1.3;text-decoration:none!important;box-shadow:0 3px 10px #11182712;white-space:normal}
.erp-app-download:hover{background:#222b3b;color:#fff!important}
.erp-app-download .erp-app-download-icon{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#f97316;color:#111827;font-size:17px;font-weight:900}
.erp-app-download small{display:block;margin-top:2px;color:#cbd5e1;font-size:10px;font-weight:500}
@media(max-width:1100px){
 .erp-navigation-shell:not(.dashboard-shell){grid-template-columns:220px minmax(0,1fr)}
 .erp-navigation-shell:not(.dashboard-shell)>aside#erp-module-sidebar{width:220px}
 .erp-navigation-shell .workspace{padding-left:20px;padding-right:20px}
 .erp-navigation-shell .quote-summary-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
 :root{--lgt-mobile-gutter:12px}
 .erp-header-stack header{flex-wrap:wrap;gap:8px 10px;padding-left:12px;padding-right:12px}
 .erp-brand-header{min-height:60px}
 .erp-brand-text{font-size:10px;max-width:calc(100vw - 190px)}
 .erp-brand-text small{font-size:7px}
 .erp-header-search-area{order:3;flex:1 1 100%;width:100%;max-width:none;min-width:0;margin:0 0 8px}
 .erp-header-search-area form,.erp-header-search-area .erp-global-search{width:100%;max-width:none;min-width:0}
 .erp-header-search-area input{width:100%;min-width:0;font-size:14px}
 .erp-command-actions{gap:7px;flex:0 0 auto}
 .erp-command-actions .erp-daybook-button{padding:7px}
 .erp-command-actions .erp-daybook-button span,.erp-command-actions .erp-icon-button[title="Website"]{display:none}
 .erp-user-name{max-width:74px}
 .erp-customer-actions{gap:7px}
 .erp-navigation-shell .workspace,.erp-navigation-shell.dashboard-shell .workspace{padding:58px 12px 22px;min-width:0}
 .erp-navigation-shell .workspace>.eyebrow{font-size:10px;overflow-wrap:anywhere}
 .erp-navigation-shell .workspace>h1{font-size:clamp(20px,5vw,27px);line-height:1.3;margin:8px 0 17px}
 .erp-navigation-shell .workspace .panel{min-width:0}
 .erp-navigation-shell .workspace .formgrid{grid-template-columns:minmax(0,1fr)!important;gap:6px 12px}
 .erp-navigation-shell .workspace .formgrid>*{grid-column:1/-1;min-width:0}
 .erp-navigation-shell .workspace .formgrid label{margin-bottom:12px}
 .erp-navigation-shell .workspace input,.erp-navigation-shell .workspace select,.erp-navigation-shell .workspace textarea{font-size:16px;min-height:44px}
 .erp-navigation-shell .workspace textarea{min-height:90px}
 .erp-navigation-shell .workspace button,.erp-navigation-shell .workspace .button{min-height:40px}
 .erp-navigation-shell .workspace .tablewrap{margin-left:0;margin-right:0;padding:6px 8px}
 .erp-navigation-shell .workspace .stats,.erp-navigation-shell .workspace .cards{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .erp-navigation-shell .workspace .dashboard-grid{gap:10px}
 .erp-navigation-shell .workspace .dashboard-panel{padding:14px}
 .erp-navigation-shell .workspace .quote-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .erp-navigation-shell .workspace .quote-grid{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-meta{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-meta label:nth-child(n){grid-column:auto}
 .erp-navigation-shell .workspace .quote-settings-fields{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-settings-wide{grid-column:auto}
 .erp-navigation-shell .workspace .quote-template-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .erp-navigation-shell .workspace .quote-settings-top{align-items:flex-start}
 .erp-navigation-shell .workspace .quote-settings-actions{display:flex;gap:9px;flex-wrap:wrap}
 .erp-navigation-shell .workspace .quote-settings-actions>*{flex:1 1 150px}
 .erp-navigation-shell .workspace .product-form-footer{align-items:stretch;gap:9px}
 .erp-navigation-shell .workspace .product-form-footer button,.erp-navigation-shell .workspace .product-form-footer .button{flex:1 1 130px}
 .erp-navigation-shell .workspace .customer-toolbar{gap:10px}
 .erp-navigation-shell .workspace .party-toolbar .party-search{min-width:0}
 .erp-navigation-shell .workspace .sales-cart-table{min-width:760px}
 .erp-navigation-shell .workspace .product-image-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .erp-navigation-shell .workspace .product-stock-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .erp-navigation-shell .workspace .product-stock-row button{grid-column:1/-1}
 .erp-navigation-shell .workspace .purchase-expense-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .erp-navigation-shell .workspace .purchase-expense-row>*{min-width:0}
 .erp-navigation-shell .workspace .purchase-document{padding:16px 12px}
 .erp-navigation-shell .workspace .purchase-document-heading,.erp-navigation-shell .workspace .purchase-document-meta,.erp-navigation-shell .workspace .purchase-document-bottom{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .purchase-document-heading>div:last-child{text-align:left}
 body>footer{gap:12px;padding:20px 14px;font-size:12px}
 .erp-app-download{width:100%;max-width:360px;font-size:13px}
}
@media(max-width:420px){
 .erp-brand-text{max-width:calc(100vw - 160px);font-size:9px}
 .erp-brand-monogram{width:31px;height:31px}
 .erp-command-actions{gap:5px}
 .erp-command-actions .erp-icon-button{width:31px;height:31px}
 .erp-navigation-shell .workspace,.erp-navigation-shell.dashboard-shell .workspace{padding-left:10px;padding-right:10px}
 .erp-navigation-shell .workspace .dashboard-kpis{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-template-options{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-settings-logo-row{align-items:flex-start}
 .erp-navigation-shell .workspace .quote-settings-logo-preview{max-width:100%}
 .erp-navigation-shell .workspace .product-image-grid{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-doc-items{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.erp-app-download{scroll-behavior:auto}}
/* Mobile UX polish pass 2 — compact header, dashboard cards and touch targets */
@media(max-width:760px){
  .erp-header-stack .erp-command-header{gap:7px 10px;padding:9px 12px;min-height:0}
  .erp-command-header .erp-brand-link{margin:0;min-height:30px}
  .erp-command-header .erp-brand-monogram{width:30px;height:30px;border-radius:9px}
  .erp-command-header .erp-brand-text{font-size:10px;line-height:1.3;max-width:none}
  .erp-command-header .erp-brand-text small{font-size:7px;letter-spacing:.7px;margin-top:2px}
  .erp-command-actions{min-height:32px;align-items:center;gap:4px}
  .erp-command-actions .erp-icon-button{width:32px;height:32px;padding:5px}
  .erp-command-actions .erp-daybook-button{width:32px;height:32px;padding:6px;display:grid;place-items:center}
  .erp-command-actions .erp-daybook-button .erp-ui-icon{width:17px;height:17px}
  .erp-command-actions a[title="Support"],.erp-command-actions button[data-erp-fullscreen]{display:none!important}
  .erp-command-actions .erp-language-summary{min-height:32px;padding:0 5px;gap:4px}
  .erp-command-actions .erp-avatar{width:31px;height:31px}
  .erp-header-search-area{margin:0;width:100%;max-width:none}
  .erp-toolbar-search input{height:40px;padding-top:8px;padding-bottom:8px;border-radius:11px}
  .erp-navigation-shell .workspace,.erp-navigation-shell.dashboard-shell .workspace{padding-top:52px}
  .erp-navigation-shell .workspace>h1{margin-top:6px;margin-bottom:13px}
  .erp-navigation-shell .workspace>.eyebrow{margin-top:0}
  .erp-navigation-shell .workspace .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:12px}
  .erp-navigation-shell .workspace .dashboard-kpi{padding:11px 10px;border-radius:13px}
  .erp-navigation-shell .workspace .metric-heading{min-height:0;align-items:flex-start;gap:7px}
  .erp-navigation-shell .workspace .metric-icon{width:29px;height:29px;flex:0 0 29px;font-size:15px}
  .erp-navigation-shell .workspace .metric-label{font-size:10px;line-height:1.35;display:block}
  .erp-navigation-shell .workspace .dashboard-kpi .metric-heading strong{font-size:clamp(14px,4vw,19px);line-height:1.3;overflow-wrap:anywhere;letter-spacing:-.3px}
  .erp-navigation-shell .workspace .metric-details{margin-top:9px;padding-top:7px;min-height:0}
  .erp-navigation-shell .workspace .metric-details>div{gap:5px;margin:5px 0;font-size:9px;line-height:1.35}
  .erp-navigation-shell .workspace .metric-details>div span{min-width:0;overflow-wrap:anywhere}
  .erp-navigation-shell .workspace .metric-details>div b{white-space:nowrap;font-size:9px}
  .erp-navigation-shell .workspace .dashboard-grid{gap:10px}
  .erp-navigation-shell .workspace .dashboard-panel{padding:13px;border-radius:14px}
  .erp-navigation-shell .workspace .dashboard-panel h2{gap:8px;font-size:14px;line-height:1.35;margin-bottom:10px;padding-bottom:10px}
  .erp-navigation-shell .workspace .dashboard-panel h2 .dashboard-icon{width:27px;height:27px;flex:0 0 27px;font-size:14px}
  .erp-navigation-shell .workspace .dashboard-panel h2 small{font-size:9px}
  .erp-navigation-shell .workspace .customer-overview{min-height:0;gap:8px;flex-wrap:wrap;justify-content:space-between}
  .erp-navigation-shell .workspace .customer-gauge{width:min(48%,150px);height:auto}
  .erp-navigation-shell .workspace .customer-gauge svg{height:auto}
  .erp-navigation-shell .workspace .customer-types{gap:12px;font-size:11px}
  .erp-navigation-shell .workspace .customer-types strong{font-size:18px}
  .erp-navigation-shell .workspace .customer-types span{font-size:10px;margin-top:4px}
  .erp-navigation-shell .workspace .overall-tiles{gap:6px}
  .erp-navigation-shell .workspace .overall-tiles>div{padding:10px 5px}
  .erp-navigation-shell .workspace .overall-tiles span{font-size:10px}
  .erp-navigation-shell .workspace .overall-tiles strong{font-size:15px;margin-top:5px}
  .erp-navigation-shell .workspace .chart-legend{margin:8px 0 3px;font-size:9px;height:auto;flex-wrap:wrap}
  .erp-navigation-shell .workspace .monthly-chart svg{height:135px}
  .erp-navigation-shell .workspace .sales-wide .monthly-chart svg{height:145px}
  .erp-navigation-shell .workspace .sales-mini{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .erp-navigation-shell .workspace .sales-mini>div{padding:9px;text-align:left;min-width:0}
  .erp-navigation-shell .workspace .sales-mini span{font-size:9px;line-height:1.4;display:block}
  .erp-navigation-shell .workspace .sales-mini strong{font-size:13px;overflow-wrap:anywhere}
  .erp-navigation-shell .workspace .data-note{font-size:10px;line-height:1.45;margin:8px 0 0}
  .erp-navigation-shell .workspace .stock-row{gap:8px;padding:11px 0}
  .erp-navigation-shell .workspace .product-icon{width:31px;height:31px}
  .erp-navigation-shell .workspace .product-title strong{font-size:11px}
  .erp-navigation-shell .workspace .product-title small,.erp-navigation-shell .workspace .ranking-row small{font-size:9px}
  .erp-navigation-shell .workspace .stock-status span{font-size:9px}
  .erp-navigation-shell .workspace .ranking-row{gap:9px;padding:11px 0;font-size:11px}
  .erp-navigation-shell .workspace .ranking-row>b{font-size:11px}
  .erp-navigation-shell .workspace .dashboard-empty{min-height:0;padding:15px 4px}
  .erp-navigation-shell .workspace .dashboard-empty.compact{min-height:0;padding:12px 4px}
  .erp-navigation-shell .workspace .dashboard-empty p{font-size:11px}
}
@media(max-width:420px){
  .erp-navigation-shell .workspace .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .erp-navigation-shell .workspace .dashboard-kpi{padding:10px 8px}
  .erp-navigation-shell .workspace .metric-heading{gap:6px}
  .erp-navigation-shell .workspace .metric-icon{width:26px;height:26px;flex-basis:26px;font-size:13px}
  .erp-navigation-shell .workspace .dashboard-kpi .metric-heading strong{font-size:14px}
  .erp-navigation-shell .workspace .metric-details>div{font-size:8px}
  .erp-navigation-shell .workspace .metric-details>div b{font-size:8px}
  .erp-command-header .erp-brand-text{max-width:calc(100vw - 100px);font-size:9px}
  .erp-command-header .erp-brand-text small{font-size:7px}
  .erp-command-actions{gap:2px}
  .erp-command-actions .erp-icon-button{width:29px;height:30px}
  .erp-command-actions .erp-daybook-button{width:29px;height:30px}
}
@media(max-width:350px){
  .erp-navigation-shell .workspace .dashboard-kpis{grid-template-columns:minmax(0,1fr)}
}

/* Responsive scroll + viewport safety pass - 17 Oct 2026 */
html{min-height:100%;overflow-y:auto;scrollbar-gutter:stable}
body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto!important}
body:has(.erp-navigation-shell.mobile-sidebar-open){overflow-y:auto!important}
/* Keep viewport scrolling as the sticky header/sidebar scroll container.
   Hidden/auto overflow on body creates a separate, non-scrolling container. */
body:has(.erp-navigation-shell):not(:has(.quotation-workspace-shell)){overflow-x:clip;overflow-y:visible!important}
.erp-navigation-shell{height:auto;min-height:calc(100dvh - var(--erp-nav-header-height,76px));overflow:visible}
.erp-navigation-shell>.workspace,.erp-navigation-shell.dashboard-shell>.workspace{height:auto;min-height:0;min-width:0;width:100%;max-width:none;overflow:visible}
.erp-navigation-shell .workspace,.erp-navigation-shell .workspace>*{min-width:0}
.erp-navigation-shell .workspace .panel,.erp-navigation-shell .workspace .quotation-page,.erp-navigation-shell .workspace .quote-grid,.erp-navigation-shell .workspace .formgrid{min-width:0;max-width:100%}
.erp-navigation-shell .workspace .tablewrap{max-width:100%;overflow-x:auto;overflow-y:visible;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
@media(max-width:1100px){.erp-navigation-shell .workspace{padding-left:clamp(12px,2vw,20px);padding-right:clamp(12px,2vw,20px)}}
@media(max-width:760px){.erp-navigation-shell>.workspace,.erp-navigation-shell.dashboard-shell>.workspace{width:100%;padding-left:12px;padding-right:12px;padding-bottom:28px}.erp-navigation-shell .workspace .panel{padding:14px}.erp-navigation-shell .workspace .quote-heading{align-items:flex-start}.erp-navigation-shell .workspace .quote-heading>*{min-width:0}.erp-navigation-shell .workspace .quote-heading button{white-space:normal}.erp-navigation-shell .workspace .quote-summary{align-self:stretch}}

/* Keep only the quotation form workspace scrolling; header and module sidebar stay fixed */
body:has(.quotation-workspace-shell){height:100dvh;min-height:0;overflow:hidden!important;display:flex;flex-direction:column}
body:has(.quotation-workspace-shell)>.erp-header-stack{position:relative;top:auto;flex:0 0 auto;z-index:40}
body:has(.quotation-workspace-shell)>.quotation-workspace-shell{display:grid;grid-template-columns:250px minmax(0,1fr);flex:1 1 auto;min-height:0;height:auto!important;max-height:none!important;overflow:hidden;align-items:stretch}
.quotation-workspace-shell>aside#erp-module-sidebar{position:sticky;top:0;height:100%;max-height:100%;min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
.quotation-workspace-shell>.workspace{height:100%;max-height:100%;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:22px 26px 28px;max-width:none;width:100%}
.quotation-workspace-shell.sidebar-hidden>.workspace{padding-top:22px}
body:has(.quotation-workspace-shell)>.lgt-site-footer{flex:0 0 auto;margin-top:0;padding:8px 12px;font-size:11px;gap:8px}
@media(max-width:1100px) and (min-width:761px){body:has(.quotation-workspace-shell)>.quotation-workspace-shell{grid-template-columns:220px minmax(0,1fr)}.quotation-workspace-shell>aside#erp-module-sidebar{width:220px}.quotation-workspace-shell>.workspace{padding-left:18px;padding-right:18px}}
@media(max-width:760px){
 body:has(.quotation-workspace-shell)>.quotation-workspace-shell{display:block;position:relative}
 .quotation-workspace-shell>aside#erp-module-sidebar{position:fixed;top:var(--erp-nav-header-height,76px);height:calc(100dvh - var(--erp-nav-header-height,76px));max-height:none;width:min(285px,calc(100vw - 48px))}
 .quotation-workspace-shell>.workspace{height:100%;max-height:100%;min-height:0;padding:54px 12px 18px;overflow-y:auto!important;overflow-x:hidden!important}
 .quotation-workspace-shell.sidebar-hidden>.workspace{padding-top:54px}
 body:has(.quotation-workspace-shell)>.lgt-site-footer{padding:5px 8px;font-size:10px}
}


/* 2026-11-03: mobile app shell; no desktop layout changes */
.erp-mobile-bottom-nav{display:none}
@media(max-width:760px){
 body:has(.erp-mobile-bottom-nav){padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .erp-mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:115;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;background:#fff;border-top:1px solid #e2e8f0;padding:6px 4px calc(7px + env(safe-area-inset-bottom,0px));box-shadow:0 -6px 24px #0f172a12}
 .erp-mobile-bottom-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-height:53px;min-width:0;padding:4px 2px;border-radius:10px;color:#64748b;text-decoration:none;font-weight:650;touch-action:manipulation}
 .erp-mobile-bottom-nav a>span{font-size:24px;line-height:1.1}
 .erp-mobile-bottom-nav a>small{font-size:10px;line-height:1.2;color:inherit;white-space:nowrap}
 .erp-mobile-bottom-nav a.active{color:#c2410c;background:#fff7ed}
 .erp-navigation-shell .workspace,.erp-navigation-shell.dashboard-shell .workspace{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .erp-navigation-shell .workspace input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.erp-navigation-shell .workspace select,.erp-navigation-shell .workspace textarea{font-size:16px}
 .erp-navigation-shell .workspace button,.erp-navigation-shell .workspace .button,.erp-navigation-shell .workspace input[type=submit]{min-height:42px}
 .erp-navigation-shell .workspace .tablewrap{border-radius:10px;scrollbar-width:thin}
 .erp-navigation-shell .workspace .quote-settings-card{padding:14px}
 .erp-navigation-shell .workspace .quote-settings-actions{display:flex;flex-wrap:wrap;gap:10px}
 .erp-navigation-shell .workspace .quote-settings-actions>*{flex:1 1 170px}
 .erp-navigation-shell .workspace .quote-settings-fields{grid-template-columns:minmax(0,1fr)}
 .erp-navigation-shell .workspace .quote-settings-wide{grid-column:auto}
 .erp-navigation-shell .workspace .quote-settings-logo-row{align-items:flex-start}
 .erp-navigation-shell .workspace .quote-settings-file{min-width:0;max-width:100%}
 .erp-navigation-shell .workspace .quote-settings-file input{max-width:100%}
 body:has(.quotation-workspace-shell)>.quotation-workspace-shell{padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))}
 body:has(.quotation-workspace-shell)>.lgt-site-footer{display:none}
}
@media print{.erp-mobile-bottom-nav{display:none!important}body:has(.erp-mobile-bottom-nav){padding-bottom:0!important}}

/* Native Android shell uses its own bottom bar. */
html.lgt-native-android .erp-mobile-bottom-nav{display:none!important}
html.lgt-native-android body:has(.erp-mobile-bottom-nav){padding-bottom:0!important}
.erp-camera-scan-button{border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:9px;padding:8px 12px;min-height:42px;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap;margin:4px 4px 4px 0;vertical-align:middle}
.erp-camera-scan-button:focus-visible{outline:3px solid #fb923c;outline-offset:2px}
.erp-camera-overlay{position:fixed;inset:0;z-index:100000;background:#0f172ae6;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
.erp-camera-card{background:#fff;border-radius:18px;padding:16px;width:min(480px,100%);max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 18px 70px #0004;color:#0f172a}
.erp-camera-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.erp-camera-top strong{font-size:16px}
.erp-camera-top button{border:0;background:#f1f5f9;border-radius:10px;font-size:24px;width:44px;height:44px;cursor:pointer}
.erp-camera-card video{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:#111827;display:block}
.erp-camera-card [data-camera-status]{font-size:13px;color:#475569;line-height:1.5;margin:12px 0}
.erp-camera-actions{display:flex;gap:10px;flex-wrap:wrap}
.erp-camera-actions button{flex:1 1 160px;min-height:44px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;border-radius:10px;font-weight:700;padding:8px}
.erp-camera-actions button:disabled{opacity:.5}
@media(max-width:760px){.erp-camera-scan-button{min-height:44px;font-size:12px}.erp-toolbar-search .erp-camera-scan-button{padding:6px 8px}.erp-camera-card{padding:12px}}
@media print{.erp-camera-scan-button,.erp-camera-overlay{display:none!important}}

/* The header scanner icon is now an accessible camera action, not a decoration. */
.erp-toolbar-search .erp-inline-scanner[role=button]{pointer-events:auto;cursor:pointer;min-width:44px;min-height:44px;right:3px;border-radius:9px}
.erp-toolbar-search .erp-inline-scanner[role=button]:focus-visible{outline:3px solid #fb923c;outline-offset:1px}
.erp-toolbar-search input[name=q]{padding-right:53px}
.sales-line-serial label>div,.product-select-action,.dsi-scan-row{flex-wrap:wrap}

/* Official Android download link: public site and ERP web footer. */
.erp-app-download-featured{gap:12px;border:1px solid #f59e0b;border-radius:14px;padding:12px 17px;background:linear-gradient(125deg,#142132,#0c1625);color:#fff!important;box-shadow:0 6px 20px rgba(15,23,42,.16);transition:transform .15s,box-shadow .15s}
.erp-app-download-featured:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(15,23,42,.2)}
.erp-app-download-featured .erp-app-download-icon{width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:#fff1e5;color:#d85e12}
.erp-app-download-featured .erp-app-download-icon svg{width:25px;height:25px}
.erp-app-download-featured:focus-visible{outline:3px solid #fb923c;outline-offset:3px}
html.lgt-native-android .lgt-site-footer .erp-app-download-featured{display:none!important}
@media(max-width:760px){.lgt-site-footer{flex-wrap:wrap}.erp-app-download-featured{width:min(100%,390px);min-height:55px;box-sizing:border-box;text-align:left;justify-content:flex-start}.erp-app-download-featured .erp-app-download-icon{flex-shrink:0}}
@media print{.erp-app-download-featured{display:none!important}}

/* Scanner camera preview: no oversized native video play overlay before permission. */
.erp-camera-placeholder{aspect-ratio:4/3;width:100%;border-radius:12px;background:linear-gradient(145deg,#101f35,#1c3854);color:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:18px;box-sizing:border-box}
.erp-camera-placeholder span{display:grid;place-items:center;border:2px solid #64748b;border-radius:16px;width:58px;height:58px;font-size:30px;color:#fdba74}
.erp-camera-placeholder strong{font-size:16px}.erp-camera-placeholder small{font-size:12px;line-height:1.5;color:#cbd5e1}
