/* AIOTOR Core ERP V12.7.5 - final screen normalization layer.
   Goal: one compact global header, at most one compact module row, content immediately,
   browser-owned vertical scroll, table-owned horizontal scroll, no hidden business values. */
:root{--v1275-line:#dbe4ef;--v1275-bg:#f5f7fb;--v1275-card:#fff;--v1275-text:#16243a;--v1275-muted:#66758a;--v1275-blue:#145d9f}
html,body{height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important}

/* ---------- shared server-rendered shell ---------- */
body.admin-tw .shared-shell-content{display:block!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important}
body.admin-tw .ai-universal-header{position:sticky!important;top:0!important;z-index:900!important;min-height:42px!important;height:auto!important}
body.admin-tw .ai-universal-context{min-height:30px!important;height:auto!important;max-height:34px!important;padding:2px 7px!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important;background:#f8fafc!important;border-bottom:1px solid var(--v1275-line)!important}
body.admin-tw .shared-shell-body{display:block!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:4px 6px 14px!important}
body.admin-tw .tabs.active,body.admin-tw .main-grid,body.admin-tw .main-grid.single,body.admin-tw .panel,body.admin-tw .workwide{min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important}
body.admin-tw .panel{margin:0 0 6px!important;border-radius:10px!important}
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head{min-height:34px!important;padding:5px 8px!important;gap:7px!important;align-items:center!important}
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head h1,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head h2,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head h3,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head h4{font-size:14px!important;line-height:1.15!important;margin:0!important}
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .panel-head p{margin:0!important;max-width:min(760px,60vw)!important;font-size:10px!important;line-height:1.2!important;color:var(--v1275-muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.admin-tw .form-grid{gap:7px!important}.admin-tw .field label{margin-bottom:2px!important}
body.admin-tw .assistantBox,body.admin-tw .detail-card,body.admin-tw .table-card{border-radius:9px!important}

/* Module pages that already own a local navigation row must not get a duplicate portal row. */
body.admin-tw.page-hr .ai-universal-context,
body.admin-tw.page-warehouse_control .ai-universal-context{display:none!important}

/* Browser vertical scroll; only wide tables scroll horizontally. */
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .table-card,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .table-wrap,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .table-scroll,
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) .wh2-table-wrap{height:auto!important;min-height:0!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important}
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) table{height:auto!important;table-layout:auto!important}
body.admin-tw:not(.page-order-create):not(.page-settings.page-cat-printstudio) td{vertical-align:top!important;line-height:1.28!important}
body.admin-tw .pager,body.admin-tw .pagerRow,body.admin-tw .pagination{position:static!important;height:auto!important;max-height:none!important;overflow:visible!important}

/* ---------- runtime shell: Products / Inventory / Orders / Factory / CRM ---------- */
body.aiotor-runtime-shell.rt-natural-page{height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important}
body.aiotor-runtime-shell.rt-natural-page .rt-app,
body.aiotor-runtime-shell.rt-natural-page .rt-platinum-shell,
body.aiotor-runtime-shell.rt-natural-page .rt-dashboard,
body.aiotor-runtime-shell.rt-natural-page .rt-content,
body.aiotor-runtime-shell.rt-natural-page .rt-main:not(.rt-order-entry-screen){height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
body.aiotor-runtime-shell.rt-natural-page .rt-dashboard{display:block!important}
body.aiotor-runtime-shell.rt-natural-page .rt-topbar{position:sticky!important;top:0!important;z-index:900!important}
body.aiotor-runtime-shell.rt-natural-page .rt-content{padding:5px 7px 14px!important}
body.aiotor-runtime-shell.rt-natural-page .rt-main:not(.rt-order-entry-screen){display:block!important}
body.aiotor-runtime-shell.rt-natural-page .rt-titlebar{min-height:34px!important;padding:4px 6px!important;margin:0 0 4px!important;gap:8px!important;align-items:center!important}
body.aiotor-runtime-shell.rt-natural-page .rt-titlebar .rt-eyebrow{display:none!important}
body.aiotor-runtime-shell.rt-natural-page .rt-titlebar h1{font-size:15px!important;line-height:1.1!important;margin:0!important}
body.aiotor-runtime-shell.rt-natural-page .rt-titlebar p[data-rt-subtitle]{margin:1px 0 0!important;font-size:10px!important;line-height:1.2!important;max-width:70vw!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.aiotor-runtime-shell.rt-natural-page .rt-kpis{gap:4px!important;margin:0 0 4px!important}
body.aiotor-runtime-shell.rt-natural-page .rt-kpi{min-height:46px!important;padding:5px 7px!important}
body.aiotor-runtime-shell.rt-natural-page .rt-subnav{min-height:29px!important;height:auto!important;padding:2px!important;margin:0 0 4px!important;overflow-x:auto!important;overflow-y:hidden!important}
body.aiotor-runtime-shell.rt-natural-page .rt-screen-toolbar{min-height:34px!important;height:auto!important;padding:3px 5px!important;margin:0 0 4px!important;overflow:visible!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table-card{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:4px!important;margin:0!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table-head{min-height:0!important;padding:2px 4px!important;margin:0!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table-head:has(.rt-table-title:empty){display:none!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table-wrap{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important;border-radius:7px!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table{height:auto!important;table-layout:auto!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table th{white-space:nowrap!important}
body.aiotor-runtime-shell.rt-natural-page .rt-table td{height:auto!important;min-height:0!important;vertical-align:top!important;line-height:1.25!important}
body.aiotor-runtime-shell.rt-natural-page .rt-pager{position:static!important;min-height:30px!important;height:auto!important;margin:3px 0 0!important;padding:2px 3px!important;overflow-x:auto!important;overflow-y:visible!important}

/* Long business values: show more inline and always expose the full value. */
body.aiotor-runtime-shell.rt-natural-page .rt-table td[data-semantic="description"],
body.aiotor-runtime-shell.rt-natural-page .rt-table td[data-semantic="product"],
body.aiotor-runtime-shell.rt-natural-page .rt-table td[data-semantic="customer"],
body.aiotor-runtime-shell.rt-natural-page .rt-table td[data-semantic="supplier"],
body.admin-tw td[data-semantic="description"],body.admin-tw td[data-semantic="product"],body.admin-tw td[data-semantic="customer"],body.admin-tw td[data-semantic="supplier"]{min-width:230px!important;max-width:420px!important;white-space:normal!important;overflow-wrap:anywhere!important}
.erp-smart-cell>.erp-cell-value{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;max-height:3.9em!important;white-space:normal!important;overflow:hidden!important;line-height:1.3!important;overflow-wrap:anywhere!important}
.erp-smart-cell[data-short-value="1"]>.erp-cell-value{display:block!important;max-height:none!important;overflow:visible!important}
.erp-smart-popover{z-index:100000!important;max-width:min(680px,calc(100vw - 24px))!important;max-height:min(420px,62vh)!important;font-size:12px!important;line-height:1.45!important}

/* ---------- Warehouse ---------- */
body.admin-tw.page-warehouse_control .shared-shell-body{padding-top:4px!important}
body.admin-tw.page-warehouse_control .wh2-shell{padding:0!important;margin:0!important;gap:5px!important}
body.admin-tw.page-warehouse_control .wh2-tabs{position:static!important;min-height:31px!important;height:auto!important;margin:0 0 4px!important;padding:2px 4px!important;border-radius:7px!important;overflow-x:auto!important;overflow-y:hidden!important}
body.admin-tw.page-warehouse_control .wh2-tabs a{min-height:25px!important;height:25px!important;padding:0 8px!important;font-size:10.5px!important}
body.admin-tw.page-warehouse_control .wh2-kpis{gap:5px!important;margin:0 0 5px!important}
body.admin-tw.page-warehouse_control .wh2-kpis article{min-height:54px!important;padding:6px 8px!important}
body.admin-tw.page-warehouse_control .wh2-kpis strong{font-size:18px!important}
body.admin-tw.page-warehouse_control .wh2-two-col{gap:6px!important}
body.admin-tw.page-warehouse_control .wh2-card{padding:8px!important;border-radius:9px!important}
body.admin-tw.page-warehouse_control .wh2-card-head{margin-bottom:5px!important;gap:7px!important}
body.admin-tw.page-warehouse_control .wh2-card h2{font-size:13px!important;margin:0 0 3px!important}
body.admin-tw.page-warehouse_control .wh2-card p{margin:0 0 5px!important;font-size:10px!important;line-height:1.35!important}

/* ---------- People / HR ---------- */
body.admin-tw.page-hr .shared-shell-body{padding-top:4px!important}
body.admin-tw.page-hr .hr-module-bar{margin:0 0 4px!important;border-radius:8px!important}
body.admin-tw.page-hr .hr-commandbar{min-height:32px!important;height:auto!important;padding:2px 5px!important;gap:4px!important}
body.admin-tw.page-hr .hr-tabs{overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}
body.admin-tw.page-hr .hr-tabs .pill,body.admin-tw.page-hr .hr-more-menu>summary{height:25px!important;min-height:25px!important;padding:0 8px!important;font-size:10.5px!important}
body.admin-tw.page-hr .module-search-row{margin:0 0 4px!important;padding:3px 5px!important;min-height:34px!important}
body.admin-tw.page-hr .main-grid,body.admin-tw.page-hr .panel{margin-top:0!important}

/* ---------- CRM editor / CRM register ---------- */
body.aiotor-runtime-shell.rt-natural-page [data-screen="crm.accounts"] .rt-kpis{display:none!important}
body.aiotor-runtime-shell.rt-natural-page [data-screen="crm.accounts"] .rt-titlebar p[data-rt-subtitle]{display:none!important}
body.aiotor-runtime-shell .rt-crm-account-editor{padding:4px!important;margin:0!important}
body.aiotor-runtime-shell .rt-crm-edit-tabs{position:sticky!important;top:43px!important;z-index:40!important;display:flex!important;gap:2px!important;padding:2px!important;margin:0 0 4px!important;overflow-x:auto!important;overflow-y:hidden!important;background:#fff!important}
body.aiotor-runtime-shell .rt-crm-edit-tabs button{min-height:27px!important;padding:0 8px!important;font-size:10.5px!important;white-space:nowrap!important}
body.aiotor-runtime-shell .rt-crm-edit-section{padding:7px!important;border-radius:8px!important}
body.aiotor-runtime-shell .rt-crm-edit-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:6px!important}
body.aiotor-runtime-shell .rt-crm-edit-grid input,body.aiotor-runtime-shell .rt-crm-edit-grid select{height:32px!important;min-height:32px!important}
body.aiotor-runtime-shell .rt-crm-edit-grid textarea{min-height:66px!important}
body.admin-tw.page-customer_form .panel-head{margin:0!important}
body.admin-tw.page-customer_form .form-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;padding:8px!important}

/* ---------- Profile ---------- */
body.admin-tw.page-profile_security .ai-universal-context{display:none!important}
body.admin-tw.page-profile_security .shared-shell-body{padding-top:10px!important}
body.admin-tw.page-profile_security .security-wrap{max-width:720px!important;margin:0 auto!important;gap:8px!important}
body.admin-tw.page-profile_security .security-card{padding:14px!important;border-radius:10px!important}
body.admin-tw.page-profile_security .security-card h2{font-size:15px!important;margin:0 0 3px!important}
body.admin-tw.page-profile_security .security-card p{font-size:11px!important;margin:0 0 8px!important}
body.admin-tw.page-profile_security .security-form{gap:7px!important;margin-top:8px!important}
body.admin-tw.page-profile_security .security-field input{min-height:34px!important;height:34px!important;padding:5px 8px!important}
body.admin-tw.page-profile_security .security-note{padding:8px!important;font-size:10.5px!important}

/* ---------- Finance: exactly two visible chrome rows ---------- */
body.page-finance-ultimate{overflow-y:auto!important;overflow-x:hidden!important}
body.page-finance-ultimate .finance-app-shell{display:block!important;min-height:0!important;height:auto!important}
body.page-finance-ultimate .finance-primary-header{position:sticky!important;top:0!important;z-index:900!important}
body.page-finance-ultimate .finance-command-row{position:sticky!important;top:42px!important;z-index:850!important;display:grid!important;grid-template-columns:minmax(360px,.85fr) minmax(520px,1.15fr)!important;align-items:center!important;gap:6px!important;min-height:34px!important;padding:3px 7px!important;border-bottom:1px solid var(--fin-line)!important;background:#f8fbff!important}
body.page-finance-ultimate .finance-subnav{min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important}
body.page-finance-ultimate .finance-command-filters{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;overflow-x:auto!important}
body.page-finance-ultimate .finance-command-filters .fu-search{min-width:180px!important;flex:1 1 220px!important}
body.page-finance-ultimate .finance-command-filters>input{width:118px!important;flex:0 0 118px!important}
body.page-finance-ultimate .finance-command-filters>select{width:62px!important;flex:0 0 62px!important}
body.page-finance-ultimate .finance-main{padding:4px 6px 14px!important;overflow:visible!important}
body.page-finance-ultimate .fu-shell{display:block!important}
body.page-finance-ultimate .fu-content{padding:0!important}
body.page-finance-ultimate .fu-bootstrap{margin:0 0 4px!important;padding:5px 7px!important;min-height:28px!important;font-size:10px!important}
body.page-finance-ultimate .fu-panel{overflow:visible!important;margin:0 0 5px!important}
body.page-finance-ultimate .fu-panel-head{min-height:31px!important;padding:4px 6px!important;align-items:center!important}
body.page-finance-ultimate .fu-panel-head p,body.page-finance-ultimate .fu-panel-note{display:none!important}
body.page-finance-ultimate .fu-table-wrap{height:auto!important;min-height:0!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important}
body.page-finance-ultimate .fu-table td.wrap{white-space:normal!important;min-width:220px!important;max-width:420px!important;overflow-wrap:anywhere!important}

/* Empty/diagnostic copy must not consume a work area. */
[data-ui-technical-note="1"],.technology-note,.implementation-note{display:none!important}

@media(max-width:1100px){
  body.page-finance-ultimate .finance-command-row{position:static!important;grid-template-columns:1fr!important;gap:3px!important}
  body.page-finance-ultimate .finance-command-filters{width:100%!important}
}
@media(max-width:760px){
  body.admin-tw .ai-universal-context{position:static!important}
  body.aiotor-runtime-shell.rt-natural-page .rt-titlebar p[data-rt-subtitle],body.admin-tw .panel-head p{display:none!important}
  body.page-finance-ultimate .finance-command-filters{flex-wrap:wrap!important;overflow:visible!important}
  body.page-finance-ultimate .finance-command-filters .fu-search{flex-basis:100%!important;min-width:100%!important}
}


/* ---------- B2B portal: same compact/no-hidden-values policy ---------- */
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b{
  height:auto!important;min-height:100%!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;background:#f6f8fb!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .desk-topbar{
  position:sticky!important;top:0!important;z-index:900!important;
  min-height:44px!important;height:auto!important;padding:5px 10px!important;gap:8px!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .brand-title{font-size:17px!important;line-height:1.05!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .brand-sub{font-size:9.5px!important;line-height:1.1!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .shop-hero{
  min-height:0!important;height:auto!important;max-height:none!important;padding:8px 12px!important;margin:0!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .shop-hero-inner{min-height:0!important;height:auto!important;max-width:1480px!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .shop-hero h1{
  margin:0 0 6px!important;font-size:clamp(20px,2.5vw,34px)!important;line-height:1.05!important;letter-spacing:-.025em!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .desk-main{
  min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
  padding:6px 10px 16px!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .panel,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .catalog-panel,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .orders-panel,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .trending-panel{
  min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
  padding:8px 10px!important;margin:0 0 7px!important;border-radius:10px!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .panel-head,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .catalog-results-head,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .trending-panel-head{
  min-height:32px!important;height:auto!important;padding:3px 4px!important;margin:0 0 4px!important;gap:7px!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .panel-head h2,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .panel-head h3{font-size:14px!important;line-height:1.15!important;margin:0!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .catalog-workbar{position:static!important;min-height:0!important;height:auto!important;padding:5px!important;margin:0 0 5px!important;gap:5px!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .table-wrap{
  height:auto!important;min-height:0!important;max-height:none!important;
  overflow-x:auto!important;overflow-y:visible!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table{height:auto!important;table-layout:auto!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table td{height:auto!important;vertical-align:top!important;line-height:1.28!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table td[data-semantic="description"],
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table td[data-semantic="product"],
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table td[data-semantic="customer"],
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b table td[data-semantic="supplier"]{
  min-width:220px!important;max-width:460px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-card h4,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-card .prod-title,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-card .prod-desc,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-sheet-row-name b,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-preview-row-name,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .product-preview-desc{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  -webkit-line-clamp:unset!important;line-clamp:unset!important;max-height:none!important;overflow-wrap:anywhere!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b #cartModal .cart-table td:has(.cart-table-name){white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b #cartModal .cart-table .cart-table-name{
  display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;line-height:1.25!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .orders-table td[data-semantic="description"],
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .orders-table td[data-semantic="customer"]{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
}
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .catalog-pager,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b #catalogPager,
body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b #catalogPagerBottom{
  position:static!important;height:auto!important;min-height:28px!important;margin:4px 0 6px!important;padding:2px!important;
}
@media(max-width:900px){
  body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .desk-topbar{position:static!important;padding:7px!important;gap:6px!important}
  body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .shop-hero{padding:6px 8px!important}
  body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .shop-hero h1{font-size:20px!important;margin-bottom:4px!important}
  body.b2b-desk-page.b2b-legacy-page.theme-cia-b2b .desk-main{padding:5px 7px 74px!important}
}
