/* Jacky Technology ERP V1.1.0 — approved navy / blue / gold interface */
:root {
  --nav: #0b1f3a;
  --nav2: #12365f;
  --gold: #d7a83d;
  --blue: #1677ff;
  --green: #16a36a;
  --text: #172033;
  --muted: #738096;
  --line: #e3eaf3;
  --bg: #f3f7fc;
}

/* R8.81 fix43 — one page title only; keep page actions and filters */
#preorders>.page-toolbar>div:first-child,
#inventory>.page-toolbar>div:first-child,
#finance>.page-toolbar>div:first-child,
#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child,
#delivery>.delivery-page-head>div:first-child{display:none!important}
#purchase>.purchase-page-hero{display:none!important}
#preorders>.page-toolbar,
#inventory>.page-toolbar,
#finance>.page-toolbar,
#reports>.page-toolbar,
#customers>.page-toolbar,
#suppliers>.page-toolbar,
#migration>.page-toolbar,
#settings>.page-toolbar{min-height:0!important;justify-content:flex-end!important}
#settings>.page-toolbar{display:none!important}
#sales .sales-order-unified-card>.sales-products-card>header{display:none!important}
#sales .sales-order-unified-card .sales-products-scroll{margin-top:14px!important}

body { background: linear-gradient(135deg, #f7faff 0, #f2f6fb 55%, #eef4fb 100%); }
.sidebar {
  width: 232px;
  padding: 20px 14px;
  background: linear-gradient(180deg, #081b34 0%, #0c294d 64%, #091d37 100%);
  box-shadow: 8px 0 30px rgba(11, 31, 58, .08);
}
.brand { padding: 0 9px 20px; border-color: rgba(255,255,255,.1); }
.brand-mark { background: #fff; border: 0; overflow: hidden; box-shadow: 0 5px 18px #0003; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand span { color: #8ea5c1; }
.sidebar nav { gap: 3px; padding-top: 16px; }
.nav-item { min-height: 43px; padding: 10px 13px; color: #b9c8da; border-radius: 9px; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, #1677ff, #216ce0);
  box-shadow: 0 7px 18px rgba(22,119,255,.25);
}
.nav-item.active { box-shadow: 0 7px 18px rgba(22,119,255,.25); }
.sidebar-foot { color: #b6c5d6; }
main { margin-left: 232px; }
header {
  min-height: 78px;
  height: auto;
  padding: 12px 28px;
  border-bottom-color: #e6edf6;
  box-shadow: 0 3px 16px rgba(25, 52, 86, .04);
}
h1 { color: #13213a; letter-spacing: -.2px; }
.app-version { color: #176fd3; background: #edf5ff; border: 1px solid #d3e5ff; }
.page { padding: 24px 28px 48px; }
.panel, .metrics article, .contact-summary article {
  border-color: #e2eaf4;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(27, 58, 94, .055);
}
.quick-order {
  color: var(--text);
  background: #fff;
  border: 1px solid #dbe7f4;
  border-top: 4px solid #1677ff;
  box-shadow: 0 6px 20px rgba(24, 69, 120, .07);
}
.quick-head p { color: var(--muted); }
.spark { background: #eaf3ff; color: #1677ff; }
.quick-box input { color: var(--text); background: #f8fbff; border-color: #dce7f3; }
.quick-box input:focus { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.quick-box button, .primary {
  color: #251b07;
  background: linear-gradient(135deg, #e6bd59, #d5a32d);
  box-shadow: 0 4px 11px rgba(196, 143, 28, .18);
}
.secondary { border-color: #cfdbe9; color: #234568; }
.page-toolbar { padding: 2px 0 3px; }
.page-toolbar h2 { color: #14233c; font-size: 20px; }
.contact-summary article { position: relative; overflow: hidden; }
.contact-summary article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #1677ff; }
.contact-summary article:nth-child(2)::before { background: #d7a83d; }
.contact-summary article:nth-child(3)::before { background: #16a36a; }
.partner-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #eaf1f9;
}
.partner-switch button {
  min-width: 126px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  color: #55708d;
  background: transparent;
  font-weight: 700;
}
.partner-switch button.active { color: #fff; background: #1677ff; box-shadow: 0 3px 9px #1677ff35; }
th { color: #60738a; background: #f3f7fc; }
tbody tr:hover td { background: #f8fbff; }
.tabs button.active { color: #176fd3; }
.release-notes-head { background: linear-gradient(135deg, #0b1f3a, #174574); }

@media (max-width: 1000px) {
  .sidebar { width: 190px; }
  main { margin-left: 190px; }
}
@media (max-width: 760px) {
  .sidebar { width: min(84vw, 300px); }
  main { margin-left: 0; }
  header { min-height: 70px; padding: 10px 12px; }
  .page { padding: 14px 10px 36px; }
  .partner-switch { width: 100%; }
  .partner-switch button { flex: 1; min-width: 0; }
}

/* V1.2 dashboard reconstruction — follows the approved dashboard reference */
body { background: #f4f8fd; }
.sidebar { width: 218px; padding: 19px 12px 16px; background: linear-gradient(180deg,#071a31 0%,#0a2544 58%,#091d35 100%); }
main { margin-left: 218px; }
.brand { min-height: 70px; padding: 0 8px 18px; }
.brand-mark { width: 45px; height: 45px; border-radius: 10px; }
.brand b { font-size: 18px; }
.brand span { font-size: 10px; letter-spacing: 2.2px; }
.sidebar nav { gap: 4px; padding-top: 14px; }
.nav-item { min-height: 45px; padding: 10px 13px; font-size: 14px; }
.nav-item.active { background: linear-gradient(90deg,#b5892f,#d0a843); box-shadow: 0 7px 18px rgba(197,153,53,.28); color: #fff; }
.nav-item.active > span:first-child { color: #fff4c9; }
#sales-nav-group .nav-parent,#purchase-nav-group .nav-parent,#finance-nav-group .nav-parent{display:flex;align-items:center;text-align:left}
#sales-nav-group .nav-parent>span:first-child,#purchase-nav-group .nav-parent>span:first-child,#finance-nav-group .nav-parent>span:first-child{flex:0 0 29px;width:29px}
#sales-nav-group .nav-parent .nav-chevron,#purchase-nav-group .nav-parent .nav-chevron,#finance-nav-group .nav-parent .nav-chevron{margin-left:auto}
#sales-nav-group .nav-submenu,#purchase-nav-group .nav-submenu,#finance-nav-group .nav-submenu{padding-top:4px;padding-bottom:5px}
.nav-submenu-item{position:relative;min-height:32px;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:#93a9c3;text-align:left;font-size:12px}
.nav-submenu-item:before{content:"";position:absolute;left:-13px;top:50%;width:7px;height:1px;background:#536177}
.nav-submenu-item:hover,.nav-submenu-item.active{color:#fff;background:rgba(255,255,255,.08)}
#finance .finance-module-tabs{display:none!important}
#finance[data-finance-active-view="receivable"] .supplier-payable-panel,#finance[data-finance-active-view="receivable"] .operating-expense-panel,#finance[data-finance-active-view="receivable"] .delivery-expense-panel,#finance[data-finance-active-view="receivable"] .courier-report-panel{display:none!important}
#finance[data-finance-active-view="supplier"] .finance-metrics,#finance[data-finance-active-view="supplier"] .finance-filter-bar,#finance[data-finance-active-view="supplier"] .finance-collection-workspace,#finance[data-finance-active-view="supplier"] .operating-expense-panel,#finance[data-finance-active-view="supplier"] .delivery-expense-panel,#finance[data-finance-active-view="supplier"] .courier-report-panel{display:none!important}
#finance[data-finance-active-view="expense"] .finance-metrics,#finance[data-finance-active-view="expense"] .finance-filter-bar,#finance[data-finance-active-view="expense"] .finance-collection-workspace,#finance[data-finance-active-view="expense"] .supplier-payable-panel{display:none!important}
#finance[data-finance-active-view="records"] .finance-metrics,#finance[data-finance-active-view="records"] .finance-filter-bar,#finance[data-finance-active-view="records"] .finance-collection-workspace,#finance[data-finance-active-view="records"] .supplier-payable-panel,#finance[data-finance-active-view="records"] .operating-expense-panel,#finance[data-finance-active-view="records"] .delivery-expense-panel,#finance[data-finance-active-view="records"] .courier-report-panel,#finance[data-finance-active-view="accounts"] .finance-metrics,#finance[data-finance-active-view="accounts"] .finance-filter-bar,#finance[data-finance-active-view="accounts"] .finance-collection-workspace,#finance[data-finance-active-view="accounts"] .supplier-payable-panel,#finance[data-finance-active-view="accounts"] .operating-expense-panel,#finance[data-finance-active-view="accounts"] .delivery-expense-panel,#finance[data-finance-active-view="accounts"] .courier-report-panel{display:none!important}
#finance:not([data-finance-active-view]) .supplier-payable-panel,#finance:not([data-finance-active-view]) .operating-expense-panel,#finance:not([data-finance-active-view]) .delivery-expense-panel,#finance:not([data-finance-active-view]) .courier-report-panel{display:none!important}
#finance[data-finance-active-view]:not([data-finance-active-view="receivable"]) #finance-register{display:none!important}
.sidebar-foot { bottom: 12px; }

header { min-height: 76px; padding: 11px 24px; gap: 18px; }
header > div:first-of-type { min-width: 330px; }
.page-title-line h1 { font-size: 21px; }
.app-version { background: #eef6ff; color: #1677ff; border-color: #d6e9ff; }
.global-search { flex: 1; max-width: 460px; position: relative; margin: 0 auto; }
.global-search span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #75869b; font-size: 18px; }
.global-search input { width: 100%; height: 42px; padding: 0 16px 0 42px; border: 1px solid #d6e1ed; border-radius: 9px; background: #f9fbfe; font-size: 14px; }
.header-metrics { display: none !important; }
.header-actions .screen-zoom-wrap { display: none; }

#dashboard { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; align-items:start; padding: 18px 22px 36px; }
#dashboard.page.active { display: grid; }
#dashboard .quick-order { grid-column: 1; grid-row: 1; margin: 0; min-height: 144px; padding: 17px 16px 13px; border: 1px solid #dce7f2; border-left: 4px solid #12b974; border-top-width: 1px; border-radius: 11px; }
#dashboard .dashboard-smart-actions { display: contents; }
#dashboard .delivery-smart-card { grid-column: 2; grid-row: 1; min-height: 144px; margin: 0; padding: 17px 16px 13px; border-left-color: #1677ff; }
#dashboard .purchase-smart-card { grid-column: 3; grid-row: 1; min-height: 144px; margin: 0; padding: 17px 16px 13px; border-left-color: #ff7c1a; }
#dashboard .quick-head { align-items:flex-start; }
#dashboard .spark { width: 42px; height: 42px; border-radius: 50%; background: #e4faf1; color: #11aa6c; }
#dashboard .quick-head h2, #dashboard .dashboard-smart-card h2 { margin: 0 0 4px; font-size: 17px; }
#dashboard .quick-head p, #dashboard .dashboard-smart-card p { min-height: 34px; margin: 0; line-height: 1.45; color: #7b899a; font-size: 12px; }
#dashboard .dashboard-smart-card > div:first-child > span { color: #1677ff; font-size: 11px; }
#dashboard .purchase-smart-card > div:first-child > span { color: #e77716; }
#dashboard .quick-box, #dashboard .quick-box.compact { display: grid; grid-template-columns:minmax(0,1fr) auto auto; gap:7px; margin-top: 10px; }
#dashboard .quick-box input { min-width:0; height: 39px; padding: 0 10px; }
#dashboard .quick-box button { min-height:39px; height:39px; padding:0 12px; white-space:nowrap; }
#dashboard .voice-input-btn { border:1px solid #ddb243; background:#fffaf0; color:#8b6714; border-radius:7px; }

#dashboard > .receivable-overview { grid-column:3; grid-row:2; min-height:92px; margin:0; padding:15px 18px; border-left:0; }
#dashboard .receivable-main { display:flex; align-items:center; gap:10px; }
#dashboard .receivable-main > span { font-weight:800; color:#24364e; }
#dashboard .receivable-main b { font-size:24px; color:#14233a; }
#dashboard .receivable-main small { margin-left:auto; }
#dashboard .dashboard-fx { display:none; }
#dashboard .receivable-actions button { color:#1677ff; background:transparent; border:0; }
#dashboard > .preorder-alert { grid-column:1 / -1; }
#dashboard > .inventory-alert-banner { grid-column:1 / 3; grid-row:4; margin:0; min-height:86px; border:1px solid #ffd5d2; background:#fff7f6; }
#dashboard > .dashboard-grid { display:contents; }
#dashboard .shortcuts { grid-column:1 / 3; grid-row:2 / span 2; overflow:hidden; min-height:350px; }
#dashboard .alerts { grid-column:3; grid-row:3 / span 2; overflow:hidden; min-height:344px; }
#dashboard .shortcut-grid { grid-template-columns:repeat(3,1fr); }
#dashboard .shortcut { min-height:139px; }
#dashboard .shortcut b { font-size:14px; }
#dashboard .sc { width:42px; height:42px; border-radius:12px; }
#dashboard .alerts .panel-title > span { margin-left:auto; }
#dashboard .alert-row { min-height:68px; }

#dashboard > .dashboard-grid.lower { display:contents; }
#dashboard .chart-panel { grid-column:1 / 3; grid-row:5; min-height:280px; }
#dashboard .summary { grid-column:3; grid-row:5; min-height:280px; }
#dashboard .chart { height:218px; }
#dashboard .summary-grid div { min-height:82px; }

@media (max-width:1400px) {
  #dashboard .quick-box, #dashboard .quick-box.compact { grid-template-columns:1fr auto; }
  #dashboard .voice-input-btn { display:none; }
  header > div:first-of-type { min-width:240px; }
}
@media (max-width:900px) {
  .global-search { display:none; }
  #dashboard.page.active { display:block; }
  #dashboard .quick-order, #dashboard .dashboard-smart-card, #dashboard > .receivable-overview, #dashboard > .inventory-alert-banner, #dashboard .shortcuts, #dashboard .alerts, #dashboard .chart-panel, #dashboard .summary { margin-bottom:12px; min-height:0; }
  #dashboard .dashboard-smart-actions { display:grid; grid-template-columns:1fr 1fr; }
  #dashboard > .dashboard-grid, #dashboard > .dashboard-grid.lower { display:grid; grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .sidebar { width:min(84vw,300px); }
  main { margin-left:0; }
  header > div:first-of-type { min-width:0; }
  #dashboard { padding:12px 10px 30px; }
  #dashboard .dashboard-smart-actions { grid-template-columns:1fr; }
  #dashboard .quick-box, #dashboard .quick-box.compact { grid-template-columns:1fr; }
  #dashboard .voice-input-btn { display:block; }
}

/* V1.0.4 default dashboard — reset from the new user-supplied reference */
.default-hide { display: none !important; }
.sidebar {
  width: 228px;
  padding: 18px 12px 14px;
  background: linear-gradient(180deg,#0a1d36 0%,#0c2748 53%,#0a203b 100%);
}
main { margin-left: 228px; }
.brand { min-height: 64px; padding: 0 7px 17px; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; }
.brand b { font-size: 17px; white-space: nowrap; }
.brand .brand-version {
  display: inline-flex;
  width: max-content;
  margin-top: 5px;
  padding: 3px 9px;
  color: #cae3ff;
  background: #123e6a;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0;
}
.sidebar nav { padding-top: 13px; gap: 4px; }
.nav-item { min-height: 48px; padding: 11px 13px; font-size: 14px; border-radius: 8px; }
.nav-item.active {
  background: linear-gradient(90deg,#ad8128 0%,#c9a13f 100%);
  box-shadow: 0 8px 20px rgba(185,139,42,.32);
}
.sidebar-foot.sidebar-logout {
  width: 100%;
  min-height: 45px;
  margin-top: auto;
  padding: 10px 13px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  color: #d5e1ef;
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}
.sidebar-foot.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.06); }

header { min-height: 78px; padding: 11px 25px 10px 28px; }
header > div:first-of-type { min-width: 420px; }
.page-title-line h1 { font-size: 22px; }
header p { margin-top: 4px; color: #7d8ba0; font-size: 12px; }
.global-search { max-width: 360px; }
.global-search input { height: 41px; background: #f9fbfe; }
.header-actions { gap: 12px; }
.header-actions .language-toggle { display: none; }

#dashboard { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 16px 16px 28px; }
#dashboard .quick-order,
#dashboard .dashboard-smart-card {
  min-height: 143px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(26,54,89,.06);
}
#dashboard .quick-order { padding: 16px 14px 12px; }
#dashboard .dashboard-smart-card { padding: 16px 14px 12px 78px; position: relative; }
#dashboard .dashboard-smart-card::before {
  position: absolute;
  left: 18px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 23px;
}
#dashboard .delivery-smart-card::before { content: "▰"; color:#1677ff; background:#eaf3ff; }
#dashboard .purchase-smart-card::before { content: "●"; color:#ff7b16; background:#fff1e7; }
#dashboard .quick-head { gap: 13px; }
#dashboard .spark { width: 45px; height: 45px; color:#13a568; background:#e7f9f1; font-size: 22px; }
#dashboard .quick-head h2,
#dashboard .dashboard-smart-card h2 { font-size: 18px; }
#dashboard .quick-head p,
#dashboard .dashboard-smart-card p { font-size: 12px; min-height: 32px; }
#dashboard .quick-box,
#dashboard .quick-box.compact { margin-top: 9px; }
#dashboard .quick-box input { height: 40px; background:#f9fbfd; }
#dashboard .quick-box button { height: 40px; min-height: 40px; border-radius: 7px; }

#dashboard .shortcuts { min-height: 314px; }
#dashboard .shortcut { min-height: 125px; }
#dashboard .shortcut-grid { grid-template-columns: repeat(3,1fr); }
#dashboard .sc { width: 45px; height: 45px; border-radius: 12px; font-size: 24px; }
#dashboard .shortcut b { margin-top: 8px; font-size: 15px; }
#dashboard .shortcut small { margin-top: 3px; font-size: 12px; }
#dashboard > .receivable-overview {
  min-height: 94px;
  padding: 16px 20px;
  border: 1px solid #dce8f6;
  background: linear-gradient(90deg,#fff,#f8fbff);
}
#dashboard .receivable-main { flex-wrap: wrap; padding-left: 58px; position: relative; }
#dashboard .receivable-main::before {
  content: "$";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color:#fff;
  background:#1677ff;
  box-shadow: 0 0 0 10px #eaf3ff;
  font-size: 24px;
}
#dashboard .receivable-main > span { width: 100%; font-size: 14px; }
#dashboard .receivable-main b { font-size: 21px; }
#dashboard .receivable-main small { margin-left: 0; }
#dashboard .receivable-actions { position:absolute; right:16px; top:27px; }
#dashboard .alerts { min-height: 300px; }
#dashboard .alert-row { min-height: 61px; }
#dashboard > .inventory-alert-banner { min-height: 91px; }
#dashboard .chart-panel { min-height: 250px; }
#dashboard .summary { min-height: 250px; }
#dashboard .chart { height: 188px; position: relative; }
#dashboard .chart svg { opacity: 1; }
#dashboard .chart:not(.has-data) svg { opacity: .16; }
#dashboard .chart:not(.has-data)::after {
  content: "▥\A 暂无销售数据\A 开始开单后将显示销售与利润趋势";
  white-space: pre;
  position:absolute;
  inset: 45px 0 auto;
  color:#94a3b8;
  text-align:center;
  font-size:12px;
  line-height:1.8;
}
#dashboard .summary-grid div { min-height: 74px; }

@media (max-width: 1450px) {
  header > div:first-of-type { min-width: 300px; }
  #dashboard .dashboard-smart-card { padding-left: 64px; }
  #dashboard .dashboard-smart-card::before { left: 12px; width: 40px; height: 40px; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .sidebar { width: 190px; }
  main { margin-left: 190px; }
  header > div:first-of-type { min-width: 220px; }
}

/* V1.1.1 visual refinement — shared across every company space */
:root {
  --nav-deep: #071a31;
  --nav-mid: #0d2d53;
  --blue-soft: #eaf3ff;
  --gold-soft: #fff6df;
  --danger-soft: #fff0ef;
  --success-soft: #eaf8f2;
  --shadow-sm: 0 3px 12px rgba(19, 48, 82, .055);
  --shadow-md: 0 10px 30px rgba(19, 48, 82, .085);
}

html { scrollbar-color: #b9c8da #edf3f9; }
body { color: #14233a; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(22, 119, 255, .18); outline-offset: 1px; }
button:not(:disabled):active { transform: translateY(1px); }

.sidebar::after { content: ""; position: absolute; inset: 0 0 auto; height: 150px; pointer-events: none; background: radial-gradient(circle at 20% 0, rgba(37, 124, 255, .18), transparent 70%); }
.brand, .sidebar nav, .sidebar-foot { position: relative; z-index: 1; }
.brand b { font-size: 17px; letter-spacing: .2px; }
.nav-item > span:first-child { color: #91abc8; }
.nav-item.active > span:first-child { color: #fff; }
.nav-submenu { margin: 2px 0 5px 28px; padding-left: 11px; border-left: 1px solid rgba(142, 175, 211, .22); }
.sales-subnav-item { color: #93a9c3; border-radius: 7px; }
.sales-subnav-item:hover, .sales-subnav-item.active { color: #fff; background: rgba(255,255,255,.08); }
.online-dot { box-shadow: 0 0 0 4px rgba(38,212,146,.1); }

header { backdrop-filter: blur(14px); background: rgba(255,255,255,.96); }
header > div:first-of-type { min-width: 175px; }
.page-title-line h1 { font-size: 22px; font-weight: 800; }
.app-version { min-height: 21px; padding: 3px 8px; border-radius: 999px; font-weight: 800; }
.header-metrics { overflow: hidden; border: 1px solid #dde7f2; border-radius: 11px; background: #fff; }
.header-metrics article { border-color: #e4ebf4; background: linear-gradient(180deg,#fff,#fbfdff); }
.header-metrics article:hover { background: #f7fbff; }
.header-metrics p { color: #8090a5; }
.header-metrics b { color: #17243a; }
.header-actions { flex-shrink: 0; }
.ghost, .language-toggle, .screen-fit-button { border: 1px solid #e0e7f0; background: #f8fafc; color: #203650; }
.ghost:hover, .language-toggle:hover, .screen-fit-button:hover { border-color: #bed7f6; background: #edf5ff; color: #126ee8; }
.avatar { border: 1px solid #ecd89d; background: linear-gradient(145deg,#fff7df,#f5df9e); box-shadow: 0 3px 10px #8d681215; }

.page-toolbar { margin-bottom: 16px; }
.page-toolbar > div > p { margin-top: 4px; }
.panel, .order-panel { background: rgba(255,255,255,.98); }
.panel:hover { border-color: #d8e3ef; }
.panel-title, .list-head { min-height: 56px; background: linear-gradient(180deg,#fff,#fbfdff); }
.panel-title h2, .list-head h2 { font-weight: 800; color: #16253c; }

.primary, .quick-box > button:not(.voice-input-btn) { min-height: 40px; border: 1px solid #d7a83d; background: linear-gradient(145deg,#edc65f,#dca92f); color: #281d07; font-weight: 800; box-shadow: 0 5px 14px rgba(193,139,24,.2); }
.primary:hover, .quick-box > button:not(.voice-input-btn):hover { filter: brightness(1.035); box-shadow: 0 7px 18px rgba(193,139,24,.26); }
.secondary { min-height: 38px; border: 1px solid #ccdae8; border-radius: 8px; background: #fff; color: #274866; font-weight: 700; }
.secondary:hover { border-color: #9fc2eb; background: #f3f8ff; color: #126ee8; }

input, select, textarea { border-color: #d7e1ec; border-radius: 8px; background: #fbfcfe; color: #18263b; }
input:hover, select:hover, textarea:hover { border-color: #b9cce0; }
input:focus, select:focus, textarea:focus { border-color: #1677ff; background: #fff; box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
label { color: #52647a; }

.quick-order { border-radius: 14px; border-top-width: 4px; }
.quick-order::before { content: ""; position: absolute; inset: 0 0 auto; height: 80px; pointer-events: none; background: linear-gradient(90deg,rgba(22,119,255,.045),transparent 60%); }
.quick-order { position: relative; overflow: hidden; }
.quick-order > * { position: relative; z-index: 1; }
.dashboard-smart-actions { gap: 14px; }
.dashboard-smart-card { border-color: #dce6f1; border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.delivery-smart-card { border-left: 4px solid #1677ff; }
.purchase-smart-card { border-left: 4px solid #d7a83d; }
.dashboard-smart-card > div:first-child > span { font-weight: 800; letter-spacing: .3px; }
.receivable-overview { border-left: 4px solid #f29b38; }
.receivable-main b { color: #ed8b25; }
.dashboard-fx { border-left-color: #e4eaf2; }
.inventory-alert-banner { border-radius: 13px; box-shadow: var(--shadow-sm); }
.inventory-alert-stats button { border: 1px solid rgba(241,151,54,.12); background: rgba(255,255,255,.66); }

.shortcut-grid { overflow: hidden; border-radius: 0 0 11px 11px; }
.shortcut { min-height: 112px; }
.shortcut:hover { background: linear-gradient(180deg,#fff,#f4f8fd); }
.shortcut:hover .sc { transform: translateY(-2px); }
.sc { box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.alert-row:hover { background: #f8fbff; }

.metrics article, .sub-metrics article, .contact-summary article, .report-cards article, .delivery-metrics article, .inventory-metrics article { border-color: #e0e8f2; box-shadow: var(--shadow-sm); }
.metrics article:hover, .sub-metrics article:hover, .contact-summary article:hover, .report-cards article:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.filters, .sales-record-filters, .expense-filters, .report-filter-bar { border: 1px solid #e1e9f2; border-radius: 11px; background: #f8fbff; }
.filter-group > label, .date-filter-group > label { color: #61738a; font-weight: 700; }
.tabs, .view-tabs, .partner-switch, .purchase-currency-switch, .sales-currency-switch { border-color: #dbe5ef; background: #edf3f9; }
.tabs button, .view-tabs button, .partner-switch button { font-weight: 700; }
.tabs button.active, .view-tabs button.active, .partner-switch button.active { color: #fff; background: linear-gradient(135deg,#1478ff,#266bda); box-shadow: 0 4px 11px rgba(22,119,255,.22); }

.contact-table-wrap, .import-table-wrap { border: 1px solid #e2eaf3; border-radius: 10px; }
table { border-collapse: separate; border-spacing: 0; }
th { height: 43px; border-bottom: 1px solid #dce5ef; color: #5b6f87; font-size: 11px; font-weight: 800; letter-spacing: .15px; }
td { border-bottom-color: #e9eef4; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f4f8fd; }
.pill, .tag, .safe-badge { border-radius: 999px; font-weight: 800; }
.customer-footer { background: #fbfcfe; border-top-color: #e5ebf2; }

.sales-simple-card { border-color: #dfe7f0; border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(22,45,75,.04); }
.sales-simple-card:hover { border-color: #bcd3ed; box-shadow: 0 7px 20px rgba(22,61,106,.08); }
.sales-card-actions button, .inventory-row-actions button { border-radius: 7px; font-weight: 700; }

.order-modal { backdrop-filter: blur(5px); background: rgba(5,17,33,.7); }
.modal-card { overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; box-shadow: 0 28px 90px rgba(1,11,25,.34); }
.modal-head { background: linear-gradient(135deg,#0a203d,#174a79); }
.modal-head h2 { letter-spacing: .1px; }
.modal-head > button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); }
.product-edit-form, .payment-record-section { background: #f7f9fc; }
.modal-actions { border-top: 1px solid #e1e8f0; background: rgba(255,255,255,.96); }

.settings-card { overflow: hidden; }
.settings-form, .setting-switches { background: linear-gradient(180deg,#fff,#fbfcfe); }
.setting-switches label { border-color: #e0e7ef; border-radius: 9px; background: #fff; }
.setting-switches label:hover { border-color: #bad2ee; background: #f7fbff; }
.settings-tip { border-left: 4px solid #d7a83d; background: var(--gold-soft); }
.operation-log-panel { overflow: hidden; }

.report-analysis-menu { border-color: #dde7f1; border-radius: 12px; background: #fff; }
.report-analysis-menu button:hover, .report-analysis-menu button.active { background: #edf5ff; color: #126ee8; }
.chart-panel, .report-table-panel, .report-ranking { overflow: hidden; }
.chart { background: linear-gradient(180deg,#fbfdff,#f5f9fd); }

.preorder-summary article, .preorder-panel, .partner-detail-card, .supplier-payable-panel { border-color: #dfe8f1; box-shadow: var(--shadow-sm); }
.preorder-list article:hover { border-color: #bad2ec; background: #f8fbff; }
.customer-order-shell { box-shadow: 0 30px 90px rgba(0,10,25,.42); }

.notification-panel { overflow: hidden; border-color: #d9e3ee; border-radius: 13px; box-shadow: 0 18px 50px rgba(12,31,55,.18); }
.notification-head { background: linear-gradient(135deg,#0d2848,#174d7d); }
.notification-item:hover { background: #f5f9fe; }
.toast { border: 1px solid rgba(255,255,255,.12); background: #102a49; box-shadow: 0 12px 38px rgba(5,22,42,.28); }

@media (max-width: 1180px) {
  .header-metrics article { min-width: 142px; }
  .header-actions { gap: 6px; }
  .header-icon-button { padding-inline: 9px; }
}

@media (max-width: 760px) {
  body { background: #f3f7fc; }
  header { border-radius: 0 0 13px 13px; box-shadow: 0 4px 18px rgba(18,48,82,.08); }
  .page-title-line h1 { font-size: 19px; }
  .app-version { font-size: 9px; }
  .quick-order, .dashboard-smart-card, .panel, .order-panel, .inventory-alert-banner { border-radius: 11px; }
  .dashboard-smart-actions { gap: 10px; }
  .quick-box { gap: 7px; }
  .primary, .secondary { min-height: 43px; }
  .metrics, .sub-metrics, .contact-summary, .report-cards { gap: 9px; }
  .filters, .sales-record-filters, .expense-filters, .report-filter-bar { padding: 10px; }
  .modal-card { border-radius: 0; }
}

/* Keep the approved default header proportions after shared refinements. */
@media (min-width: 1451px) { header > div:first-of-type { min-width: 420px; } }
@media (min-width: 1001px) and (max-width: 1450px) { header > div:first-of-type { min-width: 300px; } }

/* R8.79 — dashboard quick actions and today's real net profit */
#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:166px;padding-top:18px;background:linear-gradient(145deg,#fff 58%,#f8fbff)}
#dashboard .dashboard-smart-card{padding-left:72px}
#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(150px,1fr) 98px 112px;gap:8px;margin-top:13px}
#dashboard .quick-box input{height:42px;padding:0 13px;border-color:#cbdced;background:#fff;font-size:12px}
#dashboard .quick-box input::placeholder{color:#91a1b5}
#dashboard .quick-box button{height:42px;min-height:42px;padding:0 12px;font-size:12px;font-weight:800}
#dashboard .voice-input-btn{color:#9a6b08;background:#fffaf0;box-shadow:none}
#dashboard .dashboard-voice-icon{display:grid!important;place-items:center;width:42px!important;min-width:42px!important;padding:0!important}
#dashboard .voice-mic-icon{display:grid;place-items:center;width:20px;height:20px}
#dashboard .voice-mic-icon svg{display:block;width:20px;height:20px;fill:currentColor}
#dashboard .dashboard-voice-icon.listening{color:#fff;background:#ef5252;border-color:#ef5252;animation:voiceMicPulse 1.1s ease-in-out infinite}
@keyframes voiceMicPulse{50%{box-shadow:0 0 0 6px rgba(239,82,82,.16)}}
#dashboard .quick-box>button:not(.voice-input-btn){color:#2c2108;background:linear-gradient(145deg,#f2c754,#dda51f)}
#dashboard>.dashboard-profit-overview{grid-column:1/-1;grid-row:2;margin:0;padding:0;overflow:hidden;border:1px solid #dce7f3;background:linear-gradient(115deg,#fff,#f6faff);box-shadow:0 6px 20px rgba(18,61,109,.065)}
.dashboard-profit-head{display:flex;align-items:center;justify-content:space-between;min-height:66px;padding:11px 18px;border-bottom:1px solid #e4ecf5}
.dashboard-profit-head>div{display:flex;align-items:center;gap:12px}.dashboard-profit-head h2{margin:0;color:#17375f;font-size:17px}.dashboard-profit-head p{margin:4px 0 0;color:#788ba3;font-size:11px}
.dashboard-profit-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;color:#fff;background:linear-gradient(145deg,#1dbb78,#10985e);font-size:21px;font-weight:900;box-shadow:0 7px 16px rgba(16,152,94,.18)}
.dashboard-profit-date{padding:6px 10px;border-radius:999px;color:#55708f;background:#edf4fb;font-size:10px;font-weight:800}
.dashboard-profit-grid{display:grid;grid-template-columns:repeat(4,1fr)}
.dashboard-profit-grid article{position:relative;min-width:0;padding:15px 18px 16px;border-right:1px solid #e5edf6}.dashboard-profit-grid article:last-child{border-right:0}
.dashboard-profit-grid article>span{display:block;color:#6b7f98;font-size:11px;font-weight:800}.dashboard-profit-grid article>b{display:block;margin-top:6px;color:#172c49;font-size:22px;line-height:1.15}.dashboard-profit-grid article>small{display:block;margin-top:6px;overflow:hidden;color:#8798ac;font-size:9px;white-space:nowrap;text-overflow:ellipsis}
.dashboard-profit-grid .dashboard-net-profit-card{background:linear-gradient(135deg,#eafaf2,#f8fffb)}.dashboard-profit-grid .dashboard-net-profit-card>b{color:#0b9a5e;font-size:26px}.dashboard-profit-grid .dashboard-net-profit-card.is-loss{background:linear-gradient(135deg,#fff0ef,#fffafa)}.dashboard-profit-grid .dashboard-net-profit-card.is-loss>b{color:#df3e37}
#dashboard>.receivable-overview{grid-row:3}#dashboard .shortcuts{grid-row:3/span 2}#dashboard .alerts{grid-row:4/span 2}#dashboard>.inventory-alert-banner{grid-row:5}#dashboard .chart-panel,#dashboard .summary{grid-row:6}
@media(max-width:1400px){#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(0,1fr) 108px}#dashboard .voice-input-btn{display:none}}
@media(max-width:900px){#dashboard>.dashboard-profit-overview{margin-bottom:12px}.dashboard-profit-grid{grid-template-columns:1fr 1fr}.dashboard-profit-grid article:nth-child(2){border-right:0}.dashboard-profit-grid article:nth-child(-n+2){border-bottom:1px solid #e5edf6}}
@media(max-width:760px){#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:1fr 1fr}#dashboard .quick-box input{grid-column:1/-1}#dashboard .voice-input-btn{display:block}.dashboard-profit-head{align-items:flex-start}.dashboard-profit-date{display:none}.dashboard-profit-grid{grid-template-columns:1fr}.dashboard-profit-grid article{border-right:0;border-bottom:1px solid #e5edf6}.dashboard-profit-grid article:last-child{border-bottom:0}}

/* R8.81 — roomier, aligned dashboard quick-order cards */
#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:202px;padding-top:19px;padding-bottom:15px}
#dashboard .dashboard-smart-card>div:first-child{margin-bottom:0}
#dashboard .quick-head p,#dashboard .dashboard-smart-card p{min-height:0}
#dashboard .quick-box,#dashboard .quick-box.compact{display:grid;grid-template-columns:minmax(0,1fr) 92px 122px;grid-template-rows:44px 42px;gap:9px;margin:15px 0 0}
#dashboard .quick-box::before{content:"输入完成后可按 Enter 快速识别";grid-column:1;grid-row:2;align-self:center;color:#93a2b5;font-size:9px;white-space:nowrap}
#dashboard .quick-box input{grid-column:1/-1;grid-row:1;width:100%;height:44px;font-size:12px}
#dashboard .quick-box .voice-input-btn{display:block;grid-column:2;grid-row:2;height:42px;min-height:42px;padding:0 10px}
#dashboard .quick-box>button:not(.voice-input-btn){grid-column:3;grid-row:2;height:42px;min-height:42px;box-shadow:0 6px 13px rgba(202,148,25,.2)}
#dashboard .dashboard-smart-card>div:first-child>span{display:inline-block;margin-bottom:2px;font-weight:800}
@media(max-width:1400px){#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(0,1fr) 84px 112px}.dashboard-smart-card .quick-box::before{font-size:0}.dashboard-smart-card .quick-box::before{content:""}}
@media(max-width:760px){#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:0}#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:1fr 1fr;grid-template-rows:46px 43px}#dashboard .quick-box::before{display:none}#dashboard .quick-box .voice-input-btn{grid-column:1}#dashboard .quick-box>button:not(.voice-input-btn){grid-column:2}}

/* R8.81 compact dashboard AI cards */
#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:150px;padding-top:12px;padding-bottom:11px}
#dashboard .dashboard-smart-card{padding-left:62px}
#dashboard .dashboard-smart-card::before{left:14px;top:14px;width:37px;height:37px;font-size:18px}
#dashboard .spark{width:37px;height:37px;font-size:18px}
#dashboard .quick-head{gap:10px}
#dashboard .quick-head h2,#dashboard .dashboard-smart-card h2{font-size:16px}
#dashboard .quick-head p,#dashboard .dashboard-smart-card p{font-size:10px;line-height:1.35}
#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(0,1fr) 42px 108px;grid-template-rows:38px;gap:7px;margin-top:8px}
#dashboard .quick-box::before{display:none}
#dashboard .quick-box input{grid-column:1;grid-row:1;height:38px}
#dashboard .quick-box .voice-input-btn{grid-column:2;grid-row:1;height:38px;min-height:38px}
#dashboard .quick-box>button:not(.voice-input-btn){grid-column:3;grid-row:1;height:38px;min-height:38px}
@media(max-width:1400px){#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(0,1fr) 108px}#dashboard .quick-box>button:not(.voice-input-btn){grid-column:2}}
@media(max-width:760px){#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:0}#dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:1fr 1fr;grid-template-rows:42px 39px}#dashboard .quick-box input{grid-column:1/-1;grid-row:1;height:42px}#dashboard .quick-box .voice-input-btn{display:block;grid-column:1;grid-row:2;height:39px;min-height:39px}#dashboard .quick-box>button:not(.voice-input-btn){grid-column:2;grid-row:2;height:39px;min-height:39px}}

/* R8.81 — purchase create and records are workspace tabs; hide the old nested tabs */
#purchase .purchase-legacy-tabs{display:none!important}
#purchase .purchase-record-shortcuts{display:flex;align-items:center;gap:8px}
#purchase .purchase-record-shortcuts button{min-height:40px;white-space:nowrap}
#purchase .purchase-draft-add-row{min-height:54px;color:#7890aa;background:#fbfdff}
#purchase .purchase-draft-add-row>span:first-child{display:flex;align-items:center;justify-content:center}
#purchase .purchase-draft-add-row [data-purchase-add-next]{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid #79b2f4;border-radius:8px;color:#0876ec;background:#eef7ff;font-size:20px;font-weight:800}
#purchase .purchase-draft-add-row [data-purchase-add-next]:hover{color:#fff;background:#1677ee}
#purchase .purchase-draft-add-row>span:nth-child(2){font-weight:700}
#sales .sales-draft-add-row{height:54px;color:#7890aa;background:#fbfdff}
#sales .sales-draft-add-row td{border-top:1px solid #e2ebf5}
#sales .sales-draft-add-row td:first-child{text-align:center}
#sales .sales-draft-add-row [data-sales-add-next]{display:grid;place-items:center;width:30px;height:30px;margin:auto;padding:0;border:1px solid #79b2f4;border-radius:8px;color:#0876ec;background:#eef7ff;font-size:20px;font-weight:800}
#sales .sales-draft-add-row [data-sales-add-next]:hover{color:#fff;background:#1677ee}
#sales .sales-draft-add-row td:nth-child(2){font-weight:700}
#sales .sales-order-customer-card>header>button{height:34px;padding:0 14px;border:1px solid #98bee9;border-radius:7px;color:#086bdb;background:#f4f9ff;font-size:11px;font-weight:800;white-space:nowrap}
#sales .sales-order-customer-card.is-collapsed .sales-customer-grid{grid-template-columns:1fr;padding-top:13px;padding-bottom:15px}
#sales .sales-order-customer-card.is-collapsed .sales-customer-grid>div{display:none!important}
#sales .sales-order-customer-card.is-collapsed .sales-customer-grid>div:first-child{display:block!important;max-width:none}
#sales .sales-order-customer-card.is-collapsed>header small{display:none}
@media(max-width:650px){#sales .sales-order-customer-card>header>button{width:100%}}
#sales .sales-products-scroll table{table-layout:fixed}
#sales .sales-products-scroll th:nth-child(1),#sales .sales-products-scroll td:nth-child(1){width:52px}
#sales .sales-products-scroll th:nth-child(3),#sales .sales-products-scroll td:nth-child(3){width:135px}
#sales .sales-products-scroll th:nth-child(4),#sales .sales-products-scroll td:nth-child(4){width:85px}
#sales .sales-products-scroll th:nth-child(5),#sales .sales-products-scroll td:nth-child(5){width:90px}
#sales .sales-products-scroll th:nth-child(6),#sales .sales-products-scroll td:nth-child(6){width:115px}
#sales .sales-products-scroll th:nth-child(7),#sales .sales-products-scroll td:nth-child(7){width:125px}
#sales .sales-products-scroll th:nth-child(8),#sales .sales-products-scroll td:nth-child(8){width:65px}
#sales .sales-products-scroll td{height:auto;vertical-align:middle}
#sales .sales-products-scroll td:nth-child(2){padding-top:10px;padding-bottom:10px}
#sales .sales-products-scroll [data-order-product]{width:100%;min-height:37px;padding:7px 10px;border:1px solid #bdd3ec;border-radius:7px;color:#173b65;background:#fff;font-size:clamp(10px,.76vw,13px);font-weight:700}
#sales .sales-products-scroll [data-order-spec]{display:block;margin-top:6px;color:#7388a2;font-size:10px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
#sales .sales-products-scroll .order-variant-select{display:block;width:100%;margin-top:6px;padding:5px 26px 5px 8px;border:1px solid #cfe0f3;border-radius:7px;background:#f8fbff;color:#315170;font-size:11px}

/* R8.81 fix47 — explicit variant column, trailing item note and menu refresh */
#sales .sales-products-scroll th:nth-child(2),#sales .sales-products-scroll td:nth-child(2){width:clamp(260px,34vw,520px)!important}
#sales .sales-products-scroll th:nth-child(3),#sales .sales-products-scroll td:nth-child(3){width:clamp(130px,14vw,220px)!important}
#sales .sales-products-scroll th:nth-child(4),#sales .sales-products-scroll td:nth-child(4){width:90px!important}
#sales .sales-products-scroll th:nth-child(5),#sales .sales-products-scroll td:nth-child(5){width:80px!important}
#sales .sales-products-scroll th:nth-child(6),#sales .sales-products-scroll td:nth-child(6){width:105px!important}
#sales .sales-products-scroll th:nth-child(7),#sales .sales-products-scroll td:nth-child(7){width:115px!important}
#sales .sales-products-scroll th:nth-child(8),#sales .sales-products-scroll td:nth-child(8){width:clamp(130px,15vw,230px)!important}
#sales .sales-products-scroll th:nth-child(9),#sales .sales-products-scroll td:nth-child(9){width:58px!important}

/* R8.81 fix60 — final cross-page typography and component rhythm */
body,section.page,.modal-card,.drawer-card,.order-modal>.modal-card,.workspace-full-editor{
  font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;
  font-size:12px!important;
}
section.page>.page-toolbar,section.page>.inventory-command-bar,
section.page>.delivery-page-head,section.page>.purchase-page-hero{
  min-height:50px!important;
  padding:8px 12px!important;
}
section.page>.page-toolbar h2,section.page>.delivery-page-head h2,
section.page>.purchase-page-hero h2{font-size:18px!important;line-height:1.25!important}
section.page>.page-toolbar p,section.page>.delivery-page-head p,
section.page>.purchase-page-hero p{font-size:11px!important;line-height:1.35!important}
section.page .list-head,section.page .panel-title,section.page .sales-column-head,
section.page .delivery-detail-title,section.page .finance-list-title{
  min-height:50px!important;
  padding:8px 13px!important;
}
section.page .list-head h2,section.page .panel-title h2,
section.page .sales-column-head h3,section.page .finance-list-title h2,
section.page .list-head b,section.page .panel-title b{
  font-size:15px!important;
  line-height:1.3!important;
}
section.page .list-head small,section.page .panel-title small,
section.page .sales-column-head span{font-size:10px!important;line-height:1.35!important}
section.page table,section.page .sales-simple-list,section.page .preorder-table-list,
section.page .report-ranking-table{font-size:12px!important}
section.page table thead th,section.page .sales-compact-head>span{
  height:36px!important;
  padding:7px 9px!important;
  font-size:11px!important;
  line-height:1.35!important;
}
section.page table tbody td,section.page .sales-compact-row>span{
  min-height:44px!important;
  padding:7px 9px!important;
  font-size:12px!important;
  line-height:1.4!important;
}
section.page button,section.page .text-btn,section.page .pay-now-btn{
  min-height:32px!important;
  padding:6px 10px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
section.page input:not([type="checkbox"]):not([type="radio"]),section.page select{
  height:34px!important;
  min-height:34px!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  font-size:12px!important;
}
section.page .pill,section.page .badge,section.page .status-badge,
section.page .sales-payment-pill{font-size:11px!important;line-height:1.2!important}
section.page .customer-footer,section.page .preorder-list-footer{
  min-height:36px!important;
  padding:7px 14px!important;
  font-size:11px!important;
}
#sales-list-panel .sales-column-head,#sales-reservation-panel>.list-head{
  min-height:50px!important;
  padding:8px 13px!important;
}
#sales-list-panel .sales-column-head h3,#sales-reservation-panel>.list-head h2{font-size:15px!important}
#sales-list-panel .sales-compact-head,#sales-reservation-panel table thead tr{height:36px!important;min-height:36px!important}
#sales-list-panel .sales-compact-row,#sales-reservation-panel table tbody tr{height:44px!important;min-height:44px!important}
#sales-list-panel .sales-compact-actions button,#sales-reservation-panel table tbody button{
  height:30px!important;
  min-height:30px!important;
  padding:4px 8px!important;
  font-size:12px!important;
}
@media(max-width:760px){
  body,section.page,.modal-card,.drawer-card,.order-modal>.modal-card,.workspace-full-editor{font-size:13px!important}
  section.page button,section.page input:not([type="checkbox"]):not([type="radio"]),section.page select{font-size:13px!important}
}

/* R8.81 fix108 — new purchase entry follows the same structure as new sales. */
#purchase [data-purchase-panel="create"]{display:grid;grid-template-columns:minmax(0,760px) auto;align-items:center;gap:12px 18px}
#purchase [data-purchase-panel="create"].hidden{display:none!important}
#purchase [data-purchase-panel="create"]>.purchase-ai-strip{grid-column:1;width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
#purchase [data-purchase-panel="create"]>.purchase-ai-strip>div:first-child{display:none}
#purchase [data-purchase-panel="create"]>.purchase-ai-strip .purchase-ai-entry{display:grid;grid-template-columns:minmax(0,1fr) 92px 100px;gap:7px}
#purchase [data-purchase-panel="create"]>.purchase-ai-strip .purchase-ai-entry :is(input,button){height:40px;min-height:40px;margin:0}
#purchase [data-purchase-panel="create"]>.purchase-create-return{grid-column:2;justify-self:end;height:40px;white-space:nowrap}
#purchase [data-purchase-panel="create"]>:not(.purchase-ai-strip):not(.purchase-create-return){grid-column:1/-1;width:100%}
#purchase .purchase-order-unified-card{margin-top:0!important}
#purchase .purchase-order-unified-card>.purchase-items-preview>header{display:none!important}
#purchase .purchase-order-unified-card .purchase-empty-table{margin:14px 17px 17px!important;min-height:0!important;height:auto!important;overflow-x:auto!important;overflow-y:visible!important}
#purchase .purchase-order-unified-card .purchase-draft-rows{height:auto!important;max-height:none!important;overflow:visible!important}
#purchase .purchase-preview-bottom{grid-template-columns:1.3fr 1fr!important;gap:14px!important}
#purchase .purchase-note-preview,#purchase .purchase-total-preview{padding:16px 18px!important}
#purchase .purchase-note-preview textarea{height:auto!important;min-height:145px!important;margin-top:12px!important;padding:12px!important}
#purchase .purchase-total-preview p{min-height:40px!important;padding:9px 0!important}
#purchase .purchase-preview-actions{display:flex!important;align-items:flex-end;justify-content:flex-end;gap:10px!important;padding:14px 0!important}
@media(max-width:1050px){#purchase [data-purchase-panel="create"]{grid-template-columns:1fr auto}#purchase [data-purchase-panel="create"]>.purchase-ai-strip{max-width:none}}
@media(max-width:650px){#purchase [data-purchase-panel="create"]{grid-template-columns:1fr}#purchase [data-purchase-panel="create"]>.purchase-ai-strip,#purchase [data-purchase-panel="create"]>.purchase-create-return{grid-column:1;width:100%}#purchase [data-purchase-panel="create"]>.purchase-ai-strip .purchase-ai-entry{grid-template-columns:1fr 1fr}#purchase [data-purchase-panel="create"]>.purchase-ai-strip input{grid-column:1/-1}#purchase .purchase-preview-bottom{grid-template-columns:1fr!important}}

/* R8.81 fix109 — repair customer self-order review cards and empty workspace. */
#preorders .preorder-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:8px 0 12px!important}
#preorders .preorder-summary article{box-sizing:border-box!important;display:block!important;min-height:76px!important;height:76px!important;padding:11px 14px 10px 58px!important;overflow:hidden!important}
#preorders .preorder-summary article:before{left:14px!important;top:50%!important;width:34px!important;height:34px!important;transform:translateY(-50%)!important;line-height:34px!important;text-align:center!important}
#preorders .preorder-summary article>span,#preorders .preorder-summary article>b,#preorders .preorder-summary article>small{position:relative!important;z-index:1!important;display:block!important;width:auto!important;height:auto!important;margin:0!important;overflow:visible!important;line-height:1.35!important}
#preorders .preorder-summary article>span{font-size:11px!important}
#preorders .preorder-summary article>b{margin-top:2px!important;font-size:18px!important}
#preorders .preorder-summary article>small{margin-top:2px!important;font-size:10px!important}
#preorders .preorder-workspace{height:clamp(460px,calc(100dvh - 310px),620px)!important;min-height:460px!important}
#preorders .preorder-filter-bar .preorder-search{display:block!important;min-width:0}
#preorders .preorder-filter-bar .preorder-search span{top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;line-height:1!important}
#preorders .preorder-filter-bar .preorder-search input{display:block!important;margin:0!important;height:38px!important}
@media(max-width:900px){#preorders .preorder-summary{grid-template-columns:1fr 1fr!important}#preorders .preorder-workspace{height:auto!important;min-height:0!important}#preorders .preorder-panel{min-height:430px!important}#preorders .preorder-detail-panel{min-height:430px!important}}

/* R8.81 fix59 — sales reservation/history use one exact visual scale */
#sales-list-panel,#sales-reservation-panel{
  font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;
  font-size:12px!important;
}
#sales-list-panel .sales-column-head,#sales-reservation-panel>.list-head{
  min-height:54px!important;
  padding:10px 16px!important;
}
#sales-list-panel .sales-column-head h3,#sales-reservation-panel>.list-head h2{
  margin:0!important;
  font-size:17px!important;
  line-height:1.3!important;
}
#sales-list-panel .sales-column-head span,#sales-reservation-panel>.list-head small{
  font-size:10px!important;
  line-height:1.35!important;
}
#sales-list-panel .sales-compact-head,#sales-reservation-panel table thead tr{
  min-height:38px!important;
  height:38px!important;
}
#sales-list-panel .sales-compact-head>span,#sales-reservation-panel table thead th{
  padding:8px 10px!important;
  font-size:12px!important;
  line-height:1.35!important;
}
#sales-list-panel .sales-compact-row,#sales-reservation-panel table tbody tr{
  min-height:44px!important;
  height:44px!important;
}
#sales-list-panel .sales-compact-row>span,#sales-reservation-panel table tbody td{
  padding:8px 10px!important;
  font-size:12px!important;
  line-height:1.4!important;
}
#sales-list-panel .sales-compact-actions button,#sales-reservation-panel table tbody button{
  min-height:30px!important;
  height:30px!important;
  padding:4px 8px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
#sales-list-panel>.customer-footer,#sales-reservation-panel>.customer-footer{
  min-height:36px!important;
  padding:7px 14px!important;
  font-size:11px!important;
  line-height:1.4!important;
}

/* R8.81 fix48 — unified double-click selector windows */
#purchase-supplier-picker-modal{background:rgba(8,27,51,.58)!important}
#purchase-supplier-picker-modal .purchase-supplier-picker-card{width:min(980px,calc(100vw - 56px))!important;height:min(560px,calc(100vh - 72px))!important;max-height:none!important;overflow:hidden!important;border:1px solid #bfd2e7!important;border-radius:14px!important;background:#fff!important}
#purchase-supplier-picker-modal .modal-head{min-height:64px!important;padding:10px 16px!important;background:#f3f8fe!important;border-bottom:1px solid #c9daec!important;color:#0a4b91!important}
#purchase-supplier-picker-modal .modal-head span{display:none!important}
#purchase-supplier-picker-modal .modal-head h2{margin:0!important;font-size:17px!important;color:#064a91!important}
#purchase-supplier-picker-modal .modal-head h2::after{content:"双击供应商即可选入采购单";display:block;margin-top:3px;color:#66809b;font-size:11px;font-weight:500}
#purchase-supplier-picker-modal .modal-head button{width:36px!important;height:36px!important;border:1px solid #bdd2e8!important;border-radius:9px!important;background:#fff!important;color:#47708f!important}
#purchase-supplier-picker-modal .purchase-supplier-picker-body{height:calc(100% - 64px)!important;background:#fff}
#purchase-supplier-picker-modal #purchase-supplier-picker-search{flex:0 0 auto;height:38px!important;margin:10px 14px!important;padding:0 12px!important;border:1px solid #b8cde4!important;border-radius:7px!important}
#purchase-supplier-picker-modal .purchase-supplier-picker-list{max-height:none!important;overflow:auto!important;border-top:1px solid #d7e4f1}
.supplier-picker-table-head,#purchase-supplier-picker-modal [data-purchase-supplier-choice]{display:grid!important;grid-template-columns:minmax(170px,1.2fr) minmax(120px,.8fr) minmax(130px,.8fr) minmax(240px,1.8fr);gap:10px;align-items:center;width:100%;padding:10px 14px;text-align:left}
.supplier-picker-table-head{position:sticky;top:0;z-index:2;background:#edf5fc;color:#496681;font-size:10px;font-weight:800}
#purchase-supplier-picker-modal [data-purchase-supplier-choice]{border:0;border-bottom:1px solid #e4edf6;border-radius:0;background:#fff;color:#193b5b;font-size:11px}
#purchase-supplier-picker-modal [data-purchase-supplier-choice]:hover{background:#eaf4ff}
#purchase-supplier-picker-modal [data-purchase-supplier-choice] b,#purchase-supplier-picker-modal [data-purchase-supplier-choice] span,#purchase-supplier-picker-modal [data-purchase-supplier-choice] small{display:block;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){#purchase-supplier-picker-modal .purchase-supplier-picker-card{width:calc(100vw - 18px)!important;height:calc(100vh - 24px)!important}.supplier-picker-table-head,#purchase-supplier-picker-modal [data-purchase-supplier-choice]{min-width:720px}}

/* R8.81 fix49 — compact, consistent typography based on sales reservations */
section.page{font-size:12px}
section.page>.page-toolbar h2,
section.page .page-head h2,
section.page .purchase-page-hero h2,
section.page .delivery-page-head h2{font-size:20px!important;line-height:1.25!important}
section.page>.page-toolbar p,
section.page>.page-toolbar small,
section.page .page-head p,
section.page .purchase-page-hero p,
section.page .delivery-page-head p{font-size:10px!important;line-height:1.45!important}
section.page table th,
section.page .contact-table-wrap th,
section.page .purchase-table-head,
section.page .report-table-head{font-size:10px!important;font-weight:800!important}
section.page table td,
section.page .contact-table-wrap td,
section.page .purchase-draft-row,
section.page .operation-log-row{font-size:11px!important}
section.page table td b,
section.page table td strong{font-size:11px}
section.page table td small,
section.page .purchase-draft-row small{font-size:9px!important}
section.page button,
section.page .text-btn,
section.page .secondary,
section.page .primary{font-size:11px}
section.page .pill,
section.page .tag,
section.page .payment-status-select{font-size:10px!important}
section.page label{font-size:10px}
section.page input,
section.page select,
section.page textarea{font-size:11px}
#purchase .purchase-list-actions button,
#inventory .inventory-primary-actions button,
#delivery .delivery-page-actions button,
#customers .partner-actions button{font-size:11px!important}
#finance .finance-summary-card b,
#inventory .inventory-metrics article b{font-size:18px!important}
#sales .sales-record-column .sales-column-head h3{font-size:17px!important}
#sales .sales-record-column .sales-card-main .customer-order-link{font-size:14px!important}
#sales .sales-record-column .sales-card-money>b{font-size:15px!important}
@media(max-width:760px){section.page{font-size:11px}section.page>.page-toolbar h2,section.page .page-head h2,section.page .purchase-page-hero h2,section.page .delivery-page-head h2{font-size:18px!important}}

/* R8.81 fix50 — one card system across every ERP page */
section.page .panel,
section.page .list-panel,
section.page .customer-panel,
section.page .inventory-list-r817,
section.page .delivery-list-panel,
section.page .report-table-panel,
section.page .operation-log-panel,
#purchase-record-edit-modal .modal-card{
  overflow:hidden;
  border:1px solid #d9e5f2!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 7px 22px rgba(31,67,111,.045)!important;
}
section.page .panel-title,
section.page .list-panel>header,
section.page .customer-panel>header,
section.page .inventory-list-head-r817,
section.page .delivery-list-panel>header,
section.page .operation-log-panel>header{
  min-height:54px!important;
  padding:12px 16px!important;
  border-bottom:1px solid #dce7f2!important;
  background:#fff!important;
}
section.page .panel-title h2,
section.page .panel-title h3,
section.page .list-panel>header h2,
section.page .list-panel>header h3,
section.page .customer-panel>header h2,
section.page .customer-panel>header h3{
  margin:0!important;
  color:#102e59!important;
  font-size:17px!important;
  line-height:1.3!important;
}
section.page .panel-title small,
section.page .list-panel>header small,
section.page .customer-panel>header small{
  margin-top:4px!important;
  color:#71849d!important;
  font-size:9px!important;
}
section.page .contact-table-wrap,
section.page .import-table-wrap{
  overflow:auto;
  border:0!important;
  border-radius:0!important;
  background:#fff;
}
section.page .contact-table-wrap table,
section.page .import-table-wrap table{
  width:100%;
  border-collapse:collapse;
}
section.page .contact-table-wrap thead th,
section.page .import-table-wrap thead th{
  height:43px!important;
  padding:9px 12px!important;
  border-bottom:1px solid #d5e2ef!important;
  color:#4b6688!important;
  background:#f2f7fd!important;
  text-align:left;
}
section.page .contact-table-wrap tbody td,
section.page .import-table-wrap tbody td{
  min-height:54px;
  padding:12px!important;
  border-bottom:1px solid #e4ecf5!important;
  color:#183552;
  background:#fff;
}
section.page .contact-table-wrap tbody tr:hover td,
section.page .import-table-wrap tbody tr:hover td{
  background:#f7fbff!important;
}
section.page .contact-table-wrap tbody tr:last-child td,
section.page .import-table-wrap tbody tr:last-child td{
  border-bottom:0!important;
}
section.page .list-footer,
section.page .table-footer,
section.page [class*="-list-footer"],
section.page [class*="-table-footer"]{
  min-height:40px!important;
  padding:9px 14px!important;
  border-top:1px solid #dce7f2!important;
  color:#607795!important;
  background:#fbfdff!important;
  font-size:10px!important;
}
section.page .sub-metrics,
section.page .inventory-metrics,
section.page .finance-metrics,
section.page .preorder-summary{
  gap:10px!important;
}
section.page .sub-metrics>*,
section.page .inventory-metrics>*,
section.page .finance-metrics>*,
section.page .preorder-summary>*{
  border:1px solid #dce7f2!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(31,67,111,.035)!important;
}
section.page button,
section.page .text-btn,
section.page .primary,
section.page .secondary{
  border-radius:8px;
}
section.page input,
section.page select,
section.page textarea{
  border-radius:7px;
}
@media(max-width:760px){section.page .panel-title,section.page .list-panel>header,section.page .customer-panel>header{padding:10px 12px!important}section.page .contact-table-wrap thead th,section.page .contact-table-wrap tbody td{padding-left:9px!important;padding-right:9px!important}}

/* R8.81 fix51 — compact legacy list pages missed by the unified selectors */
section.page .list-panel>.list-head,
section.page .customer-panel>.list-head{
  display:flex!important;
  min-height:68px!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0!important;
  padding:12px 16px!important;
  border-bottom:1px solid #dce7f2!important;
  background:#fff!important;
}
section.page .list-panel>.list-head h2,
section.page .customer-panel>.list-head h2{
  margin:0!important;
  color:#102e59!important;
  font-size:18px!important;
  line-height:1.25!important;
}
section.page .list-panel>.list-head small,
section.page .customer-panel>.list-head small{
  display:block!important;
  margin-top:5px!important;
  color:#71849d!important;
  font-size:9px!important;
  line-height:1.4!important;
}
section.page .list-panel>.list-head button,
section.page .customer-panel>.list-head button{
  min-height:38px!important;
  padding:0 14px!important;
  font-size:11px!important;
}
section.page .customer-footer{
  display:flex!important;
  min-height:38px!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  padding:8px 14px!important;
  border-top:1px solid #dce7f2!important;
  color:#607795!important;
  background:#fbfdff!important;
  font-size:10px!important;
}
#sales-reservation-panel{
  width:calc(100% - 36px)!important;
  max-width:none!important;
  margin:12px 18px 18px!important;
}
#sales-reservation-panel .contact-table-wrap thead th{height:40px!important;padding-top:8px!important;padding-bottom:8px!important}
#sales-reservation-panel .contact-table-wrap tbody td{height:52px!important;padding-top:10px!important;padding-bottom:10px!important}
#sales-reservation-panel .customer-footer{min-height:36px!important}
@media(max-width:760px){section.page .list-panel>.list-head,section.page .customer-panel>.list-head{min-height:60px!important;padding:10px 12px!important;align-items:stretch!important;flex-direction:column!important}section.page .list-panel>.list-head button,section.page .customer-panel>.list-head button{width:100%}#sales-reservation-panel{width:calc(100% - 20px)!important;margin:10px!important}.customer-footer{align-items:flex-start!important;flex-direction:column!important}}
#sales .sales-products-scroll [data-order-spec],#sales .sales-products-scroll .order-variant-select{margin-top:0!important}
#sales .sales-products-scroll .order-item-note{width:100%;min-width:0}
.notification-actions{grid-template-columns:1fr!important}
.notification-clear{border-left:0!important}
.product-edit-form #edit-product-variants{min-height:76px;resize:vertical}
.product-edit-form label>small{display:block;margin-top:5px;color:#7388a2;font-size:11px;line-height:1.45}
.purchase-record-editor-card .purchase-record-edit-item{grid-template-columns:42px minmax(250px,1.8fr) minmax(130px,.9fr) minmax(82px,.48fr) minmax(120px,.65fr) minmax(110px,.62fr) 76px!important}
#sales .searchable-select-menu:has(.product-search-table-row){width:min(980px,calc(100vw - 310px));right:auto;max-height:390px;padding:0;overflow:auto}
.product-search-tools{position:sticky;top:0;z-index:3;display:flex;justify-content:flex-end;gap:8px;padding:8px;background:#fff;border-bottom:1px solid #d9e5f2}
.product-search-tools select{width:auto;min-width:145px;height:32px;border:1px solid #cbd9e8;border-radius:6px;background:#fff;padding:0 28px 0 9px;color:#274562;font-size:11px}
.product-search-table-head,.searchable-select-menu .product-search-table-row{display:grid!important;grid-template-columns:110px minmax(180px,1.45fr) minmax(170px,1.3fr) 90px 62px 72px 100px;align-items:center;gap:8px;min-width:820px}
.product-search-table-head{position:sticky;top:49px;z-index:2;padding:8px 11px;background:#edf5fc;border-bottom:1px solid #ccdaea;color:#496681;font-size:10px;font-weight:800}
.searchable-select-menu .product-search-table-row{border-radius:0;border-bottom:1px solid #e4edf6;padding:9px 11px!important;font-size:11px}
.searchable-select-menu .product-search-table-row span,.searchable-select-menu .product-search-table-row b,.searchable-select-menu .product-search-table-row strong,.searchable-select-menu .product-search-table-row em{display:block;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-style:normal}
.searchable-select-menu .product-search-table-row strong{color:#0b4f9c}.searchable-select-menu .product-search-table-row em{color:#00965e;font-weight:800}
@media(max-width:900px){#sales .searchable-select-menu:has(.product-search-table-row){width:calc(100vw - 36px);max-width:none;left:0}.product-search-table-head,.searchable-select-menu .product-search-table-row{grid-template-columns:90px minmax(160px,1.4fr) minmax(150px,1.2fr) 82px 52px 62px 86px}}
body.product-picker-open{overflow:hidden}
body.product-picker-open:after{display:none!important}
#sales .searchable-select-menu.product-picker-dialog{position:fixed!important;z-index:5000!important;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%);display:block;width:min(1180px,calc(100vw - 48px))!important;height:min(680px,calc(100vh - 60px));max-height:none!important;padding:0!important;overflow:auto;border:1px solid #bfd2e7;border-radius:14px;background:#fff;box-shadow:0 0 0 9999px rgba(8,27,51,.48),0 28px 80px rgba(2,20,43,.35)}
.product-picker-title{position:sticky;top:0;z-index:6;display:flex;align-items:center;justify-content:space-between;min-height:64px;padding:12px 18px;background:linear-gradient(135deg,#f8fbff,#edf5ff);border-bottom:1px solid #d4e1ee}
.product-picker-title b,.product-picker-title small{display:block}.product-picker-title b{font-size:17px;color:#083f83}.product-picker-title small{margin-top:3px;color:#71869d;font-size:11px}.product-picker-title button{width:34px;height:34px;border:1px solid #c7d8e9;border-radius:8px;background:#fff;color:#56708c;font-size:22px;line-height:1}
.product-picker-dialog .product-search-tools{top:64px;justify-content:stretch;padding:10px 14px}.product-picker-dialog .product-search-tools input{flex:1;min-width:260px;height:36px;border:1px solid #b8cde4;border-radius:7px;padding:0 12px;color:#183958;outline:none}.product-picker-dialog .product-search-tools input:focus{border-color:#2384f4;box-shadow:0 0 0 3px rgba(35,132,244,.13)}
.product-picker-dialog .product-search-table-head{top:121px;padding:10px 14px}.product-picker-dialog .product-search-table-row{padding:11px 14px!important}
@media(max-width:760px){#sales .searchable-select-menu.product-picker-dialog{width:calc(100vw - 18px)!important;height:calc(100vh - 24px)}.product-picker-dialog .product-search-tools{flex-wrap:wrap}.product-picker-dialog .product-search-tools input{flex-basis:100%;min-width:0}.product-picker-dialog .product-search-table-head{top:167px}}

/* R8.81 unified document entry cards */
#sales .sales-order-unified-card{margin-bottom:14px;overflow:visible;border:1px solid #d7e4f3;border-radius:11px;background:#fff;box-shadow:0 5px 16px rgba(26,65,108,.055)}
#sales .sales-order-unified-card>.panel{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#sales .sales-order-unified-card>.sales-order-customer-card>header{min-height:52px;padding:9px 17px;border-bottom:0}
#sales .sales-order-unified-card>.sales-order-customer-card>header>div{display:none}
#sales .sales-order-unified-card .sales-customer-grid{padding:5px 17px 15px!important}
#sales .sales-order-unified-card>.sales-products-card{border-top:1px solid #e0e9f3!important}
#sales .sales-order-unified-card>.sales-products-card>header{min-height:55px;padding:8px 17px;border-bottom:0}
#sales .sales-order-unified-card>.sales-products-card>header>div:first-child{display:none}
#sales .sales-order-unified-card>.sales-products-card>header>.manual-sales-product{width:100%;justify-content:flex-end}
#sales .sales-order-unified-card .sales-products-scroll{margin:0 17px 17px}

#purchase .purchase-order-unified-card{margin-bottom:14px;overflow:visible;border:1px solid #d7e4f3;border-radius:11px;background:#fff;box-shadow:0 5px 16px rgba(26,65,108,.055)}
#purchase .purchase-order-unified-card>.panel{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#purchase .purchase-order-unified-card>.purchase-items-preview{border-top:1px solid #e0e9f3!important}
#purchase .purchase-order-unified-card>.purchase-items-preview>header{min-height:55px;border-bottom:0;background:transparent}
#purchase .purchase-order-unified-card>.purchase-items-preview>header>div:first-child{display:none}
#purchase .purchase-order-unified-card>.purchase-items-preview>header>.purchase-product-toolbar{width:100%;margin-left:auto}
#purchase .purchase-order-unified-card .purchase-empty-table{margin-top:0}

#delivery-form-modal .delivery-items-editor{padding:0;border-color:#d7e4f3;background:#fff}
#delivery-form-modal .delivery-items-title{justify-content:flex-end;min-height:52px;margin:0;padding:8px 12px;border-bottom:1px solid #e0e9f3}
#delivery-form-modal .delivery-items-title>div{display:none}
#delivery-form-modal .delivery-items-scroll{padding:8px 10px 10px}
#delivery-form-modal [data-delivery-spec]{min-width:170px!important;max-width:240px}
.reservation-quote-btn{color:#8a5900!important;background:#fff5d8!important;border-color:#e8bd54!important}
.quote-currency-picker{display:flex;align-items:center;gap:7px;color:#d9e4f2;font-size:10px;white-space:nowrap}.quote-currency-picker span{display:block!important;color:#d9e4f2!important;margin:0!important}.quote-currency-picker select{height:34px;border:1px solid #52647d;border-radius:7px;background:#fff;color:#17375e;padding:0 28px 0 10px;font-weight:800}
.quotation-notice{margin-top:14px;padding:10px 12px;border:1px solid #ecd58e;border-radius:7px;color:#765612;background:#fff9e7;font-size:12px}
.partner-total-link{border:0;background:transparent;color:#086bda;padding:0;font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
@media(max-width:650px){#sales .sales-order-unified-card>.sales-order-customer-card>header{align-items:center!important;flex-direction:row!important}#sales .sales-order-unified-card>.sales-order-customer-card>header>button{width:auto}.sales-order-unified-card .manual-sales-product{grid-template-columns:1fr}.purchase-order-unified-card .purchase-product-toolbar{grid-template-columns:1fr!important}}
@media(max-width:760px){#purchase .purchase-record-shortcuts{display:grid;grid-template-columns:1fr 1fr;width:100%}#purchase .purchase-record-shortcuts button{width:100%}}

/* Delivery management — follows the approved default ERP language */
#delivery { padding: 18px 20px 32px; background: linear-gradient(135deg,#f7fbff,#eef6ff); }
.delivery-page-head { margin-bottom: 12px; align-items: center; }
.delivery-page-head > div:first-child { display:flex; align-items:center; gap:13px; }
.delivery-page-head h2 { margin:0 0 4px; color:#0f3f9d; font-size:25px; }
.delivery-page-head p { margin:0; color:#5270a7; font-size:13px; }
.delivery-page-icon { display:grid; place-items:center; width:42px; height:42px; color:#fff; background:linear-gradient(145deg,#50a7ff,#116ff0); clip-path:polygon(50% 0,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%); }
.delivery-page-head .primary { min-width:136px; }
.delivery-status-tabs { display:flex; gap:6px; height:46px; margin-bottom:14px; border-bottom:1px solid #dce8f7; }
.delivery-status-tabs button { min-width:130px; padding:0 18px; border:0; border-bottom:2px solid transparent; color:#385c9e; background:transparent; font-weight:800; }
.delivery-status-tabs button.active { color:#0876ef; border-bottom-color:#0876ef; background:#fff; }
#delivery .delivery-metrics { grid-template-columns:repeat(5,1fr); gap:13px; margin-bottom:14px; }
#delivery .delivery-metrics article { display:flex; align-items:center; gap:14px; min-height:84px; padding:15px 17px; }
#delivery .delivery-metrics .dm { display:grid; place-items:center; flex:0 0 45px; width:45px; height:45px; border-radius:10px; font-style:normal; font-size:22px; }
.dm.blue { color:#0577f8; background:#e8f3ff; }.dm.green { color:#09a66a; background:#e8f8f1; }.dm.teal { color:#04a87c; background:#e7f9f3; }.dm.orange { color:#ff7c10; background:#fff0e5; }.dm.violet { color:#7e48ee; background:#f1eaff; }
#delivery .delivery-metrics span { color:#244b91; font-size:13px; font-weight:800; }
#delivery .delivery-metrics b { margin:6px 0 0; color:#092d86; font-size:22px; }
.delivery-ai-bar { display:grid; grid-template-columns:270px minmax(260px,1fr) 140px 140px; align-items:center; gap:12px; margin-bottom:14px; padding:14px 16px; }
.delivery-ai-bar > div b,.delivery-ai-bar > div small { display:block; }.delivery-ai-bar > div b { color:#123f9e; font-size:17px; }.delivery-ai-bar > div small { margin-top:4px; color:#7185aa; font-size:11px; }
.delivery-ai-bar input,.delivery-filter-bar input,.delivery-filter-bar select { height:42px; padding:0 13px; border:1px solid #bed5f5; background:#fff; }
.delivery-ai-bar button { height:42px; border-radius:7px; font-weight:800; }
.delivery-voice { border:0; color:#fff; background:linear-gradient(135deg,#3495ff,#0871eb); }
.delivery-filter-bar { display:grid; grid-template-columns:minmax(300px,1fr) 190px 165px 165px 165px; gap:12px; margin-bottom:14px; padding:12px; }
.delivery-filter-bar button { height:42px; border:1px solid #bed5f5; border-radius:7px; color:#0872e8; background:#fff; font-weight:800; }
.delivery-filter-bar .export { color:#fff; border-color:#0872e8; background:linear-gradient(135deg,#3495ff,#0871eb); }
.delivery-workspace { display:grid; grid-template-columns:minmax(0,2.08fr) minmax(360px,1fr); gap:14px; align-items:stretch; }
.delivery-list-panel { min-height:490px; }
.delivery-list-panel .list-head { height:52px; padding:0 16px; }.delivery-list-panel .list-head > div { display:flex; align-items:center; gap:18px; }.delivery-list-panel .list-head b { color:#0d469f; font-size:16px; }.delivery-list-panel .list-head small { color:#5a77a6; }
.delivery-list-panel table { min-width:850px; }.delivery-list-panel th { color:#355a96; background:#f3f8ff; }.delivery-list-panel td { padding:12px 9px; vertical-align:middle; color:#163c7a; }.delivery-list-panel td b { color:#103c89; }.delivery-list-panel td small { color:#6680ac; }
.delivery-list-panel .delivery-actions { flex-wrap:wrap; }.delivery-list-panel .delivery-actions button { padding:7px 9px; border-color:#1680f8; color:#0874ec; }
.delivery-detail-preview { min-height:490px; overflow:hidden; }
.delivery-detail-title { display:flex; justify-content:space-between; align-items:center; height:52px; padding:0 16px; border-bottom:1px solid #deebf9; }.delivery-detail-title b { color:#0c459f; font-size:16px; }.delivery-detail-title button { border:0; background:transparent; color:#244b91; font-size:22px; }
.delivery-preview-form { display:grid; gap:7px; padding:13px 16px 8px; }.delivery-preview-form label { display:grid; grid-template-columns:92px 1fr; align-items:center; gap:8px; color:#244b91; font-size:12px; font-weight:800; }.delivery-preview-form em { color:#e74848; font-style:normal; }.delivery-preview-form input,.delivery-preview-form select,.delivery-preview-form textarea { width:100%; min-height:31px; padding:5px 9px; border:1px solid #c7d9f1; font-size:12px; }.delivery-preview-form label > div { display:grid; grid-template-columns:1fr 92px; gap:7px; }.delivery-preview-form label > div button { border:0; border-radius:5px; color:#fff; background:#0c76ee; font-weight:800; }
.delivery-flow { display:flex; align-items:flex-start; padding:8px 24px 12px; }.delivery-flow span { display:grid; place-items:center; flex:0 0 48px; color:#94a8ca; text-align:center; font-size:18px; }.delivery-flow span b { margin-top:5px; font-size:10px; white-space:nowrap; }.delivery-flow span.active { color:#0c78ef; }.delivery-flow i { flex:1; height:2px; margin-top:9px; background:#cbd8eb; }
.delivery-cost { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; margin:0 14px 12px; padding:10px 12px; border:1px solid #c8dcf6; border-radius:7px; color:#164894; }.delivery-cost span small { display:block; margin-top:3px; color:#7890b6; font-size:10px; }.delivery-cost b { color:#12377e; }.delivery-cost button { height:34px; border:1px solid #0c79f0; border-radius:6px; color:#0c6fe0; background:#fff; font-weight:800; }
.delivery-detail-actions { display:grid; grid-template-columns:.65fr .9fr 1.2fr 1.2fr; gap:8px; padding:10px 14px 14px; border-top:1px solid #e2ebf7; }.delivery-detail-actions button { min-height:38px; border:1px solid #bcd4f1; border-radius:6px; color:#0873e9; background:#fff; font-weight:800; }.delivery-detail-actions .gold { color:#fff; border-color:#d7a32d; background:linear-gradient(135deg,#e8bd4d,#d39b1f); }
@media(max-width:1320px){.delivery-ai-bar{grid-template-columns:220px 1fr 110px 120px}.delivery-filter-bar{grid-template-columns:1fr 150px 140px 130px 130px}.delivery-workspace{grid-template-columns:1fr}.delivery-detail-preview{min-height:0}.delivery-status-tabs{overflow-x:auto}.delivery-status-tabs button{min-width:115px}.delivery-detail-actions{grid-template-columns:repeat(4,1fr)}}
@media(max-width:760px){#delivery{padding:13px 10px 28px}.delivery-page-head>div:first-child{align-items:flex-start}.delivery-page-head h2{font-size:21px}.delivery-page-head .primary{width:100%}.delivery-status-tabs{overflow-x:auto}.delivery-status-tabs button{flex:0 0 115px}.delivery-status-tabs button:nth-child(4),.delivery-status-tabs button:nth-child(5){display:none}#delivery .delivery-metrics{grid-template-columns:1fr 1fr}.delivery-ai-bar,.delivery-filter-bar{grid-template-columns:1fr}.delivery-ai-bar>div{grid-column:1}.delivery-workspace{grid-template-columns:1fr}.delivery-detail-preview{display:none}.delivery-list-panel{min-height:360px}.delivery-filter-bar input,.delivery-filter-bar select,.delivery-filter-bar button{width:100%}}

/* R8.5: final sales display lock, loaded after all shared layout rules. */
#sales #sales-overview-head.sales-overview-actions{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:10px!important;padding:12px 0!important}
#sales #sales-overview-head.sales-overview-actions>.sales-currency-switch{flex:0 0 310px!important;width:310px!important;max-width:310px!important;margin:0!important;grid-template-columns:auto 1fr 1fr!important;gap:4px!important;padding:5px 6px!important}
#sales #sales-overview-head .sales-currency-switch>span{padding:0 7px!important;font-size:10px!important;white-space:nowrap}
#sales #sales-overview-head .sales-currency-switch>button{min-width:0!important;padding:7px 10px!important}
#sales #sales-overview-head .sales-currency-switch>small{grid-column:2/-1!important;padding:0 4px 1px!important;font-size:8px!important;line-height:1.2}
#sales #sales-overview-head #open-sales-create{flex:0 0 auto!important;width:auto!important;min-height:44px!important;padding:0 20px!important}
#sales .sales-customer-group{grid-template-columns:minmax(300px,1.35fr) minmax(180px,.72fr) minmax(180px,.72fr) auto!important;gap:18px!important;align-items:center!important;min-height:156px;margin:10px!important;padding:18px!important;border:1px solid #d4e4f6!important;border-radius:12px!important;background:#fff!important;box-shadow:0 5px 18px rgba(23,111,211,.06)!important}
#sales .sales-customer-group .sales-group-customer{gap:14px!important}
#sales .sales-customer-group .sales-group-avatar{flex-basis:50px!important;width:50px!important;height:50px!important;font-size:24px!important}
#sales .sales-customer-group .sales-card-main>button{font-size:15px!important;font-weight:850!important}
#sales .sales-customer-group .sales-card-main>small{margin-top:7px!important;padding:4px 9px!important;font-size:10px!important;line-height:1.35}
#sales .sales-customer-group .sales-card-money{display:flex!important;flex-direction:column!important;justify-content:center!important;min-height:76px!important;padding:12px 14px!important;border:1px solid #d8e7f7!important;border-radius:10px!important;background:#f5f9ff!important}
#sales .sales-customer-group .sales-card-money>span{font-size:10px!important}
#sales .sales-customer-group .sales-card-money>b{font-size:18px!important;line-height:1.25}
#sales .sales-customer-group .sales-card-money>small{font-size:9px!important}
#sales .sales-customer-group .sales-group-due{border-color:#f2cfa5!important;background:#fff8ef!important}
#sales .sales-customer-group .sales-card-actions{justify-content:flex-end!important}
#sales .sales-customer-group .statement-btn{min-height:40px!important;padding:0 15px!important;font-size:11px!important}
#sales .sales-customer-group .sales-group-details{grid-column:1/-1!important;width:100%!important;padding:0!important;border:0!important}
#sales .sales-customer-group .sales-group-details>summary{min-height:42px;padding:12px 14px!important;border-radius:8px!important;background:#f0f6fd!important;font-size:11px!important}
@media(max-width:900px){#sales .sales-customer-group{grid-template-columns:1fr 1fr!important;min-height:0}#sales .sales-customer-group .sales-group-customer{grid-column:1/-1}#sales .sales-customer-group .sales-group-details{grid-column:1/-1!important}}
@media(max-width:650px){#sales #sales-overview-head.sales-overview-actions{display:grid!important;grid-template-columns:1fr!important}#sales #sales-overview-head.sales-overview-actions>.sales-currency-switch{width:100%!important;max-width:none!important;grid-template-columns:auto 1fr 1fr!important}#sales #sales-overview-head #open-sales-create{width:100%!important}#sales .sales-customer-group{grid-template-columns:1fr!important;margin:8px!important;padding:13px!important}#sales .sales-customer-group .sales-group-customer,#sales .sales-customer-group .sales-group-details{grid-column:1!important}}

/* R8.7: compact sales header and one consistent row language for grouped debt. */
#sales{padding-top:18px!important}
#sales #sales-list-panel>.list-head{display:flex!important;align-items:center!important;min-height:72px!important;padding:12px 16px!important;gap:16px}
#sales #sales-list-panel>.list-head>div:first-child{flex:1;min-width:190px}
#sales #sales-overview-head.sales-overview-actions{display:flex!important;flex:0 0 auto!important;width:auto!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;padding:0!important;margin:0!important}
#sales #sales-overview-head.sales-overview-actions>.sales-currency-switch{flex:0 0 230px!important;width:230px!important;max-width:230px!important;grid-template-columns:auto 1fr 1fr!important;padding:4px 5px!important}
#sales #sales-overview-head .sales-currency-switch>button{padding:6px 8px!important}
#sales #sales-overview-head .sales-currency-switch>small{font-size:7px!important}
#sales #sales-overview-head .sales-product-audit,#sales #sales-overview-head #open-sales-create{flex:0 0 auto!important;width:auto!important;min-height:38px!important;height:38px!important;padding:0 14px!important}
#sales .sales-record-column .sales-customer-group{display:grid!important;grid-template-columns:minmax(240px,1fr) 190px 190px 360px!important;gap:12px!important;align-items:center!important;min-height:0!important;margin:0!important;padding:13px 15px!important;border:0!important;border-bottom:1px solid #edf0f3!important;border-radius:0!important;background:#fff!important;box-shadow:none!important}
#sales .sales-record-column .sales-customer-group:hover{background:#fafbfd!important}
#sales .sales-customer-group .sales-group-customer{display:block!important;grid-column:auto!important}
#sales .sales-customer-group .sales-card-main>button{font-size:inherit!important;font-weight:700!important}
#sales .sales-customer-group .sales-card-main>small{display:block!important;margin-top:5px!important;padding:0!important;border-radius:0!important;background:transparent!important;color:var(--muted)!important;font-size:9px!important}
#sales .sales-customer-group .sales-card-money{display:block!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}
#sales .sales-customer-group .sales-card-money>span{font-size:9px!important}
#sales .sales-customer-group .sales-card-money>b{font-size:12px!important}
#sales .sales-customer-group .sales-card-money>small{font-size:9px!important}
#sales .sales-customer-group .sales-card-actions{width:360px!important;justify-content:flex-end!important}
#sales .sales-customer-group .statement-btn{min-height:32px!important;padding:5px 8px!important;font-size:10px!important}
#sales .sales-customer-group .sales-group-details{grid-column:1/-1!important;width:100%!important;margin-top:0!important;padding:0!important;border:0!important}
#sales .sales-customer-group .sales-group-details>summary{min-height:0!important;margin:0!important;padding:9px 11px!important;border-radius:7px!important;background:#f2f7fd!important;color:#126ee8!important;font-size:10px!important}
@media(max-width:1250px){#sales #sales-list-panel>.list-head{align-items:flex-start!important;flex-wrap:wrap}#sales #sales-overview-head.sales-overview-actions{width:100%!important;justify-content:flex-start!important}#sales .sales-record-column .sales-customer-group{grid-template-columns:minmax(220px,1fr) 150px 150px!important}#sales .sales-customer-group .sales-card-actions{grid-column:1/-1!important;width:auto!important}}
@media(max-width:650px){#sales #sales-overview-head.sales-overview-actions{display:grid!important;grid-template-columns:1fr 1fr!important}#sales #sales-overview-head.sales-overview-actions>.sales-currency-switch{grid-column:1/-1;width:100%!important;max-width:none!important}#sales #sales-overview-head .sales-product-audit,#sales #sales-overview-head #open-sales-create{width:100%!important}#sales .sales-record-column .sales-customer-group{grid-template-columns:1fr 1fr!important;margin:0!important;padding:12px!important}#sales .sales-customer-group .sales-group-customer,#sales .sales-customer-group .sales-group-details,#sales .sales-customer-group .sales-card-actions{grid-column:1/-1!important}}

/* Sales header: create left, status tabs centered, currency right. */
#sales #sales-list-panel>.list-head{display:block!important;padding-bottom:0!important}
#sales #sales-overview-head.sales-overview-actions{width:100%!important;display:grid!important;grid-template-columns:minmax(150px,1fr) auto minmax(230px,1fr)!important;align-items:center!important;gap:18px!important;margin-top:14px!important;padding:12px 0!important;border-top:1px solid #e5edf6!important}
#sales #sales-overview-head #open-sales-create{justify-self:start!important;min-width:150px!important;min-height:42px!important}
#sales #sales-overview-head>.sales-view-tabs{justify-self:center!important;display:flex!important;gap:7px!important;padding:0!important;border:0!important}
#sales #sales-overview-head>.sales-currency-switch{justify-self:end!important;margin:0!important}
#sales .sales-record-filters>.sales-product-audit{flex:0 0 auto!important;min-height:40px!important;white-space:nowrap!important}
@media(max-width:900px){#sales #sales-overview-head.sales-overview-actions{grid-template-columns:1fr 1fr!important}#sales #sales-overview-head>.sales-view-tabs{grid-column:1/-1;grid-row:1;justify-self:stretch!important;display:grid!important;grid-template-columns:repeat(3,1fr)!important}#sales #sales-overview-head #open-sales-create{grid-column:1;grid-row:2;width:100%!important}#sales #sales-overview-head>.sales-currency-switch{grid-column:2;grid-row:2;width:100%!important;max-width:none!important}}
@media(max-width:650px){#sales #sales-overview-head.sales-overview-actions{grid-template-columns:1fr!important}#sales #sales-overview-head>.sales-view-tabs,#sales #sales-overview-head #open-sales-create,#sales #sales-overview-head>.sales-currency-switch{grid-column:1!important;grid-row:auto!important;width:100%!important}#sales .sales-record-filters>.sales-product-audit{width:100%!important}}

/* R8.9: one status dropdown, page-aware header search, compact filters. */
#sales #sales-overview-head.sales-overview-actions{grid-template-columns:minmax(180px,1fr) minmax(260px,1fr) minmax(230px,1fr)!important;grid-template-rows:auto auto!important}
#sales #sales-overview-head>.sales-header-filters{grid-column:2/-1;grid-row:1;justify-self:end;display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}
#sales .sales-header-filters select,#sales .sales-header-filters button,#sales .sales-header-filters summary{min-height:38px}
#sales .sales-header-filters #sales-record-status{min-width:150px}
#sales .sales-header-filters #sales-record-sort{min-width:165px}
#sales #sales-overview-head #open-sales-create{grid-column:1;grid-row:2}
#sales #sales-overview-head>.sales-currency-switch{grid-column:3;grid-row:2}
@media(max-width:1050px){#sales #sales-overview-head>.sales-header-filters{grid-column:1/-1;width:100%;display:grid;grid-template-columns:1fr 1fr}#sales .sales-header-filters .sales-product-audit{width:100%}#sales #sales-overview-head #open-sales-create{grid-column:1/3}#sales #sales-overview-head>.sales-currency-switch{grid-column:3}}
@media(max-width:650px){#sales #sales-overview-head.sales-overview-actions{grid-template-columns:1fr!important}#sales #sales-overview-head>.sales-header-filters,#sales #sales-overview-head #open-sales-create,#sales #sales-overview-head>.sales-currency-switch{grid-column:1!important;grid-row:auto!important;width:100%!important}#sales #sales-overview-head>.sales-header-filters{display:grid;grid-template-columns:1fr!important}#sales .sales-header-filters>*{width:100%!important}}

/* R8.10 — compact sales heading and clearer customer multi-filter */
#sales #sales-list-panel>.list-head{justify-content:flex-end!important}
#sales #sales-overview-head.sales-overview-actions{margin-top:0!important;border-top:0!important}
#sales .sales-filter-popover{width:min(700px,92vw);grid-template-columns:minmax(350px,1.3fr) minmax(220px,.7fr)}
#sales .filter-group-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
#sales .filter-group-head>b{font-size:12px}
#sales .sales-select-all{border:0;background:transparent;color:#126ee8;padding:2px 4px;font-size:12px;font-weight:700;cursor:pointer}
#sales .sales-select-all:hover{text-decoration:underline}
#sales .sales-select-all:disabled{color:#a8b3c2;cursor:default;text-decoration:none}
#sales #sales-customer-options{max-height:260px;overflow-y:auto;overflow-x:hidden}
#sales #sales-customer-options label{grid-template-columns:22px minmax(0,1fr) auto;gap:10px;min-width:0;padding:10px 12px}
#sales #sales-customer-options input{width:16px;height:16px;margin:0}
#sales #sales-customer-options span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#17233c;font-weight:600}
#sales #sales-customer-options small{white-space:nowrap;color:#7d8ca2}
@media(max-width:850px){#sales .sales-filter-popover{width:min(94vw,520px);grid-template-columns:1fr}}

/* R8.10 — the application header is the single page title */
#preorders>.page-toolbar>div:first-child,
#inventory>.page-toolbar>div:first-child,
#finance>.page-toolbar>div:first-child,
#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child,
#delivery>.delivery-page-head>div:first-child,
#purchase>.purchase-page-hero>.purchase-title-mark,
#purchase>.purchase-page-hero>div:nth-child(2){display:none!important}

/* R8.11 — enlarged single-row sales action toolbar */
#sales #sales-list-panel>.list-head{padding:14px 16px!important}
#sales #sales-overview-head.sales-overview-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;width:100%!important}
#sales #sales-overview-head #open-sales-create{order:1!important;flex:0 0 165px!important;width:165px!important;height:46px!important;min-height:46px!important;padding:0 18px!important;font-size:14px!important;font-weight:800!important;justify-self:auto!important}
#sales #sales-overview-head>.sales-header-filters{order:2!important;display:flex!important;flex:1 1 auto!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;width:auto!important;min-width:0!important;grid-column:auto!important;grid-row:auto!important}
#sales .sales-header-filters .sales-multi-filter{flex:0 0 150px!important}
#sales .sales-header-filters .sales-multi-filter>summary{height:46px!important;min-height:46px!important;padding:0 14px!important;font-size:13px!important;justify-content:space-between!important}
#sales .sales-header-filters #sales-record-status{flex:0 0 160px!important;width:160px!important;min-width:160px!important;height:46px!important;font-size:13px!important;padding:0 13px!important}
#sales .sales-header-filters #sales-record-sort{flex:0 0 175px!important;width:175px!important;min-width:175px!important;height:46px!important;font-size:13px!important;padding:0 13px!important}
#sales .sales-header-filters .sales-product-audit{flex:0 0 125px!important;width:125px!important;height:46px!important;min-height:46px!important;padding:0 14px!important;font-size:13px!important}
#sales #sales-overview-head>.sales-currency-switch{order:3!important;flex:0 0 285px!important;width:285px!important;max-width:285px!important;height:58px!important;margin:0!important;padding:5px 7px!important;grid-column:auto!important;grid-row:auto!important;grid-template-columns:auto 1fr 1fr!important}
#sales #sales-overview-head .sales-currency-switch>span{font-size:11px!important;padding:0 8px!important}
#sales #sales-overview-head .sales-currency-switch>button{height:36px!important;padding:0 13px!important;font-size:14px!important;font-weight:800!important}
#sales #sales-overview-head .sales-currency-switch>small{font-size:8px!important}
@media(max-width:1450px){#sales #sales-overview-head.sales-overview-actions{flex-wrap:wrap!important}#sales #sales-overview-head>.sales-header-filters{order:3!important;flex-basis:100%!important}#sales #sales-overview-head>.sales-currency-switch{order:2!important;margin-left:auto!important}}
@media(max-width:700px){#sales #sales-overview-head.sales-overview-actions{display:grid!important;grid-template-columns:1fr!important}#sales #sales-overview-head #open-sales-create,#sales #sales-overview-head>.sales-header-filters,#sales #sales-overview-head>.sales-currency-switch{width:100%!important;max-width:none!important;grid-column:1!important}#sales #sales-overview-head>.sales-header-filters{display:grid!important;grid-template-columns:1fr 1fr!important}#sales .sales-header-filters>*{width:100%!important;min-width:0!important;max-width:none!important;flex-basis:auto!important}}

/* R8.12 — larger, clearer sales records */
#sales .sales-record-column{background:#f7faff!important}
#sales .sales-record-column .sales-column-head{min-height:64px;padding:14px 18px!important;background:#fff}
#sales .sales-record-column .sales-column-head h3{font-size:19px!important}
#sales .sales-record-column .sales-column-head>b{font-size:12px!important}
#sales .sales-record-column .sales-simple-list{padding:10px 12px 14px!important}
#sales .sales-record-column .sales-simple-card{grid-template-columns:minmax(280px,1.35fr) minmax(165px,.65fr) minmax(175px,.7fr) minmax(275px,.9fr)!important;gap:18px!important;align-items:center!important;min-height:78px!important;margin:0 0 8px!important;padding:13px 16px!important;border:1px solid #dce7f3!important;border-radius:11px!important;background:#fff!important;box-shadow:0 2px 8px rgba(22,61,106,.035)!important}
#sales .sales-record-column .sales-simple-card:last-child{margin-bottom:0!important}
#sales .sales-record-column .sales-simple-card:hover{border-color:#b8d3f0!important;background:#fbfdff!important;box-shadow:0 6px 16px rgba(22,61,106,.07)!important}
#sales .sales-record-column .sales-card-main .customer-order-link{font-size:17px!important;line-height:1.25!important;font-weight:850!important}
#sales .sales-record-column .sales-card-main small{margin-top:6px!important;font-size:11px!important;line-height:1.3!important}
#sales .sales-record-column .sales-card-money>span{margin-bottom:5px!important;font-size:10px!important}
#sales .sales-record-column .sales-card-money>b{font-size:17px!important;line-height:1.25!important}
#sales .sales-record-column .sales-card-money>small{font-size:10px!important}
#sales .sales-record-column .sales-simple-card>.sales-card-money:nth-child(3)>span{display:inline-flex!important;width:max-content!important;min-height:24px!important;align-items:center!important;padding:3px 9px!important;border-radius:999px!important;font-size:10px!important;font-weight:800!important}
#sales .sales-record-column .sales-simple-card>.due-money:nth-child(3)>span{background:#fff0e4!important;color:#e76d16!important}
#sales .sales-record-column .sales-simple-card>.paid-money:nth-child(3)>span{background:#e5f8ef!important;color:#078b59!important}
#sales .sales-record-column .sales-card-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;width:auto!important;flex-wrap:nowrap!important}
#sales .sales-record-column .sales-card-actions button{min-height:38px!important;padding:0 12px!important;border-radius:8px!important;font-size:11px!important;font-weight:800!important}
#sales .sales-record-column .sales-customer-group{min-height:128px!important;border-color:#bdd9f7!important;background:#fbfdff!important;padding:15px 17px!important}
#sales .sales-record-column .sales-customer-group .sales-group-details{grid-column:1/-1!important}
#sales .sales-record-column .sales-customer-group .sales-group-details>summary{min-height:40px!important;padding:11px 14px!important;font-size:11px!important}
@media(max-width:1250px){#sales .sales-record-column .sales-simple-card{grid-template-columns:minmax(240px,1fr) 170px 180px!important}#sales .sales-record-column .sales-card-actions{grid-column:1/-1!important;justify-content:flex-end!important}}
@media(max-width:700px){#sales .sales-record-column .sales-simple-list{padding:8px!important}#sales .sales-record-column .sales-simple-card{grid-template-columns:1fr 1fr!important;gap:11px!important;padding:14px!important}#sales .sales-record-column .sales-card-main{grid-column:1/-1!important}#sales .sales-record-column .sales-card-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(3,1fr)!important}#sales .sales-record-column .sales-card-actions button{width:100%!important;padding:0 6px!important}}

/* R8.13 — keep the sales filter popover fully visible */
#sales #sales-list-panel{overflow:visible!important}
#sales .sales-header-filters .sales-multi-filter{position:relative!important}
#sales .sales-header-filters .sales-multi-filter>.sales-filter-popover{left:0!important;right:auto!important;top:calc(100% + 8px)!important;z-index:120!important;width:min(700px,calc(100vw - 310px))!important;min-width:620px!important}
#sales .sales-header-filters .sales-multi-filter[open]{z-index:121!important}
@media(max-width:1050px){#sales .sales-header-filters .sales-multi-filter>.sales-filter-popover{width:min(700px,calc(100vw - 285px))!important;min-width:560px!important}}
@media(max-width:700px){#sales .sales-header-filters .sales-multi-filter>.sales-filter-popover{position:fixed!important;left:12px!important;right:12px!important;top:110px!important;width:auto!important;min-width:0!important;max-height:calc(100vh - 125px)!important;overflow-y:auto!important;grid-template-columns:1fr!important}}

/* R8.16 — compact and readable inventory workspace */
#inventory>.inventory-command-bar{display:grid!important;grid-template-columns:auto minmax(360px,1fr) auto!important;align-items:center!important;gap:12px!important;margin-bottom:12px!important;padding:14px 16px!important;border:1px solid #dbe7f4!important;border-radius:13px!important;background:#fff!important;box-shadow:0 5px 18px rgba(28,76,129,.06)!important}
#inventory>.inventory-command-bar>div:first-child{display:none!important}
#inventory .inventory-primary-actions{display:flex;gap:8px;align-items:center}
#inventory .inventory-primary-actions button{height:44px;min-width:112px;padding:0 16px;border-radius:9px;font-size:13px;font-weight:800}
#inventory .inventory-primary-actions #new-inventory-product{min-width:148px;background:linear-gradient(135deg,#efbd3d,#d99b12);box-shadow:0 6px 14px rgba(216,157,24,.2)}
#inventory .inventory-quick-tabs{display:grid;grid-template-columns:repeat(4,minmax(88px,1fr));gap:5px;padding:5px;border:1px solid #dae6f4;border-radius:10px;background:#f5f9fd}
#inventory .inventory-quick-tabs button{height:34px;border:0;border-radius:7px;background:transparent;color:#65758d;font-size:11px;font-weight:800;cursor:pointer}
#inventory .inventory-quick-tabs button.active{background:#1678eb;color:#fff;box-shadow:0 4px 10px rgba(22,120,235,.2)}
#inventory .inventory-toolbar-selects{display:flex;gap:8px}
#inventory .inventory-toolbar-selects select{width:145px;height:44px;border:1px solid #cfdeef;border-radius:9px;background:#fff;padding:0 12px;color:#263a57;font-weight:700}
#inventory .inventory-metrics{grid-template-columns:repeat(5,1fr)!important;gap:10px!important;margin-bottom:12px!important}
#inventory .inventory-metrics article{min-height:90px!important;padding:15px 16px!important;border-radius:12px!important}
#inventory .inventory-metrics article span{font-size:11px;color:#687b95}
#inventory .inventory-metrics article b{margin-top:5px;font-size:20px}
#inventory .inventory-metrics article small{margin-top:5px;font-size:9px}
#inventory>.panel{border-radius:13px!important;overflow:hidden!important}
#inventory .contact-table-wrap table{min-width:1040px}
#inventory .contact-table-wrap th{height:46px;background:#f3f7fc;font-size:11px}
#inventory .contact-table-wrap td{padding-top:13px!important;padding-bottom:13px!important;font-size:12px}
#inventory .contact-table-wrap td:first-child b{font-size:14px;line-height:1.35}
#inventory .inventory-row-actions button{min-height:34px;padding:0 11px!important}
#inventory .inventory-row-actions .copy-product-btn{border-color:#9dc3ee;color:#0871df;background:#eef7ff}
#inventory .inventory-row-actions .copy-product-btn:hover{border-color:#1677ff;color:#fff;background:#1677ff}
@media(max-width:1450px){#inventory>.inventory-command-bar{grid-template-columns:1fr auto!important}#inventory .inventory-quick-tabs{grid-row:2;grid-column:1/-1}#inventory .inventory-metrics{grid-template-columns:repeat(3,1fr)!important}}
@media(max-width:760px){#inventory>.inventory-command-bar{display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:12px!important}#inventory .inventory-primary-actions{display:grid;grid-template-columns:1fr 1fr}#inventory .inventory-primary-actions #new-inventory-product{grid-column:1/-1}#inventory .inventory-primary-actions button{width:100%;min-width:0}#inventory .inventory-quick-tabs{grid-template-columns:1fr 1fr}#inventory .inventory-toolbar-selects{display:grid;grid-template-columns:1fr 1fr}#inventory .inventory-toolbar-selects select{width:100%}#inventory .inventory-metrics{grid-template-columns:1fr 1fr!important}}

/* R8.17 — inventory imagery and delivery-matched quick panel */
#inventory .inventory-workspace-r817{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px;align-items:start}
#inventory .inventory-list-r817{min-width:0}
#inventory .inventory-product-cell-r817{display:flex;align-items:center;gap:11px;min-width:245px}
#inventory .inventory-product-image-r817{position:relative;flex:0 0 54px;width:54px;height:54px;border:1px solid #dce8f5;border-radius:9px;background:linear-gradient(145deg,#eef6ff,#fff);display:grid;place-items:center;overflow:hidden;color:#327bc4;font-style:normal;font-weight:900}
#inventory .inventory-product-image-r817 img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff;z-index:1}
#inventory .inventory-product-image-r817 i{font-style:normal;font-size:11px}
#inventory .inventory-quick-count-r817{padding:0;overflow:hidden;position:sticky;top:16px}
#inventory .inventory-quick-count-head{height:49px;padding:0 14px;border-bottom:1px solid #e3ecf6;display:flex;justify-content:space-between;align-items:center}
#inventory .inventory-quick-count-head b{font-size:15px;color:#0c3e92}
#inventory .inventory-quick-count-head span{font-size:10px;color:#8192a8}
#inventory .inventory-quick-product-r817{display:flex;align-items:center;gap:11px;padding:13px 14px}
#inventory .inventory-quick-product-r817>div:last-child{min-width:0}
#inventory .inventory-quick-product-r817 b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#inventory .inventory-quick-product-r817 small{display:block;margin-top:4px;color:#74869e;font-size:10px}
#inventory .inventory-product-placeholder{width:58px;height:58px;flex:0 0 58px;border-radius:9px;background:#eff6ff;color:#1678eb;display:grid;place-items:center;font-weight:900;overflow:hidden}
#inventory .inventory-product-placeholder img{width:100%;height:100%;object-fit:contain;background:#fff}
#inventory .inventory-quick-count-r817>label{display:block;margin:0 14px 11px;color:#456085;font-size:11px;font-weight:800}
#inventory .inventory-quick-count-r817 input,#inventory .inventory-quick-count-r817 textarea{width:100%;margin-top:5px;border:1px solid #ccdbed;border-radius:8px;background:#fff;padding:9px 10px;color:#17345d}
#inventory .inventory-quick-actual{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end}
#inventory .inventory-quick-actual button{height:38px;border:1px solid #80b7f4;border-radius:8px;background:#fff;color:#0872df;font-weight:800;font-size:10px;white-space:nowrap}
#inventory .inventory-quick-help{display:block;margin:-4px 14px 11px;color:#7d90aa;font-size:9px}
#inventory .inventory-quick-difference{margin:0 14px 12px;padding:11px;border-radius:8px;background:#eef4fb;color:#516b8d;font-size:16px;font-weight:900}
#inventory .inventory-quick-difference.negative{background:#fff0ef;color:#e32929}
#inventory .inventory-quick-difference.positive{background:#eaf9f0;color:#15834c}
#inventory .inventory-quick-confirm{width:calc(100% - 28px);height:46px;margin:0 14px 14px;border:0;border-radius:9px;background:linear-gradient(135deg,#efbd3d,#d99b12);color:#fff;font-weight:900}
#inventory .inventory-quick-confirm:disabled{opacity:.45}
.product-image-editor-r817{display:grid;grid-template-columns:170px 1fr;gap:14px;padding:14px;border:1px solid #dce8f5;border-radius:10px;background:#f7faff}
.product-image-preview-r817{height:145px;border:1px dashed #a9c8eb;border-radius:9px;background:#fff;display:grid;place-items:center;color:#7f93ad;overflow:hidden}
.product-image-preview-r817 span{align-self:end}.product-image-preview-r817 small{align-self:start;text-align:center;margin-top:7px;color:#6e86a4;font-size:10px;line-height:1.5}.product-image-preview-r817:focus{outline:3px solid rgba(22,120,235,.18);border-color:#1678eb}
.product-image-preview-r817 img{width:100%;height:100%;object-fit:contain}
.product-image-fields-r817 label{display:block}
.product-image-actions-r817{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.product-image-actions-r817 button,.product-image-camera-r820{min-height:36px;padding:0 12px!important;display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer}
.product-image-fields-r817>small{display:block;margin-top:8px;color:#71859f;font-size:10px}
.product-edit-card .product-edit-form{padding-bottom:24px!important}
.product-edit-card .product-edit-form textarea#edit-product-note{min-height:120px;resize:vertical}
.product-edit-card .product-edit-form>.modal-actions{position:static;z-index:auto;margin:8px 0 0;padding:14px 0 0;background:transparent;box-shadow:none}
@media(min-width:701px){.product-image-camera-r820{display:none!important}}
@media(max-width:1100px){#inventory .inventory-workspace-r817{grid-template-columns:1fr}#inventory .inventory-quick-count-r817{position:static}}
@media(max-width:700px){.product-image-editor-r817{grid-template-columns:1fr}.product-image-preview-r817{height:180px}}

/* R8.21 — delivery method-aware editing and tracking */
#delivery-form-modal>.product-edit-card{display:grid!important;grid-template-rows:auto minmax(0,1fr);height:min(940px,calc(100dvh - 28px))!important;max-height:calc(100dvh - 28px)!important;overflow:hidden!important}
#delivery-form-modal .modal-head{position:relative!important;top:auto!important}
#delivery-form-modal .product-edit-form{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable;padding-bottom:0!important;align-content:start}
#delivery-form-modal .product-edit-form>.modal-actions{position:sticky!important;left:auto!important;right:auto!important;bottom:0!important;z-index:6;width:auto!important;margin:8px -2px 0!important;padding:12px 2px calc(10px + env(safe-area-inset-bottom))!important;background:#f7f9fc!important;box-shadow:0 -10px 18px rgba(21,54,91,.09)}
#delivery .delivery-page-head{margin-bottom:8px;padding:0}
#delivery .delivery-page-head>div:first-child{min-width:0}#delivery .delivery-page-head h2{font-size:21px}#delivery .delivery-page-head p{font-size:11px}
#delivery .delivery-status-tabs{align-items:stretch;margin-top:0;background:#fff;border:1px solid #dce8f7;border-radius:10px;padding:0 8px}
#delivery .delivery-metrics article{min-height:72px;padding:11px 14px}
#delivery .delivery-ai-bar{padding:10px 14px}
#delivery .delivery-filter-bar{padding:9px 11px}
.delivery-detail-preview{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:calc(100dvh - 245px)}
.delivery-detail-preview .delivery-preview-form{min-height:0;overflow-y:auto;scrollbar-gutter:stable;padding-bottom:12px}
.delivery-detail-preview .delivery-flow,.delivery-detail-preview .delivery-cost{grid-column:1}
.delivery-provider-fields{padding:14px;border:1px solid #cfe0f3;border-radius:9px;background:#f6faff}
.delivery-provider-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.delivery-provider-heading b{color:#114796}.delivery-provider-heading small{color:#7388a7;font-size:10px}
.delivery-provider-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.delivery-provider-grid label{color:#526b91;font-size:11px}.delivery-provider-grid input{width:100%;margin-top:6px}
.delivery-provider-preview{margin-top:5px;padding:11px;border:1px solid #d4e2f3;border-radius:8px;background:linear-gradient(135deg,#fff,#f6faff)}
.delivery-provider-preview-head{display:flex;align-items:center;justify-content:space-between}.delivery-provider-preview-head b{color:#0c469d;font-size:13px}.delivery-provider-preview-head span{padding:4px 9px;border-radius:999px;color:#b66b00;background:#fff0d9;font-size:10px;font-weight:900}
.delivery-provider-preview-content{display:grid;gap:6px;margin-top:9px;color:#45638e;font-size:11px}.delivery-provider-preview-content div{display:grid;grid-template-columns:78px 1fr;gap:6px}.delivery-provider-preview-content b{overflow:hidden;color:#173f7c;text-overflow:ellipsis;white-space:nowrap}
.delivery-provider-preview-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.delivery-provider-preview-actions button{min-height:32px;border:1px solid #8ebbef;border-radius:6px;color:#0872e8;background:#fff;font-size:10px;font-weight:800}.delivery-provider-preview-actions button:disabled{opacity:.42;cursor:not-allowed}
.delivery-provider-fields[data-method="staff"] [data-provider-field="order"],.delivery-provider-fields[data-method="staff"] [data-provider-field="tracking"],.delivery-provider-fields[data-method="staff"] [data-provider-field="pickupTime"],
.delivery-provider-fields[data-method="lalamove"] [data-provider-field="pickupTime"],.delivery-provider-fields[data-method="grab"] [data-provider-field="pickupTime"],
.delivery-provider-fields[data-method="pickup"] [data-provider-field="order"],.delivery-provider-fields[data-method="pickup"] [data-provider-field="tracking"],.delivery-provider-fields[data-method="pickup"] [data-provider-field="driver"],.delivery-provider-fields[data-method="pickup"] [data-provider-field="driverPhone"],.delivery-provider-fields[data-method="pickup"] [data-provider-field="vehicle"],
.delivery-provider-fields[data-method="other"] [data-provider-field="pickupTime"]{display:none}
@media(max-width:760px){#delivery-form-modal>.product-edit-card{height:100dvh!important;max-height:100dvh!important;border-radius:0!important}.delivery-provider-grid{grid-template-columns:1fr}.delivery-detail-preview{max-height:none}.delivery-provider-preview-actions{grid-template-columns:1fr}.delivery-provider-heading{align-items:flex-start;flex-direction:column;gap:3px}}

/* R8.22 — full delivery preview and safe deletion */
.delivery-delete-button{border-color:#f0bcbc!important;color:#d93636!important;background:#fff7f7!important}.delivery-delete-button:disabled{opacity:.4;cursor:not-allowed}
#delivery-report-modal{padding:18px}#delivery-report-modal .invoice-shell{width:min(1260px,97vw)}#delivery-report-paper{min-height:0;padding:20px 24px 24px}
#delivery-report-paper .delivery-paper-header{margin-bottom:12px;padding:13px 16px}#delivery-report-paper .delivery-paper-brand h1{font-size:25px}#delivery-report-paper .delivery-paper-brand p{margin:2px 0 0;color:#7183a0;font-size:11px}
.delivery-report-layout{display:grid;grid-template-columns:1fr 1fr;gap:12px}.delivery-report-column{display:grid;align-content:start;gap:12px}.delivery-report-card{overflow:hidden;border:1px solid #dce7f3;border-radius:9px;background:#fff}.delivery-report-card h3{margin:0;padding:10px 13px;border-bottom:1px solid #e4edf7;color:#124a9e;background:#f7fbff;font-size:14px}.delivery-report-card>strong,.delivery-report-card>p{display:block;margin:10px 13px}.delivery-report-card>strong{color:#113c7a;font-size:18px}.delivery-report-card>p{color:#425e84;line-height:1.55}.delivery-report-info-grid{display:grid;grid-template-columns:95px 1fr 95px 1fr;gap:9px 8px;padding:12px 13px;color:#607898;font-size:11px}.delivery-report-info-grid b{color:#183f78}.delivery-report-card .delivery-navigation-line{margin:10px 13px;padding:10px;border-radius:7px;background:#f2f7fd}.delivery-report-card .delivery-navigation-line span,.delivery-report-card .delivery-navigation-line small{display:block;margin-top:4px;color:#7187a5;font-size:10px}.delivery-report-warehouse{background:#f7fbff}.delivery-report-products table{width:100%;border-collapse:collapse}.delivery-report-products th,.delivery-report-products td{padding:8px;border:1px solid #e1e9f3;font-size:11px}.delivery-report-products th{color:#45628c;background:#f2f7fd}.delivery-report-products .delivery-product-name{font-size:12px!important}.delivery-report-products .delivery-product-quantity{font-size:14px!important}
.delivery-report-provider-row,.delivery-report-fee{display:grid;grid-template-columns:110px 1fr;gap:8px;padding:8px 13px;border-bottom:1px solid #edf2f7;color:#617a9c;font-size:11px}.delivery-report-provider-row b,.delivery-report-fee b{color:#173f7c}.delivery-report-tracking{display:block;margin:10px 13px;padding:9px;border-radius:7px;color:#0872e8;background:#edf6ff;text-align:center;font-weight:800}.delivery-report-provider{border-color:#ffd3bc}.delivery-report-provider h3{color:#e85912;background:#fff8f3}.delivery-report-fee{grid-template-columns:120px 1fr 120px 1fr;border-bottom:0}.delivery-paper-footer{margin-top:22px}
@media(max-width:850px){#delivery-report-modal{padding:0}.delivery-report-layout{grid-template-columns:1fr}.delivery-report-info-grid{grid-template-columns:90px 1fr}.delivery-report-fee{grid-template-columns:110px 1fr}}
@media print{#delivery-report-paper{padding:5mm!important}.delivery-report-layout{grid-template-columns:1fr 1fr;gap:8px}.delivery-report-column{gap:8px}.delivery-report-card h3{padding:7px 9px}.delivery-report-info-grid{padding:8px 9px;gap:6px}.delivery-report-card>strong,.delivery-report-card>p{margin:7px 9px}.delivery-report-provider-row,.delivery-report-fee{padding:6px 9px}.delivery-report-tracking{display:none}.delivery-paper-footer{margin-top:12px}}
.delivery-waybill-paste{grid-column:1/-1;display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center;padding:12px;border:1px dashed #94bfff;border-radius:10px;background:#f8fbff;outline:none}.delivery-waybill-paste:focus{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.12)}#delivery-waybill-preview{display:flex;min-height:105px;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;border:1px dashed #abc8ef;border-radius:8px;background:#fff;color:#7187a5;text-align:center}#delivery-waybill-preview img{display:block;width:100%;height:130px;object-fit:contain}#delivery-waybill-preview small{margin-top:5px}.delivery-waybill-paste p{margin:7px 0 10px;color:#6d82a1;font-size:12px}.delivery-report-waybill{margin:10px 13px}.delivery-report-waybill img{display:block;width:100%;max-height:235px;object-fit:contain;border:1px solid #dce7f3;border-radius:7px;background:#fff}.delivery-report-waybill figcaption{margin-top:5px;color:#7187a5;font-size:10px;text-align:center}@media(max-width:600px){.delivery-waybill-paste{grid-template-columns:1fr}#delivery-waybill-preview img{height:170px}}
.delivery-provider-fields[data-method="staff"] [data-provider-field="waybillImage"],.delivery-provider-fields[data-method="pickup"] [data-provider-field="waybillImage"]{display:none}
.partner-role{display:inline-flex;margin:5px 5px 0 0;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700}.partner-role.customer{color:#1261c9;background:#eaf3ff}.partner-role.supplier{color:#16845b;background:#e8f8f1}.partner-role.both{color:#9a6500;background:#fff3d6}.partner-add-role{margin-left:5px!important;white-space:nowrap}
.partner-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.partner-role-tabs{flex-wrap:wrap}.partner-role-tabs button{white-space:nowrap}.customer-panel .contact-table-wrap{overflow:auto}.customer-panel table{min-width:1120px}.customer-panel td,.customer-panel th{white-space:nowrap}.customer-panel td:nth-child(2){white-space:normal;min-width:130px}
@media(max-width:900px){.partner-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.partner-role-tabs{width:100%}.partner-role-tabs button{flex:1}.customer-panel table{min-width:1050px}}
.partner-center-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:12px;align-items:stretch;min-height:calc(100vh - 285px)}.partner-center-layout>.customer-panel{min-width:0;margin:0;display:flex;flex-direction:column;max-height:calc(100vh - 285px)}.partner-center-layout>.customer-panel .contact-table-wrap{flex:1;min-height:360px}.partner-detail-panel{position:sticky;top:12px;padding:0;height:calc(100vh - 105px);min-height:560px;overflow:hidden}.partner-detail-empty{padding:38px 24px;text-align:center;color:#72839a}.partner-detail-empty b{display:block;color:#17345f;font-size:18px;margin-bottom:8px}.partner-detail-content{height:100%;display:flex;flex-direction:column}.partner-detail-scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}.partner-detail-scroll>section{padding:14px 18px;border-top:1px solid #e5edf6}.partner-detail-head{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 18px;background:#fff;position:relative;z-index:2;box-shadow:0 1px 0 #e5edf6}.partner-detail-head h2{margin:0 0 4px;color:#102b55;font-size:19px}.partner-detail-head small{display:block;margin-top:7px;color:#71829b}.partner-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;color:#16345f}.partner-info-list{display:grid;grid-template-columns:82px 1fr;gap:7px;margin:0;font-size:13px}.partner-info-list dt{color:#7b8ba1}.partner-info-list dd{margin:0;color:#253e62}.partner-contact-card,.partner-address-card{border:1px solid #e0e9f3;border-radius:8px;padding:10px 12px;margin-top:8px}.partner-contact-card{display:flex;justify-content:space-between}.partner-address-card p{margin:6px 0;color:#536a89;line-height:1.45}.partner-address-card a{color:#0877ee;text-decoration:none}.partner-business-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.partner-business-grid article{border:1px solid #e1eaf4;border-radius:8px;padding:9px 10px}.partner-business-grid span{display:block;color:#71839c;font-size:11px}.partner-business-grid b{display:block;margin-top:4px;color:#17345e}.partner-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 18px;background:#fff;border-top:1px solid #e2eaf3;box-shadow:0 -5px 16px rgba(38,66,105,.06)}.partner-quick-actions button{min-height:39px}.partner-table-row{cursor:pointer}.partner-table-row:hover td{background:#f4f8ff}.partner-table-row.selected td{background:#edf5ff}.partner-table-row.selected td:first-child{box-shadow:inset 3px 0 #1677ff}.customer-panel .tag{padding:5px 8px!important;font-size:11px}.customer-panel td{padding-left:9px!important;padding-right:9px!important}
@media(max-width:1380px){.partner-center-layout{grid-template-columns:minmax(0,1fr) 350px}.customer-panel table{min-width:1010px}}@media(max-width:1050px){.partner-center-layout{grid-template-columns:1fr;max-height:none}.partner-center-layout>.customer-panel{max-height:none}.partner-detail-panel{position:relative;top:auto;height:auto;min-height:0}.partner-detail-content{max-height:720px}}@media(max-width:700px){.partner-business-grid,.partner-quick-actions{grid-template-columns:1fr}.partner-detail-panel{border-radius:10px}}
.partner-detail-panel{transition:box-shadow .25s ease,border-color .25s ease}.partner-detail-panel.partner-detail-highlight{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.13),0 12px 28px rgba(20,65,120,.14)}
.partner-detail-content.hidden{display:none}

/* R8.29 — use the full partner workspace height instead of leaving unused space */
@media(min-width:1051px){
  .partner-center-layout{
    height:calc(100dvh - 105px);
    min-height:560px;
    align-items:stretch;
  }
  .partner-center-layout>.customer-panel{
    height:100%;
    max-height:none;
    overflow:hidden;
  }
  .partner-center-layout>.customer-panel .contact-table-wrap{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    scrollbar-gutter:stable;
  }
  .partner-center-layout>.customer-panel .customer-footer{
    flex:0 0 auto;
  }
  .partner-center-layout>.partner-detail-panel{
    height:100%;
    min-height:0;
  }
}

/* R8.81 fix43 final override — shared page layout */
#preorders>.page-toolbar>div:first-child,
#inventory>.page-toolbar>div:first-child,
#finance>.page-toolbar>div:first-child,
#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child,
#delivery>.delivery-page-head>div:first-child{display:none!important}
#purchase>.purchase-page-hero{display:none!important}
#preorders>.page-toolbar,
#inventory>.page-toolbar,
#finance>.page-toolbar,
#reports>.page-toolbar,
#customers>.page-toolbar,
#suppliers>.page-toolbar,
#migration>.page-toolbar,
#settings>.page-toolbar{min-height:0!important;justify-content:flex-end!important}
#settings>.page-toolbar{display:none!important}
#sales .sales-order-unified-card>.sales-products-card>header{display:none!important}
#sales .sales-order-unified-card .sales-products-scroll{margin-top:14px!important}

/* R8.81 fix33 — remove duplicate document heroes and keep document number with customer data */
#sales-create-area>.sales-page-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  margin:0 0 10px!important;
  padding:0!important;
}

/* R8.81 fix34 — deleted records separated by company space */
#deleted-record-archive-panel .deleted-record-filters{display:flex;min-width:min(560px,52vw);align-items:center;justify-content:flex-end;gap:8px}
#deleted-record-archive-panel .deleted-record-filters select{width:210px;min-width:170px}
#deleted-record-archive-panel .deleted-record-filters input{width:min(330px,30vw)}
@media(max-width:850px){#deleted-record-archive-panel .list-head{align-items:stretch;flex-direction:column}#deleted-record-archive-panel .deleted-record-filters{width:100%;min-width:0}#deleted-record-archive-panel .deleted-record-filters select,#deleted-record-archive-panel .deleted-record-filters input{width:50%}}

/* R8.81 fix36 — one page title only: the sticky application header is authoritative */
#preorders>.page-toolbar>div:first-child,
#inventory>.inventory-command-bar>div:first-child,
#finance>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child{display:none!important}
#preorders>.page-toolbar,#finance>.page-toolbar,#customers>.page-toolbar,#migration>.page-toolbar,#settings>.page-toolbar{
  min-height:0!important;margin:0 0 10px!important;padding:0!important;justify-content:flex-end!important;background:transparent!important;border:0!important;box-shadow:none!important
}
#inventory>.inventory-command-bar{
  grid-template-columns:minmax(0,1fr) auto!important;min-height:0!important;margin:0 0 10px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important
}
#inventory>.inventory-command-bar>.inventory-primary-actions{grid-column:2!important;grid-row:1!important;justify-self:end!important}
#inventory>.inventory-command-bar>.inventory-quick-tabs{grid-column:1!important;grid-row:2!important}
#inventory>.inventory-command-bar>.inventory-toolbar-selects{grid-column:2!important;grid-row:2!important}
@media(max-width:850px){#inventory>.inventory-command-bar{grid-template-columns:1fr!important}#inventory>.inventory-command-bar>.inventory-primary-actions,#inventory>.inventory-command-bar>.inventory-quick-tabs,#inventory>.inventory-command-bar>.inventory-toolbar-selects{grid-column:1!important;grid-row:auto!important;width:100%!important}}

/* R8.81 fix38 — isolated audit menus, master-data delete actions and stable product picker */
#settings .settings-main-column.settings-record-only>*:not(.operation-log-panel){display:none!important}
#settings .settings-main-column.settings-record-only>.operation-log-panel:not([hidden]){display:block!important;margin:0}
#settings .operation-log-filters{display:flex;min-width:min(560px,52vw);align-items:center;justify-content:flex-end;gap:8px}
#settings .operation-log-filters select{width:210px;min-width:170px}
#settings .operation-log-filters input{width:min(330px,30vw)}
.partner-delete-btn,.product-delete-btn{border:1px solid #ffd1d1!important;background:#fff2f2!important;color:#df3f3f!important}
body.product-picker-open #sales .sales-order-customer-card{z-index:1!important}
body.product-picker-open #sales .sales-products-card{position:relative!important;z-index:6000!important}
body.product-picker-open #sales .sales-order-unified-card{position:relative!important;z-index:5999!important}
#sales .searchable-select-menu.product-picker-dialog{isolation:isolate!important;overflow-y:auto!important;overscroll-behavior:contain}
#sales .product-picker-dialog .product-search-table-row{position:relative!important;z-index:1!important;background:#fff!important}
#sales .product-picker-dialog .product-search-table-row:hover{background:#eaf4ff!important}
@media(max-width:850px){#settings .operation-log-filters{width:100%;min-width:0}#settings .operation-log-filters select,#settings .operation-log-filters input{width:50%}}

/* R8.81 fix39 — compact dashboard action and daily-profit cards */
#dashboard .quick-order,#dashboard .dashboard-smart-card{min-height:126px!important;padding-top:10px!important;padding-bottom:10px!important}
#dashboard .quick-box,#dashboard .quick-box.compact{margin-top:7px!important}
#dashboard>.dashboard-profit-overview{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
#dashboard .dashboard-profit-head{min-height:48px;padding:5px 8px 8px;border:0}
#dashboard .dashboard-profit-icon{width:34px;height:34px;border-radius:9px;font-size:18px;box-shadow:none}
#dashboard .dashboard-profit-head h2{font-size:15px}
#dashboard .dashboard-profit-head p{margin-top:2px;font-size:10px}
#dashboard .dashboard-profit-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#dashboard .dashboard-profit-grid article{min-height:88px;padding:12px 14px;border:1px solid #dce7f3!important;border-radius:10px;background:#fff;box-shadow:0 3px 10px rgba(24,63,106,.045)}
#dashboard .dashboard-profit-grid article>b{margin-top:5px;font-size:19px}
#dashboard .dashboard-profit-grid .dashboard-net-profit-card>b{font-size:22px}
#dashboard .dashboard-profit-grid article>small{margin-top:5px}
@media(max-width:900px){#dashboard .dashboard-profit-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){#dashboard .dashboard-profit-grid{grid-template-columns:1fr}}

/* R8.81 fix40 — compact inventory reminder cards and live seven-day chart */
#dashboard .alerts{display:none!important}
#dashboard>.inventory-alert-banner{display:grid!important;grid-column:1/-1!important;grid-template-columns:minmax(250px,1.35fr) repeat(3,minmax(105px,.42fr)) auto!important;gap:8px!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
#dashboard>.inventory-alert-banner>.inventory-alert-icon{display:none!important}
#dashboard>.inventory-alert-banner>.inventory-alert-copy,#dashboard>.inventory-alert-banner .inventory-alert-stats>button,#dashboard>.inventory-alert-banner>#dashboard-inventory-alert{min-height:74px;border:1px solid #ffd8d3!important;border-radius:10px!important;background:#fff!important;box-shadow:0 3px 10px rgba(90,49,35,.045)}
#dashboard>.inventory-alert-banner>.inventory-alert-copy{display:flex;padding:11px 14px;justify-content:center;flex-direction:column;border-left:4px solid #ef5252!important}
#dashboard>.inventory-alert-banner .inventory-alert-stats{display:contents!important}
#dashboard>.inventory-alert-banner .inventory-alert-stats>button{padding:10px!important}
#dashboard>.inventory-alert-banner>#dashboard-inventory-alert{padding:0 18px!important;color:#fff!important;background:#ef5252!important;white-space:nowrap}
#dashboard .chart-panel .chart{height:230px}
#dashboard #dashboard-trend-svg{height:180px}
@media(max-width:1000px){#dashboard>.inventory-alert-banner{grid-template-columns:1fr 1fr!important}#dashboard>.inventory-alert-banner>.inventory-alert-copy{grid-column:1/-1}#dashboard>.inventory-alert-banner>#dashboard-inventory-alert{width:100%}}

/* R8.81 fix41 — sales product picker is portalled above every page control */
body.product-picker-open #sales .sales-order-customer-card,
body.product-picker-open #sales .sales-products-card,
body.product-picker-open #sales .sales-order-unified-card{z-index:auto!important}
body>.searchable-select-menu.product-picker-dialog{position:fixed!important;z-index:10000!important;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%)!important;display:block!important;width:min(1180px,calc(100vw - 48px))!important;height:min(680px,calc(100vh - 60px))!important;max-height:none!important;padding:0!important;overflow:auto!important;border:1px solid #bfd2e7!important;border-radius:14px!important;background:#fff!important;box-shadow:0 0 0 9999px rgba(8,27,51,.58),0 28px 80px rgba(2,20,43,.35)!important;isolation:isolate}
body>.product-picker-dialog .product-search-table-row{position:relative;z-index:1;background:#fff!important}
body>.product-picker-dialog .product-search-table-row:hover{background:#eaf4ff!important}
@media(max-width:760px){body>.searchable-select-menu.product-picker-dialog{width:calc(100vw - 18px)!important;height:calc(100vh - 24px)!important}}

/* R8.81 fix42 — remove repeated page titles and redundant sales filters */
#inventory>.inventory-command-bar>div:first-child{display:none!important}
#sales .sales-order-unified-card>.sales-products-card>header{display:none!important}
#sales .sales-order-unified-card .sales-products-scroll{margin-top:14px!important}
#sales-create-area>.sales-page-hero>.sales-title-mark,
#sales-create-area>.sales-page-hero>.sales-page-title-copy{display:none!important}
#sales-create-area>.sales-page-hero>.sales-ai-strip{width:auto!important;margin:0!important}
#sales .sales-number-value{display:flex;min-height:42px;padding:7px 12px;align-items:center;gap:10px;border:1px solid #c7dbf4;border-radius:7px;background:#f8fbff;color:#173e72}
#sales .sales-number-value b{font-size:13px;white-space:nowrap}
#sales .sales-number-value small{color:#6f86a4;font-size:10px}
#sales .sales-order-customer-card.is-collapsed .sales-customer-grid{grid-template-columns:minmax(320px,1fr) minmax(220px,.55fr)!important}
#sales .sales-order-customer-card.is-collapsed .sales-customer-grid>.sales-number-field{display:block!important;max-width:none}
#purchase>.purchase-page-hero{display:none!important}
#delivery>.delivery-page-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  min-height:0!important;
  margin:0 0 10px!important;
  padding:0!important;
}
#delivery>.delivery-page-head>div:first-child{display:none!important}
#delivery>.delivery-page-head>.delivery-ai-bar{width:auto!important;max-width:none!important;margin:0!important}
#delivery>.delivery-page-head>#add-delivery-order{margin:0!important}
@media(max-width:760px){
  #sales-create-area>.sales-page-hero,#delivery>.delivery-page-head{grid-template-columns:1fr!important}
  #sales-create-area>.sales-page-hero>#close-sales-create,#delivery>.delivery-page-head>#add-delivery-order{width:100%!important}
  #sales .sales-order-customer-card.is-collapsed .sales-customer-grid{grid-template-columns:1fr!important}
}

/* R8.31 — finance management collection workspace */
.finance-hidden-stats{display:none!important}
.finance-module-tabs{display:flex;align-items:center;gap:6px;margin:8px 0 12px;border-bottom:1px solid #dce7f3;overflow-x:auto}
.finance-module-tabs button{min-height:42px;padding:0 17px;border:0;border-bottom:3px solid transparent;color:#315685;background:transparent;white-space:nowrap;font-weight:800}
.finance-module-tabs button.active{color:#096fe8;border-bottom-color:#1677ff;background:linear-gradient(180deg,#f6faff,#edf6ff)}
.finance-metrics{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.finance-collection-workspace{display:grid!important;grid-template-columns:minmax(0,1.62fr) minmax(390px,1fr)!important;gap:12px!important;align-items:stretch!important;min-height:610px!important;margin-top:12px}
.finance-customer-list{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;height:calc(100dvh - 285px);min-height:610px;max-height:790px;overflow:hidden}
.finance-customer-list .contact-table-wrap{min-height:0!important;height:100%;overflow:auto!important;border-radius:0;scrollbar-gutter:stable}
.finance-customer-list table{min-width:790px}
.finance-customer-row{cursor:pointer}.finance-customer-row:hover td{background:#f4f8ff}.finance-customer-row.selected td{background:#edf5ff}.finance-customer-row.selected td:first-child{box-shadow:inset 3px 0 #1677ff}
.finance-receive-panel{height:calc(100dvh - 285px);min-height:610px;max-height:790px;padding:0!important;overflow:hidden}
.finance-receive-empty{padding:48px 24px;text-align:center;color:#72849e}.finance-receive-empty b{display:block;color:#173b71;font-size:18px}.finance-receive-empty p{margin-top:8px}
.finance-receive-content{display:grid;height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr) auto}.finance-receive-content.hidden{display:none}
.finance-receive-head{display:flex;align-items:flex-start;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #dfe8f2;background:#fff}.finance-receive-head h2{margin:0 0 5px;color:#103f86;font-size:17px}.finance-receive-head small{color:#6f84a2}.finance-receive-head button{border:0;background:transparent;color:#31577e;font-size:22px}
.finance-receive-scroll{min-height:0;padding:12px 14px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.finance-invoice-select-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;color:#173b70}
.finance-invoice-selection{display:grid;gap:7px}.finance-invoice-choice{display:grid;grid-template-columns:18px minmax(0,1fr) auto 105px;gap:8px;align-items:center;padding:9px;border:1px solid #dce7f3;border-radius:8px;background:#fbfdff}.finance-invoice-choice>span{min-width:0}.finance-invoice-choice b,.finance-invoice-choice small{display:block}.finance-invoice-choice b{color:#155fc0}.finance-invoice-choice small{margin-top:3px;color:#7185a1;font-size:10px;white-space:normal}.finance-invoice-choice strong{color:#e44b45;font-size:12px}.finance-invoice-amount{width:100%;min-width:0;height:34px;padding:6px 8px;border:1px solid #bfd2e9;border-radius:6px;text-align:right}
.finance-receive-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:10px}.finance-receive-totals div{padding:9px;border:1px solid #dfe8f3;border-radius:8px;background:#f6faff}.finance-receive-totals span{display:block;color:#7084a0;font-size:10px}.finance-receive-totals b{display:block;margin-top:4px;color:#153f7c;font-size:13px}.finance-receive-totals div:last-child b{color:#16915e}
.finance-receive-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}.finance-receive-fields label,.finance-proof-paste{color:#536d91;font-size:11px}.finance-receive-fields input,.finance-receive-fields select{width:100%;height:36px;margin-top:5px}
.finance-proof-paste{display:grid;grid-template-columns:85px 1fr;align-items:center;gap:6px;margin-top:11px;padding:11px;border:1px dashed #9bbce6;border-radius:8px;background:#f8fbff;outline:none}.finance-proof-paste:focus{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.1)}.finance-proof-paste input{position:absolute;width:1px;height:1px;opacity:0}.finance-proof-paste span{color:#1470dc;font-weight:800}.finance-proof-paste small{grid-column:2;color:#7a8ca5}
.finance-receive-actions{display:grid;grid-template-columns:.8fr 1fr 1fr;gap:8px;padding:11px 14px;border-top:1px solid #dfe8f2;background:#fff;box-shadow:0 -5px 14px rgba(29,65,110,.06)}.finance-receive-actions button{min-height:39px}.finance-receive-actions .gold{border:0;border-radius:7px;color:#251b07;background:linear-gradient(135deg,#e6bd59,#d5a32d);font-weight:800}
@media(max-width:1180px){.finance-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}.finance-collection-workspace{grid-template-columns:1fr!important}.finance-customer-list,.finance-receive-panel{height:auto;max-height:none}.finance-customer-list{min-height:520px}.finance-receive-panel{min-height:600px}}
@media(max-width:700px){.finance-metrics{grid-template-columns:1fr 1fr!important}.finance-invoice-choice{grid-template-columns:18px 1fr}.finance-invoice-choice strong,.finance-invoice-amount{grid-column:2}.finance-receive-totals,.finance-receive-fields{grid-template-columns:1fr}.finance-receive-actions{grid-template-columns:1fr}.finance-proof-paste{grid-template-columns:1fr}.finance-proof-paste small{grid-column:1}}

/* R8.32 — full finance page visual reconstruction */
#finance{background:radial-gradient(circle at 65% -10%,rgba(88,177,255,.13),transparent 38%)}
#finance>.page-toolbar{display:flex!important;align-items:center!important;min-height:66px!important;margin:0 0 4px!important;padding:0!important}
#finance>.page-toolbar>div:first-child{position:relative;padding-left:52px}
#finance>.page-toolbar>div:first-child:before{content:"◆";position:absolute;left:0;top:2px;display:grid;width:38px;height:38px;place-items:center;border-radius:10px;color:#fff;background:linear-gradient(145deg,#1782ff,#0e5ed5);box-shadow:0 7px 16px rgba(22,119,255,.22)}
#finance>.page-toolbar h2{margin:0;color:#071f73!important;font-size:25px!important;letter-spacing:-.4px}
#finance>.page-toolbar p{margin:4px 0 0;color:#3563a2!important;font-size:12px}
#finance>.page-toolbar>.secondary{margin-left:auto!important;color:#0c6fdc!important;border-color:#a8c9ef!important;background:#fff!important}
#finance>.page-toolbar>.primary{min-width:132px;margin-left:9px!important;color:#281b04!important;background:linear-gradient(135deg,#f0c451,#dca625)!important}
.finance-module-tabs{gap:18px;margin:0 0 12px;padding-left:8px;background:rgba(255,255,255,.55)}
.finance-module-tabs button{min-height:45px;padding:0 13px;font-size:13px}
.finance-metrics{gap:11px!important;margin-bottom:12px!important}
.finance-metrics article{position:relative;min-height:82px!important;padding:15px 13px 12px 62px!important;border:1px solid #dfe9f5!important;border-radius:9px!important;background:#fff!important;box-shadow:0 5px 15px rgba(29,69,117,.055)!important}
.finance-metrics article:before{position:absolute;left:15px;top:17px;display:grid;width:36px;height:36px;place-items:center;border-radius:9px;font-size:18px;font-weight:900}
.finance-metrics article:nth-child(1):before{content:"✓";color:#0c8f61;background:#e6f9f1}.finance-metrics article:nth-child(2):before{content:"▣";color:#0874e9;background:#e8f4ff}.finance-metrics article:nth-child(3):before{content:"!";color:#e8544d;background:#fff0ef}.finance-metrics article:nth-child(4):before{content:"◔";color:#7c42e7;background:#f3edff}.finance-metrics article:nth-child(5):before{content:"▤";color:#eb7815;background:#fff2e8}
.finance-metrics article span{color:#244f94!important;font-size:11px!important}.finance-metrics article b{display:block;margin-top:4px;color:#082b79;font-size:20px!important}.finance-metrics article small{font-size:9px!important}
.finance-filter-bar{display:grid;grid-template-columns:minmax(230px,1.35fr) 150px minmax(300px,1.25fr) 132px 132px 84px 125px;gap:8px;align-items:end;margin:0 0 12px;padding:11px 12px;border:1px solid #dfe8f3;border-radius:9px;background:#fff;box-shadow:0 4px 14px rgba(29,68,115,.05)}
.finance-filter-bar label{color:#4f6b91;font-size:10px}.finance-filter-bar label input,.finance-filter-bar label select{width:100%;height:36px;margin-top:5px;border:1px solid #cad9eb;border-radius:6px;background:#fff}.finance-search-field{position:relative}.finance-search-field>input{padding-left:31px!important}.finance-search-field:first-letter{color:#146ee0;font-size:18px}
.finance-status-filter{display:flex;height:36px;padding:3px;border-radius:6px;background:#edf3fa}.finance-status-filter button{flex:1;border:0;border-radius:5px;color:#5a7292;background:transparent;font-size:10px;font-weight:800}.finance-status-filter button.active{color:#fff;background:#1677ff;box-shadow:0 3px 8px rgba(22,119,255,.22)}
.finance-filter-bar>button{height:36px}.finance-print-button{border:0;border-radius:6px;color:#251b07;background:linear-gradient(135deg,#edc050,#dca42a);font-weight:800}
.finance-list-title{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:0 15px;border-bottom:1px solid #dfe8f3;background:linear-gradient(180deg,#fff,#fbfdff)}.finance-list-title>div{display:flex;align-items:center;gap:9px}.finance-list-title h2{margin:0;color:#0d3e8c;font-size:17px}.finance-list-title small{color:#7185a2}.finance-list-icon{display:grid;width:27px;height:27px;place-items:center;border-radius:50%;color:#1677ff;background:#eaf4ff}
.finance-collection-workspace{margin-top:0!important}.finance-customer-list,.finance-receive-panel{border-radius:10px!important;box-shadow:0 8px 22px rgba(28,63,105,.07)!important}
.finance-receive-head{min-height:52px;background:linear-gradient(180deg,#fff,#fbfdff)}
@media(max-width:1500px){.finance-filter-bar{grid-template-columns:minmax(220px,1fr) 140px minmax(290px,1fr) 125px 125px 78px 118px}.finance-module-tabs{gap:8px}}
@media(max-width:1250px){.finance-filter-bar{grid-template-columns:1fr 160px 1fr 140px 140px}.finance-filter-bar>button{width:100%}.finance-filter-bar .finance-print-button{grid-column:auto}.finance-metrics article{padding-left:52px!important}.finance-metrics article:before{left:10px}}
@media(max-width:760px){#finance>.page-toolbar{align-items:flex-start!important}#finance>.page-toolbar>div:first-child{padding-left:45px}.finance-filter-bar{grid-template-columns:1fr}.finance-status-filter{min-width:310px;overflow-x:auto}.finance-module-tabs{gap:2px}.finance-metrics article{padding:12px!important}.finance-metrics article:before{display:none}}

/* R8.33 — match the approved finance collection reference */
#finance{padding-top:0!important;background:linear-gradient(180deg,#f6fbff 0,#f8fbff 100%)!important}
#finance>.page-toolbar{display:flex!important;min-height:70px!important;margin:0!important;padding:8px 8px 3px!important}
#finance>.page-toolbar>div:first-child{display:block!important;padding-left:52px!important}
#finance>.page-toolbar>.primary{margin-left:auto!important;margin-right:0!important;align-self:flex-start;min-height:40px!important}
#finance .finance-module-tabs{margin:0 8px 12px!important;padding:0!important;border-bottom:1px solid #cfdff0!important;background:transparent!important}
#finance .finance-module-tabs button{min-height:42px!important;padding:0 24px!important;color:#123c94!important;font-size:13px!important}
#finance .finance-module-tabs button.active{background:#fff!important;color:#096cf0!important}
#finance .finance-metrics{gap:12px!important;margin:0 8px 12px!important}
#finance .finance-metrics article{min-height:80px!important;padding:13px 13px 11px 64px!important}
#finance .finance-filter-bar{grid-template-columns:minmax(270px,1.35fr) 170px 170px 145px 145px 92px 132px!important;margin:0 8px 12px!important;padding:10px 12px!important;align-items:end!important}
#finance .finance-filter-bar>label{display:flex!important;flex-direction:column!important;justify-content:flex-end!important}
#finance .finance-filter-bar .finance-search-field{display:block!important;padding-top:15px!important}
#finance .finance-collection-workspace{grid-template-columns:minmax(0,1.62fr) minmax(430px,1fr)!important;margin:0 8px!important;gap:12px!important}
#finance .finance-customer-list table{min-width:900px!important}
#finance .finance-customer-list th,#finance .finance-customer-list td{padding:11px 9px!important}
#finance .finance-customer-list th:first-child,#finance .finance-customer-list td:first-child{width:38px;text-align:center}
#finance .finance-row-actions{display:flex;gap:6px;white-space:nowrap}
#finance .finance-row-actions button{min-height:32px;padding:0 10px;border:1px solid #8ebdff;border-radius:6px;color:#086de5;background:#fff;font-weight:800}
#finance .finance-row-actions .finance-pay-all{background:#f4f9ff}
#finance .finance-list-title{min-height:56px!important}
#finance .finance-receive-panel{border-color:#dbe7f3!important}
@media(max-width:1350px){#finance .finance-filter-bar{grid-template-columns:minmax(240px,1fr) 145px 145px 132px 132px!important}#finance .finance-filter-bar>button{width:100%}}
@media(max-width:760px){#finance>.page-toolbar>div:first-child{display:block!important}#finance .finance-module-tabs button{padding:0 12px!important}#finance .finance-filter-bar{grid-template-columns:1fr!important}#finance .finance-collection-workspace{margin:0!important}}

/* R8.34 — one complete, compact title system across ERP modules */
#preorders>.page-toolbar>div:first-child,
#inventory>.page-toolbar>div:first-child,
#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child,
#delivery>.delivery-page-head>div:first-child,
#purchase>.purchase-page-hero>.purchase-title-mark,
#purchase>.purchase-page-hero>div:nth-child(2){display:flex!important}

#preorders>.page-toolbar,#reports>.page-toolbar,#customers>.page-toolbar,
#suppliers>.page-toolbar,#migration>.page-toolbar,#settings>.page-toolbar,
#delivery>.delivery-page-head{min-height:72px!important;margin:0 0 12px!important;padding:8px 10px!important;align-items:center!important;border:0!important;background:transparent!important;box-shadow:none!important}

#preorders>.page-toolbar>div:first-child,#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,#settings>.page-toolbar>div:first-child{position:relative;flex:1;min-width:240px;padding-left:52px!important;flex-direction:column;align-items:flex-start;justify-content:center}

#preorders>.page-toolbar>div:first-child:before,#reports>.page-toolbar>div:first-child:before,
#customers>.page-toolbar>div:first-child:before,#suppliers>.page-toolbar>div:first-child:before,
#migration>.page-toolbar>div:first-child:before,#settings>.page-toolbar>div:first-child:before{content:"◆";position:absolute;left:0;top:50%;display:grid;width:38px;height:38px;place-items:center;transform:translateY(-50%);border-radius:10px;color:#fff;background:linear-gradient(145deg,#1782ff,#0e5ed5);box-shadow:0 7px 16px rgba(22,119,255,.2)}

#preorders>.page-toolbar h2,#reports>.page-toolbar h2,#customers>.page-toolbar h2,
#suppliers>.page-toolbar h2,#migration>.page-toolbar h2,#settings>.page-toolbar h2,
#delivery>.delivery-page-head h2,#inventory>.inventory-command-bar h2,
#purchase>.purchase-page-hero h2{margin:0!important;color:#092466!important;font-size:23px!important;line-height:1.2!important;letter-spacing:-.3px}

#preorders>.page-toolbar p,#reports>.page-toolbar p,#customers>.page-toolbar p,
#suppliers>.page-toolbar p,#migration>.page-toolbar p,#settings>.page-toolbar p,
#delivery>.delivery-page-head p,#inventory>.inventory-command-bar p,
#purchase>.purchase-page-hero p{margin:5px 0 0!important;color:#54739d!important;font-size:11px!important}

#delivery>.delivery-page-head>div:first-child{position:relative;flex:1;align-items:center!important;gap:12px!important}
#delivery .delivery-page-icon{display:grid!important;width:38px!important;height:38px!important;place-items:center;border-radius:10px;color:#fff!important;background:linear-gradient(145deg,#1782ff,#0e5ed5)!important;box-shadow:0 7px 16px rgba(22,119,255,.2)}
#delivery>.delivery-page-head>#add-delivery-order{margin-left:auto!important;min-width:138px!important;min-height:40px!important}

#inventory>.inventory-command-bar{grid-template-columns:minmax(250px,1fr) auto!important;gap:10px 16px!important;margin-bottom:12px!important;padding:10px 12px!important}
#inventory>.inventory-command-bar>div:first-child{position:relative;display:flex!important;min-height:50px;padding-left:52px!important;flex-direction:column;justify-content:center}
#inventory>.inventory-command-bar>div:first-child:before{content:"▦";position:absolute;left:0;top:50%;display:grid;width:38px;height:38px;place-items:center;transform:translateY(-50%);border-radius:10px;color:#fff;background:linear-gradient(145deg,#1782ff,#0e5ed5)}
#inventory .inventory-primary-actions{justify-self:end!important}
#inventory .inventory-quick-tabs{grid-column:1!important;grid-row:2!important}
#inventory .inventory-toolbar-selects{grid-column:2!important;grid-row:2!important;justify-self:end!important}

#purchase>.purchase-page-hero{display:grid!important;grid-template-columns:42px minmax(260px,1fr) auto!important;align-items:center!important;gap:12px!important;min-height:72px!important;margin:0 0 10px!important;padding:8px 10px!important;background:transparent!important;border:0!important;box-shadow:none!important}
#purchase>.purchase-page-hero>.purchase-title-mark{width:38px!important;height:38px!important;align-items:center!important;justify-content:center!important;border-radius:10px!important;color:#fff!important;background:linear-gradient(145deg,#1782ff,#0e5ed5)!important}
#purchase>.purchase-page-hero>div:nth-child(2){flex-direction:column!important;align-items:flex-start!important}
#purchase>.purchase-page-hero>.purchase-new-main{justify-self:end!important;min-width:138px!important;min-height:40px!important}

#reports.page.active{display:flex!important;flex-direction:column!important}
#reports>.page-toolbar{order:-2!important}
#reports>.report-analysis-menu{order:-1!important;margin-top:0!important}
.page>.page-toolbar>.primary,.page>.page-toolbar>.secondary{min-height:40px!important;white-space:nowrap!important}

@media(max-width:900px){
  #preorders>.page-toolbar,#reports>.page-toolbar,#customers>.page-toolbar,#suppliers>.page-toolbar,#migration>.page-toolbar,#settings>.page-toolbar,#delivery>.delivery-page-head{flex-wrap:wrap!important;height:auto!important}
  #inventory>.inventory-command-bar{grid-template-columns:1fr!important}
  #inventory .inventory-primary-actions,#inventory .inventory-quick-tabs,#inventory .inventory-toolbar-selects{grid-column:1!important;grid-row:auto!important;justify-self:stretch!important}
  #purchase>.purchase-page-hero{grid-template-columns:42px 1fr!important}
  #purchase>.purchase-page-hero>.purchase-new-main{grid-column:1/-1!important;width:100%!important}
}

/* R8.35 — complete purchase workspace and cross-module spacing audit */
#purchase{padding-top:16px!important;background:radial-gradient(circle at 60% -12%,rgba(78,170,255,.12),transparent 38%)}
#purchase>.purchase-page-hero{margin-bottom:4px!important}
#purchase .purchase-new-main{border:0;border-radius:8px;color:#251b07;background:linear-gradient(135deg,#efc24f,#dda727);box-shadow:0 5px 13px rgba(202,148,25,.2);font-weight:850}
#purchase .purchase-main-tabs{display:flex;align-items:center;gap:18px;margin:0 8px 12px;padding:0 8px;border-bottom:1px solid #d4e1ef;overflow-x:auto;background:rgba(255,255,255,.55)}
#purchase .purchase-main-tabs button{min-width:135px;min-height:44px;padding:0 16px;border:0;border-bottom:3px solid transparent;color:#355b91;background:transparent;font-size:13px;font-weight:850;white-space:nowrap}
#purchase .purchase-main-tabs button.active{color:#0871eb;border-bottom-color:#1677ff;background:linear-gradient(180deg,#f8fbff,#edf6ff)}
#purchase .purchase-view{margin:0 8px}
#purchase .purchase-view.hidden{display:none!important}
#purchase .purchase-create-view{display:grid;gap:12px}
#purchase .purchase-ai-strip{display:grid;grid-template-columns:minmax(240px,.72fr) minmax(480px,1.65fr);align-items:center;gap:16px;padding:13px 15px;border:1px solid #dce8f4;border-radius:10px;background:#fff;box-shadow:0 5px 16px rgba(26,65,108,.055)}
#purchase .purchase-ai-strip>div:first-child b,#purchase .purchase-form-preview header b,#purchase .purchase-items-preview header b{display:block;color:#0b438f;font-size:15px}
#purchase .purchase-ai-strip small,#purchase .purchase-form-preview header small,#purchase .purchase-items-preview header small{display:block;margin-top:4px;color:#7287a3;font-size:10px}
#purchase .purchase-ai-entry{display:grid;grid-template-columns:minmax(0,1fr) 105px 112px;gap:8px}
#purchase .purchase-ai-entry input{width:100%;min-width:0;height:40px;padding:0 12px;border:1px solid #bfd3ec;border-radius:7px;background:#fbfdff}
#purchase .purchase-ai-entry button{height:40px;border-radius:7px;font-weight:800}
#purchase .purchase-ai-entry .voice-input-btn{border:1px solid #91c0f4;color:#096ee5;background:#eef7ff}
#purchase .purchase-ai-entry .purchase-ai-go{border:0;color:#251b07;background:linear-gradient(135deg,#edc052,#dfa72a)}
#purchase .purchase-form-preview,#purchase .purchase-items-preview{padding:0!important;overflow:hidden;border-radius:10px!important}
#purchase .purchase-form-preview>header,#purchase .purchase-items-preview>header{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:57px;padding:11px 15px;border-bottom:1px solid #dfe8f3;background:linear-gradient(180deg,#fff,#fbfdff)}
#purchase .purchase-form-preview>header>span{padding:7px 10px;border-radius:7px;color:#3670b8;background:#eef6ff;font-size:10px;white-space:nowrap}
#purchase .purchase-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px;padding:15px}
#purchase .purchase-form-compact .purchase-preview-grid{padding:13px 15px;gap:10px 14px}
#purchase .purchase-form-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;background:linear-gradient(90deg,#f6faff,#fff);border-left:4px solid #1680f5}
#purchase .purchase-form-summary.hidden{display:none}
#purchase .purchase-form-summary b,#purchase .purchase-form-summary span{display:block}
#purchase .purchase-form-summary b{color:#123f78;font-size:14px}
#purchase .purchase-form-summary span{margin-top:4px;color:#6b809b;font-size:11px}
#purchase .purchase-form-summary button,#purchase .purchase-info-actions button{height:34px;padding:0 14px;border:1px solid #98bee9;border-radius:7px;color:#086bdb;background:#f4f9ff;font-weight:800}
#purchase .purchase-info-actions{grid-column:1/-1;display:flex;justify-content:flex-end}
#purchase .purchase-form-compact.is-collapsed .purchase-preview-grid{display:grid;grid-template-columns:minmax(320px,1fr) auto;align-items:end}
#purchase .purchase-form-compact.is-collapsed .purchase-preview-grid>*{display:none}
#purchase .purchase-form-compact.is-collapsed .purchase-preview-grid>label:first-child,#purchase .purchase-form-compact.is-collapsed .purchase-preview-grid>.purchase-info-actions{display:block;grid-column:auto}
#purchase .purchase-form-compact.is-collapsed .purchase-info-actions{align-self:end}
#purchase .purchase-form-compact.is-collapsed .purchase-info-actions button{height:39px}
@media(max-width:760px){#purchase .purchase-form-compact.is-collapsed .purchase-preview-grid{grid-template-columns:1fr}#purchase .purchase-form-compact.is-collapsed .purchase-info-actions{justify-content:stretch}#purchase .purchase-form-compact.is-collapsed .purchase-info-actions button{width:100%}}
.sales-delete-btn{border:0!important;color:#e33d3d!important;background:transparent!important;font-weight:800!important}
.sales-delete-btn:hover{color:#fff!important;background:#e54848!important}
.purchase-supplier-picker-field{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:6px;margin-top:6px}
#purchase .purchase-preview-grid .purchase-supplier-picker-field input{margin-top:0;cursor:pointer;background:#fff}
.purchase-supplier-picker-field button{border:1px solid #9cc3ee;border-radius:7px;color:#0875ea;background:#eef7ff;font-size:20px;font-weight:900}
.purchase-supplier-picker-card{width:min(540px,calc(100vw - 28px))!important}
.purchase-supplier-picker-body{padding:15px}
.purchase-supplier-picker-body>input{width:100%;height:42px;padding:0 13px;border:1px solid #b9d1ea;border-radius:8px}
.purchase-supplier-picker-list{display:grid;gap:8px;max-height:390px;margin-top:12px;overflow:auto}
.purchase-supplier-picker-list>button{display:grid;grid-template-columns:1fr auto;gap:4px 12px;width:100%;padding:11px 13px;text-align:left;border:1px solid #d4e2f1;border-radius:9px;color:#173d6d;background:#fff}
.purchase-supplier-picker-list>button:hover{border-color:#2686ed;background:#f2f8ff}
.purchase-supplier-picker-list b{font-size:14px}.purchase-supplier-picker-list span{color:#527294;font-size:11px}.purchase-supplier-picker-list small{grid-column:1/-1;color:#7b8da3;font-size:10px}
#purchase-supplier-picker-modal.order-modal{display:flex!important;align-items:center!important;justify-content:center!important;padding:20px!important;overflow:auto!important}
#purchase-supplier-picker-modal.order-modal.hidden{display:none!important}
#purchase-supplier-picker-modal .purchase-supplier-picker-card{display:flex!important;flex-direction:column!important;width:min(560px,calc(100vw - 40px))!important;height:auto!important;min-height:0!important;max-height:min(620px,calc(100vh - 40px))!important;margin:auto!important;border-radius:14px!important}
#purchase-supplier-picker-modal .purchase-supplier-picker-body{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#purchase-supplier-picker-modal .purchase-supplier-picker-list{min-height:0;max-height:min(360px,calc(100vh - 230px));overflow-y:auto}
@media(max-width:760px){#purchase-supplier-picker-modal.order-modal{padding:12px!important}#purchase-supplier-picker-modal .purchase-supplier-picker-card{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;border-radius:12px!important}#purchase-supplier-picker-modal .purchase-supplier-picker-list{max-height:min(330px,calc(100dvh - 210px))}}
#purchase .purchase-preview-grid label{color:#496889;font-size:11px;font-weight:700}
#purchase .purchase-preview-grid label.wide{grid-column:span 2}
#purchase .purchase-preview-grid em{color:#ef4949;font-style:normal}
#purchase .purchase-preview-grid input,#purchase .purchase-preview-grid select{width:100%;height:39px;margin-top:6px;padding:0 11px;border:1px solid #c8d8ea;border-radius:7px;color:#314d70;background:#f9fbfe}
#purchase .purchase-items-preview>header>div:last-child{display:grid;grid-template-columns:120px minmax(220px,1fr) auto;gap:8px}
#purchase .purchase-items-preview>header>.purchase-product-toolbar{overflow:visible}
.purchase-product-search{position:relative;min-width:0}
#purchase .purchase-product-search>input{width:100%}
.purchase-product-search-results{position:absolute;z-index:1250;top:calc(100% + 6px);left:0;width:min(620px,60vw);max-height:360px;padding:6px;overflow:auto;border:1px solid #bfd2e7;border-radius:9px;background:#fff;box-shadow:0 16px 38px rgba(18,54,94,.2)}
.purchase-product-search-results button{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px 11px;border:0;border-radius:7px;color:#173b68;background:#fff;text-align:left}
.purchase-product-search-results button:hover,.purchase-product-search-results button.active{background:#eaf4ff;color:#0871e5}
.purchase-product-search-results button b,.purchase-product-search-results button small{display:block}.purchase-product-search-results button b{font-size:12px}.purchase-product-search-results button small{margin-top:4px;color:#71849c;font-size:9px}.purchase-product-search-results button em{color:#3470b4;font-size:10px;font-style:normal;font-weight:800;white-space:nowrap}
@media(max-width:760px){#purchase .purchase-items-preview>header{align-items:stretch;flex-direction:column}#purchase .purchase-items-preview>header>.purchase-product-toolbar{grid-template-columns:1fr}#purchase .purchase-product-search-results{width:100%;max-height:300px}.purchase-product-search-results button{grid-template-columns:1fr}.purchase-product-search-results button em{margin-top:3px}}
#purchase .purchase-items-preview>header select,#purchase .purchase-items-preview>header input,#purchase .purchase-items-preview>header button{height:38px;border:1px solid #c7d9ec;border-radius:7px}
#purchase .purchase-items-preview>header select,#purchase .purchase-items-preview>header input{padding:0 10px;background:#fff}
#purchase .purchase-items-preview>header button{padding:0 13px;color:#096ee5;background:#f2f8ff;font-weight:800}
#purchase .purchase-empty-table{min-height:240px;background:#fff}
#purchase .purchase-table-head{display:grid;grid-template-columns:45px 1.25fr 1fr 105px 105px 115px 115px 80px;gap:8px;padding:12px 14px;border-bottom:1px solid #dce6f1;color:#5d7491;background:#f2f7fc;font-size:10px;font-weight:800}
#purchase .purchase-empty-state{display:flex;min-height:195px;align-items:center;justify-content:center;flex-direction:column;color:#7387a3}
#purchase .purchase-empty-state strong{font-size:31px;color:#8bb8ed}
#purchase .purchase-empty-state p{margin:8px 0 12px}
#purchase .purchase-empty-state button{min-height:36px;padding:0 14px;border:1px solid #9ec5f2;border-radius:7px;color:#096ee5;background:#f3f8ff;font-weight:800}
#purchase .purchase-preview-bottom{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.65fr);gap:12px}
#purchase .purchase-note-preview,#purchase .purchase-total-preview{padding:14px 15px!important}
#purchase .purchase-note-preview>b,#purchase .purchase-total-preview>b{color:#123f82}
#purchase .purchase-note-preview textarea{width:100%;min-height:116px;margin-top:10px;padding:10px;border:1px solid #cbdbea;border-radius:8px;resize:vertical;background:#fbfdff}
#purchase .purchase-total-preview p{display:flex;align-items:center;justify-content:space-between;margin:0;padding:8px 2px;border-bottom:1px solid #edf1f6;color:#667b98;font-size:11px}
#purchase .purchase-total-preview p:last-child{border-bottom:0}
#purchase .purchase-total-preview strong{color:#173d75;font-size:13px}
#purchase .purchase-preview-actions{display:flex;justify-content:flex-end;gap:9px;padding:3px 0 8px}
#purchase .purchase-preview-actions button{min-width:150px;min-height:42px}
#purchase .purchase-record-toolbar{min-height:58px!important;margin:0 0 10px!important;padding:8px 12px!important;border:1px solid #dfe8f3;border-radius:10px;background:#fff}
#purchase .purchase-record-toolbar>div:first-child{display:block!important;margin-right:auto}
#purchase .purchase-record-toolbar h2{margin:0;color:#103f86;font-size:17px}
#purchase .purchase-record-toolbar p{margin:4px 0 0;color:#7387a2;font-size:10px}
#purchase .purchase-record-toolbar .purchase-record-shortcuts{margin-left:auto}
#purchase [data-purchase-panel="records"]{display:grid;grid-template-columns:1fr;gap:10px 12px;align-items:stretch}
#purchase [data-purchase-panel="records"]>.purchase-record-toolbar{margin:0!important}
#purchase [data-purchase-panel="records"]>.sub-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px;width:min(100%,560px);margin:0 0 0 auto}
#purchase [data-purchase-panel="records"]>.sub-metrics article{min-height:0;padding:9px 12px;border-radius:9px;box-shadow:none}
#purchase [data-purchase-panel="records"]>.sub-metrics span{font-size:10px}
#purchase [data-purchase-panel="records"]>.sub-metrics b{margin:3px 0 0;font-size:15px;line-height:1.25}
#purchase [data-purchase-panel="records"]>.sub-metrics small{display:none}
#purchase [data-purchase-panel="records"]>.list-panel{grid-column:1/-1;overflow:hidden}
#purchase [data-purchase-panel="records"]>.list-panel>.list-head{display:grid;grid-template-columns:auto minmax(260px,1fr) 180px auto;gap:10px;align-items:center;padding:12px 14px}
#purchase .purchase-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}
#purchase .purchase-list-actions #purchase-record-open-create{height:38px;white-space:nowrap}
#purchase [data-purchase-panel="records"] #purchase-search{justify-self:end;width:min(100%,430px);height:39px}
#purchase [data-purchase-panel="records"] #purchase-sort{width:180px;height:39px}

/* Normalize visible module headers after the legacy single-title rule. */
#preorders,#delivery,#inventory,#purchase,#finance,#reports,#customers,#migration,#settings{padding-top:16px!important}
#preorders>.page-toolbar,#delivery>.delivery-page-head,#inventory>.inventory-command-bar,#finance>.page-toolbar,#reports>.page-toolbar,#customers>.page-toolbar,#migration>.page-toolbar,#settings>.page-toolbar{margin-top:0!important}

@media(max-width:1100px){
  #purchase .purchase-ai-strip{grid-template-columns:1fr}
  #purchase .purchase-preview-grid{grid-template-columns:1fr 1fr}
  #purchase .purchase-preview-grid label.wide{grid-column:span 2}
  #purchase .purchase-items-preview>header{align-items:flex-start;flex-direction:column}
  #purchase .purchase-items-preview>header>div:last-child{width:100%}
  #purchase .purchase-table-head{grid-template-columns:40px 1fr 1fr 90px 90px 100px 100px 65px;min-width:820px}
  #purchase .purchase-empty-table{overflow-x:auto}
  #purchase [data-purchase-panel="records"]{grid-template-columns:1fr}
  #purchase [data-purchase-panel="records"]>.sub-metrics{grid-template-columns:1fr 1fr!important;width:100%}
}
.notification-fx-summary{display:grid;gap:5px;padding:12px 15px;border-bottom:1px solid #dce7f3;background:linear-gradient(135deg,#eef7ff,#fff9e8)}
.notification-fx-summary span{color:#587392;font-size:10px}
.notification-fx-summary b{color:#103f78;font-size:12px;letter-spacing:.1px}
.dashboard-fx,#fx-rate-status{display:none!important}
#sales .sales-page-hero>.sales-ai-strip{display:grid;grid-template-columns:1fr;flex:1;min-width:430px;max-width:760px;gap:5px;margin:0 18px 0 auto;padding:0;border:0;background:transparent;box-shadow:none}
#sales .sales-page-hero>.sales-ai-strip>div:first-child{display:none}
#sales .sales-page-hero>.sales-ai-strip .sales-ai-entry{gap:7px}
#sales .sales-page-hero>.sales-ai-strip .sales-ai-entry input{height:40px}
#sales .sales-page-hero>.sales-ai-strip .sales-ai-entry button{min-width:92px;height:40px;padding:0 13px}
#sales .sales-page-hero>#close-sales-create{margin-left:0;white-space:nowrap}
@media(max-width:1050px){#sales .sales-page-hero{flex-wrap:wrap}#sales .sales-page-hero>.sales-ai-strip{order:3;flex-basis:100%;max-width:none;margin:5px 0 0}#sales .sales-page-hero>#close-sales-create{margin-left:auto}}
@media(max-width:650px){#sales .sales-page-hero>.sales-ai-strip{min-width:0}#sales .sales-page-hero>.sales-ai-strip .sales-ai-entry{display:grid;grid-template-columns:1fr 1fr}#sales .sales-page-hero>.sales-ai-strip .sales-ai-entry input{grid-column:1/-1}}
#delivery>.delivery-page-head>.delivery-ai-bar{display:grid;grid-template-columns:minmax(260px,1fr) 88px 88px;flex:1;min-width:430px;max-width:720px;gap:7px;margin:0 18px 0 auto;padding:0;border:0;background:transparent;box-shadow:none}
#delivery>.delivery-page-head>.delivery-ai-bar>div:first-child{display:none}
#delivery>.delivery-page-head>.delivery-ai-bar input,#delivery>.delivery-page-head>.delivery-ai-bar button{height:40px;min-width:0}
#delivery>.delivery-page-head>.delivery-ai-bar button{padding:0 11px;white-space:nowrap}
#delivery>.delivery-page-head>#add-delivery-order{margin-left:0!important;white-space:nowrap}
@media(max-width:1180px){#delivery>.delivery-page-head{flex-wrap:wrap!important}#delivery>.delivery-page-head>.delivery-ai-bar{order:3;flex-basis:100%;max-width:none;margin:5px 0 0}#delivery>.delivery-page-head>#add-delivery-order{margin-left:auto!important}}
@media(max-width:650px){#delivery>.delivery-page-head>.delivery-ai-bar{grid-template-columns:1fr 1fr;min-width:0}#delivery>.delivery-page-head>.delivery-ai-bar input{grid-column:1/-1}}
@media(max-width:700px){
  #purchase .purchase-main-tabs{gap:3px;margin-left:0;margin-right:0}
  #purchase .purchase-main-tabs button{min-width:120px;padding:0 8px}
  #purchase .purchase-view{margin:0}
  #purchase .purchase-ai-entry{grid-template-columns:1fr 1fr}
  #purchase .purchase-ai-entry input{grid-column:1/-1}
  #purchase .purchase-preview-grid{grid-template-columns:1fr}
  #purchase .purchase-preview-grid label.wide{grid-column:1}
  #purchase .purchase-items-preview>header>div:last-child{grid-template-columns:1fr}
  #purchase .purchase-preview-bottom{grid-template-columns:1fr}
  #purchase .purchase-preview-actions{display:grid;grid-template-columns:1fr}
  #purchase .purchase-preview-actions button{width:100%}
  #purchase [data-purchase-panel="records"]>.sub-metrics{grid-template-columns:1fr 1fr!important}
  #purchase [data-purchase-panel="records"]>.list-panel>.list-head{grid-template-columns:1fr}
  #purchase .purchase-list-actions{justify-content:stretch}
  #purchase .purchase-list-actions #purchase-record-open-create{flex:1}
  #purchase [data-purchase-panel="records"] #purchase-search,#purchase [data-purchase-panel="records"] #purchase-sort{width:100%}
}

/* R8.36 — statistics dashboard and AI business analysis */
#reports{background:radial-gradient(circle at 64% -8%,rgba(76,176,255,.14),transparent 38%)}
#reports>.page-toolbar{min-height:66px!important;margin-bottom:4px!important}
#reports>.page-toolbar .report-filter-bar{display:grid;grid-template-columns:64px 64px 145px 138px 138px 68px 105px 112px 105px;gap:7px;align-items:end;margin-left:auto;padding:0;border:0;background:transparent}
#reports .report-filter-bar label{color:#526f96;font-size:9px}
#reports .report-filter-bar input,#reports .report-filter-bar button{width:100%;height:38px;margin-top:4px;border-radius:7px}
#reports .report-filter-bar .primary,#reports .report-filter-bar .report-print{border:0;color:#261b05;background:linear-gradient(135deg,#efc24e,#dca526);font-weight:850}
#reports .report-analysis-menu{display:flex;min-height:48px;align-items:flex-end;margin:0 0 10px!important;padding:0 8px!important;border-width:0 0 1px!important;border-radius:0!important;background:rgba(255,255,255,.5)!important}
#reports .report-analysis-menu>div{display:none}
#reports #report-analysis-tabs{display:flex;width:100%;gap:8px;overflow-x:auto}
#reports #report-analysis-tabs button{min-width:128px;min-height:44px;padding:0 13px;border:0;border-bottom:3px solid transparent;color:#28518c;background:transparent;font-weight:850;white-space:nowrap}
#reports #report-analysis-tabs button.active{color:#0871ea;border-bottom-color:#1677ff;background:linear-gradient(180deg,#f8fbff,#edf6ff)}
#reports .report-empty-prompt{margin:10px 0;padding:22px;border:1px dashed #a9c8eb;border-radius:10px;color:#52739b;background:#f5faff;text-align:center}
#reports .report-kpi-modern{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:9px!important;margin:9px 0!important}
#reports .report-kpi-modern[hidden]{display:none!important}
#reports .report-kpi-modern article{position:relative;min-height:84px;padding:14px 10px 11px 54px!important;border:1px solid #dfe9f5;border-radius:9px;background:#fff;box-shadow:0 4px 13px rgba(27,66,112,.05)}
#reports .report-kpi-modern article:before{position:absolute;left:12px;top:17px;display:grid;width:34px;height:34px;place-items:center;border-radius:9px;font-weight:900}
#reports .report-kpi-modern article:nth-child(1):before{content:"▤";color:#0875e9;background:#e9f4ff}
#reports .report-kpi-modern article:nth-child(2):before{content:"▣";color:#0a9c65;background:#e9f9f1}
#reports .report-kpi-modern article:nth-child(3):before{content:"✓";color:#1677ff;background:#eaf4ff}
#reports .report-kpi-modern article:nth-child(4):before{content:"◇";color:#f06f24;background:#fff0e7}
#reports .report-kpi-modern article:nth-child(5):before{content:"□";color:#e89a08;background:#fff5df}
#reports .report-kpi-modern article:nth-child(6):before{content:"▥";color:#8148df;background:#f3edff}
#reports .report-kpi-modern span{display:block;color:#174693;font-size:10px;font-weight:800}
#reports .report-kpi-modern b{display:block;margin-top:5px;color:#072b79;font-size:17px;white-space:nowrap}
#reports .report-kpi-modern small{display:block;margin-top:4px;color:#7186a3;font-size:8px}
.report-data-hidden{display:none!important}
#reports .report-cost-notice{margin:7px 0!important;padding:8px 12px!important;border-radius:7px!important;font-size:9px!important}
#reports .report-ai-dashboard{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.72fr) minmax(330px,.72fr);gap:10px;margin-bottom:10px}
#reports .report-ai-dashboard[hidden]{display:none!important}
#reports .report-ai-dashboard>.panel{padding:0!important;overflow:hidden;border-radius:10px!important}
#reports .report-trend-panel{min-height:270px}
#reports .report-modern-title{display:flex;min-height:46px;align-items:center;justify-content:space-between;padding:10px 13px;border-bottom:1px solid #e1e9f3;color:#0d4190;background:linear-gradient(180deg,#fff,#fbfdff)}
#reports .report-modern-title b{font-size:14px}.report-modern-title small{color:#7185a0;font-size:9px}
#reports .report-chart-legend{display:flex;gap:13px;color:#547197;font-size:9px}.report-chart-legend span:before{content:"";display:inline-block;width:8px;height:8px;margin-right:4px;border-radius:50%}.report-chart-legend .sales:before{background:#1680f3}.report-chart-legend .income:before{background:#12a46d}.report-chart-legend .profit:before{background:#efa31d}
#reports .report-trend-chart{height:218px;padding:4px 8px 8px}.report-trend-chart svg{width:100%;height:100%;overflow:visible}.report-trend-chart .grid line{stroke:#e2ebf5;stroke-width:1}.report-trend-chart path{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.report-trend-chart .sales-line{stroke:#1680f3}.report-trend-chart .income-line{stroke:#10a369}.report-trend-chart .profit-line{stroke:#efa31d;stroke-dasharray:5 4}.report-trend-chart .labels text{fill:#7185a2;font-size:9px;text-anchor:middle}
#reports .report-composition-body{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:10px;padding:20px 14px}
#reports .report-donut-modern{display:flex;width:132px;height:132px;align-items:center;justify-content:center;flex-direction:column;border-radius:50%;background:radial-gradient(circle,#fff 0 45%,transparent 46%),conic-gradient(#1881f2 0 65%,#16b176 65% 86%,#f3a428 86%);color:#0d4090;text-align:center}.report-donut-modern b{font-size:12px}.report-donut-modern small{font-size:9px}
#reports .report-composition-list p{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;margin:0;padding:9px 0;border-bottom:1px solid #edf1f6;color:#55708e;font-size:9px}.report-composition-list i{width:9px;height:9px;border-radius:50%}.report-composition-list i.blue{background:#1881f2}.report-composition-list i.green{background:#16b176}.report-composition-list i.orange{background:#f3a428}.report-composition-list b{color:#143f7d;font-size:10px}
#reports .report-ai-panel{grid-column:3;grid-row:1 / span 2;border-color:#d8d8fb!important;background:linear-gradient(180deg,#fff,#f9f8ff)!important}
#reports .report-ai-head{display:flex;min-height:52px;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid #e1e2f5}.report-ai-head>div{display:flex;align-items:center;gap:8px}.report-ai-head>div>span{display:grid;width:29px;height:29px;place-items:center;border-radius:9px;color:#fff;background:linear-gradient(135deg,#1680f5,#7955e8);font-size:10px;font-weight:900}.report-ai-head b{color:#173a93;font-size:14px}.report-ai-head>small{padding:5px 8px;border-radius:999px;color:#0a9462;background:#e8f9f1;font-size:8px}
#reports .report-ai-insights{display:grid;gap:7px;padding:9px}.report-ai-insights article{position:relative;min-height:68px;padding:10px 10px 9px 42px;border:1px solid #e0e7f1;border-radius:8px;background:#fff}.report-ai-insights article:before{content:"!";position:absolute;left:11px;top:13px;display:grid;width:23px;height:23px;place-items:center;border-radius:7px;color:#f04e56;background:#fff0f1;font-weight:900}.report-ai-insights article.warn:before{content:"◇";color:#e58112;background:#fff4e5}.report-ai-insights article.good:before{content:"✓";color:#0e9d67;background:#eaf9f2}.report-ai-insights article.idea:before{content:"✦";color:#6b4ee0;background:#f2efff}.report-ai-insights b{color:#15438e;font-size:11px}.report-ai-insights p{margin:4px 0 0;color:#607590;font-size:9px;line-height:1.45}
#reports .report-ai-query{display:grid;grid-template-columns:1fr 75px;gap:6px;padding:0 9px 8px}.report-ai-query input{min-width:0;height:37px;padding:0 9px;border:1px solid #c9d7e9;border-radius:7px}.report-ai-query button{border:0;border-radius:7px;color:#261b05;background:linear-gradient(135deg,#efc04c,#dca526);font-weight:850}.report-ai-disclaimer{margin:0;padding:7px 10px;border-top:1px solid #e4e7f5;color:#7387a2;font-size:8px}
#reports .report-customer-ranking{grid-column:1}.report-ranking-table{padding:5px 11px 10px}.report-ranking-table>div{display:grid;grid-template-columns:24px minmax(110px,1fr) 55px 100px 110px;gap:7px;align-items:center;min-height:34px;border-bottom:1px solid #edf1f6;color:#496887;font-size:9px}.report-ranking-table>div>span{color:#1677ff}.report-ranking-table>div>b{color:#12418b}.report-ranking-table>div>strong{text-align:right;color:#0e438d}.report-ranking-table>div>em{text-align:right;font-style:normal}
#reports .report-funds-panel{grid-column:2}.report-funds-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:11px}.report-funds-grid article{padding:10px;border:1px solid #dfe8f3;border-radius:8px;background:#fbfdff}.report-funds-grid span{display:block;color:#7185a1;font-size:9px}.report-funds-grid b{display:block;margin-top:5px;color:#153f7d;font-size:12px}
#reports .report-expense-panel,#reports .report-detail-grid{margin-top:10px}

@media(max-width:1450px){#reports>.page-toolbar{align-items:flex-start!important;flex-wrap:wrap!important}#reports>.page-toolbar .report-filter-bar{width:100%;grid-template-columns:repeat(9,minmax(90px,1fr))}.report-ai-dashboard{grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr)!important}.report-ai-panel{grid-column:1/-1!important;grid-row:auto!important}.report-customer-ranking{grid-column:1!important}.report-funds-panel{grid-column:2!important}}
@media(max-width:900px){#reports>.page-toolbar .report-filter-bar{grid-template-columns:1fr 1fr 1fr!important}.report-kpi-modern{grid-template-columns:repeat(3,1fr)!important}.report-ai-dashboard{grid-template-columns:1fr!important}.report-ai-dashboard>*{grid-column:1!important}.report-composition-body{grid-template-columns:135px 1fr!important}}
@media(max-width:600px){#reports>.page-toolbar .report-filter-bar{grid-template-columns:1fr 1fr!important}.report-kpi-modern{grid-template-columns:1fr 1fr!important}.report-kpi-modern article{padding-left:48px!important}.report-chart-legend{display:none!important}.report-ranking-table>div{grid-template-columns:22px 1fr 55px}.report-ranking-table>div>strong,.report-ranking-table>div>em{grid-column:2/-1;text-align:left!important}.report-funds-grid{grid-template-columns:1fr}}

/* R8.37 — report visibility, tab focus and fault recovery */
#reports .report-load-status{margin:9px 0;padding:11px 14px;border:1px solid #b9d7fb;border-radius:9px;color:#245c9c;background:#eef7ff;font-size:12px;font-weight:700}
#reports .report-load-status.error{border-color:#ffc8cd;color:#ad2833;background:#fff1f2}
#reports[data-active-report="sales-trend"] .report-composition-panel,#reports[data-active-report="sales-trend"] .report-customer-ranking,#reports[data-active-report="sales-trend"] .report-funds-panel,#reports[data-active-report="sales-trend"] .report-expense-panel,#reports[data-active-report="sales-trend"] .report-detail-grid{display:none!important}
#reports[data-active-report="order-profit"] .report-ai-dashboard,#reports[data-active-report="order-profit"] .report-expense-panel{display:none!important}
#reports[data-active-report="purchase-order"] .report-ai-dashboard,#reports[data-active-report="purchase-order"] .report-detail-grid{display:none!important}
#reports[data-active-report="product-profit"] .report-trend-panel,#reports[data-active-report="product-profit"] .report-composition-panel,#reports[data-active-report="product-profit"] .report-ai-panel,#reports[data-active-report="product-profit"] .report-customer-ranking,#reports[data-active-report="product-profit"] .report-expense-panel,#reports[data-active-report="product-profit"] .report-table-panel{display:none!important}
#reports[data-active-report="product-profit"] .report-ranking{grid-column:1/-1}
#reports[data-active-report="customer-profit"] .report-trend-panel,#reports[data-active-report="customer-profit"] .report-composition-panel,#reports[data-active-report="customer-profit"] .report-ai-panel,#reports[data-active-report="customer-profit"] .report-funds-panel,#reports[data-active-report="customer-profit"] .report-expense-panel,#reports[data-active-report="customer-profit"] .report-detail-grid{display:none!important}
#reports[data-active-report="customer-profit"] .report-customer-ranking{grid-column:1/-1}
#reports[data-active-report="ai-insight"] .report-trend-panel,#reports[data-active-report="ai-insight"] .report-composition-panel,#reports[data-active-report="ai-insight"] .report-customer-ranking,#reports[data-active-report="ai-insight"] .report-funds-panel,#reports[data-active-report="ai-insight"] .report-expense-panel,#reports[data-active-report="ai-insight"] .report-detail-grid{display:none!important}
#reports[data-active-report="ai-insight"] .report-ai-panel{grid-column:1/-1;grid-row:auto}

/* R8.38 — customer self-order review workspace */
#preorders{background:radial-gradient(circle at 75% 0,rgba(65,158,255,.12),transparent 35%)}
#preorders .preorder-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0 12px}
#preorders .preorder-summary article{position:relative;min-height:86px;padding:15px 14px 12px 58px;border-radius:10px;background:#fff}
#preorders .preorder-summary article:before{position:absolute;left:14px;top:17px;display:grid;width:34px;height:34px;place-items:center;border-radius:50%;color:#1677ff;background:#e9f4ff;font-weight:900}
#preorders .preorder-summary article:nth-child(1):before{content:"▤"}#preorders .preorder-summary article:nth-child(2):before{content:"◷";color:#ed7b18;background:#fff1e5}#preorders .preorder-summary article:nth-child(3):before{content:"✓";color:#08a66b;background:#e8f9f1}#preorders .preorder-summary article:nth-child(4):before{content:"AI";color:#714fe0;background:#f1edff;font-size:10px}
#preorders .preorder-summary b{font-size:23px;color:#102b57}
.preorder-workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(390px,.82fr);gap:12px;align-items:stretch;height:calc(100dvh - 250px);min-height:590px}
.preorder-workspace>.panel{margin:0;min-width:0;overflow:hidden;border-radius:11px}
.preorder-panel{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;padding:0!important}
.preorder-main-tabs{display:flex;gap:18px;min-height:48px;align-items:end;padding:0 13px;border-bottom:1px solid #dfe8f3}
.preorder-main-tabs button{min-height:43px;padding:0 8px;border:0;border-bottom:3px solid transparent;color:#4f6d94;background:transparent;font-weight:800}.preorder-main-tabs button.active{color:#0875eb;border-bottom-color:#1677ff}
.preorder-filter-bar{display:grid;grid-template-columns:minmax(210px,1fr) 145px 145px 75px;gap:8px;padding:11px 12px;border-bottom:1px solid #e3ebf5;background:#fbfdff}.preorder-filter-bar label{font-size:9px;color:#607897}.preorder-filter-bar input,.preorder-filter-bar button{height:38px;margin-top:3px}.preorder-filter-bar .preorder-search{position:relative}.preorder-filter-bar .preorder-search span{position:absolute;left:10px;bottom:10px;color:#7890ae}.preorder-filter-bar .preorder-search input{width:100%;padding-left:29px}
.preorder-table-list{min-height:0;overflow:auto;padding:0!important}.preorder-table-list .preorder-card{display:grid;grid-template-columns:115px 145px minmax(190px,1fr) 75px 45px;gap:10px;align-items:center;margin:0;padding:12px 11px;border:0;border-bottom:1px solid #e8eef5;border-radius:0;cursor:pointer}.preorder-table-list .preorder-card:hover,.preorder-table-list .preorder-card.selected{background:#f2f7ff}.preorder-table-list .preorder-card.selected{box-shadow:inset 3px 0 #1677ff}.preorder-order-no b,.preorder-meta b{display:block;color:#123b78}.preorder-order-no small,.preorder-meta span{display:block;margin-top:4px;color:#7185a0;font-size:10px}.preorder-table-list .preorder-request{min-width:0}.preorder-table-list .preorder-request span{color:#1677ff;font-size:10px}.preorder-table-list .preorder-request p{margin:4px 0 0;overflow:hidden;color:#405d82;text-overflow:ellipsis;white-space:nowrap}.preorder-list-footer{display:flex;min-height:44px;align-items:center;justify-content:space-between;padding:0 13px;border-top:1px solid #e2eaf4;color:#526e91;background:#fff}
.preorder-detail-panel{height:100%;padding:0!important}.preorder-detail-empty{display:flex;height:100%;align-items:center;justify-content:center;flex-direction:column;color:#7387a2}.preorder-detail-empty span{display:grid;width:54px;height:54px;place-items:center;margin-bottom:12px;border-radius:50%;color:#1677ff;background:#eaf4ff;font-size:23px}.preorder-detail-empty b{color:#153a73;font-size:18px}.preorder-detail-empty p{margin:7px 0}.preorder-detail-content{display:grid;height:100%;grid-template-rows:auto minmax(0,1fr) auto}.preorder-detail-content>header{display:flex;min-height:65px;align-items:center;justify-content:space-between;padding:0 15px;border-bottom:1px solid #dfe8f3}.preorder-detail-content h2{margin:0;color:#102d59;font-size:18px}.preorder-detail-content header small{display:block;margin-top:5px;color:#7a8da7}.preorder-detail-scroll{min-height:0;overflow-y:auto}.preorder-detail-scroll section{padding:12px 15px;border-bottom:1px solid #e5edf6}.preorder-detail-scroll h3{margin:0 0 10px;color:#153f7b;font-size:14px}.preorder-detail-scroll dl{display:grid;grid-template-columns:82px 1fr;gap:8px;margin:0;font-size:12px}.preorder-detail-scroll dt{color:#71849f}.preorder-detail-scroll dd{margin:0;color:#213f69}.preorder-detail-request{padding:11px;border-radius:8px;color:#36577f;background:#f5f9fd;line-height:1.6}.preorder-ai-check{display:grid;gap:7px}.preorder-ai-check article{display:grid;grid-template-columns:80px 1fr;gap:8px;padding:9px;border:1px solid #e0e9f3;border-radius:8px;background:#fbfdff}.preorder-ai-check b{color:#124188}.preorder-ai-check span{color:#5d7696;font-size:11px}.preorder-ai-check article.good{border-color:#cceedd;background:#f3fcf7}.preorder-ai-check article.warn{border-color:#ffe0bb;background:#fff9f1}.preorder-detail-content>footer{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:11px 13px;border-top:1px solid #dfe8f3;background:#fff}.preorder-detail-content>footer button{min-height:38px}.preorder-detail-content>footer .preorder-detail-confirm{border:0;border-radius:7px;color:#2f2207;background:linear-gradient(135deg,#efc14d,#dda527);font-weight:850}.preorder-detail-content>footer .preorder-delete{grid-column:1/-1}
@media(max-width:1200px){.preorder-workspace{grid-template-columns:minmax(0,1.35fr) 380px}.preorder-table-list .preorder-card{grid-template-columns:100px 125px 1fr 65px}.preorder-table-list .preorder-card>.text-btn{display:none}}
@media(max-width:900px){#preorders .preorder-summary{grid-template-columns:1fr 1fr}.preorder-workspace{height:auto;grid-template-columns:1fr}.preorder-panel{min-height:560px}.preorder-detail-panel{min-height:620px}.preorder-filter-bar{grid-template-columns:1fr 1fr}.preorder-filter-bar .preorder-search{grid-column:1/-1}}
@media(max-width:600px){#preorders .preorder-summary{grid-template-columns:1fr 1fr}.preorder-table-list .preorder-card{grid-template-columns:95px 1fr 70px}.preorder-table-list .preorder-request{grid-column:1/-1}.preorder-filter-bar{grid-template-columns:1fr}.preorder-filter-bar .preorder-search{grid-column:auto}}

/* R8.59 customer preorder image upload */
[hidden]{display:none!important}
.customer-image-upload{position:relative;display:block;padding:12px;border:1px dashed #a9c8ed;border-radius:9px;background:#f6faff;color:#315a88!important;cursor:pointer}
.customer-image-upload input{position:absolute;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.customer-image-upload>span{display:flex;min-height:42px;align-items:center;justify-content:center;margin-top:7px;border:1px solid #c9dcf3;border-radius:8px;background:#fff;color:#1677ee;font-weight:800}
.customer-image-upload>small{display:block;margin-top:7px;color:#7589a3;text-align:center}
.preorder-image-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:-4px}
.preorder-image-preview:empty{display:none}
.preorder-image-preview figure{position:relative;height:105px;margin:0;overflow:hidden;border:1px solid #d9e6f4;border-radius:9px;background:#eef4fb}
.preorder-image-preview img{width:100%;height:100%;object-fit:cover}
.preorder-image-preview button{position:absolute;right:5px;top:5px;display:grid;width:27px;height:27px;place-items:center;padding:0;border:0;border-radius:50%;background:#d9363e;color:#fff;font-size:18px;cursor:pointer}
.preorder-detail-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.preorder-detail-images a{display:block;height:105px;overflow:hidden;border:1px solid #dce8f5;border-radius:8px;background:#eef4fb}
.preorder-detail-images img{width:100%;height:100%;object-fit:cover;transition:transform .2s}
.preorder-detail-images a:hover img{transform:scale(1.04)}
@media(max-width:600px){.preorder-image-preview,.preorder-detail-images{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* R8.39 — unified system settings workspace */
#settings{background:radial-gradient(circle at 72% -5%,rgba(64,158,255,.12),transparent 36%)}
#settings>.page-toolbar{min-height:64px;margin-bottom:8px!important}#settings>.page-toolbar>div:first-child{display:flex!important}#settings>.page-toolbar>#save-report-settings{display:none!important}
.settings-workspace{display:grid;grid-template-columns:185px minmax(0,1fr) 310px;gap:12px;align-items:start}
.settings-side-nav{position:sticky;top:10px;display:grid;gap:3px;padding:6px!important;overflow:hidden}.settings-side-nav button{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:center;min-height:62px;padding:7px 9px;border:0;border-left:3px solid transparent;border-radius:7px;color:#214b82;background:transparent;text-align:left}.settings-side-nav button:hover,.settings-side-nav button.active{border-left-color:#1677ff;color:#0875eb;background:#eaf4ff}.settings-side-nav button>span{min-width:0}.settings-side-nav b,.settings-side-nav small{display:block}.settings-side-nav b{font-size:13px}.settings-side-nav small{margin-top:3px;color:#7186a2;font-size:9px;font-weight:500}
.admin-header-entry-moved{display:none!important}.settings-admin-entry.hidden{display:none!important}
.settings-main-column{display:grid;gap:10px;min-width:0}.settings-tenant-notice{padding:11px 13px;border:1px solid #cfe3fb;border-radius:8px;color:#245a9d;background:#eef7ff;font-size:11px}.settings-main-column .report-settings-grid{display:grid;grid-template-columns:1fr;gap:10px}.settings-main-column .settings-card{margin:0;border-radius:10px}.settings-main-column .panel-title{min-height:43px;padding:0 13px}.settings-main-column .settings-form{grid-template-columns:1fr 1fr;gap:10px;padding:13px}.settings-main-column .settings-form label{font-size:11px}.settings-main-column .settings-form input,.settings-main-column .settings-form select{height:39px}.settings-main-column .setting-switches{grid-template-columns:1fr 1fr;padding:13px}.settings-main-column .operation-log-panel{margin:0}.settings-main-column .settings-tip{margin:0}
.settings-info-column{position:sticky;top:10px;display:grid;gap:10px}.settings-info-card{margin:0;padding:14px!important;border-radius:10px}.settings-info-card h3{margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid #e2eaf3;color:#102f5e;font-size:15px}.settings-info-card dl{display:grid;grid-template-columns:92px 1fr;gap:10px;margin:0;color:#607896;font-size:11px}.settings-info-card dd{margin:0;color:#183f76;font-weight:700}.settings-info-action{width:100%;margin-top:13px}.settings-help-card p{display:grid;grid-template-columns:92px 1fr;gap:8px;margin:0;padding:9px 0;border-bottom:1px solid #edf1f6}.settings-help-card p:last-child{border:0}.settings-help-card b{color:#174486;font-size:11px}.settings-help-card span{color:#71849e;font-size:10px;line-height:1.45}.settings-sticky-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:8px;padding:12px;border:1px solid #dfe7f1;border-radius:10px;background:#fff;box-shadow:0 9px 25px rgba(25,59,102,.09)}.settings-sticky-actions button{min-height:43px}.settings-sticky-actions .primary{color:#2b2008;background:linear-gradient(135deg,#efc24d,#dca427)}
@media(max-width:1300px){.settings-workspace{grid-template-columns:175px minmax(0,1fr) 270px}.settings-main-column .settings-form{grid-template-columns:1fr}.settings-main-column .settings-form .wide{grid-column:auto}}
@media(max-width:1000px){.settings-workspace{grid-template-columns:170px 1fr}.settings-info-column{position:static;grid-column:1/-1;grid-template-columns:1fr 1fr}.settings-help-card{grid-column:1/-1}.settings-sticky-actions{grid-column:1/-1}}
@media(max-width:700px){.settings-workspace{grid-template-columns:1fr}.settings-side-nav{position:static;display:flex;overflow-x:auto}.settings-side-nav button{flex:0 0 150px}.settings-info-column{grid-template-columns:1fr}.settings-help-card,.settings-sticky-actions{grid-column:auto}.settings-main-column .setting-switches{grid-template-columns:1fr}}

/* R8.81 fix16 — reliable collapsed sidebar menus and cohesive purchase header */
#nav>.nav-group{display:flex!important;width:100%;flex-direction:column!important}
#nav>.nav-group>.nav-parent{display:flex!important;width:100%!important;align-items:center!important;cursor:pointer!important}
#nav>.nav-group>.nav-parent{font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:14px!important;font-weight:400!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important}
#nav>.nav-group>.nav-parent>.nav-chevron{display:inline-flex!important;width:22px!important;height:22px!important;margin:0 3px 0 auto!important;align-items:center!important;justify-content:center!important;visibility:visible!important;opacity:1!important;color:#91a9c3!important;font-size:17px!important;font-style:normal!important;line-height:1!important;transform:rotate(0deg);transition:transform .18s ease,color .18s ease}
#nav>.nav-group.open>.nav-parent>.nav-chevron{color:#fff!important;transform:rotate(180deg)!important}
#nav>.nav-group>.nav-submenu{display:none!important;width:auto;margin:2px 8px 6px 38px!important;padding:3px 0 3px 10px!important;border-left:1px solid rgba(143,181,222,.32)!important}
#nav>.nav-group.open>.nav-submenu{display:grid!important;gap:2px!important}
#nav>.nav-group>.nav-submenu>.nav-submenu-item{display:block!important;width:100%;min-height:34px;padding:7px 8px!important;cursor:pointer;text-align:left}

#purchase>.purchase-page-hero{min-height:66px!important;margin:0 0 8px!important;padding:10px 13px!important;border:1px solid #dbe7f3!important;border-radius:11px!important;background:rgba(255,255,255,.92)!important;box-shadow:0 5px 16px rgba(27,67,111,.05)!important}
#purchase>.purchase-page-hero>.purchase-title-mark{width:34px!important;height:34px!important;border-radius:9px!important;box-shadow:none!important}
#purchase>.purchase-page-hero h2{font-size:20px!important}
#purchase>.purchase-page-hero p{margin-top:3px!important}
#purchase [data-purchase-panel="records"]>.sub-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(135px,1fr))!important;width:100%!important;gap:0!important;margin:0!important;overflow:hidden;border:1px solid #dbe7f3;border-radius:10px;background:#fff}
#purchase [data-purchase-panel="records"]>.sub-metrics article{position:relative;display:flex!important;min-height:48px!important;padding:8px 14px!important;border:0!important;border-right:1px solid #e3ebf4!important;border-radius:0!important;background:#fff!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
#purchase [data-purchase-panel="records"]>.sub-metrics article:last-child{border-right:0!important}
#purchase [data-purchase-panel="records"]>.sub-metrics span{font-size:10px!important;white-space:nowrap}
#purchase [data-purchase-panel="records"]>.sub-metrics b{margin:0!important;font-size:14px!important;white-space:nowrap}
@media(max-width:900px){#purchase [data-purchase-panel="records"]>.sub-metrics{grid-template-columns:1fr 1fr!important}#purchase [data-purchase-panel="records"]>.sub-metrics article:nth-child(2){border-right:0!important}#purchase [data-purchase-panel="records"]>.sub-metrics article:nth-child(-n+2){border-bottom:1px solid #e3ebf4!important}}

/* R8.81 fix20 — warehouse-first delivery preview */
#delivery-report-paper .delivery-report-layout{grid-template-columns:minmax(360px,.82fr) minmax(560px,1.28fr)!important;gap:14px!important}
#delivery-report-paper .delivery-products-focus{min-height:245px!important;border-color:#b9d5f5!important;box-shadow:0 5px 16px rgba(22,119,255,.08)}
#delivery-report-paper .delivery-products-focus h3{padding:12px 15px!important;font-size:16px!important;background:#eaf4ff!important}
#delivery-report-paper .delivery-products-focus .delivery-report-products th{padding:11px 12px!important;font-size:12px!important}
#delivery-report-paper .delivery-products-focus .delivery-report-products td{padding:17px 12px!important;font-size:15px!important;line-height:1.45!important}
#delivery-report-paper .delivery-products-focus .delivery-product-name{font-size:17px!important;line-height:1.4!important}
#delivery-report-paper .delivery-products-focus .delivery-product-spec{font-size:15px!important;color:#425f84!important}
#delivery-report-paper .delivery-products-focus .delivery-product-quantity{font-size:22px!important;color:#092f66!important}
@media(max-width:1000px){#delivery-report-paper .delivery-report-layout{grid-template-columns:1fr!important}#delivery-report-paper .delivery-products-focus{min-height:210px!important}}
@media print{#delivery-report-paper .delivery-report-layout{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;gap:7px!important}#delivery-report-paper .delivery-products-focus{min-height:54mm!important}#delivery-report-paper .delivery-products-focus .delivery-report-products td{padding:11px 8px!important}#delivery-report-paper .delivery-products-focus .delivery-product-name{font-size:15px!important}#delivery-report-paper .delivery-products-focus .delivery-product-spec{font-size:13px!important}#delivery-report-paper .delivery-products-focus .delivery-product-quantity{font-size:19px!important}}

/* R8.40 — settings spacing correction and real AI settings panel */
#settings .settings-main-column{margin-left:0!important;width:auto!important;max-width:none!important}
#settings .settings-workspace{gap:10px;grid-template-columns:190px minmax(620px,1fr) 300px}
#settings .settings-side-nav,#settings .settings-info-column{top:8px}
#settings .settings-main-column .settings-form{column-gap:12px;row-gap:9px}
#settings .settings-main-column .settings-form textarea{width:100%;min-height:82px;resize:vertical}
#settings .settings-ai-card .panel-title{justify-content:space-between}
#settings .settings-ai-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-top:1px solid #e3ebf4;background:#fbfdff}.settings-ai-actions small{color:#7185a1;font-size:10px}.settings-ai-actions button{min-width:145px}
#settings #settings-ai-status.ai-ok{color:#087443;background:#e7f8ef;border-color:#bdebd2}
#settings #settings-ai-status.ai-error{color:#b42318;background:#fff0ee;border-color:#ffc9c3}
/* R8.42 — server-backed AI status and connection feedback */
@media(max-width:1380px){#settings .settings-workspace{grid-template-columns:175px minmax(520px,1fr) 270px}}
@media(max-width:1120px){#settings .settings-workspace{grid-template-columns:170px minmax(0,1fr)}#settings .settings-info-column{position:static;grid-column:1/-1;grid-template-columns:1fr 1fr}#settings .settings-help-card,#settings .settings-sticky-actions{grid-column:1/-1}}
@media(max-width:760px){#settings .settings-workspace{grid-template-columns:1fr}#settings .settings-side-nav{position:static;display:flex;overflow-x:auto}#settings .settings-info-column{grid-template-columns:1fr}#settings .settings-help-card,#settings .settings-sticky-actions{grid-column:auto}#settings .settings-main-column .settings-form{grid-template-columns:1fr}#settings .settings-ai-actions{align-items:stretch;flex-direction:column}}

/* R8.30 — symmetrical partner list and detail cards */
@media(min-width:1051px){
  .partner-center-layout{
    grid-template-rows:minmax(0,1fr);
  }
  .partner-center-layout>.customer-panel{
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    min-height:0;
    box-sizing:border-box;
  }
  .partner-center-layout>.customer-panel .list-head,
  .partner-center-layout>.customer-panel .customer-footer{
    position:relative;
    z-index:2;
  }
  .partner-center-layout>.customer-panel .contact-table-wrap{
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
    margin:0;
    border-radius:0;
  }
  .partner-center-layout>.partner-detail-panel{
    align-self:stretch;
    box-sizing:border-box;
  }
  .partner-detail-content{
    min-height:0;
  }
  .partner-detail-scroll{
    overscroll-behavior:contain;
  }
}

/* R8.81 fix43 last cascade layer — shared page layout */
#preorders>.page-toolbar>div:first-child,
#inventory>.page-toolbar>div:first-child,
#finance>.page-toolbar>div:first-child,
#reports>.page-toolbar>div:first-child,
#customers>.page-toolbar>div:first-child,
#suppliers>.page-toolbar>div:first-child,
#migration>.page-toolbar>div:first-child,
#settings>.page-toolbar>div:first-child,
#delivery>.delivery-page-head>div:first-child{display:none!important}
#purchase>.purchase-page-hero{display:none!important}
#preorders>.page-toolbar,
#inventory>.page-toolbar,
#finance>.page-toolbar,
#reports>.page-toolbar,
#customers>.page-toolbar,
#suppliers>.page-toolbar,
#migration>.page-toolbar,
#settings>.page-toolbar{min-height:0!important;justify-content:flex-end!important}
#settings>.page-toolbar{display:none!important}
#sales .sales-order-unified-card>.sales-products-card>header{display:none!important}
#sales .sales-order-unified-card .sales-products-scroll{margin-top:14px!important}

/* R8.81 fix44 — compact sales form and matching purchase picker */
body>.searchable-select-menu.product-picker-dialog,
body>.purchase-product-search-results.product-picker-dialog{width:min(980px,calc(100vw - 56px))!important;height:min(560px,calc(100vh - 72px))!important}
body>.purchase-product-search-results.product-picker-dialog{position:fixed!important;z-index:10000!important;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%)!important;display:block!important;max-height:none!important;padding:0!important;overflow:auto!important;border:1px solid #bfd2e7!important;border-radius:14px!important;background:#fff!important;box-shadow:0 0 0 9999px rgba(8,27,51,.58),0 28px 80px rgba(2,20,43,.35)!important;isolation:isolate}
body>.purchase-product-picker-dialog .product-search-table-row{display:grid!important;grid-template-columns:110px minmax(180px,1.45fr) minmax(170px,1.3fr) 90px 62px 72px 100px!important;align-items:center!important;gap:8px!important;width:100%!important;padding:9px 11px!important;border:0!important;border-bottom:1px solid #e4edf6!important;border-radius:0!important;background:#fff!important;text-align:left!important}
body>.purchase-product-picker-dialog .product-search-table-row:hover{background:#eaf4ff!important}
body>.purchase-product-picker-dialog .product-search-table-row span,body>.purchase-product-picker-dialog .product-search-table-row b,body>.purchase-product-picker-dialog .product-search-table-row strong,body>.purchase-product-picker-dialog .product-search-table-row em{display:block;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-style:normal}
body>.purchase-product-picker-dialog .product-search-table-row strong{color:#0b4f9c}body>.purchase-product-picker-dialog .product-search-table-row em{color:#00965e;font-weight:800}
#sales .sales-order-unified-card{margin-top:6px!important}
#sales .sales-order-customer-card .sales-customer-grid{padding:8px 16px 10px!important}
#sales .sales-order-customer-card header{min-height:42px!important;padding:6px 16px!important}
#sales .sales-products-scroll{margin:8px 16px 10px!important}
#sales .sales-products-scroll th{height:34px!important;padding-top:7px!important;padding-bottom:7px!important}
#sales .sales-products-scroll td{padding-top:7px!important;padding-bottom:7px!important}
#sales .sales-products-scroll [data-order-product]{min-height:34px!important}
#sales .sales-products-scroll tr:last-child td{height:45px!important;padding-top:5px!important;padding-bottom:5px!important}
#inventory-quick-variant-wrap small{display:block;margin-top:4px;color:#71849c;font-size:9px}
.order-item-note{width:100%;min-width:100px;height:34px;padding:6px 8px;border:1px solid #cfe0f3;border-radius:7px;color:#294967;background:#fff;font-size:11px}

/* R8.81 fix54 — one readable typography scale across every ERP workspace */
:root{--jk-text-base:12px;--jk-text-control:12px;--jk-text-meta:11px;--jk-text-title:18px}
body{font-size:var(--jk-text-base)!important;line-height:1.45}
.page,.modal,.drawer,.order-modal,.workspace-full-editor{font-size:var(--jk-text-base)!important}
.page button,.page input,.page select,.page textarea,.modal button,.modal input,.modal select,.modal textarea,.drawer button,.drawer input,.drawer select,.drawer textarea,.order-modal button,.order-modal input,.order-modal select,.order-modal textarea,.workspace-full-editor button,.workspace-full-editor input,.workspace-full-editor select,.workspace-full-editor textarea{font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:var(--jk-text-control)!important}
.page button,.modal button,.drawer button,.order-modal button,.workspace-full-editor button{font-weight:700}
.page table,.modal table,.drawer table,.order-modal table,.workspace-full-editor table,.page .sales-simple-list,.page .report-ranking-table,.page .preorder-table-list{font-size:var(--jk-text-control)!important}
.page th,.page td,.modal th,.modal td,.drawer th,.drawer td,.order-modal th,.order-modal td{font-size:var(--jk-text-control)!important;line-height:1.45}
.page label,.modal label,.drawer label,.order-modal label,.workspace-full-editor label{font-size:var(--jk-text-meta)!important}
.page small,.modal small,.drawer small,.order-modal small,.workspace-full-editor small,.page .customer-footer,.page .preorder-list-footer{font-size:var(--jk-text-meta)!important;line-height:1.4}
.page h2,.modal h2,.drawer h2,.order-modal h2,.workspace-full-editor h2{font-size:var(--jk-text-title)!important;line-height:1.3}
.page h3,.modal h3,.drawer h3,.order-modal h3,.workspace-full-editor h3{font-size:15px!important;line-height:1.35}
.page .list-head b,.page .panel-title b,.page .delivery-detail-title b,.page .sales-column-head h3,.page .finance-list-title h2,.page .report-modern-title b{font-size:14px!important}
.page .sub-metrics span,.page .report-kpi-modern span,.page .report-funds-grid span,.page .report-composition-list p,.page .report-ai-insights p,.page .report-ranking-table>div{font-size:11px!important}
.page .sub-metrics b,.page .report-kpi-modern b{font-size:17px!important}
.product-picker-dialog,.purchase-product-picker-dialog,.supplier-picker-dialog{font-size:13px!important}
.product-picker-dialog button,.purchase-product-picker-dialog button,.supplier-picker-dialog button,.product-picker-dialog input,.purchase-product-picker-dialog input,.supplier-picker-dialog input,.product-picker-dialog select,.purchase-product-picker-dialog select,.supplier-picker-dialog select{font-size:13px!important}
@media(max-width:760px){:root{--jk-text-base:13px;--jk-text-control:13px;--jk-text-meta:11px;--jk-text-title:18px}}

/* R8.81 fix56 — controls, rows and cards scale together with typography */
.page input:not([type="checkbox"]):not([type="radio"]),.page select,.modal input:not([type="checkbox"]):not([type="radio"]),.modal select,.drawer input:not([type="checkbox"]):not([type="radio"]),.drawer select,.order-modal input:not([type="checkbox"]):not([type="radio"]),.order-modal select,.workspace-full-editor input:not([type="checkbox"]):not([type="radio"]),.workspace-full-editor select{height:34px!important;min-height:34px!important;padding-top:5px!important;padding-bottom:5px!important}
.page button,.modal button,.drawer button,.order-modal button,.workspace-full-editor button{min-height:32px;padding-top:6px;padding-bottom:6px}
.page textarea,.modal textarea,.drawer textarea,.order-modal textarea,.workspace-full-editor textarea{padding:9px 11px!important;line-height:1.45!important}
.page th,.modal th,.drawer th,.order-modal th{height:36px!important;padding:7px 9px!important}
.page td,.modal td,.drawer td,.order-modal td{padding:7px 9px!important}
.page .list-head,.page .panel-title{min-height:50px!important;padding:9px 14px!important}
.page .customer-footer{min-height:36px!important;padding:7px 14px!important}

#sales .sales-record-column .sales-column-head,#sales-reservation-panel>.list-head{min-height:54px!important;padding:10px 16px!important}
#sales .sales-record-column .sales-column-head h3,#sales-reservation-panel>.list-head h2{font-size:17px!important}
#sales .sales-compact-head,#sales .sales-compact-row{font-size:12px!important}
#sales .sales-compact-head{min-height:38px!important}
#sales .sales-compact-head>span{padding:8px 10px!important}
#sales .sales-compact-row{min-height:44px!important}
#sales .sales-compact-row>span{padding:8px 10px!important}
#sales .sales-compact-actions button{min-height:30px!important;height:30px!important;padding:4px 8px!important;font-size:12px!important}
#sales .sales-payment-pill{min-height:26px!important;padding:4px 8px!important;font-size:12px!important}
#sales-reservation-panel .contact-table-wrap thead th{height:36px!important;padding:7px 9px!important;font-size:12px!important}
#sales-reservation-panel .contact-table-wrap tbody td{height:44px!important;padding:7px 9px!important;font-size:12px!important}
#sales-reservation-panel .contact-table-wrap tbody button{min-height:30px!important;height:30px!important;padding:4px 8px!important;font-size:12px!important}
#sales-reservation-panel .customer-footer{min-height:36px!important;font-size:12px!important}
#sales #sales-overview-head #open-sales-create,#sales .sales-header-filters .sales-multi-filter>summary,#sales .sales-header-filters #sales-record-status,#sales .sales-header-filters #sales-record-sort,#sales .sales-header-filters .sales-product-audit{height:38px!important;min-height:38px!important;font-size:13px!important}
#sales #sales-overview-head>.sales-currency-switch{height:48px!important;padding:4px 6px!important}

.unified-customer-picker{z-index:12050!important;align-items:flex-start!important;padding:4vh 5vw!important}
.unified-customer-picker>.modal-card{width:min(980px,92vw)!important;max-width:980px!important;height:min(650px,88vh)!important;display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr)!important;padding:0!important;overflow:hidden!important}
.unified-customer-picker header{display:flex;align-items:center;justify-content:space-between;min-height:62px;padding:10px 16px;border-bottom:1px solid #dce7f3;background:#f6faff}
.unified-customer-picker header b{display:block;color:#0b438f;font-size:17px}.unified-customer-picker header small{display:block;margin-top:3px;color:#7185a0}.unified-customer-picker header button{width:36px;padding:0!important}
.unified-customer-tools{padding:10px 14px;border-bottom:1px solid #dce7f3}.unified-customer-tools input{width:100%}
.unified-customer-head,.unified-customer-list button{display:grid;grid-template-columns:1.1fr .8fr .8fr 1.5fr;gap:10px;align-items:center}
.unified-customer-head{min-height:38px;padding:8px 14px;color:#4f6d91;background:#eef5fd;font-size:12px;font-weight:800}
.unified-customer-list{min-height:0;overflow:auto}.unified-customer-list button{width:100%;min-height:46px;padding:8px 14px;border:0;border-bottom:1px solid #e3ebf4;border-radius:0;background:#fff;color:#254566;text-align:left}.unified-customer-list button:hover{background:#edf6ff}.unified-customer-list button b{color:#0d438d}.unified-customer-list button small{overflow:hidden;color:#6e839e;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.unified-customer-picker{padding:10px!important}.unified-customer-picker>.modal-card{width:100%!important;height:calc(100vh - 20px)!important}.unified-customer-head,.unified-customer-list button{grid-template-columns:1fr 1fr}.unified-customer-head span:nth-child(n+3),.unified-customer-list button span:nth-child(n+3),.unified-customer-list button small{display:none}}

/* R8.81 fix57 — compact command bars and metric cards */
#inventory>.inventory-command-bar{display:grid!important;grid-template-columns:minmax(420px,1fr) auto auto!important;grid-template-rows:auto!important;gap:8px!important;align-items:center!important;min-height:0!important;margin-bottom:8px!important;padding:8px 10px!important}
#inventory>.inventory-command-bar>div:first-child{display:none!important}
#inventory>.inventory-command-bar>.inventory-quick-tabs{grid-column:1!important;grid-row:1!important;width:100%!important;padding:3px!important}
#inventory>.inventory-command-bar>.inventory-primary-actions{grid-column:2!important;grid-row:1!important;display:flex!important;gap:6px!important;justify-self:end!important}
#inventory>.inventory-command-bar>.inventory-toolbar-selects{grid-column:3!important;grid-row:1!important;display:flex!important;gap:6px!important;justify-self:end!important}
#inventory .inventory-primary-actions button{height:34px!important;min-height:34px!important;min-width:96px!important;padding:0 11px!important;border-radius:7px!important;font-size:12px!important}
#inventory .inventory-primary-actions #new-inventory-product{min-width:122px!important}
#inventory .inventory-quick-tabs button{height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:12px!important}
#inventory .inventory-toolbar-selects select{width:130px!important;height:34px!important;min-height:34px!important;padding:0 9px!important;border-radius:7px!important;font-size:12px!important}
#inventory .inventory-metrics{gap:8px!important;margin-bottom:8px!important}
#inventory .inventory-metrics article{min-height:68px!important;padding:10px 13px!important;border-radius:9px!important}
#inventory .inventory-metrics article span{font-size:11px!important}
#inventory .inventory-metrics article b{margin-top:3px!important;font-size:17px!important;line-height:1.2!important}
#inventory .inventory-metrics article small{margin-top:3px!important;font-size:10px!important}
@media(max-width:1350px){#inventory>.inventory-command-bar{grid-template-columns:minmax(360px,1fr) auto!important}#inventory>.inventory-command-bar>.inventory-quick-tabs{grid-column:1!important;grid-row:1!important}#inventory>.inventory-command-bar>.inventory-primary-actions{grid-column:2!important;grid-row:1!important}#inventory>.inventory-command-bar>.inventory-toolbar-selects{grid-column:1/-1!important;grid-row:2!important;justify-self:end!important}}
@media(max-width:850px){#inventory>.inventory-command-bar{grid-template-columns:1fr!important}#inventory>.inventory-command-bar>.inventory-quick-tabs,#inventory>.inventory-command-bar>.inventory-primary-actions,#inventory>.inventory-command-bar>.inventory-toolbar-selects{grid-column:1!important;grid-row:auto!important;justify-self:stretch!important}#inventory .inventory-primary-actions,#inventory .inventory-toolbar-selects{display:grid!important;grid-template-columns:1fr 1fr!important}#inventory .inventory-primary-actions button,#inventory .inventory-toolbar-selects select{width:100%!important;min-width:0!important}}

/* R8.81 fix58 — shared component dimensions for the complete ERP */
:root{--jk-control-h:34px;--jk-button-h:32px;--jk-table-head-h:36px;--jk-table-row-h:44px;--jk-card-radius:9px;--jk-card-gap:8px;--jk-card-pad:11px;--jk-title-h:50px}
section.page{font-size:12px!important}
section.page>.page-toolbar{min-height:50px!important;margin-top:0!important;margin-bottom:8px!important;padding:8px 12px!important;border-radius:var(--jk-card-radius)!important}
section.page>.page-toolbar h2{margin:0!important;font-size:18px!important;line-height:1.25!important}
section.page>.page-toolbar p{margin:3px 0 0!important;font-size:11px!important;line-height:1.35!important}
section.page .panel,section.page .list-panel,section.page .customer-panel,section.page .settings-card{border-radius:var(--jk-card-radius)!important}
section.page .list-head,section.page .panel-title,section.page .sales-column-head{min-height:var(--jk-title-h)!important;padding:8px 13px!important}
section.page .list-head h2,section.page .panel-title h2,section.page .list-head b,section.page .panel-title b{font-size:15px!important;line-height:1.3!important}
section.page .list-head small,section.page .panel-title small{margin-top:3px!important;font-size:10px!important}
section.page button{min-height:var(--jk-button-h)!important;border-radius:7px!important;font-size:12px!important;line-height:1.2!important}
section.page input:not([type="checkbox"]):not([type="radio"]),section.page select{height:var(--jk-control-h)!important;min-height:var(--jk-control-h)!important;border-radius:7px!important;font-size:12px!important}
section.page textarea{border-radius:7px!important;font-size:12px!important}
section.page table{font-size:12px!important}
section.page table thead th{height:var(--jk-table-head-h)!important;padding:7px 9px!important;font-size:11px!important}
section.page table tbody td{min-height:var(--jk-table-row-h)!important;padding:7px 9px!important;font-size:12px!important}
section.page .metrics,section.page .sub-metrics,section.page .contact-summary,section.page .report-cards,section.page .delivery-metrics,section.page .inventory-metrics{gap:var(--jk-card-gap)!important;margin-top:8px!important;margin-bottom:8px!important}
section.page .metrics article,section.page .sub-metrics article,section.page .contact-summary article,section.page .report-cards article,section.page .delivery-metrics article,section.page .inventory-metrics article{min-height:68px!important;padding:10px 13px!important;border-radius:var(--jk-card-radius)!important}
section.page .metrics article span,section.page .sub-metrics article span,section.page .contact-summary article span,section.page .report-cards article span,section.page .delivery-metrics article span,section.page .inventory-metrics article span{font-size:11px!important}
section.page .metrics article b,section.page .sub-metrics article b,section.page .contact-summary article b,section.page .report-cards article b,section.page .delivery-metrics article b,section.page .inventory-metrics article b{margin-top:3px!important;font-size:17px!important;line-height:1.2!important}
section.page .metrics article small,section.page .sub-metrics article small,section.page .contact-summary article small,section.page .report-cards article small,section.page .delivery-metrics article small,section.page .inventory-metrics article small{margin-top:3px!important;font-size:10px!important}
.modal-card,.drawer-card,.order-modal>.modal-card,.workspace-full-editor{border-radius:10px!important;font-size:12px!important}
.modal-card>header,.drawer-card>header,.workspace-full-editor>header{min-height:54px!important;padding:9px 14px!important}
.modal-card>header h2,.drawer-card>header h2,.workspace-full-editor>header h2{font-size:18px!important}
.modal-card button,.drawer-card button,.order-modal button,.workspace-full-editor button{min-height:32px!important;font-size:12px!important;border-radius:7px!important}
.modal-card input:not([type="checkbox"]):not([type="radio"]),.modal-card select,.drawer-card input:not([type="checkbox"]):not([type="radio"]),.drawer-card select,.order-modal input:not([type="checkbox"]):not([type="radio"]),.order-modal select,.workspace-full-editor input:not([type="checkbox"]):not([type="radio"]),.workspace-full-editor select{height:34px!important;min-height:34px!important;font-size:12px!important;border-radius:7px!important}
.modal-card table thead th,.drawer-card table thead th,.order-modal table thead th,.workspace-full-editor table thead th{height:36px!important;padding:7px 9px!important;font-size:11px!important}
.modal-card table tbody td,.drawer-card table tbody td,.order-modal table tbody td,.workspace-full-editor table tbody td{padding:7px 9px!important;font-size:12px!important}
.workspace-tabs button,.sales-view-tabs button,.purchase-main-tabs button,.delivery-status-tabs button,.finance-module-tabs button{min-height:34px!important;height:34px!important;padding:0 12px!important;font-size:12px!important}
@media(max-width:760px){:root{--jk-control-h:38px;--jk-button-h:36px;--jk-table-row-h:48px}section.page{font-size:13px!important}section.page button,section.page input:not([type="checkbox"]):not([type="radio"]),section.page select{font-size:13px!important}}
.order-item-note:focus{border-color:#2384f4;outline:0;box-shadow:0 0 0 3px rgba(35,132,244,.11)}
#sales .sales-products-scroll th:nth-child(2),#sales .sales-products-scroll td:nth-child(2){width:clamp(300px,43vw,620px)!important}
#sales .sales-products-scroll th:nth-child(3),#sales .sales-products-scroll td:nth-child(3){width:clamp(140px,16vw,250px)!important}
#sales .sales-products-scroll [data-order-product]{width:min(100%,620px)!important}
#purchase .purchase-table-head,#purchase .purchase-draft-row{grid-template-columns:42px minmax(260px,1.6fr) minmax(150px,.8fr) 95px 95px 110px 110px 70px!important}
@media(max-width:760px){body>.searchable-select-menu.product-picker-dialog,body>.purchase-product-search-results.product-picker-dialog{width:calc(100vw - 18px)!important;height:calc(100vh - 24px)!important}}
/* R8.81 fix47 final sales item-column sizing */
#sales .sales-products-scroll th:nth-child(2),#sales .sales-products-scroll td:nth-child(2){width:clamp(260px,34vw,520px)!important}
#sales .sales-products-scroll th:nth-child(3),#sales .sales-products-scroll td:nth-child(3){width:clamp(130px,14vw,220px)!important}
#sales .sales-products-scroll th:nth-child(8),#sales .sales-products-scroll td:nth-child(8){width:clamp(130px,15vw,230px)!important}
#sales .sales-products-scroll th:nth-child(9),#sales .sales-products-scroll td:nth-child(9){width:58px!important}

/* R8.81 fix60 final cascade — every workspace follows the same measurements */
body section.page,body .modal-card,body .drawer-card,body .order-modal>.modal-card,body .workspace-full-editor{font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:12px!important}
body section.page .list-head,body section.page .panel-title,body section.page .sales-column-head,body section.page .delivery-detail-title,body section.page .finance-list-title{min-height:50px!important;padding:8px 13px!important}
body section.page .list-head h2,body section.page .panel-title h2,body section.page .sales-column-head h3,body section.page .finance-list-title h2,body section.page .list-head b,body section.page .panel-title b{font-size:15px!important;line-height:1.3!important}
body section.page .list-head small,body section.page .panel-title small,body section.page .sales-column-head span{font-size:10px!important;line-height:1.35!important}
body section.page table,body section.page .sales-simple-list,body section.page .preorder-table-list,body section.page .report-ranking-table{font-size:12px!important}
body section.page table thead th,body section.page .sales-compact-head>span{height:36px!important;padding:7px 9px!important;font-size:11px!important;line-height:1.35!important}
body section.page table tbody td,body section.page .sales-compact-row>span{min-height:44px!important;padding:7px 9px!important;font-size:12px!important;line-height:1.4!important}
body section.page button,body section.page .text-btn,body section.page .pay-now-btn{min-height:32px!important;padding:6px 10px!important;font-size:12px!important;line-height:1.2!important}
body section.page input:not([type="checkbox"]):not([type="radio"]),body section.page select{height:34px!important;min-height:34px!important;padding-top:5px!important;padding-bottom:5px!important;font-size:12px!important}
body section.page .pill,body section.page .badge,body section.page .status-badge,body section.page .sales-payment-pill{font-size:11px!important;line-height:1.2!important}
body section.page .customer-footer,body section.page .preorder-list-footer{min-height:36px!important;padding:7px 14px!important;font-size:11px!important}
body #sales-list-panel .sales-column-head,body #sales-reservation-panel>.list-head{min-height:50px!important;padding:8px 13px!important}
body #sales-list-panel .sales-column-head h3,body #sales-reservation-panel>.list-head h2{font-size:15px!important}
body #sales-list-panel .sales-compact-head,body #sales-reservation-panel table thead tr{height:36px!important;min-height:36px!important}
body #sales-list-panel .sales-compact-row,body #sales-reservation-panel table tbody tr{height:44px!important;min-height:44px!important}
body #sales-list-panel .sales-compact-actions button,body #sales-reservation-panel table tbody button{height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:12px!important}
body .modal-card>header,body .drawer-card>header,body .workspace-full-editor>header{min-height:50px!important;padding:8px 13px!important}
body .modal-card>header h2,body .drawer-card>header h2,body .workspace-full-editor>header h2{font-size:18px!important}
body .modal-card button,body .drawer-card button,body .order-modal button,body .workspace-full-editor button{min-height:32px!important;font-size:12px!important}
body .modal-card input:not([type="checkbox"]):not([type="radio"]),body .modal-card select,body .drawer-card input:not([type="checkbox"]):not([type="radio"]),body .drawer-card select,body .order-modal input:not([type="checkbox"]):not([type="radio"]),body .order-modal select,body .workspace-full-editor input:not([type="checkbox"]):not([type="radio"]),body .workspace-full-editor select{height:34px!important;min-height:34px!important;font-size:12px!important}

/* R8.81 fix61 — sales-detail screen is the canonical scale for every page */
:root{
  --jk-canonical-body:12px;
  --jk-canonical-meta:10px;
  --jk-canonical-table-head:11px;
  --jk-canonical-section-title:15px;
  --jk-canonical-page-title:20px;
  --jk-canonical-control-h:34px;
  --jk-canonical-button-h:34px;
  --jk-canonical-table-head-h:36px;
  --jk-canonical-table-row-h:44px;
  --jk-canonical-panel-head-h:58px;
}
body,body .app-shell,body main,body section.page,body .modal,body .drawer,body .order-modal,body .workspace-full-editor{font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:var(--jk-canonical-body)!important}
body .app-header h1,body .page-heading h1,body section.page>.page-toolbar h2{font-size:var(--jk-canonical-page-title)!important;line-height:1.25!important}
body section.page .list-head,body section.page .panel-title,body section.page .sales-column-head,body section.page .delivery-detail-title,body section.page .finance-list-title{min-height:var(--jk-canonical-panel-head-h)!important;padding:10px 16px!important}
body section.page .list-head h2,body section.page .panel-title h2,body section.page .sales-column-head h3,body section.page .finance-list-title h2,body section.page .list-head b,body section.page .panel-title b{font-size:var(--jk-canonical-section-title)!important;line-height:1.3!important}
body section.page .list-head small,body section.page .panel-title small,body section.page .sales-column-head span,body section.page small{font-size:var(--jk-canonical-meta)!important;line-height:1.4!important}
body section.page table,body section.page .sales-simple-list,body section.page .preorder-table-list,body section.page .report-ranking-table,body section.page .purchase-draft-row{font-size:var(--jk-canonical-body)!important}
body section.page table thead th,body section.page .sales-compact-head>span,body section.page .purchase-table-head>span{height:var(--jk-canonical-table-head-h)!important;padding:8px 10px!important;font-size:var(--jk-canonical-table-head)!important;line-height:1.35!important}
body section.page table tbody tr,body section.page .sales-compact-row,body section.page .purchase-draft-row{min-height:var(--jk-canonical-table-row-h)!important}
body section.page table tbody td,body section.page .sales-compact-row>span,body section.page .purchase-draft-row>div{padding:8px 10px!important;font-size:var(--jk-canonical-body)!important;line-height:1.4!important}
body section.page input:not([type="checkbox"]):not([type="radio"]),body section.page select,body .modal-card input:not([type="checkbox"]):not([type="radio"]),body .modal-card select,body .drawer-card input:not([type="checkbox"]):not([type="radio"]),body .drawer-card select,body .workspace-full-editor input:not([type="checkbox"]):not([type="radio"]),body .workspace-full-editor select{height:var(--jk-canonical-control-h)!important;min-height:var(--jk-canonical-control-h)!important;padding:5px 9px!important;font-size:var(--jk-canonical-body)!important}
body section.page button,body .modal-card button,body .drawer-card button,body .order-modal button,body .workspace-full-editor button{min-height:var(--jk-canonical-button-h)!important;padding:5px 10px!important;font-size:var(--jk-canonical-body)!important;line-height:1.2!important}
body section.page .text-btn,body section.page .sales-compact-actions button,body section.page .purchase-row-actions button,body section.page table tbody button{height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:var(--jk-canonical-body)!important}
body section.page .pill,body section.page .badge,body section.page .status-badge,body section.page .sales-payment-pill{min-height:26px!important;padding:5px 10px!important;font-size:11px!important;line-height:1.2!important}
body section.page .panel,body section.page .list-panel,body section.page .customer-panel,body section.page .settings-card,body section.page .metrics article,body section.page .sub-metrics article{border-radius:10px!important}
body .modal-card>header,body .drawer-card>header,body .workspace-full-editor>header{min-height:58px!important;padding:10px 16px!important}
body .modal-card>header h2,body .drawer-card>header h2,body .workspace-full-editor>header h2{font-size:18px!important;line-height:1.3!important}
body #nav .nav-parent{font-size:14px!important}body #nav .nav-submenu-item{font-size:12px!important}
@media(max-width:760px){:root{--jk-canonical-body:13px;--jk-canonical-table-head:12px;--jk-canonical-control-h:38px;--jk-canonical-button-h:38px;--jk-canonical-table-row-h:48px}}

/* R8.81 fix63 — all top action buttons match inventory management */
body #sales #sales-overview-head #open-sales-create,
body #sales .sales-header-filters .sales-multi-filter>summary,
body #sales .sales-header-filters #sales-record-status,
body #sales .sales-header-filters #sales-record-sort,
body #sales .sales-header-filters .sales-product-audit,
body section.page>.page-toolbar button,
body section.page .inventory-primary-actions button,
body section.page .inventory-toolbar-selects select,
body section.page .list-head>button,
body section.page .panel-title>button{
  width:auto!important;
  height:34px!important;
  min-height:34px!important;
  min-width:0!important;
  padding:0 11px!important;
  border-radius:7px!important;
  font-size:12px!important;
  line-height:32px!important;
  white-space:nowrap!important;
}
body #sales #sales-overview-head #open-sales-create,
body section.page .inventory-primary-actions #new-inventory-product{min-width:122px!important}

/* R8.81 fix64 — exact record-list parity with sales details */
body #sales #sales-reservation-panel .contact-table-wrap table,
body #purchase [data-purchase-panel="records"] .contact-table-wrap table{
  font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;
  font-size:12px!important;
  line-height:1.4!important;
}
body #sales #sales-reservation-panel .contact-table-wrap thead th,
body #purchase [data-purchase-panel="records"] .contact-table-wrap thead th{
  box-sizing:border-box!important;
  height:36px!important;
  min-height:36px!important;
  padding:7px 10px!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:700!important;
}
body #sales #sales-reservation-panel .contact-table-wrap tbody tr,
body #purchase [data-purchase-panel="records"] .contact-table-wrap tbody tr{
  height:44px!important;
  min-height:44px!important;
}
body #sales #sales-reservation-panel .contact-table-wrap tbody td,
body #purchase [data-purchase-panel="records"] .contact-table-wrap tbody td{
  box-sizing:border-box!important;
  height:44px!important;
  min-height:44px!important;
  padding:6px 10px!important;
  font-size:12px!important;
  line-height:1.4!important;
}
body #sales #sales-reservation-panel .contact-table-wrap tbody td b,
body #sales #sales-reservation-panel .contact-table-wrap tbody td strong,
body #purchase [data-purchase-panel="records"] .contact-table-wrap tbody td b,
body #purchase [data-purchase-panel="records"] .contact-table-wrap tbody td strong{font-size:12px!important;line-height:1.4!important}
body #sales #sales-reservation-panel .contact-table-wrap tbody td small,
body #purchase [data-purchase-panel="records"] .contact-table-wrap tbody td small{display:block!important;margin-top:2px!important;font-size:10px!important;line-height:1.25!important}
body #sales #sales-reservation-panel .purchase-row-actions,
body #purchase [data-purchase-panel="records"] .purchase-row-actions{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important}
body #sales #sales-reservation-panel .purchase-row-actions button,
body #purchase [data-purchase-panel="records"] .purchase-row-actions button{
  box-sizing:border-box!important;
  height:30px!important;
  min-height:30px!important;
  padding:4px 8px!important;
  font-size:12px!important;
  line-height:20px!important;
  white-space:nowrap!important;
}
body #purchase [data-purchase-panel="records"] .payment-status-select{
  box-sizing:border-box!important;
  height:30px!important;
  min-height:30px!important;
  padding:4px 8px!important;
  font-size:12px!important;
  line-height:20px!important;
}
body #sales #sales-reservation-panel>.customer-footer,
body #purchase [data-purchase-panel="records"] .customer-footer{height:36px!important;min-height:36px!important;padding:7px 14px!important;font-size:11px!important}

/* R8.81 fix65 — sales-detail is the enforced standard across every module */
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),
body .modal-card:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),
body .drawer-card:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),
body .workspace-full-editor:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c){font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:12px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c)>.page-toolbar h2,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .page-head h2,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .purchase-page-hero h2,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .delivery-page-head h2{font-size:20px!important;line-height:1.25!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .list-head,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .panel-title,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .sales-column-head,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .inventory-list-head-r817,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .delivery-detail-title,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .finance-list-title{box-sizing:border-box!important;min-height:50px!important;padding:8px 13px!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .list-head :is(h2,h3,b),
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .panel-title :is(h2,h3,b),
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .sales-column-head h3,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .finance-list-title h2{font-size:15px!important;line-height:1.3!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.list-head,.panel-title,.sales-column-head) small,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) .sales-column-head span{font-size:10px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-simple-list,.preorder-table-list,.report-ranking-table,.purchase-draft-row,.operation-log-row){font-size:12px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table thead th,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-compact-head,.purchase-table-head,.report-table-head)>*{box-sizing:border-box!important;height:36px!important;min-height:36px!important;padding:7px 10px!important;font-size:12px!important;line-height:1.35!important;font-weight:700!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table tbody tr,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-compact-row,.purchase-draft-row,.operation-log-row){height:44px!important;min-height:44px!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table tbody td,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-compact-row,.purchase-draft-row,.operation-log-row)>*{box-sizing:border-box!important;min-height:44px!important;padding:6px 10px!important;font-size:12px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table tbody td :is(b,strong,a),
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-compact-row,.purchase-draft-row,.operation-log-row) :is(b,strong,a){font-size:12px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) table tbody td small,
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.sales-compact-row,.purchase-draft-row,.operation-log-row) small{font-size:10px!important;line-height:1.3!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(input:not([type="checkbox"]):not([type="radio"]),select),
body :is(.modal-card,.drawer-card,.workspace-full-editor):not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(input:not([type="checkbox"]):not([type="radio"]),select){box-sizing:border-box!important;height:34px!important;min-height:34px!important;padding:5px 9px!important;font-size:12px!important;line-height:1.3!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) textarea,
body :is(.modal-card,.drawer-card,.workspace-full-editor):not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) textarea{padding:8px 10px!important;font-size:12px!important;line-height:1.45!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) button,
body :is(.modal-card,.drawer-card,.workspace-full-editor):not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) button{box-sizing:border-box!important;min-height:34px!important;padding:5px 10px!important;font-size:12px!important;line-height:1.2!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.text-btn,.pay-now-btn,.payment-record-btn,.purchase-row-actions button,.sales-compact-actions button,table tbody button){height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:12px!important;line-height:20px!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.pill,.tag,.badge,.status-badge,.payment-status-select,.sales-payment-pill){min-height:26px!important;padding:5px 9px!important;font-size:11px!important;line-height:1.2!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.customer-footer,.list-footer,.table-footer,.preorder-list-footer){box-sizing:border-box!important;min-height:36px!important;padding:7px 14px!important;font-size:11px!important;line-height:1.4!important}
body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c) :is(.panel,.list-panel,.customer-panel,.settings-card,.inventory-list-r817,.delivery-list-panel,.report-table-panel,.operation-log-panel){border-radius:10px!important}
body :is(.modal-card,.drawer-card,.workspace-full-editor):not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c)>:is(header,.modal-head){box-sizing:border-box!important;min-height:54px!important;padding:9px 14px!important}
body :is(.modal-card,.drawer-card,.workspace-full-editor):not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c)>:is(header,.modal-head) h2{font-size:18px!important;line-height:1.3!important}
@media(max-width:760px){body section.page:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),body .modal-card:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),body .drawer-card:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c),body .workspace-full-editor:not(#jk-scale-a):not(#jk-scale-b):not(#jk-scale-c){font-size:13px!important}}

/* R8.81 fix66 — every editable field uses the sales-detail type scale */
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input:not([type="checkbox"]):not([type="radio"]),
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) select,
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) textarea,
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) [contenteditable="true"]{
  font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.4!important;
  letter-spacing:0!important;
}
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input:not([type="checkbox"]):not([type="radio"]),
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) select{
  box-sizing:border-box!important;
  height:34px!important;
  min-height:34px!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
}
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) textarea{
  padding:8px 10px!important;
}
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input::placeholder,
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) textarea::placeholder{
  font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.4!important;
  opacity:1!important;
}
html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input[type="number"]{font-variant-numeric:tabular-nums!important}
@media(max-width:760px){html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input:not([type="checkbox"]):not([type="radio"]),html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) select,html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) textarea,html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) [contenteditable="true"],html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) input::placeholder,html body:not(#jk-field-a):not(#jk-field-b):not(#jk-field-c) textarea::placeholder{font-size:13px!important}}

/* R8.81 fix67 — purchase-record table is the visual standard for every data frame */
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap){height:auto!important;min-height:0!important;overflow:auto!important;border:1px solid #d9e5f2!important;border-radius:10px!important;background:#fff!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) table{width:100%!important;border-collapse:collapse!important;font-size:12px!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) thead th{box-sizing:border-box!important;height:36px!important;min-height:36px!important;padding:7px 10px!important;border-bottom:1px solid #d5e2ef!important;color:#355579!important;background:#f2f7fd!important;font-size:12px!important;font-weight:700!important;line-height:1.35!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) tbody tr{height:46px!important;min-height:46px!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) tbody td{box-sizing:border-box!important;height:46px!important;min-height:46px!important;padding:6px 10px!important;border-bottom:1px solid #e1eaf4!important;color:#183552!important;background:#fff!important;font-size:12px!important;line-height:1.4!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) tbody tr:hover td{background:#f7fbff!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) tbody :is(.pill,.tag,.badge,.status-badge,.payment-status-select){box-sizing:border-box!important;height:34px!important;min-height:34px!important;padding:6px 10px!important;font-size:12px!important;line-height:20px!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.contact-table-wrap,.import-table-wrap) tbody button{box-sizing:border-box!important;height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:12px!important;line-height:20px!important}
body section.page:not(#jk-table-a):not(#jk-table-b):not(#jk-table-c) :is(.customer-footer,.list-footer,.table-footer,.preorder-list-footer){box-sizing:border-box!important;height:36px!important;min-height:36px!important;padding:7px 14px!important;border-top:1px solid #dce7f2!important;font-size:11px!important;line-height:1.4!important}
body #sales .sales-compact-head,body #sales .sales-compact-row{font-size:12px!important}
body #sales .sales-compact-head{min-height:36px!important}body #sales .sales-compact-row{min-height:46px!important}
body #sales .sales-compact-head>span{padding:7px 10px!important;font-size:12px!important}body #sales .sales-compact-row>span{padding:6px 10px!important;font-size:12px!important}

/* Compact create/edit workspaces so controls size with their content */
body #purchase .purchase-order-unified-card>.purchase-items-preview>header{min-height:44px!important;padding:5px 12px!important}
body #purchase .purchase-items-preview>header select,body #purchase .purchase-items-preview>header input,body #purchase .purchase-items-preview>header button{height:34px!important;min-height:34px!important;font-size:12px!important}
body #purchase .purchase-empty-table{min-height:0!important;height:auto!important}
body #purchase .purchase-empty-state{min-height:96px!important;padding:12px!important}
body #purchase .purchase-draft-row{min-height:46px!important}
body #purchase .purchase-draft-add-row{min-height:56px!important;padding-top:9px!important;padding-bottom:9px!important;overflow:visible!important}
body #purchase .purchase-draft-add-row [data-purchase-add-next]{position:relative;z-index:1;flex:0 0 32px;width:32px;height:32px;min-height:32px}
body #purchase .purchase-order-unified-card{overflow:visible}
body #purchase .purchase-form-preview,body #purchase .purchase-items-preview{margin-bottom:14px;border-radius:10px}
body #purchase .purchase-empty-table{overflow-x:auto!important;overflow-y:visible!important}
body #purchase .purchase-draft-rows{height:auto!important;min-height:0!important;overflow:visible!important;padding-bottom:2px}

/* R8.81 fix110: purchase rows expand naturally on desktop; customer orders use five clear metrics. */
@media(min-width:901px){
  body #purchase .purchase-order-unified-card,
  body #purchase .purchase-items-preview,
  body #purchase .purchase-empty-table,
  body #purchase .purchase-draft-rows{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  body #purchase .purchase-empty-table{margin:14px 17px 17px!important}
  body #purchase .purchase-table-head,
  body #purchase .purchase-draft-row,
  body #purchase .purchase-draft-rows{min-width:0!important;width:100%!important}
  body #purchase .purchase-table-head,
  body #purchase .purchase-draft-row{grid-template-columns:44px minmax(240px,1.6fr) minmax(150px,1fr) 90px 90px 110px 100px 70px!important}
}
#preorders .preorder-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}
#preorders .preorder-summary article:nth-child(1):before{content:"▦"!important;color:#1677ff!important;background:#e9f4ff!important}
#preorders .preorder-summary article:nth-child(2):before{content:"▤"!important;color:#1677ff!important;background:#e9f4ff!important}
#preorders .preorder-summary article:nth-child(3):before{content:"◷"!important;color:#ed7b18!important;background:#fff1e5!important}
#preorders .preorder-summary article:nth-child(4):before{content:"✓"!important;color:#08a66b!important;background:#e8f9f1!important;font-size:inherit!important}
#preorders .preorder-summary article:nth-child(5):before{content:"AI"!important;color:#714fe0!important;background:#f1edff!important;font-size:10px!important}
@media(max-width:1200px) and (min-width:761px){#preorders .preorder-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:760px){#preorders .preorder-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* R8.81 fix111: sales product selection always presents the searchable input. */
#order-body .searchable-select{margin-top:0!important}
#order-body select[data-order-product].searchable-select-native{position:absolute!important;inset:auto auto 0 0!important;width:1px!important;min-width:0!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#order-body .searchable-select-input{display:block!important;width:100%!important;min-width:0!important;height:34px!important}
body #purchase .purchase-draft-row{box-sizing:content-box!important;height:auto!important;line-height:1.4}
body #purchase .purchase-draft-add-row{box-sizing:border-box!important}
body #purchase .purchase-preview-bottom{gap:8px!important}
body #purchase .purchase-note-preview,body #purchase .purchase-total-preview{padding:10px 12px!important}
body #purchase .purchase-note-preview textarea{min-height:76px!important;height:76px!important;margin-top:7px!important;padding:8px 10px!important;font-size:12px!important}
body #purchase .purchase-total-preview p{min-height:30px!important;margin:0!important;padding:6px 0!important;font-size:12px!important}
body #purchase .purchase-preview-actions{gap:8px!important;padding:2px 0 6px!important}

/* Tablet dashboard voice controls: keep the microphone visible and tappable. */
@media(max-width:1400px){
  #dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:minmax(0,1fr) 42px 108px!important}
  #dashboard .dashboard-voice-icon{display:grid!important;grid-column:2!important}
  #dashboard .quick-box>button:not(.voice-input-btn){grid-column:3!important}
}
@media(max-width:760px){
  #dashboard .quick-box,#dashboard .quick-box.compact{grid-template-columns:42px minmax(0,1fr)!important;grid-template-rows:42px 39px!important}
  #dashboard .quick-box input{grid-column:1/-1!important;grid-row:1!important}
  #dashboard .dashboard-voice-icon{grid-column:1!important;grid-row:2!important}
  #dashboard .quick-box>button:not(.voice-input-btn){grid-column:2!important;grid-row:2!important}
}
body #purchase .purchase-preview-actions button{height:34px!important;min-height:34px!important;min-width:122px!important;padding:5px 10px!important;font-size:12px!important}

/* R8.81 fix69 — double-click sales unit price to choose retail/wholesale */
.sales-price-picker{position:fixed;z-index:10050;box-sizing:border-box;padding:10px;border:1px solid #bfd3ea;border-radius:10px;background:#fff;box-shadow:0 14px 34px rgba(15,42,73,.2);font-family:"Segoe UI","Microsoft YaHei",Arial,sans-serif;color:#16395f}
.sales-price-picker>strong,.sales-price-picker>small,.sales-price-picker>em{display:block}
.sales-price-picker>strong{font-size:13px;line-height:1.4}.sales-price-picker>small{margin:2px 0 8px;color:#6a8099;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sales-price-picker>button{display:flex!important;align-items:center;justify-content:space-between;width:100%;height:36px!important;min-height:36px!important;margin-top:6px;padding:6px 10px!important;border:1px solid #d3e1f0;border-radius:7px;background:#f7fbff;color:#174d84;font-size:12px!important;cursor:pointer}
.sales-price-picker>button:hover{border-color:#3185df;background:#eaf4ff}.sales-price-picker>button b{font-size:12px;color:#003e7e}.sales-price-picker>em{margin-top:8px;color:#8192a6;font-size:10px;font-style:normal}

/* R8.81 fix70 — reservation stocking detail */
.sales-reservation-view-modal{display:flex!important;align-items:center;justify-content:center;padding:22px;z-index:10040}
.sales-reservation-view-card{width:min(1180px,96vw)!important;max-height:90vh;display:flex;flex-direction:column;background:#f7faff}
.sales-reservation-view-card .modal-head{flex:0 0 auto}.sales-reservation-view-card .modal-head small{display:block;margin-top:3px;color:#d8e8f8;font-size:11px}
.reservation-view-summary{display:grid;grid-template-columns:1.1fr 1.4fr 1fr 1fr;gap:8px;padding:12px 14px;background:#fff;border-bottom:1px solid #dce7f2}
.reservation-view-summary>div{padding:9px 11px;border:1px solid #dce7f2;border-radius:8px;background:#f8fbff}.reservation-view-summary small,.reservation-view-summary b{display:block}.reservation-view-summary small{margin-bottom:3px;color:#6b8199;font-size:10px}.reservation-view-summary b{color:#153a62;font-size:12px}
.reservation-view-table{min-height:0;overflow:auto;margin:12px 14px 0;border:1px solid #d5e2ef;border-radius:9px;background:#fff}.reservation-view-table table{width:100%;border-collapse:collapse}.reservation-view-table th{position:sticky;top:0;z-index:1;height:36px;padding:7px 9px;background:#eef5fc;color:#355579;font-size:11px;text-align:left}.reservation-view-table td{height:46px;padding:7px 9px;border-bottom:1px solid #e1eaf4;color:#183552;font-size:12px}.reservation-view-table td small{display:block;margin-top:2px;color:#71869d;font-size:10px}
.reservation-stock-status{display:inline-flex;align-items:center;min-height:26px;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}.reservation-stock-status.ready{color:#008455;background:#e1f7ef}.reservation-stock-status.short{color:#c43a34;background:#ffe9e7}
.reservation-view-note{margin:10px 14px;padding:9px 11px;border:1px solid #eadfac;border-radius:8px;background:#fff9df}.reservation-view-note b{font-size:11px}.reservation-view-note p{margin:4px 0 0;color:#5e5121;font-size:12px}
.sales-reservation-view-card>footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid #dce7f2;background:#fff}
@media(max-width:760px){.sales-reservation-view-modal{padding:8px}.sales-reservation-view-card{width:100%!important;max-height:calc(100vh - 16px)}.reservation-view-summary{grid-template-columns:1fr 1fr}.reservation-view-table{overflow:auto}.reservation-view-table table{min-width:850px}}

/* R8.81 fix71 — trade-in sales workflow */
.sales-trade-in-button{width:100%;margin-top:8px;border-color:#7bc9ae!important;color:#087654!important;background:#eefaf6!important;font-weight:700}
.sales-order-customer-card header .sales-info-actions{display:flex!important;align-items:center;gap:8px}.sales-order-customer-card header .sales-info-actions .sales-trade-in-button{display:inline-flex!important;width:auto!important;margin:0!important;white-space:nowrap}.sales-order-customer-card header .sales-info-actions #sales-info-collapse{display:inline-flex!important;white-space:nowrap}
.trade-in-line b{color:#d46a16!important}.trade-in-net-line{border-top:1px dashed #c8d8e8}.trade-in-net-line b{color:#075fae!important}
.sales-trade-in-modal{display:flex!important;align-items:center;justify-content:center;padding:20px;z-index:10050}.sales-trade-in-card{width:min(820px,95vw)!important;max-height:92vh;overflow:auto;background:#f7faff}.sales-trade-in-card .modal-head small{display:block;margin-top:3px;color:#d8e8f8;font-size:11px}
.sales-trade-in-card form{padding:14px}.trade-in-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.trade-in-form-grid label{display:grid;gap:5px;color:#47617d;font-size:11px;font-weight:700}.trade-in-form-grid input,.trade-in-form-grid select{width:100%}.trade-in-note-field{grid-column:1/-1}.trade-in-note-field textarea{min-height:72px;resize:vertical}.trade-in-tip{margin-top:12px;padding:9px 11px;border:1px solid #e8d99c;border-radius:8px;background:#fff8dc;color:#6c5714;font-size:11px}.sales-trade-in-card form>footer{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #dce7f2}.sales-trade-in-card form>footer .danger{margin-right:auto;color:#d33a35;border-color:#efb2ae;background:#fff1f0}.invoice-trade-in-row td{color:#9b4e13!important;background:#fff8e8!important}
@media(max-width:760px){.sales-trade-in-modal{padding:8px}.sales-trade-in-card{width:100%!important}.trade-in-form-grid{grid-template-columns:1fr 1fr}.trade-in-note-field{grid-column:1/-1}}

/* R8.81 fix72 — standalone recycle stock-in for phones, computers and other devices */
#inventory .inventory-primary-actions .inventory-recycle-button{border-color:#69bfa3!important;color:#087654!important;background:#eefaf6!important}
.recycle-stock-in-card{width:min(900px,96vw)!important}.recycle-stock-in-card .trade-in-form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:900px){.recycle-stock-in-card .trade-in-form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.sales-order-customer-card header{align-items:stretch!important}.sales-order-customer-card header .sales-info-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.sales-order-customer-card header .sales-info-actions button{width:100%!important}}

/* R8.81 fix113: purchase create page follows the sales-order layout exactly. */
body #purchase [data-purchase-panel="create"]{
  display:grid!important;
  grid-template-columns:minmax(560px,760px) minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px 10px!important;
}
body #purchase [data-purchase-panel="create"].hidden{display:none!important}
body #purchase [data-purchase-panel="create"]>.purchase-ai-strip{
  display:block!important;
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body #purchase [data-purchase-panel="create"]>.purchase-ai-strip>.purchase-ai-entry{
  display:grid!important;
  grid-template-columns:minmax(280px,1fr) 92px 110px!important;
  width:100%!important;
  min-width:0!important;
  gap:7px!important;
}
body #purchase [data-purchase-panel="create"]>.purchase-create-return{grid-column:3!important;justify-self:end!important;margin:0!important}
body #purchase [data-purchase-panel="create"]>:not(.purchase-ai-strip):not(.purchase-create-return){grid-column:1/-1!important;width:100%!important;min-width:0!important}
body #purchase .purchase-order-unified-card,
body #purchase .purchase-items-preview,
body #purchase .purchase-empty-table,
body #purchase .purchase-draft-rows{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
body #purchase .purchase-empty-table{margin:14px 17px 17px!important;overflow:clip!important}
body #purchase .purchase-table-head,
body #purchase .purchase-draft-row{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  grid-template-columns:44px minmax(220px,1.55fr) minmax(145px,.95fr) 88px 88px 108px 98px 68px!important;
}
body #purchase .purchase-draft-row{overflow:visible!important}
@media(max-width:900px){
  body #purchase [data-purchase-panel="create"]{grid-template-columns:1fr auto!important}
  body #purchase [data-purchase-panel="create"]>.purchase-ai-strip{grid-column:1!important}
  body #purchase [data-purchase-panel="create"]>.purchase-create-return{grid-column:2!important}
  body #purchase .purchase-empty-table{overflow-x:auto!important;overflow-y:hidden!important}
  body #purchase .purchase-table-head,body #purchase .purchase-draft-row{min-width:820px!important}
}
@media(max-width:650px){
  body #purchase [data-purchase-panel="create"]{grid-template-columns:1fr!important}
  body #purchase [data-purchase-panel="create"]>.purchase-ai-strip,
  body #purchase [data-purchase-panel="create"]>.purchase-create-return{grid-column:1!important;width:100%!important}
  body #purchase [data-purchase-panel="create"]>.purchase-ai-strip>.purchase-ai-entry{grid-template-columns:1fr 1fr!important}
  body #purchase [data-purchase-panel="create"]>.purchase-ai-strip>.purchase-ai-entry input{grid-column:1/-1!important}
}

/* R8.81 fix115: purchase headers and row controls share one exact grid. */
body #purchase .purchase-table-head,
body #purchase .purchase-draft-row{
  display:grid!important;
  grid-template-columns:44px minmax(220px,1.55fr) minmax(145px,.95fr) 88px 88px 108px 98px 68px!important;
  gap:8px!important;
  box-sizing:border-box!important;
  width:100%!important;
  padding-left:14px!important;
  padding-right:14px!important;
  align-items:center!important;
}
body #purchase .purchase-table-head{min-height:46px!important;padding-top:0!important;padding-bottom:0!important}
body #purchase .purchase-draft-row{min-height:52px!important;padding-top:7px!important;padding-bottom:7px!important}
body #purchase .purchase-table-head>span,
body #purchase .purchase-draft-row>span{
  box-sizing:border-box!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
}
body #purchase .purchase-table-head>span:first-child,
body #purchase .purchase-draft-row>span:first-child{text-align:center!important}
body #purchase .purchase-draft-row input,
body #purchase .purchase-draft-row select{box-sizing:border-box!important;width:100%!important;min-width:0!important}
body #purchase .purchase-table-head>span:nth-child(n+4){display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
body #purchase .purchase-draft-row>span:nth-child(n+4){display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
body #purchase .purchase-draft-row>span:nth-child(5) input{max-width:72px!important;text-align:center!important}
body #purchase .purchase-draft-row>span:nth-child(6) input{max-width:92px!important;text-align:center!important}
body #purchase .purchase-draft-row>span:nth-child(7) b{display:block!important;width:100%!important;text-align:center!important}
body #purchase .purchase-draft-row>span:nth-child(8) button{margin:0 auto!important}

/* R8.81 fix116: dashboard daily memo and checklist replaces shortcuts. */
#dashboard .dashboard-daily-planner{display:flex!important;flex-direction:column;min-height:220px!important;padding:0!important}
#dashboard .dashboard-daily-planner .panel-title{min-height:54px;padding:12px 15px;border-bottom:1px solid #e1eaf4}
#dashboard .dashboard-daily-planner .panel-title>div h2{margin:0;font-size:14px}
#dashboard .dashboard-daily-planner .panel-title>div small{display:block;margin-top:3px;color:#8191a6;font-size:10px}
#dashboard .dashboard-daily-planner .panel-title>span{margin-left:auto;padding:5px 9px;border-radius:999px;color:#08765a;background:#e8f8f2;font-size:10px;font-weight:800}
#dashboard .dashboard-memo-area{padding:12px 14px 8px}
#dashboard #dashboard-daily-memo{box-sizing:border-box;width:100%;min-height:76px;resize:vertical;padding:10px 11px;border:1px solid #d5e2ef;border-radius:8px;background:#fbfdff;color:#213b5c;font:inherit}
#dashboard .dashboard-daily-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0 14px 10px}
#dashboard .dashboard-daily-form input{min-width:0;height:38px;padding:0 11px;border:1px solid #cbdced;border-radius:7px}
#dashboard .dashboard-daily-form button{height:38px;padding:0 15px;border:0;border-radius:7px;color:#241c09;background:linear-gradient(145deg,#f2c754,#dda51f);font-weight:800}
#dashboard .dashboard-daily-list{flex:1;min-height:95px;padding:0 14px 12px;overflow:auto}
#dashboard .dashboard-daily-item{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:38px;padding:5px 8px;border-top:1px solid #edf2f7}
#dashboard .dashboard-daily-item label{display:flex;align-items:center;gap:9px;min-width:0;cursor:pointer}
#dashboard .dashboard-daily-item label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#294562;font-size:12px}
#dashboard .dashboard-daily-item.done label span{text-decoration:line-through;color:#98a5b4}
#dashboard .dashboard-daily-item button{width:28px;height:28px;border:0;border-radius:6px;color:#dc4545;background:#fff0f0}
#dashboard .dashboard-daily-empty{padding:22px;text-align:center;color:#8b9aae;font-size:11px}

/* R8.81 fix117: keep the purchase item grid inside its card at every desktop width. */
body #purchase .purchase-order-unified-card,
body #purchase .purchase-items-preview{
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
body #purchase .purchase-order-unified-card .purchase-empty-table{
  box-sizing:border-box!important;
  width:calc(100% - 34px)!important;
  max-width:calc(100% - 34px)!important;
  min-width:0!important;
  margin:14px 17px 17px!important;
  overflow:hidden!important;
}
body #purchase .purchase-table-head,
body #purchase .purchase-draft-row{
  grid-template-columns:44px minmax(0,1.55fr) minmax(0,.95fr) 88px 88px 108px 98px 68px!important;
  max-width:100%!important;
}
body #purchase .purchase-table-head>span,
body #purchase .purchase-draft-row>span{
  overflow:hidden!important;
}
body #purchase .purchase-draft-row>span:nth-child(3){display:flex!important;flex-direction:column!important;justify-content:center!important}
@media(max-width:1100px){
  body #purchase .purchase-order-unified-card .purchase-empty-table{overflow-x:auto!important;overflow-y:hidden!important}
  body #purchase .purchase-table-head,
  body #purchase .purchase-draft-row{min-width:820px!important}
}

/* R8.81 fix118: the add control is a separate row, never part of product row 1. */
body #purchase .purchase-draft-rows{display:flex!important;flex-direction:column!important;gap:0!important}
body #purchase .purchase-draft-row:not(.purchase-draft-add-row){flex:0 0 auto!important}
body #purchase .purchase-draft-add-row{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:48px!important;
  margin:8px 0 0!important;
  padding-top:7px!important;
  padding-bottom:7px!important;
  border-top:1px solid #dce7f2!important;
  background:#fbfdff!important;
}
body #purchase .purchase-draft-add-row>span:first-child{overflow:visible!important}
body #purchase .purchase-draft-add-row [data-purchase-add-next]{position:relative!important;inset:auto!important;flex:0 0 34px!important;width:34px!important;height:34px!important;min-height:34px!important;margin:0 auto!important}
body #purchase .purchase-draft-add-row>span:nth-child(2){display:flex!important;align-items:center!important;height:34px!important;white-space:nowrap!important}

/* R8.81 fix119: visible memo records and per-variant inventory prices. */
#dashboard .dashboard-memo-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}
#dashboard .dashboard-memo-actions small{color:#7a8da3;font-size:10px}
#dashboard #dashboard-memo-save{height:34px;min-height:34px;padding:0 13px;border:0;border-radius:7px;color:#241c09;background:linear-gradient(145deg,#f2c754,#dda51f);font-weight:800}
#dashboard .dashboard-memo-records{max-height:210px;overflow:auto;padding:0 14px 14px}
#dashboard .dashboard-memo-record{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:8px;padding:8px 9px;border-top:1px solid #e6edf5;background:#fbfdff}
#dashboard .dashboard-memo-record time{color:#7890a8;font-size:10px;white-space:nowrap}
#dashboard .dashboard-memo-record span{color:#27435f;font-size:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
#dashboard .dashboard-memo-record button{width:27px;height:27px;min-height:27px;padding:0;border:0;border-radius:6px;color:#d94040;background:#fff0f0}
#dashboard .dashboard-memo-empty{padding:7px 9px;color:#8b9aae;font-size:10px}
#dashboard .dashboard-todo-label{margin:0 14px 8px;padding-top:8px;border-top:1px solid #dce7f2;color:#31557a;font-size:11px;font-weight:800}

/* R8.81 fix124: memo-only dashboard and denser reports/customer ordering pages. */
#dashboard .dashboard-daily-planner{min-height:220px!important;height:auto!important}
#dashboard .dashboard-memo-records{max-height:210px;overflow:auto;padding-bottom:14px}

/* Reports keep related analysis blocks together and avoid tall empty panels. */
#reports{padding-bottom:18px!important}
#reports>.page-toolbar{min-height:58px!important;margin-bottom:2px!important;padding-top:8px!important;padding-bottom:8px!important}
#reports .report-analysis-menu{min-height:43px!important;margin-bottom:6px!important}
#reports #report-analysis-tabs button{min-height:39px!important}
#reports .report-kpi-modern{gap:7px!important;margin:6px 0!important}
#reports .report-kpi-modern article{min-height:72px!important;padding-top:10px!important;padding-bottom:8px!important}
#reports .report-ai-dashboard{grid-template-columns:minmax(0,1.55fr) minmax(280px,.72fr) minmax(310px,.72fr);grid-auto-rows:auto;gap:8px;margin-bottom:8px}
#reports .report-ai-dashboard>.panel{min-height:0!important;height:auto!important;margin:0!important}
#reports .report-trend-panel{min-height:230px!important}
#reports .report-trend-chart{height:178px!important}
#reports .report-composition-body{padding:12px!important}
#reports .report-modern-title{min-height:40px!important;padding:7px 11px!important}
#reports .report-ai-insights{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#reports .report-ai-insights article{min-height:54px;padding-top:8px;padding-bottom:7px}
#reports .report-expense-panel,#reports .report-detail-grid{margin-top:8px!important}
#reports .report-detail-grid{grid-template-columns:minmax(0,1fr) minmax(260px,.3fr);gap:8px}
#reports .report-table-panel,#reports .report-ranking{min-height:0!important;height:auto!important;margin:0!important}
#reports .report-empty-prompt{margin:6px 0!important;padding:16px!important}

/* Customer self-order management uses the available space without oversized blanks. */
#preorders .preorder-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important;margin-bottom:8px!important}
#preorders .preorder-summary article{min-height:62px!important;padding:10px 12px!important}
#preorders .preorder-workspace{height:auto!important;min-height:330px!important;grid-template-columns:minmax(0,1.75fr) minmax(340px,.72fr)!important;gap:8px!important}
#preorders .preorder-panel,#preorders .preorder-detail-panel{height:auto!important;min-height:330px!important;max-height:560px!important}
#preorders .preorder-table-list{min-height:210px!important;max-height:430px!important}
#preorders .preorder-detail-empty{min-height:330px!important}
#preorders .preorder-filter-bar{padding:8px 11px!important}
#preorders .preorder-main-tabs{min-height:42px!important}

/* Public ordering form: related fields share rows on wide screens. */
#customer-order-portal{min-height:100dvh!important;padding:18px!important}
#customer-order-portal .customer-order-shell{width:min(920px,100%)!important;padding:20px!important}
#customer-order-portal #customer-order-form{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}
#customer-order-portal #customer-order-form label{margin:0!important}
#customer-order-portal #customer-order-form label:nth-child(n+3),#customer-order-portal #customer-order-form .customer-image-upload,#customer-order-portal #preorder-image-preview,#customer-order-portal #customer-order-form>button,#customer-order-portal #customer-order-form>small{grid-column:1/-1}
#customer-order-portal #customer-order-form textarea{min-height:86px;resize:vertical}
#customer-order-portal #customer-order-content>h1{margin:16px 0 5px!important}
#customer-order-portal #customer-order-content>p{margin-bottom:14px!important}
@media(max-width:900px){#reports .report-ai-insights{grid-template-columns:1fr}#preorders .preorder-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}#preorders .preorder-workspace{grid-template-columns:1fr!important}#preorders .preorder-panel,#preorders .preorder-detail-panel{max-height:none!important}#customer-order-portal #customer-order-form{grid-template-columns:1fr}#customer-order-portal #customer-order-form>*{grid-column:1!important}}

/* Partner pages: actions sit in one compact toolbar instead of a large blank band. */
#customers>.page-toolbar,#suppliers>.page-toolbar{display:flex!important;min-height:48px!important;height:auto!important;margin:0 0 8px!important;padding:6px 12px!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;background:transparent!important}
#customers>.page-toolbar button,#suppliers>.page-toolbar button{min-height:36px!important;height:36px!important;margin:0!important}
#customers>.partner-summary,#suppliers>.contact-summary{margin-top:0!important;margin-bottom:8px!important;gap:8px!important}
#customers>.partner-summary article,#suppliers>.contact-summary article{min-height:70px!important;padding:11px 13px!important}
@media(min-width:1051px){#customers .partner-center-layout{height:calc(100dvh - 262px)!important;min-height:460px!important}#customers .partner-detail-panel{height:100%!important;min-height:0!important}}

/* R8.81 fix125: sales returns and exchanges linked to the original invoice. */
.sales-return-btn{border:1px solid #d7b566!important;border-radius:7px!important;background:#fff8e8!important;color:#8a6100!important;font-weight:800!important}
.sales-return-badge{display:block;margin-top:4px;color:#b07300;font-size:9px;font-weight:800}
.sales-payment-pill.refund{background:#fff0dc;color:#b46200}
.sales-return-card{width:min(1040px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:hidden}
.sales-return-card .modal-head small{display:block;margin-top:4px;color:#b9d3ef;font-size:10px}
.sales-return-form{max-height:calc(100dvh - 112px);overflow:auto;padding:15px 18px 18px;background:#f6f9fd}
.sales-return-source{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-bottom:10px}.sales-return-source>div{padding:10px 12px;border:1px solid #d8e6f5;border-radius:8px;background:#fff}.sales-return-source span,.sales-return-source b{display:block}.sales-return-source span{color:#72869e;font-size:10px}.sales-return-source b{margin-top:4px;color:#153d73}
.sales-return-section{margin-bottom:10px;border:1px solid #d6e4f2;border-radius:9px;background:#fff;overflow:hidden}.sales-return-section>header{padding:10px 12px;border-bottom:1px solid #e3ebf4;background:#f4f8fd}.sales-return-section header b,.sales-return-section header small{display:block}.sales-return-section header b{color:#153e77}.sales-return-section header small{margin-top:3px;color:#71869f;font-size:10px}
.sales-return-item{display:grid;grid-template-columns:minmax(220px,1fr) 76px 76px 135px;gap:9px;align-items:center;padding:9px 12px;border-bottom:1px solid #edf2f7}.sales-return-item:last-child{border-bottom:0}.sales-return-item b,.sales-return-item small{display:block}.sales-return-item b{color:#173d70}.sales-return-item small,.sales-return-item>span{margin-top:3px;color:#71859e;font-size:10px}.sales-return-item label{display:flex;align-items:center;gap:7px;color:#496681;font-size:10px}.sales-return-item input{width:70px;height:34px;border:1px solid #c9daec;border-radius:7px;padding:0 8px;text-align:center}
.sales-return-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:10px}.sales-return-options label,.sales-return-note{color:#315679;font-size:11px;font-weight:750}.sales-return-options select,.sales-return-note textarea{box-sizing:border-box;width:100%;margin-top:5px;border:1px solid #cbdced;border-radius:7px;background:#fff;padding:9px;color:#213f64;font:inherit}
.sales-exchange-row{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(150px,.8fr) 90px 120px;gap:8px;padding:11px}.sales-exchange-row select,.sales-exchange-row input{min-width:0;height:38px;border:1px solid #cbdced;border-radius:7px;background:#fff;padding:0 10px;font:inherit}
.sales-return-product-picker{position:relative;min-width:0}.sales-return-product-picker>#sales-exchange-product-search{width:100%;box-sizing:border-box}.sales-return-product-picker .sales-search-dropdown{z-index:140;top:calc(100% + 5px);max-height:260px}.sales-return-product-picker .sales-search-dropdown button{grid-template-columns:minmax(0,1fr) auto}.sales-return-product-picker .sales-search-dropdown button em{grid-column:2;grid-row:1/3}
.sales-return-note{display:block;margin-bottom:10px}.sales-return-note textarea{resize:vertical}
.sales-return-summary{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:8px;margin-top:10px}.sales-return-summary>div{padding:11px 13px;border:1px solid #d8e5f3;border-radius:8px;background:#fff}.sales-return-summary span,.sales-return-summary b,.sales-return-summary strong{display:block}.sales-return-summary span{color:#71869f;font-size:10px}.sales-return-summary b,.sales-return-summary strong{margin-top:5px;color:#153e78;font-size:16px}.sales-return-summary .sales-return-balance{border-color:#f0c873;background:#fff9e9}.sales-return-summary .sales-return-balance strong{color:#b67500}.sales-return-summary .sales-return-balance strong.refund{color:#0b9863}
.sales-return-warning{margin:10px 0;padding:9px 11px;border:1px solid #f0d18b;border-radius:7px;background:#fff9e8;color:#785b17;font-size:10px}.sales-return-form>.modal-actions{position:sticky;bottom:-18px;z-index:3;margin:0 -18px -18px;padding:11px 18px calc(11px + env(safe-area-inset-bottom));border-top:1px solid #dce6f1;background:#fff}
.sales-return-history{margin:0 0 10px;border:1px solid #d8e5f3;border-radius:8px;background:#fff}.sales-return-history summary{padding:10px 12px;color:#176cc9;font-size:11px;font-weight:800;cursor:pointer}.sales-return-history article{display:grid;grid-template-columns:minmax(190px,1fr) minmax(220px,1.4fr) auto;gap:10px;align-items:center;padding:9px 12px;border-top:1px solid #e8eef5}.sales-return-history b,.sales-return-history small{display:block}.sales-return-history small{margin-top:3px;color:#71859d;font-size:9px}.sales-return-history article>span{color:#3c5d80;font-size:10px}.sales-return-history article>strong{color:#a66a00;font-size:11px}.sales-return-empty{padding:14px;color:#7d8fa5;text-align:center;font-size:10px}
@media(max-width:760px){.sales-return-card{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.sales-return-form{max-height:calc(100dvh - 72px);padding:12px}.sales-return-source{grid-template-columns:1fr}.sales-return-options{grid-template-columns:1fr 1fr}.sales-return-item{grid-template-columns:1fr 1fr 1fr}.sales-return-item>div{grid-column:1/-1}.sales-exchange-row{grid-template-columns:1fr 1fr}.sales-return-product-picker{grid-column:1/-1}.sales-return-summary{grid-template-columns:1fr}.sales-return-form>.modal-actions{bottom:-12px;margin:0 -12px -12px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}}
.product-variant-prices{overflow:hidden;border:1px solid #cfe0f1;border-radius:9px;background:#fff}
.product-variant-prices.hidden{display:none!important}
.product-variant-price-title{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;background:#eef5fc;color:#174c82}
.product-variant-price-title b{font-size:12px}.product-variant-price-title small{font-size:10px;color:#69819b}
.product-variant-price-head,.product-variant-price-row{display:grid;grid-template-columns:minmax(150px,1.3fr) 90px repeat(3,minmax(100px,1fr));gap:8px;align-items:center;padding:7px 10px}
.product-variant-price-head{border-top:1px solid #d6e4f1;border-bottom:1px solid #d6e4f1;background:#f7faff;color:#53708e;font-size:10px;font-weight:800}
.product-variant-price-row{border-bottom:1px solid #edf2f7}.product-variant-price-row:last-child{border-bottom:0}
.product-variant-price-row>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#183e65;font-size:11px}
.product-variant-price-row input{width:100%!important;min-width:0!important;text-align:right}
@media(max-width:760px){.product-variant-prices{overflow-x:auto}.product-variant-price-head,.product-variant-price-row{min-width:680px}}

/* R8.81 fix120: compact purchase rows to the same density as the sales form. */
body #purchase .purchase-order-unified-card .purchase-empty-table{
  width:calc(100% - 26px)!important;
  max-width:calc(100% - 26px)!important;
  margin:10px 13px 12px!important;
}
body #purchase .purchase-table-head{height:36px!important;min-height:36px!important;padding-top:0!important;padding-bottom:0!important}
body #purchase .purchase-draft-row:not(.purchase-draft-add-row){height:44px!important;min-height:44px!important;padding-top:5px!important;padding-bottom:5px!important}
body #purchase .purchase-draft-add-row{
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
}
body #purchase .purchase-draft-add-row [data-purchase-add-next]{
  flex:0 0 24px!important;
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  padding:0!important;
  border-radius:6px!important;
  font-size:15px!important;
  line-height:22px!important;
}
body #purchase .purchase-draft-add-row>span:nth-child(2){height:24px!important;font-size:11px!important}

/* R8.81 fix122: exact compact purchase product block, without the extra nested-card space. */
body #purchase .purchase-order-unified-card>.purchase-items-preview{
  margin:0!important;
  padding:0!important;
  border-top:1px solid #dce7f2!important;
  border-radius:0!important;
}
body #purchase .purchase-order-unified-card .purchase-empty-table{
  width:calc(100% - 20px)!important;
  max-width:calc(100% - 20px)!important;
  margin:8px 10px 9px!important;
  padding:0!important;
}
body #purchase .purchase-table-head{height:34px!important;min-height:34px!important}
body #purchase .purchase-draft-row:not(.purchase-draft-add-row){height:42px!important;min-height:42px!important;padding-top:4px!important;padding-bottom:4px!important}
body #purchase .purchase-draft-add-row{height:32px!important;min-height:32px!important;padding-top:3px!important;padding-bottom:3px!important}
body #purchase .purchase-draft-add-row [data-purchase-add-next]{
  flex-basis:20px!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
  border-radius:5px!important;
  font-size:13px!important;
  line-height:18px!important;
}
body #purchase .purchase-draft-add-row>span:nth-child(2){height:20px!important;font-size:10px!important}
body.sales-hotfix-picker-open { overflow: hidden; }
.sales-hotfix-overlay { position: fixed; inset: 0; z-index: 1000000; display: grid; place-items: center; padding: 24px; background: rgba(8, 35, 67, .48); }
.sales-hotfix-dialog { width: min(1180px, 96vw); max-height: 88vh; overflow: hidden; border: 1px solid #bdd7f4; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(8, 35, 67, .28); }
.sales-hotfix-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: #fff; background: #113e6b; }
.sales-hotfix-dialog header b { display: block; font-size: 18px; }
.sales-hotfix-dialog header small { display: block; margin-top: 4px; opacity: .82; }
.sales-hotfix-dialog header button { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; color: #fff; background: rgba(255,255,255,.1); font-size: 22px; }
.sales-hotfix-tools { display: grid; grid-template-columns: 1fr 220px; gap: 10px; padding: 14px 16px; }
.sales-hotfix-tools input, .sales-hotfix-tools select { min-height: 42px; border: 1px solid #b8d4f2; border-radius: 8px; padding: 0 12px; background: #fff; }
.sales-hotfix-head, .sales-hotfix-product { display: grid; grid-template-columns: 130px minmax(260px, 1fr) minmax(220px, 1fr) 120px 100px; gap: 12px; align-items: center; }
.sales-hotfix-head { padding: 10px 18px; color: #3f5f80; background: #edf5fd; font-weight: 700; }
.sales-hotfix-results { max-height: 58vh; overflow: auto; }
.sales-hotfix-product { width: 100%; padding: 12px 18px; border: 0; border-bottom: 1px solid #dfebf7; text-align: left; color: #163b61; background: #fff; cursor: pointer; }
.sales-hotfix-product:hover, .sales-hotfix-product:focus { outline: none; background: #eef7ff; }
.sales-hotfix-product strong { color: #075fbc; }
.sales-hotfix-product em { color: #079557; font-style: normal; }
.sales-hotfix-empty { padding: 50px; color: #7890aa; text-align: center; }
@media (max-width: 780px) { .sales-hotfix-overlay { padding: 8px; } .sales-hotfix-tools { grid-template-columns: 1fr; } .sales-hotfix-head { display: none; } .sales-hotfix-product { grid-template-columns: 1fr auto; } .sales-hotfix-product span:nth-child(3) { grid-column: 1 / -1; } }

/* R8.81 fix134 — keep the purchase edit page and its save actions inside the viewport */
body .purchase-record-editor-page.active {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
body .purchase-record-editor-card,
body .purchase-record-editor-card .product-edit-form {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body .purchase-record-editor-card .purchase-record-items-editor,
body .purchase-record-editor-card .purchase-record-edit-items { min-width: 0 !important; max-width: 100% !important; }
body .purchase-record-editor-card .purchase-record-edit-item {
  grid-template-columns: 34px minmax(220px, 1.7fr) minmax(120px, .75fr) 82px 120px 100px 68px !important;
  min-width: 820px !important;
  box-sizing: border-box !important;
}
body .purchase-record-editor-card .modal-actions {
  position: sticky !important;
  bottom: -24px !important;
  z-index: 30 !important;
  width: auto !important;
  margin: 0 -22px -24px !important;
  padding: 12px 22px calc(12px + env(safe-area-inset-bottom)) !important;
  border-top: 1px solid #d6e3f1 !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 -9px 22px rgba(14,48,85,.10) !important;
}
@media (max-width: 760px) {
  body .purchase-record-editor-card .modal-actions { bottom: -14px !important; margin: 0 -14px -14px !important; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important; }
}

/* R8.81 fix153 — keep the dashboard complete and readable on phones */
@media (max-width: 900px) {
  body #dashboard.page.active {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  body #dashboard .dashboard-smart-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 14px !important;
  }
  body #dashboard .dashboard-smart-card,
  body #dashboard .quick-order,
  body #dashboard .dashboard-profit-overview {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  body #dashboard .dashboard-smart-card {
    padding-left: 64px !important;
  }
  body #dashboard .quick-box,
  body #dashboard .quick-box.compact {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    grid-template-rows: 44px 42px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  body #dashboard .quick-box input {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  body #dashboard .quick-box .dashboard-voice-icon {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  body #dashboard .quick-box > button:not(.voice-input-btn) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 420px) {
  body #dashboard {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  body #dashboard .dashboard-smart-card {
    padding-left: 58px !important;
    padding-right: 10px !important;
  }
  body #dashboard .dashboard-smart-card::before {
    left: 10px !important;
  }
  body #dashboard .quick-head h2,
  body #dashboard .dashboard-smart-card h2 {
    font-size: 17px !important;
  }
  body #dashboard .quick-head p,
  body #dashboard .dashboard-smart-card p {
    font-size: 11px !important;
  }
}

/* R8.81 fix155 — complete mobile inventory layout without horizontal clipping */
@media (max-width: 700px) {
  body #inventory.page.active {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  body #inventory > .inventory-command-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  body #inventory > .inventory-command-bar > div:first-child {
    display: none !important;
  }
  body #inventory .inventory-primary-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    order: 1 !important;
  }
  body #inventory .inventory-primary-actions button,
  body #inventory .inventory-primary-actions #new-inventory-product {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    padding: 8px 5px !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
  body #inventory .inventory-quick-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    order: 2 !important;
  }
  body #inventory .inventory-quick-tabs button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    height: auto !important;
  }
  body #inventory .inventory-toolbar-selects {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    order: 3 !important;
  }
  body #inventory .inventory-toolbar-selects select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    box-sizing: border-box !important;
  }
  body #inventory .inventory-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #inventory .inventory-metrics article {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  body #inventory .inventory-metrics article:last-child {
    grid-column: 1 / -1 !important;
  }
  body #inventory .inventory-workspace-r817 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #inventory .inventory-list-r817,
  body #inventory .contact-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  body #inventory .contact-table-wrap table,
  body #inventory .contact-table-wrap tbody {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #inventory .contact-table-wrap thead {
    display: none !important;
  }
  body #inventory .contact-table-wrap tr.product-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 12px !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    min-width: 0 !important;
    margin: 8px !important;
    padding: 12px !important;
    border: 1px solid #dbe7f3 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(21, 67, 115, .06) !important;
    box-sizing: border-box !important;
  }
  body #inventory .contact-table-wrap tr.product-row > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 8px 0 !important;
    border: 0 !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }
  body #inventory .contact-table-wrap tr.product-row > td:first-child {
    grid-column: 1 / -1 !important;
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e5edf6 !important;
  }
  body #inventory .inventory-product-cell-r817 {
    width: 100% !important;
    min-width: 0 !important;
  }
  body #inventory .inventory-product-cell-r817 > div:last-child {
    min-width: 0 !important;
  }
  body #inventory .inventory-product-cell-r817 b,
  body #inventory .inventory-product-cell-r817 small {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(n+2):nth-child(-n+8)::before {
    display: block !important;
    margin-bottom: 4px !important;
    color: #7a8da5 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(2)::before { content: "商品编号"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(3)::before { content: "分类 / 品牌"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(4)::before { content: "库存"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(5)::before { content: "进货价"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(6)::before { content: "批发价"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(7)::before { content: "零售价"; }
  body #inventory .contact-table-wrap tr.product-row > td:nth-child(8)::before { content: "状态"; }
  body #inventory .contact-table-wrap tr.product-row > td:last-child {
    grid-column: 1 / -1 !important;
    padding-bottom: 0 !important;
    border-top: 1px solid #e5edf6 !important;
  }
  body #inventory .inventory-row-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
  }
  body #inventory .inventory-row-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 5px 3px !important;
  }
  body #inventory .inventory-quick-count-r817 {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #inventory .customer-footer {
    flex-wrap: wrap !important;
    gap: 4px !important;
    height: auto !important;
    padding: 9px 12px !important;
  }
}

/* Always visible outside the collapsed customer details. */
#sales .sales-customer-quote-option{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 18px;background:#eef6ff;border-bottom:1px solid #c8dcf5}
#sales .sales-customer-quote-option label{display:flex;align-items:center;gap:8px;font-weight:700;color:#174677}
#sales .sales-customer-quote-option input{width:18px;height:18px;margin:0;flex:none}
#sales .sales-customer-quote-option small{color:#526780}
#sales .customer-quote-price-field{display:block;margin-top:8px;color:#174677;font-size:12px}
#sales .customer-quote-price-field[hidden]{display:none!important}
#sales .customer-quote-price-field input{width:100%;margin-top:4px}

[data-quote-comparison]{display:block;margin-top:6px;white-space:normal}
#saved-customer-quote-details{padding:18px;background:#eef6ff;overflow:auto}
#saved-customer-quote-details table{width:100%;border-collapse:collapse}
#saved-customer-quote-details td,#saved-customer-quote-details th{padding:10px;border:1px solid #bbcee2}
#saved-customer-quote-details[hidden]{display:none!important}
@media print{#saved-customer-quote-details{display:none!important}}

#mobile-topups .mobile-topup-entry{display:flex;flex-direction:column}#mobile-topups .mobile-topup-form{width:100%}#mobile-topups .mobile-topup-image-optional{padding:12px}#mobile-topups .mobile-topup-image-optional summary{cursor:pointer}#mobile-topups .mobile-topup-no-proof{display:none}

#sales .customer-price-pair.quote-active{display:grid;grid-template-columns:100px 100px;gap:4px 10px;align-items:start}
#sales .customer-price-pair label{display:block;margin:0;font-size:12px;color:#174677}
#sales .customer-price-pair label>span{display:block;margin-bottom:4px}
#sales .customer-price-pair label input{display:block;width:100%!important;min-width:0;margin-top:4px;box-sizing:border-box}
#sales .customer-price-pair [data-quote-comparison]{grid-column:1/-1;margin:0;font-size:11px;line-height:1.3;white-space:normal}
#sales .customer-price-pair:not(.quote-active) .actual-sale-price-field>span{display:none}
#sales .customer-price-pair [hidden]{display:none!important}
@media(max-width:600px){#sales .customer-price-pair.quote-active{grid-template-columns:90px 90px;gap:4px 6px}}

/* fix187: reserve table space for both quotation prices, keeping subtotal separate. */
#sales .sales-products-scroll table.customer-quote-columns{table-layout:fixed!important;min-width:1250px!important;width:100%!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(1){width:36px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(2){width:auto!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(3){width:190px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(4){width:85px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(5){width:85px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(6){width:230px!important;box-sizing:border-box!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(7){width:125px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(8){width:180px!important}
#sales .sales-products-scroll table.customer-quote-columns :is(th,td):nth-child(9){width:44px!important}
#sales .customer-price-pair.quote-active{width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:4px 10px!important}
#sales .customer-price-pair.quote-active label{min-width:0!important;margin:0!important}
#sales .customer-price-pair.quote-active label>span{height:16px;line-height:16px;margin:0!important}
#sales .customer-price-pair.quote-active label input{height:34px!important;min-height:34px!important;margin-top:4px!important;box-sizing:border-box!important}
#sales .sales-products-scroll{overflow-x:auto!important}
#sales .sales-products-scroll table.customer-quote-columns [data-order-subtotal]{display:block;white-space:nowrap}
