:root {
  --erp-canvas: #f4f6fa;
  --erp-surface: #fff;
  --erp-ink: #17243b;
  --erp-muted: #526174;
  --erp-line: #e4e9f1;
  --erp-blue: #2463eb;
  --erp-blue-soft: #edf3ff;
  --erp-radius: 8px;
}

body.erp-product-page {
  min-width: 320px;
  margin: 0;
  color: var(--erp-ink);
  background: var(--erp-canvas);
  font: var(--inventory-text-body, 16px)/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.erp-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.erp-sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 14px;
  border-right: 1px solid var(--erp-line);
  background: #fff;
}

.erp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 4px 10px 20px;
  color: var(--erp-ink);
  text-decoration: none;
}

.erp-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 9px;
  color: #fff;
  background: #17243b;
  font-size: 12px;
  font-weight: 760;
}

.erp-brand strong { display: block; font-size: 15px; line-height: 1.25; }
.erp-brand small { display: block; margin-top: 4px; color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
.erp-nav { display: flex; flex-direction: column; gap: 3px; }
#productPrimaryNav [hidden], .erp-nav [hidden] { display: none !important; }
.erp-nav-label { margin: 16px 12px 6px; color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); font-weight: 650; }

.erp-nav-link {
  min-height: 44px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  color: #43536a;
  font-size: var(--inventory-text-table, 15px);
  font-weight: 560;
  text-decoration: none;
}

.erp-nav-link:hover { color: var(--erp-ink); background: #f3f6fb; }
.erp-nav-link[aria-current="page"] { color: #245cda; background: var(--erp-blue-soft); font-weight: 680; }
.erp-nav-icon { width: 18px; flex: 0 0 18px; text-align: center; font-size: 15px; }
.erp-sidebar-foot { margin: 24px 10px 0; padding-top: 16px; border-top: 1px solid var(--erp-line); color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
.erp-workspace { min-width: 0; }

body[data-product-experience="premium-v1"] .product-module-nav {
  margin: 0 0 14px;
  padding: 0 0 12px;
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--erp-line);
}

body[data-product-experience="premium-v1"] .product-module-nav .nav-label { margin: 8px 10px 4px; }
body[data-product-experience="premium-v1"] .product-module-nav .nav-item { min-height: 36px; text-decoration: none; }
body[data-product-experience="premium-v1"] .product-module-nav .nav-item.is-current { color: #245cda; background: var(--erp-blue-soft); font-weight: 680; }

.erp-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  padding: 11px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--erp-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.erp-breadcrumb { color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
.erp-scope { display: flex; align-items: center; gap: 10px; color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
.erp-scope-badge { padding: 6px 9px; border: 1px solid var(--erp-line); border-radius: 6px; color: #40516b; background: #fff; }
.erp-content { width: min(100%, 1600px); margin: 0 auto; padding: 28px 32px 60px; }

.erp-page-head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.erp-page-head h1 { margin: 0; color: var(--erp-ink); font-size: 26px; font-weight: 680; letter-spacing: -.025em; }
.erp-page-head p { margin: 8px 0 0; color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); line-height: 1.65; }
.erp-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

body.erp-product-page .button,
body.erp-product-page .row-button,
body.erp-product-page .icon-button {
  border-radius: 6px;
}

body.erp-product-page .button.primary,
body.erp-product-page .row-button.primary {
  border-color: var(--erp-blue);
  color: #fff;
  background: var(--erp-blue);
  box-shadow: none;
}

body.erp-product-page .panel,
body.erp-product-page .metrics > article,
body.erp-product-page .task-card,
body.erp-product-page .source-card {
  border-color: var(--erp-line);
  border-radius: var(--erp-radius);
  background: #fff;
  box-shadow: none;
}

body.erp-product-page .metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

body.erp-product-page .metrics > article { min-height: 118px; padding: 17px 19px; }
body.erp-product-page .metrics span { color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
body.erp-product-page .metrics strong { margin: 5px 0 3px; font-size: 29px; font-weight: 670; }
body.erp-product-page .metrics small { color: var(--erp-muted); font-size: var(--inventory-text-small, 14px); }
body.erp-product-page .workspace { display: block; }
body.erp-product-page .module-subnav { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; width: fit-content; border: 1px solid var(--erp-line); border-radius: 8px; background: #fff; }
body.erp-product-page .module-subnav button { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 5px; color: var(--erp-muted); background: transparent; font-size: var(--inventory-text-table, 15px); }
body.erp-product-page .module-subnav button.active { color: #245cda; background: var(--erp-blue-soft); font-weight: 650; }
body.erp-product-page .panel-head { padding: 16px 18px; }
body.erp-product-page .panel-head h2 { font-size: 16px; }
body.erp-product-page .eyebrow { display: none; }
body.erp-product-page .table-shell { border-radius: 0; }
body.erp-product-page table { font-size: var(--inventory-text-table, 15px); }
body.erp-product-page th { padding: 12px 16px; color: var(--erp-muted); background: #f8fafc; font-size: var(--inventory-text-small, 14px); }
body.erp-product-page td { padding: 13px 16px; }
body.erp-product-page .dialog { border-radius: 10px; }

body.erp-product-page .inventory-list-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--erp-line);
  border-bottom: 1px solid var(--erp-line);
  background: #fbfcfe;
}

body.erp-product-page .inventory-list-filters label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: var(--erp-muted);
  font-size: var(--inventory-text-small, 14px);
}

body.erp-product-page .inventory-list-filters label.wide { min-width: 240px; flex: 1 1 320px; }
body.erp-product-page .inventory-list-filters :is(input, select) {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  color: var(--erp-ink);
  background: #fff;
  font: inherit;
}

body.erp-product-page .inventory-list-filters > span {
  margin-left: auto;
  padding-bottom: 9px;
  color: var(--erp-muted);
  font-size: var(--inventory-text-small, 14px);
  white-space: normal;
}

body.product-experience-v9,
body[data-product-experience="premium-v1"] {
  background: var(--erp-canvas) !important;
}

body.product-experience-v9 :is(.panel, .metric, .catalog-safety-note, .shadow-banner),
body[data-product-experience="premium-v1"] :is(.panel, .metric-card, .feature-check-strip, .library-intro) {
  border-radius: var(--erp-radius) !important;
  box-shadow: none !important;
}

body.product-experience-v9 :is(.button, .nav-item, .quick-find-button),
body[data-product-experience="premium-v1"] :is(.button, .row-button, .nav-item, .quick-find-button) {
  border-radius: 7px !important;
}

body.product-experience-v9 .topbar {
  top: 0 !important;
  min-height: 68px !important;
  margin: 0 !important;
  border-width: 0 0 1px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.product-experience-v9 .content { padding: 28px 32px 60px !important; }
body[data-product-experience="premium-v1"] .content { padding-top: 22px !important; }

body[data-product-experience="premium-v1"] :is(.hero-panel, .flow-panel) { display: none !important; }

@media (max-width: 1100px) {
  .erp-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .erp-content, .erp-topbar { padding-left: 22px; padding-right: 22px; }
  body.erp-product-page .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .erp-layout { display: block; }
  .erp-sidebar { position: sticky; height: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--erp-line); }
  .erp-brand, .erp-nav-label, .erp-sidebar-foot { display: none; }
  .erp-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .erp-nav-link { min-height: 44px; white-space: nowrap; }
  .erp-nav-link:not([data-mobile-primary]) { display: none; }
  .erp-topbar { min-height: 56px; padding: 10px 15px; }
  .erp-breadcrumb { display: none; }
  .erp-content { padding: 20px 14px 48px; }
  .erp-page-head { align-items: flex-start; flex-direction: column; }
  .erp-page-head h1 { font-size: 23px; }
  body.erp-product-page .metrics { gap: 9px; }
  body.erp-product-page .metrics > article { min-height: 102px; padding: 14px; }
  body.erp-product-page .metrics strong { font-size: 25px; }
  body.erp-product-page .inventory-list-filters { align-items: stretch; }
  body.erp-product-page .inventory-list-filters label,
  body.erp-product-page .inventory-list-filters label.wide { width: 100%; min-width: 0; flex-basis: 100%; }
  body.erp-product-page .inventory-list-filters > span { margin-left: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
