/* Responsive layout refinements. Tables scroll inside their panel, never the page. */
.workspace{grid-template-columns:218px minmax(0,1fr)}
.workspace>*,.catalog-layout>*,.order-layout>*,.form-grid>*,.company-grid>*,.dashboard-grid>*{min-width:0}
.admin-main{width:100%}.table-container{max-width:100%;overflow-x:auto}
.product-info,.company-card,.panel{overflow-wrap:anywhere}
.export-toolbar{align-items:center}.export-toolbar .btn{flex:0 1 auto}
.email-composer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.email-pane{min-width:0}.email-pane h3{margin-top:22px}.email-preview-frame{width:100%;height:660px;border:1px solid var(--line);border-radius:8px;background:white}
.email-contact{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:6px;margin:6px 0;font-size:12px;overflow-wrap:anywhere}
.email-contact input{flex:none}.email-meta{padding:12px;background:#f1f4ee;border-radius:6px;font-size:12px;line-height:1.8;margin:12px 0}
.email-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.email-hint{font-size:12px;line-height:1.7;color:var(--muted)}
.email-dialog{max-width:1140px}.email-form fieldset{margin:0;padding:12px;border:1px solid var(--line);border-radius:6px}
.email-form legend{font-size:12px;font-weight:600}.email-log{display:grid;gap:10px}.email-log article{padding:12px;background:#f4f6f0;border-radius:6px;display:flex;flex-wrap:wrap;align-items:center;gap:10px}.email-log strong{flex:1;min-width:160px;font-size:13px}.email-log small{font-size:11px}.email-empty{padding:28px;border:1px dashed #cbd7cc;border-radius:8px;background:#f8faf5;font-size:13px;line-height:1.8}
@media(max-width:1199px){
  .site-header{height:auto;min-height:86px;padding:16px 4%;flex-wrap:wrap;gap:14px}
  .site-header nav{order:3;flex:1 0 100%;margin:0;gap:12px 24px;flex-wrap:wrap}
  .site-header nav a{min-height:44px;display:inline-flex;align-items:center}
  .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .company-grid{grid-template-columns:minmax(0,1fr)}
  .policy-rule{grid-template-columns:1fr 1fr}.policy-rule [data-rule-item]{grid-column:span 2}
  .email-composer{grid-template-columns:minmax(0,1fr)}.email-preview-frame{height:700px}
}
@media(max-width:1100px){
  .workspace{display:block}.sidebar{height:auto;position:static;padding:16px 24px;border-right:0;border-bottom:1px solid var(--line)}
  .sidebar .brand{display:block;margin:0 0 14px}.sidebar .nav-label,.sidebar-bottom{display:none}
  .sidebar nav{display:flex;flex-direction:row;overflow-x:auto;gap:6px;padding-bottom:5px;scrollbar-width:thin}
  .sidebar nav a{flex:none;white-space:nowrap;min-height:44px;padding:12px;font-size:12px}.sidebar .nav-icon{display:none}
  .workspace-header{padding:12px 24px;height:auto;min-height:64px;gap:12px;flex-wrap:wrap}
  .admin-main,.page{padding:28px 24px 60px}.page-heading{flex-wrap:wrap}
  .catalog-layout{grid-template-columns:minmax(0,1fr);gap:20px}
  .filter-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-right:0;border-right:0}
  .filter-panel h3{grid-column:1/-1;margin:0}.filter-panel .field{margin:0}.filter-note{display:none}
  .toolbar{flex-wrap:wrap}.toolbar .search{flex:1 1 240px}
  .export-toolbar strong{flex:1 0 100%;order:-1;margin:0}.export-toolbar{position:static;padding:14px;background:#fff;border:1px solid var(--line);border-radius:8px}
  .order-layout{grid-template-columns:minmax(0,1fr)}.order-summary{position:static}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.span2{grid-column:1/-1}
  .summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(pointer:coarse),(max-width:1100px){
  .btn,.btn.small,.icon-btn,select,input:not([type=checkbox]){min-height:44px}.icon-btn{min-width:44px}
  input[type=checkbox],.select-card input,.email-contact input{width:20px;height:20px}
  .select-card{min-height:48px}.add-form input{font-size:16px}.modal-actions{flex-wrap:wrap}
  .policy-rule select,.field input,.field textarea,.field select{font-size:16px}
}
@media(max-width:639px){
  .admin-main,.page{padding:22px 16px 60px}.sidebar{padding:16px}.workspace-header{padding:12px 16px}
  .site-header{display:flex}.site-header .header-right{margin-left:auto;gap:8px}.site-header .account-chip{display:none}
  .filter-panel,.form-grid{grid-template-columns:1fr 1fr}.form-grid .field,.form-grid .span2{grid-column:1/-1}
  .email-composer{gap:14px}.email-preview-frame{height:630px}.email-actions .btn{width:100%}
  dialog{width:calc(100% - 20px);max-height:94dvh}#modal-body{padding:18px}
  
  .export-toolbar .btn{flex:1 1 130px}.page-heading h1{font-size:27px}.header-right .btn{font-size:11px}
  .catalogue-prices>div{flex-wrap:wrap;gap:3px}.catalogue-prices dd{margin-left:auto}
  .product-card .add-form{flex-wrap:wrap}.product-card .add-form .btn{flex:1}.cart-dock{max-width:calc(100% - 24px)}
}
@media(max-width:374px){.products-grid{grid-template-columns:minmax(0,1fr)}.filter-panel{grid-template-columns:minmax(0,1fr)}}
.email-dialog{width:min(1180px,calc(100% - 32px));max-width:1180px}

/* V40 — shared tablet presentation for CRM, buyer, account and staff entry points.
   Screen-only: catalogue PDFs, email templates and printed reports are unaffected. */
.nc-tablet-nav-toggle,.nc-tablet-scroll-hint{display:none}
@media screen {
  body :is(.workspace,#buyer-app,#buyer-admin,#home-admin,#buyer-dialog-root){min-width:0;max-width:100%}
  body :is(.admin-main,.bp-shell,.bp-panel,.sc-panel,.fa-table-wrap,.sc-table,.data-wrap,.table-container,.bp-table-wrap){min-width:0}
  body :is(.data-wrap,.table-container,.fa-table-wrap,.sc-table,.bp-table-wrap,.cm-table-wrap,.om-table-wrap,.ss-table){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  body [data-nc-scroll-region]:focus-visible{outline:3px solid #24644d;outline-offset:3px}
  body .bp-card-upc{min-width:0}
  body .bp-card-upc .bp-upc-variant{margin:6px 0 0;color:var(--bp-ink);font-size:14px;line-height:1.55;overflow-wrap:anywhere}
  body .bp-card-upc .bp-upc-variant strong{font-weight:650}
  body .bp-card-upc .bp-upc-variant span{user-select:text;-webkit-user-select:text}
}
@media screen and (max-width:1199px), screen and (any-pointer:coarse) and (max-width:1366px) {
  body .workspace{display:block;grid-template-columns:minmax(0,1fr)}
  body .workspace>.sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 16px;height:auto;position:static;overflow:visible;padding:14px 24px 10px;border-right:0;border-bottom:1px solid #dfe7e1}
  body .workspace>.sidebar>a.brand,body .workspace>.sidebar>a.brand.cs-logo{grid-column:1;grid-row:1;display:inline-flex;width:auto;max-width:100%;min-height:56px;margin:0;justify-self:start}
  body .workspace>.sidebar>.nav-label,body .workspace>.sidebar>.sidebar-bottom{display:none}
  body .workspace>.sidebar>.nc-tablet-nav-toggle{grid-column:2;grid-row:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;min-width:84px;padding:10px 14px;border:1px solid #c6d7cd;border-radius:8px;background:#fff;color:#194d3f;font-family:inherit;font-size:14px;font-weight:600;line-height:1.4;white-space:nowrap;cursor:pointer}
  body .workspace>.sidebar>.nc-tablet-nav-toggle:focus-visible{outline:3px solid #24644d;outline-offset:3px}
  /* Progressive enhancement: the original navigation stays visible without JS. */
  body .workspace>.sidebar>nav{grid-column:1/-1;display:flex;flex-direction:row;overflow-x:auto;max-width:100%;margin:0;padding:4px;gap:8px}
  body .workspace>.sidebar[data-nc-tablet-nav]>nav{display:none}
  body .workspace>.sidebar[data-nc-menu-open="true"]>nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:min(55dvh,440px);overflow:auto;overscroll-behavior:contain;scroll-padding-block:8px;margin-top:6px}
  body .workspace>.sidebar>nav>a{min-width:0;min-height:48px;white-space:normal;font-size:14px;line-height:1.45;padding:12px 12px 12px 46px;overflow-wrap:anywhere}
  body .workspace>.sidebar>nav>a::before{left:14px;width:22px;height:22px}
  body .workspace-header{height:auto;min-height:64px;padding:12px 24px;gap:12px;flex-wrap:wrap}
  body .admin-main,body .page{width:100%;padding:28px 24px 64px}
  body :is(.page-heading,.fa-heading,.bp-section-head,.sc-heading){flex-wrap:wrap;gap:16px}
  body :is(.workspace,.bp-shell) :is(.toolbar,.wcat-toolbar,.cs-toolbar,.om-toolbar,.fa-header-actions,.or-actions,.sc-actions,.bp-actions){flex-wrap:wrap;gap:12px;min-width:0}
  body :is(.workspace,.bp-shell) :is(.toolbar,.wcat-toolbar,.cs-toolbar,.om-toolbar,.fa-header-actions,.or-actions,.sc-actions,.bp-actions)>.btn{max-width:100%;white-space:normal}
  body .workspace .toolbar .search{flex:1 1 260px;min-width:0}
  body .workspace :is(.catalog-layout,.order-layout,.dashboard-grid,.cs-email-grid,.email-composer){grid-template-columns:minmax(0,1fr)}
  body .workspace :is(.order-summary,.export-toolbar){position:static}
  body .workspace :is(.wcat-grid,.cs-grid,.whi-grid){grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:20px}
  body .workspace :is(.form-grid,.wcat-filters,.cs-filter-grid,.summary-cards,.fa-kpis,.fa-stats){grid-template-columns:repeat(2,minmax(0,1fr))}
  body .workspace .fa-dashboard :is(.fa-filters,.fa-receivable-filters){grid-template-columns:repeat(2,minmax(0,1fr))}
  body .workspace .fa-filters>button{grid-column:1/-1}
  body .workspace :is(.filter-panel,.policy-rule){grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
  body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.bp-panel,.sc-panel){padding:22px}
  body .workspace :is(.data-table,.fa-dashboard table){font-size:14px}
  body .workspace :is(.data-table th,.fa-dashboard th){font-size:12px;padding:14px 12px}
  body .workspace :is(.data-table td,.fa-dashboard td){padding:14px 12px}
  body .workspace .data-table{table-layout:auto}
  body .workspace :is(.data-table,.fa-dashboard table):has(th:nth-child(6)){min-width:1000px}
  body .workspace .data-table td{word-break:normal;overflow-wrap:normal}
  body .workspace .data-table td strong{font-size:14px}
  body .workspace .data-table td small{font-size:12px}
  body .workspace :is(.wcat-body,.cs-card-body,.whi-body) :is(p,dl,.small){font-size:14px;line-height:1.55}
  body .workspace .nc-product-vendor>span{font-size:12px}
  body .workspace :is(.cs-select,.select-card,.wcat-check,.allocation-option,.sc-check,.email-contact){min-height:44px;align-items:center}
  body .nc-tablet-scroll-hint:not([hidden]){display:block;margin:10px 0;font-size:12px;line-height:1.5;color:#52695c}
  body #buyer-app .bp-shell,body #buyer-admin .bp-shell,body #home-admin .bp-shell{width:calc(100% - 48px);max-width:1344px}
  body #buyer-app .bp-card-content{padding:20px}
  body #buyer-app .bp-card-meta{font-size:13px;line-height:1.5;flex-wrap:wrap}
  body #buyer-app .bp-card h3{font-size:21px}
  body #buyer-app .bp-stock-tag{font-size:11px;line-height:1.5}
  body #buyer-app .bp-stock-note{font-size:13px;line-height:1.5}
  body #buyer-app .bp-thumbs{flex-wrap:wrap;gap:8px}
  body #buyer-app .bp-card-photo{height:210px}
  body #buyer-app :is(.bp-btn,.bp-link-btn){font-size:14px;line-height:1.5;white-space:normal}
  body #buyer-app .bp-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  body #buyer-app .bp-filters :is(.bp-search-field,[type=submit]){grid-column:1/-1}
  body #buyer-app .bp-auth-wrap{gap:28px}
  body #buyer-admin .bp-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body #buyer-app .bn-navigation{max-height:calc(var(--nc-visible-height,100dvh) - 110px);padding-bottom:max(24px,env(safe-area-inset-bottom))}
  body :is(#modal,dialog.bp-dialog,dialog.vp-dialog,dialog.ha-preview){position:fixed;top:calc(var(--nc-viewport-top,0px) + 12px);bottom:auto;margin-block:0;width:calc(100% - 32px);max-width:1100px;max-height:calc(var(--nc-visible-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain;scroll-padding-block:76px 24px}
  body :is(.bp-dialog-header,.modal-heading){position:sticky;top:0;z-index:3;background:#fff}
  body .bp-dialog-header{padding:16px 22px;gap:16px}
  body .bp-dialog-header h2{min-width:0;overflow-wrap:anywhere;font-size:22px}
  body .bp-dialog-content{padding:22px}
  body .bp-dialog :is(.bp-product-detail,.bp-detail-form)>*,body .vp-layout>*{min-width:0}
  body .bp-dialog .bp-product-photo,body .vp-main-image{height:280px}
  body .bp-dialog .bp-product-description{font-size:14px;line-height:1.6}
  body .bp-dialog .bp-swatch{width:88px}
  body .bp-dialog .bp-swatch small{font-size:12px;line-height:1.4;overflow-wrap:anywhere}
  body :is(.modal-actions,.vp-actions){gap:12px;flex-wrap:wrap}
  body :is(.modal-actions,.vp-actions)>.btn{white-space:normal;max-width:100%}
}
/* Coarse pointers include tablets with a connected trackpad; pinch-to-zoom remains available. */
@media screen and (max-width:1199px), screen and (any-pointer:coarse) {
  :is(body.staff-auth-page,body .workspace,body #buyer-app,body #buyer-admin,body #home-admin,body #buyer-dialog-root,body #modal) :is(button,.btn,.bp-btn,summary,select){min-height:46px;touch-action:manipulation}
  :is(body.staff-auth-page,body .workspace,body #buyer-app,body #buyer-admin,body #home-admin,body #buyer-dialog-root,body #modal) button{min-width:44px}
  :is(body.staff-auth-page,body .workspace,body #buyer-app,body #buyer-admin,body #home-admin,body #buyer-dialog-root,body #modal) input:not([type=checkbox]):not([type=radio]):not([type=hidden]){min-height:46px;min-width:0;font-size:16px;max-width:100%;box-sizing:border-box}
  :is(body.staff-auth-page,body .workspace,body #buyer-app,body #buyer-admin,body #home-admin,body #buyer-dialog-root,body #modal) :is(select,textarea){font-size:16px;max-width:100%;box-sizing:border-box}
  body #cs-filters>label.field>:is(input,select){font-size:16px}
  body :is(.workspace,#buyer-app,#buyer-admin,#home-admin,#buyer-dialog-root,#modal) input:is([type=checkbox],[type=radio]){width:22px;height:22px;min-height:22px;flex-shrink:0}
  body #buyer-app :is(.bp-check,.bp-form-links>a,.bp-footer-links>a),body #buyer-admin .bp-check{min-height:44px}
  body #buyer-app :is(.bn-icon-link,.bn-menu-toggle){min-width:44px;min-height:48px}
  body #buyer-app .bp-password-entry>input{min-height:56px}
  body #buyer-app .bp-password-toggle{min-height:46px}
  body .workspace :is(.fa-tabs a,.sc-tabs .btn,.table-actions .btn){min-height:46px;display:inline-flex;align-items:center;justify-content:center}
  body .workspace .data-table :is(input,select){min-width:120px}
  body .workspace .data-table input:is([type=checkbox],[type=radio]){min-width:22px}
  body .workspace .table-actions{gap:12px;flex-wrap:wrap}
  body .workspace .btn,body .sc-panel button,body.staff-auth-page button{font-size:14px;line-height:1.45}
}
@media screen and (min-width:601px) and (max-width:1000px) {
  body #buyer-app .bp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  body :is(.bp-dialog .bp-product-detail,.vp-layout){grid-template-columns:minmax(0,1fr);gap:22px}
  body .vp-gallery{position:static}
  body .bp-dialog .bp-product-photo,body .vp-main-image{height:230px}
  body #buyer-app .bp-auth-wrap{grid-template-columns:minmax(0,1fr)}
  body .workspace :is(.sc-grid,.sc-permissions,.allocation-columns){grid-template-columns:minmax(0,1fr)}
  body .workspace :is(.fa-chart-grid,.fa-chart-grid.fa-equal){grid-template-columns:minmax(0,1fr)}
}
@media screen and (min-width:1001px) and (max-width:1366px) {
  body #buyer-app .bp-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
}
@media screen and (max-width:600px) {
  body .admin-main,body .page{padding:22px 16px 56px}
  body .workspace>.sidebar{padding:12px 16px 10px;gap:8px}
  body .workspace-header{padding:12px 16px}
  body .workspace>.sidebar[data-nc-menu-open="true"]>nav{grid-template-columns:minmax(0,1fr)}
  body .workspace :is(.form-grid,.wcat-filters,.cs-filter-grid,.filter-panel,.policy-rule,.company-grid,.sc-grid,.sc-permissions,.sc-config,.ss-config,.allocation-columns){grid-template-columns:minmax(0,1fr)}
  body .workspace .fa-dashboard :is(.fa-filters,.fa-receivable-filters){grid-template-columns:minmax(0,1fr)}
  body .workspace .policy-rule [data-rule-item]{grid-column:auto}
  body #buyer-admin .bp-admin-grid{grid-template-columns:minmax(0,1fr)}
  body #buyer-app .bp-shell,body #buyer-admin .bp-shell,body #home-admin .bp-shell{width:calc(100% - 32px)}
  body #buyer-app .bp-card-content{padding:18px}
  body #buyer-app .bp-grid{gap:16px}
  body #buyer-app .bp-filters{grid-template-columns:minmax(0,1fr);padding:18px}
  body :is(#modal,dialog.bp-dialog,dialog.vp-dialog,dialog.ha-preview){width:calc(100% - 20px)}
  body .bp-dialog-header{padding:12px 16px}
  body .bp-dialog-header h2{font-size:20px}
  body .bp-dialog-content,body #modal-body{padding:18px}
  body .bp-dialog .bp-product-photo,body .vp-main-image{height:200px}
  body .bp-dialog .bp-product-detail{grid-template-columns:minmax(0,1fr)}
  body .bp-dialog .bp-swatch{width:84px}
  body .workspace :is(.panel,.sc-panel),body #buyer-admin .bp-panel,body #home-admin .bp-panel{padding:18px}
  body .workspace .fa-chart-grid{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:480px) {
  body #buyer-app .bp-grid{grid-template-columns:minmax(0,1fr)}
  body .workspace :is(.summary-cards,.fa-kpis,.fa-stats){grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:359px) {
  body #buyer-app .bn-header .bp-brand img{width:30px;height:30px}
  body #buyer-app .bn-header .bp-brand strong{font-size:18px}
  body #buyer-app .bn-header .bp-brand small{font-size:5px;letter-spacing:.5px}
}
@media screen and (max-height:600px) and (min-width:768px) {
  body .bp-dialog .bp-product-photo,body .vp-main-image{height:180px}
  body .bp-dialog .bp-product-description{max-height:90px}
}

/* V51 final tablet density normalization. Desktop is outside this range. */
@media screen and (min-width:700px) and (max-width:1180px){
 body .workspace .wcat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
 body .workspace .wcat-body{padding:10px 11px!important}
 body .workspace .wcat-body :is(p,.small){font-size:11px!important;line-height:1.3!important}
 body .workspace .wcat-photo{height:108px!important}
 body .workspace :is(.panel,.sc-panel){padding:16px}
 body .admin-main,body .page{padding:18px 16px 48px}
 body .workspace-header{min-height:56px;padding:8px 16px}
 body #buyer-app .bp-card-content{padding:14px}
 body #buyer-app .bp-card-photo{height:150px}
 body #buyer-app .bp-card-meta{font-size:11px;line-height:1.35}
 body #buyer-app .bp-card h3{font-size:17px}
 body #buyer-app :is(.bp-btn,.bp-link-btn){font-size:12px}
}

/* V72 — tablet-first buyer / admin workspaces and the approved CRM section hierarchy.
   Presentation only. Keep native zoom, input values, authorization and action ownership.
   Passive labels may be compact; every ordering/menu/form control retains a 46px target. */
@media screen {
 html body .workspace {background:#f4f5f7}
 /* A wide table remains keyboard-discoverable on desktop as well as touch screens. */
 html body .nc-tablet-scroll-hint:not([hidden]) {display:block;margin:10px 0;font-size:12px;line-height:1.5;color:#52695c}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.page-heading,.fa-heading,.sc-heading,.ss-root>header,.ha-heading),
 html body #buyer-app :is(.bp-section-head,.bn-gallery>.bn-panel-heading) {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;
  padding:12px 0 14px;margin-bottom:20px;border-top:3px solid #df3347;border-bottom:1px solid #e2e7ec;
  background:transparent;min-width:0
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.page-heading,.fa-heading,.sc-heading,.ss-root>header,.ha-heading)>div:first-child,
 html body #buyer-app :is(.bp-section-head,.bn-gallery>.bn-panel-heading)>div:first-child {flex:1 1 260px;min-width:0}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.page-heading,.fa-heading,.sc-heading,.ss-root>header,.ha-heading) h1,
 html body #buyer-app :is(.bp-section-head,.bn-gallery>.bn-panel-heading) :is(h1,h2) {
  margin:4px 0 6px!important;color:#172338;font-size:clamp(22px,2.2vw,30px)!important;line-height:1.25;letter-spacing:-.5px;overflow-wrap:anywhere
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.page-heading,.fa-heading,.sc-heading,.ss-root>header,.ha-heading) :is(.eyebrow,.fa-eyebrow,.sc-eyebrow,.ss-eyebrow),
 html body #buyer-app :is(.bp-section-head,.bn-gallery>.bn-panel-heading) :is(.bp-eyebrow,.bn-eyebrow) {
  font-size:11px!important;font-weight:750;letter-spacing:1.3px;text-transform:uppercase;color:#b5283b;margin:0 0 5px!important;line-height:1.4
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.page-heading,.fa-heading,.sc-heading,.ss-root>header,.ha-heading) p,
 html body #buyer-app :is(.bp-section-head,.bn-gallery>.bn-panel-heading) p {font-size:13px;line-height:1.5;margin:0;color:#627185}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel) {
  --nc-section-accent:#3773bc;background:#fff;border:1px solid #e0e5ec;border-top:3px solid var(--nc-section-accent);border-radius:12px;box-shadow:0 2px 8px #17233803
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel):nth-of-type(3n+2) {--nc-section-accent:#168b88}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel):nth-of-type(3n+3) {--nc-section-accent:#3c8d63}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel)>h2,
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel-title,.sc-panel-heading,.ss-heading,.fa-row)>h2 {
  display:flex;align-items:center;gap:10px;min-width:0;font-size:17px;line-height:1.35;color:#172338;margin:0 0 14px;letter-spacing:-.15px
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel)>h2::before,
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel-title,.sc-panel-heading,.ss-heading,.fa-row)>h2::before {
  content:"";flex:0 0 5px;align-self:stretch;min-height:20px;border-radius:3px;background:var(--nc-section-accent,#3773bc)
 }
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel-title,.sc-panel-heading,.ss-heading,.fa-row):has(>h2) {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel-title,.sc-panel-heading,.ss-heading,.fa-row)>h2 {margin:0;flex:1 1 200px}
 html body .workspace :is(.stat-card,.summary-card,.fa-kpi) {border-radius:12px;border:1px solid #e0e5ec;border-top:3px solid #3773bc;background:#fff}
 html body .workspace :is(.stat-card,.summary-card,.fa-kpi):nth-child(4n+1) {border-top-color:#df3347}
 html body .workspace :is(.stat-card,.summary-card,.fa-kpi):nth-child(4n+3) {border-top-color:#168b88}
 html body .workspace :is(.stat-card,.summary-card,.fa-kpi):nth-child(4n+4) {border-top-color:#bc811d}
 /* Inline ordering: no controls are moved in the DOM, preserving focus and exact-item handlers. */
 html body :is(.workspace,#buyer-app) .nc-trade-card {border-radius:14px;--nc-card-photo:168px;container:nc-trade / inline-size}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-body {padding:12px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-topline {display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center;gap:4px 8px;flex-wrap:wrap;margin:0 0 5px;min-width:0}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-topline .nc-trade-brand {flex:1 1 65px;margin:0!important;font-size:11px!important;letter-spacing:1.2px}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-topline .nc-card-badges {container-type:normal;flex:0 1 auto;gap:5px;margin:0!important;align-items:center}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-topline .nc-card-badges :is(.nc-publication-badge,.nc-polarized-badge) {
  flex:0 0 auto;width:auto;min-height:28px!important;height:28px!important;padding:4px 7px!important;font-size:11px!important;line-height:1.3!important;min-width:0;max-width:100%;white-space:nowrap;border-radius:5px
 }
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-topline .nc-grouped-badge {flex:0 1 auto;min-height:46px!important;height:auto!important;white-space:normal;min-width:0}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-model {font-size:19px!important;line-height:1.25!important;margin:3px 0 4px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .nc-trade-body p {font-size:13px!important;line-height:1.35!important;margin:3px 0!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-counts {color:#596d64;font-size:12px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card[data-trade-count="1"] .or-model-range {display:none}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-preview {padding-top:6px;flex:1 1 auto}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-preview-heading {font-size:12px;margin-bottom:3px}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-stock {font-size:11px!important;padding:4px 7px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .wcat-specs {gap:2px 10px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .wcat-prices {padding:6px 0!important;gap:3px 10px!important;margin:5px 0!important;font-size:13px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .wcat-prices :is(dt,dd):nth-last-child(-n+2) {font-size:12px;color:#62756b;font-weight:400}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-stock-note {min-height:0!important;font-size:12px!important;line-height:1.4!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-variant-button {margin:8px 0 0!important;min-height:46px!important;padding:8px!important;font-size:13px!important;background:#fff}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry {grid-template-columns:minmax(0,1fr) 144px;gap:5px 10px;margin-top:8px;align-items:end}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry .or-tray {font-size:11px!important;line-height:1.4;white-space:normal}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-quantity-label {font-size:11px;line-height:1.4;margin-bottom:4px}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry .or-tray input {margin-top:4px!important;height:46px!important;min-height:46px!important;padding:7px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry .or-quantity {grid-template-columns:46px minmax(0,1fr) 46px;grid-auto-rows:46px}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry .or-quantity>:is(button,input) {margin:0!important;min-height:46px!important;height:46px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-help {font-size:11px!important;line-height:1.4!important;margin:5px 0 0!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry .or-model-quantity-status {font-size:11px!important;line-height:1.4!important;margin:0!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-model-entry input {font-size:16px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-quantity input {appearance:textfield}
 html body :is(.workspace,#buyer-app) .nc-trade-card .or-quantity input::-webkit-inner-spin-button {appearance:none}
 html body :is(.workspace,#buyer-app) .nc-trade-card :is(button,input):focus-visible {outline:3px solid #24644d;outline-offset:2px}
}
/* Split-screen and portrait tablets retain two usable cards rather than three cramped ones. */
@media screen and (min-width:640px) and (max-width:1023px) {
 html body #buyer-app .bp-grid,html body .workspace .wcat-grid:has(.nc-trade-card) {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
}
@media screen and (min-width:1024px) and (max-width:1439px) {
 html body #buyer-app .bp-grid,html body .workspace .wcat-grid:has(.nc-trade-card) {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
}
@media screen and (max-width:639px) {
 html body #buyer-app .bp-grid,html body .workspace .wcat-grid:has(.nc-trade-card) {grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
 html body :is(.workspace,#buyer-app) .nc-trade-card {--nc-card-photo:160px}
}
@media screen and (min-width:640px) and (max-width:1439px) {
 html body :is(.workspace,#buyer-app) .nc-trade-card {--nc-card-photo:144px}
 html body #buyer-app .bp-shell {width:calc(100% - 32px)}
 html body .workspace .admin-main {padding:20px 16px 48px}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.form-grid,.cm-grid,.or-filters,.cs-filter-grid,.wcat-filters,.whb-filters) {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.form-grid,.cm-grid,.or-filters,.cs-filter-grid,.wcat-filters,.whb-filters)>* {min-width:0}
 html body #buyer-app .bp-filters {grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:12px}
 html body #buyer-app .bp-filters :is(.bp-search-field,[type=submit]) {grid-column:1/-1}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.panel,.sc-panel,.ss-panel,.bp-panel) {padding:18px}
 /* Authentication retains real fields, CAPTCHA and their existing enabled/disabled states. */
 html body .login-shell {grid-template-columns:minmax(0,.8fr) minmax(0,1fr);min-height:0;max-width:1040px;margin:24px auto;padding:0 24px;gap:24px}
 html body .login-art {padding:28px;min-height:0;border-radius:12px}
 html body .login-art .art {height:150px;min-height:0}
 html body .login-panel {padding:28px;min-width:0}
 html body .login-panel>div {width:100%;max-width:480px}
 html body #buyer-app .bp-auth-wrap {grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:28px;padding:28px 0;align-items:start}
 html body #buyer-app .bp-auth-copy {padding:10px 0}
 html body #buyer-app .bp-auth-copy h1 {font-size:32px;line-height:1.2}
 html body #buyer-app .bp-auth-card {margin:0;padding:26px;min-width:0}
 html body :is(.login-shell,#buyer-app .bp-auth-wrap) input:not([type=checkbox]) {font-size:16px!important;min-height:48px;box-sizing:border-box;max-width:100%}
 html body :is(.login-shell,#buyer-app .bp-auth-wrap) button {min-height:48px;font-size:15px}
 html body.staff-auth-page .ss-auth-card {width:calc(100% - 48px);max-width:520px;box-sizing:border-box;margin:20px auto;padding:28px}
 html body.staff-auth-page .ss-auth-card button {min-height:48px}
}
@media screen and (min-width:640px) and (max-width:899px) {
 html body .login-shell {grid-template-columns:minmax(0,1fr);max-width:570px;gap:16px}
 html body .login-art {padding:20px}
 html body .login-art .art,html body .login-art>p:last-child {display:none}
 html body .login-art h1 {font-size:26px;line-height:1.2}
 html body #buyer-app .bp-auth-wrap {grid-template-columns:minmax(0,1fr);max-width:520px;gap:18px}
 html body #buyer-app .bp-auth-copy .bp-list {display:none}
 html body #buyer-app .bp-auth-copy h1 br {display:none}
}
@media screen and (max-width:1199px),screen and (any-pointer:coarse) and (max-width:1600px) {
 html body :is(.workspace,#buyer-app,#buyer-admin,#home-admin,#modal,.login-shell,.ss-auth-card) :is(button,.btn,.bp-btn,select,summary) {min-height:46px;touch-action:manipulation}
 html body :is(.workspace,#buyer-admin,#home-admin) :is(.cm-company-list,.cm-scope-options) label {min-height:44px;display:flex;align-items:center;gap:10px}
 html body :is(.workspace,#buyer-app,#buyer-admin,#home-admin) :is(.cm-dialog,.commerce-dialog,dialog) {max-width:calc(100% - 24px)}
 html body dialog.commerce-dialog {width:min(900px,calc(100% - 24px));max-height:calc(var(--nc-visible-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain}
 html body .commerce-dialog .cm-actions {display:flex;flex-wrap:wrap;gap:10px}
 html body .commerce-dialog .cm-actions button {min-height:46px}
}
@media screen and (forced-colors:active) {
 html body :is(.workspace,#buyer-app,#buyer-admin,#home-admin) :is(.page-heading,.bp-section-head,.panel,.bp-panel) {border-color:CanvasText}
 html body :is(.workspace,#buyer-app) .nc-trade-card :is(button,input):focus-visible {outline-color:Highlight}
}

/* V73 — clear product category sections and shared software-credit footers. */
@media screen {
 /* Product rows still stretch together; heading rows must not inherit card-sized 1fr tracks. */
 html body :is(.bp-grid,.wcat-grid,.whi-grid,.cs-grid):has(>.nc-product-category) {grid-auto-rows:auto!important;align-content:start}
 html body .nc-product-category {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:14px 16px;margin:8px 0 0;border:1px solid #d7e3e3;border-top:3px solid #168f91;background:#f4f6f7;border-radius:12px;min-width:0}
 html body .nc-product-category :is(h2,h3,h4) {margin:0!important;font-size:21px!important;line-height:1.3;color:#243b4c;text-transform:none;letter-spacing:0}
 html body .nc-product-category>span {font-size:12px;line-height:1.5;color:#536575;overflow-wrap:anywhere}
 html body .nc-product-category-row th {padding:12px 14px;background:#f4f6f7;border-top:3px solid #168f91;border-radius:12px 12px 0 0;color:#243b4c;text-align:left;font-size:17px}
 html body .nc-product-category-row span {font-weight:400;font-size:12px;margin-left:12px}
 html body .nc-powered-by {box-sizing:border-box;display:block;flex:0 0 100%;width:100%;max-width:100%;margin:0;padding:14px 20px;color:#5f6d79;font-size:12px;line-height:1.6;text-align:center;letter-spacing:.02em;overflow-wrap:anywhere;text-transform:none}
 html body .nc-powered-by strong {color:#273e51;font-weight:700;white-space:normal}
 html body :is(.nc-workspace-footer,.nc-portal-footer) {clear:both;border-top:1px solid #e0e5e9;background:#f7f8f9;margin-top:24px;padding:4px 0}
 html body .workspace-content>.nc-workspace-footer {margin-top:auto}
 html body :is(.footer,.bp-footer,.ss-footer)>.nc-powered-by {margin-top:16px;border-top:1px solid #e0e5e9}
 html body .footer:has(>.nc-powered-by) {flex-wrap:wrap}
 html body .ss-footer>.nc-powered-by {padding-bottom:0}
 @media(max-width:639px){html body .nc-product-category {padding:12px;margin-top:4px}html body .nc-product-category :is(h2,h3,h4){font-size:19px!important}html body .nc-powered-by{font-size:11px;padding:12px 16px}}
}

@media screen {html body .bn-quick-category{margin:10px 0 4px;padding:7px 9px;background:#f3f5f6;border-left:3px solid #df3347;font-size:13px;line-height:1.4}}

/* V74 setup instructions cannot stretch the mobile workspace. */
@media screen { .nc-item-sync code{overflow-wrap:anywhere;word-break:break-word}.nc-item-sync pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}.nc-item-sync .data-wrap{overflow-x:auto} }
