/*
 * SMTDT UI Design System V1
 * Scope: presentation only. No business semantics, API contracts or data
 * behavior are changed by this layer.
 */
:root {
  --ui-navy-975: #06181f;
  --ui-navy-950: #082129;
  --ui-navy-900: #0d2d36;
  --ui-navy-800: #16424a;
  --ui-teal-700: #0f6f68;
  --ui-teal-600: #12877d;
  --ui-teal-500: #22a599;
  --ui-teal-100: #dff5f0;
  --ui-canvas: #f4f1eb;
  --ui-canvas-deep: #ece8e0;
  --ui-surface: #fffdf9;
  --ui-surface-strong: #ffffff;
  --ui-line: #d9ddd7;
  --ui-line-strong: #c2cbc6;
  --ui-ink: #162c31;
  --ui-ink-soft: #334b50;
  --ui-muted: #617378;
  --ui-info: #2563a6;
  --ui-info-soft: #e8f2fb;
  --ui-success: #18734f;
  --ui-success-soft: #e5f5ec;
  --ui-warning: #9b650d;
  --ui-warning-soft: #fff2d3;
  --ui-danger: #b33a3a;
  --ui-danger-soft: #fdeaea;
  --ui-shadow-1: 0 1px 2px rgba(9, 32, 37, .06);
  --ui-shadow-2: 0 8px 24px rgba(9, 32, 37, .07);
  --ui-radius-sm: 10px;
  --ui-radius-md: 12px;
  --ui-radius-lg: 14px;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 24px;
  --ui-space-6: 32px;
  --ui-sidebar-width: 252px;
  --ui-topbar-height: 64px;
  --ui-font-sans: "Inter", "Noto Sans SC", "Microsoft YaHei UI",
    "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --ui-font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

html.m40-a6-shell-prepaint body {
  visibility: hidden !important;
}

html.m40-a6-shell-ready body,
html.m40-a6-shell-fallback body {
  visibility: visible;
}

body.ui-design-system-v1 {
  --bg: var(--ui-canvas);
  --panel: var(--ui-surface);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --blue: var(--ui-teal-700);
  --blue-soft: var(--ui-teal-100);
  --green: var(--ui-success);
  --amber: var(--ui-warning);
  --red: var(--ui-danger);
  --dark: var(--ui-navy-950);
  --dark-panel: var(--ui-navy-900);
  margin: 0;
  background: var(--ui-canvas);
  color: var(--ui-ink);
  font-family: var(--ui-font-sans);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1760px) {
  body.ui-design-system-v1 {
    font-size: 16px;
  }
}

body.ui-design-system-v1 *,
body.ui-design-system-v1 *::before,
body.ui-design-system-v1 *::after {
  box-sizing: border-box;
}

body.ui-design-system-v1 a {
  text-underline-offset: 3px;
}

body.ui-design-system-v1 .shell,
body.ui-design-system-v1 .m27-bizchain-v2 .shell,
body.ui-design-system-v1[data-page="BOMOVERALL"] .shell {
  grid-template-columns: var(--ui-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--ui-canvas);
}

body.ui-design-system-v1 .main {
  min-width: 0;
  max-width: none;
  overflow: clip;
  background:
    radial-gradient(circle at 88% 0, rgba(18, 135, 125, .045), transparent 28rem),
    var(--ui-canvas);
}

/* Sidebar / product identity */
body.ui-design-system-v1 .sidebar,
body.ui-design-system-v1 .m27-bizchain-v2 .sidebar,
body.ui-design-system-v1 .page00-sidebar {
  width: var(--ui-sidebar-width);
  height: 100vh;
  padding: 22px 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 20rem),
    var(--ui-navy-950);
  background-color: var(--ui-navy-950) !important;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .08);
  color: #edf6f3;
  box-shadow: 8px 0 28px rgba(6, 24, 31, .08);
}

body.ui-design-system-v1 .sidebar::-webkit-scrollbar {
  width: 8px;
}

body.ui-design-system-v1 .sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(217, 242, 235, .24);
  background-clip: padding-box;
}

body.ui-design-system-v1 .brand,
body.ui-design-system-v1 .page00-sidebar .brand {
  display: block;
  margin: 0 0 18px;
  padding: 0 4px 18px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

body.ui-design-system-v1 .ui-brand-mark {
  display: flex;
  align-items: center;
  gap: 11px;
}

body.ui-design-system-v1 .ui-brand-glyph {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(147, 232, 219, .42);
  border-radius: 11px;
  background: rgba(18, 135, 125, .2);
  color: #a9eee4;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.04em;
}

body.ui-design-system-v1 .ui-brand-copy strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: .02em;
}

body.ui-design-system-v1 .ui-brand-copy small {
  display: block;
  margin-top: 2px;
  color: #a9bab9;
  font-size: 13px;
  line-height: 1.35;
}

body.ui-design-system-v1 .ui-env-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 12px;
  padding: 3px 8px;
  border: 1px solid rgba(154, 225, 215, .24);
  border-radius: 999px;
  background: rgba(18, 135, 125, .12);
  color: #bfe9e2;
  font-size: 13px;
  font-weight: 650;
}

body.ui-design-system-v1 .sidebar nav {
  margin-top: 0;
}

body.ui-design-system-v1 .sidebar .nav-group {
  margin: 0;
}

body.ui-design-system-v1.m27-bizchain-v2 nav[data-m30-core-nav] .nav-group {
  display: block !important;
}

body.ui-design-system-v1 .sidebar .nav-group-title {
  margin: 0 6px 9px;
  color: #819a99;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .08em;
}

body.ui-design-system-v1 .sidebar .nav-item,
body.ui-design-system-v1 .m27-bizchain-v2 .nav-item,
body.ui-design-system-v1 .page00-sidebar .nav-item {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  margin: 4px 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #c6d4d2;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.35;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, transform 160ms ease;
}

body.ui-design-system-v1 .sidebar .nav-item[data-customer-nav-key],
body.ui-design-system-v1 .m27-bizchain-v2 .nav-item[data-customer-nav-key],
body.ui-design-system-v1 .page00-sidebar .nav-item[data-customer-nav-key] {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
}

body.ui-design-system-v1
  .sidebar
  .nav-item:not([data-customer-nav-key])
  > span:first-child {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
}

body.ui-design-system-v1
  .sidebar
  .nav-item:not([data-customer-nav-key])
  > small {
  display: none !important;
}

body.ui-design-system-v1 .sidebar .nav-item:hover {
  border-color: rgba(133, 217, 205, .16);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transform: translateX(1px);
}

body.ui-design-system-v1 .sidebar .nav-item.active,
body.ui-design-system-v1 .sidebar .nav-item[aria-current="page"] {
  border-color: rgba(115, 217, 201, .34);
  background: linear-gradient(90deg, rgba(18, 135, 125, .34), rgba(18, 135, 125, .16));
  color: #fff;
  box-shadow: inset 3px 0 0 #59c9bb;
}

body.ui-design-system-v1 .sidebar .nav-item.readonly-disabled,
body.ui-design-system-v1 .page00-sidebar .nav-item.readonly-disabled {
  border-color: #e3b767 !important;
  background: #fff8e8 !important;
  color: #7b4b00 !important;
}

body.ui-design-system-v1 .sidebar .nav-item.readonly-disabled .ui-nav-label,
body.ui-design-system-v1 .page00-sidebar .nav-item.readonly-disabled .ui-nav-label {
  color: inherit !important;
}

body.ui-design-system-v1 .ui-nav-index {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  color: #8fb0ae;
  font-family: var(--ui-font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

body.ui-design-system-v1 .nav-item.active .ui-nav-index,
body.ui-design-system-v1 .nav-item[aria-current="page"] .ui-nav-index {
  border-color: rgba(134, 234, 219, .3);
  background: rgba(8, 33, 41, .34);
  color: #aef1e7;
}

body.ui-design-system-v1 .ui-nav-label {
  min-width: 0;
  white-space: nowrap;
}

/* Topbar */
body.ui-design-system-v1 .topbar,
body.ui-design-system-v1 .page00-topbar,
body.ui-design-system-v1 .m27-bizchain-v2 .topbar {
  top: 0;
  z-index: 30;
  min-height: var(--ui-topbar-height);
  height: auto;
  padding: 10px 24px;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(255, 253, 249, .96);
  box-shadow: var(--ui-shadow-1);
  backdrop-filter: blur(10px);
}

body.ui-design-system-v1 .topbar-title {
  gap: 10px;
  color: var(--ui-ink);
  font-size: 16px;
  font-weight: 760;
}

@media (min-width: 901px) {
  body.ui-design-system-v1[data-ui-mode="customer"]
    .topbar-title [data-ui-page-title] {
    display: none !important;
  }
}

body.ui-design-system-v1 .ui-stage-chip,
body.ui-design-system-v1 .runtime-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0;
  padding: 3px 9px;
  border: 1px solid #b6ddd7;
  border-radius: 999px;
  background: #edf9f6;
  color: var(--ui-teal-700);
  font-size: 13px;
  font-weight: 650;
}

body.ui-design-system-v1 .topbar-actions {
  gap: 8px;
  flex-wrap: nowrap;
}

body.ui-design-system-v1 .topbar-actions .env-root,
body.ui-design-system-v1[data-ui-mode="customer"] .topbar-actions [data-modal="auditDetail"],
body.ui-design-system-v1[data-ui-mode="customer"] .topbar-actions > a[href="home.html"],
body.ui-design-system-v1[data-ui-mode="customer"] .anno {
  display: none !important;
}

body.ui-design-system-v1[data-ui-mode="customer"] .topbar-title .runtime-pill,
body.ui-design-system-v1[data-ui-mode="customer"] .account-chip [data-m28-auth-chip],
body.ui-design-system-v1[data-ui-mode="customer"] .account-chip .m28-auth-chip,
body.ui-design-system-v1 .topbar-actions > [data-ui-redundant-action],
body.ui-design-system-v1[data-page="HOME"][data-ui-mode="customer"]
  .page00-account-strip .account-chip:nth-of-type(n + 2) {
  display: none !important;
}

body.ui-design-system-v1 .account-chip {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface-strong);
  color: var(--ui-muted);
  font-size: 13px;
}

body.ui-design-system-v1 .account-chip strong {
  color: var(--ui-ink);
  font-size: 14px;
}

body.ui-design-system-v1 .ui-mode-toggle {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 10px;
  background: var(--ui-surface-strong);
  color: var(--ui-ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

body.ui-design-system-v1 .ui-mode-toggle:hover {
  border-color: var(--ui-teal-600);
  color: var(--ui-teal-700);
}

/* Exact business context */
body.ui-design-system-v1 .ui-business-context {
  position: sticky;
  top: var(--ui-topbar-height);
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(92px, .72fr)
    minmax(150px, 1.1fr) minmax(150px, 1.1fr) minmax(130px, .9fr)
    minmax(130px, .9fr);
  gap: 1px;
  padding: 0 24px;
  border-bottom: 1px solid #bfcac5;
  background: #cbd3cf;
  box-shadow: 0 4px 14px rgba(9, 32, 37, .05);
}

body.ui-design-system-v1 .ui-context-item {
  min-width: 0;
  padding: 9px 12px 10px;
  background: rgba(255, 253, 249, .98);
}

body.ui-design-system-v1 .ui-context-item span {
  display: block;
  margin-bottom: 1px;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.3;
}

body.ui-design-system-v1 .ui-context-value-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  gap: 6px;
  align-items: stretch;
}

body.ui-design-system-v1 .ui-context-value,
body.ui-design-system-v1 .ui-context-copy {
  border: 0;
  background: transparent;
  color: var(--ui-ink);
  font: inherit;
}

body.ui-design-system-v1 .ui-context-value {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 710;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

body.ui-design-system-v1 .ui-context-item.is-expanded .ui-context-value {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

body.ui-design-system-v1 .ui-context-copy {
  width: 48px;
  min-width: 48px;
  padding: 0 4px;
  color: var(--ui-teal-700);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

body.ui-design-system-v1 .ui-context-item[data-ui-context-key="status"] {
  box-shadow: inset 3px 0 0 var(--ui-warning);
}

body.ui-design-system-v1[data-ui-context-state="locked"]
  .ui-context-item[data-ui-context-key="status"] {
  box-shadow: inset 3px 0 0 var(--ui-success);
}

body.ui-design-system-v1[data-ui-context-state="locked"]
  .ui-context-item[data-ui-context-key="status"] .ui-context-value {
  color: var(--ui-success);
}

body.ui-design-system-v1[data-ui-context-state="blocked"]
  .ui-context-item[data-ui-context-key="status"] {
  background: var(--ui-danger-soft);
  box-shadow: inset 3px 0 0 var(--ui-danger);
}

body.ui-design-system-v1[data-ui-context-state="blocked"]
  .ui-context-item[data-ui-context-key="status"] .ui-context-value {
  color: var(--ui-danger);
}

body.ui-design-system-v1[data-ui-context-state="blocked"]
  .content > :not([data-ui-context-recovery]),
body.ui-design-system-v1[data-ui-context-state="blocked"]
  .page00-content > :not([data-ui-context-recovery]),
body.ui-design-system-v1[data-ui-context-state="blocked"]
  :where(.workspace-tabs,.drawer,.drawer-mask,.modal,.modal-mask,.toast) {
  display: none !important;
}

body.ui-design-system-v1[data-ui-context-state="blocked"]
  .topbar-actions > :not(.account-chip):not([data-m28-auth-logout]):not([data-ui-mode-toggle]) {
  display: none !important;
}

body.ui-design-system-v1 .ui-context-recovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 28px;
  border: 2px solid #cf5a52;
  background: #fff8f6;
  box-shadow: var(--ui-shadow-2);
}

body.ui-design-system-v1 .ui-context-recovery h1 {
  margin: 6px 0 10px;
  font-size: clamp(26px, 2vw, 28px);
  line-height: 1.2;
}

body.ui-design-system-v1 .ui-context-recovery p {
  max-width: 760px;
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

body.ui-design-system-v1 .ui-context-recovery-kicker {
  color: #9e2f2f;
  font-size: 15px;
  font-weight: 750;
}

body.ui-design-system-v1 .ui-context-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.ui-design-system-v1 .workspace-tabs {
  position: relative;
  top: auto;
  z-index: 8;
  min-height: 42px;
  padding: 6px 24px;
  border-color: var(--ui-line);
  background: #eeece6;
}

body.ui-design-system-v1 .workspace-tabs .label,
body.ui-design-system-v1 .ws-tab,
body.ui-design-system-v1 .ws-tab a {
  font-size: 13px;
}

/* Main canvas and shared surfaces */
body.ui-design-system-v1 .content,
body.ui-design-system-v1 .page00-content,
body.ui-design-system-v1 .m27-bizchain-v2 .content,
body.ui-design-system-v1 .m27-bomtree-embedded .content {
  width: 100%;
  max-width: none;
  padding: 24px 28px 64px;
}

body.ui-design-system-v1 .page-head,
body.ui-design-system-v1 .panel,
body.ui-design-system-v1 .quick-card,
body.ui-design-system-v1 .state-card,
body.ui-design-system-v1 .stat {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-1);
}

body.ui-design-system-v1 .page-head {
  margin-bottom: 16px;
  padding: 22px 24px;
}

/* W08A-USER-VISUAL-001: the user explicitly requested a calmer hero scale and
   more readable supporting copy after reviewing the GZHH reference screen. */
body.ui-design-system-v1 .page-head h1 {
  color: var(--ui-ink);
  font-size: clamp(26px, 1.8vw, 28px);
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: -.02em;
}

body.ui-design-system-v1 .page-head p {
  max-width: 72ch;
  margin-top: 7px;
  color: var(--ui-muted);
  font-size: 16px;
  line-height: 1.6;
}

body.ui-design-system-v1 .panel {
  margin-bottom: 16px;
  padding: 18px;
}

body.ui-design-system-v1 .panel-title {
  margin-bottom: 14px;
}

body.ui-design-system-v1 :where(.panel-title h2, .panel > h2, .process-flow-panel h2) {
  color: var(--ui-ink);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.3;
}

body.ui-design-system-v1 :where(.panel h3, .quick-card h3, .state-card h3) {
  color: var(--ui-ink);
  font-size: 17px;
  line-height: 1.35;
}

body.ui-design-system-v1 :where(p, .muted) {
  color: var(--ui-muted);
  font-size: 15px;
  line-height: 1.55;
}

body.ui-design-system-v1 :where(small, .anno, .runtime-pill, .badge) {
  font-size: 13px;
  line-height: 1.4;
}

body.ui-design-system-v1 .stat,
body.ui-design-system-v1 .quick-card,
body.ui-design-system-v1 .state-card {
  min-height: 104px;
  padding: 16px;
}

body.ui-design-system-v1 .stat .num,
body.ui-design-system-v1 .metric-value {
  color: var(--ui-ink);
  font-size: 28px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

/* Controls */
body.ui-design-system-v1 :where(button, .btn, input, select, textarea) {
  font-family: var(--ui-font-sans);
  font-size: 14px;
}

body.ui-design-system-v1 :where(button, .btn) {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 10px;
  background: var(--ui-surface-strong);
  color: var(--ui-ink-soft);
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease,
    color 160ms ease, box-shadow 160ms ease;
}

body.ui-design-system-v1 :where(button, .btn):hover:not(:disabled) {
  border-color: #8bbab3;
  background: #f6fbf9;
  color: var(--ui-teal-700);
}

body.ui-design-system-v1 :where(.btn.primary, button.primary, .btn.green) {
  border-color: var(--ui-teal-700);
  background: var(--ui-teal-700);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 111, 104, .16);
}

body.ui-design-system-v1 :where(.btn.primary, button.primary, .btn.green):hover:not(:disabled) {
  border-color: #0a5d57;
  background: #0a5d57;
  color: #fff;
}

body.ui-design-system-v1 .btn.warn {
  border-color: #e5c683;
  background: var(--ui-warning-soft);
  color: #80530d;
}

body.ui-design-system-v1 :where(.btn.danger, button.danger, .btn.err) {
  border-color: #e0a5a5;
  background: var(--ui-danger-soft);
  color: var(--ui-danger);
}

body.ui-design-system-v1 :where(button, .btn):disabled,
body.ui-design-system-v1 :where(button, .btn)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .56;
  box-shadow: none;
}

body.ui-design-system-v1 :where(input, select, textarea) {
  min-height: 40px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 9px;
  background: var(--ui-surface-strong);
  color: var(--ui-ink);
}

body.ui-design-system-v1 :where(label, .filter label, .form-field label) {
  color: var(--ui-ink-soft);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.4;
}

body.ui-design-system-v1 .filter {
  min-height: 76px;
  padding: 10px;
  border-color: var(--ui-line);
  border-radius: 10px;
  background: #faf9f5;
}

body.ui-design-system-v1 :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(18, 135, 125, .36);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

/* Status semantics */
body.ui-design-system-v1 .badge {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 680;
}

body.ui-design-system-v1 :where(.badge.ok, .is-ready, [data-status="AUTO_MATCHED"],
  [data-status="STRUCTURE_IDENTITY_ASSIGNED"]) {
  border-color: #addbc5;
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

body.ui-design-system-v1 :where(.badge.wait, .is-active, [data-status="MANUAL_PENDING"],
  [data-status="CANDIDATE_NARROWED"], [data-status="FAMILY_NONSTD"]) {
  border-color: #e5c77f;
  background: var(--ui-warning-soft);
  color: var(--ui-warning);
}

body.ui-design-system-v1 :where(.badge.err, [data-status="BLOCKED_MISSING_KEY_ATTRIBUTE"],
  [data-status="CONFLICT_REQUIRES_REVIEW"]) {
  border-color: #e1a9a9;
  background: var(--ui-danger-soft);
  color: var(--ui-danger);
}

body.ui-design-system-v1 .badge.info {
  border-color: #b4cee8;
  background: var(--ui-info-soft);
  color: var(--ui-info);
}

/* Tables */
body.ui-design-system-v1 .table-wrap,
body.ui-design-system-v1 .page02-table-wrap,
body.ui-design-system-v1 .w04m-table-scroll,
body.ui-design-system-v1 .tmv2-table {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--ui-line);
  border-radius: 11px;
  background: #fff;
  scrollbar-color: #aebcb7 #eef0ec;
}

body.ui-design-system-v1 table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.45;
}

body.ui-design-system-v1 :where(th, td) {
  padding: 11px 12px;
  border-bottom-color: #e5e9e5;
  color: var(--ui-ink-soft);
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}

body.ui-design-system-v1 th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef1ed;
  color: #3d5458;
  font-size: 13px;
  font-weight: 730;
  letter-spacing: .01em;
}

body.ui-design-system-v1 tbody tr:hover td {
  background: #f4faf8;
}

body.ui-design-system-v1 tr.selected td {
  background: #e7f5f1;
  box-shadow: inset 0 1px 0 #c4e5de, inset 0 -1px 0 #c4e5de;
}

body.ui-design-system-v1 code,
body.ui-design-system-v1 pre {
  font-family: var(--ui-font-mono);
  font-size: 13px;
}

body.ui-design-system-v1 .page02-order-identity strong,
body.ui-design-system-v1 .page02-cell-stack strong {
  font-size: 14px;
}

body.ui-design-system-v1 :where(
  .page02-overview-strip span,
  .page02-order-selected,
  .page02-status-badge,
  .page02-result-count,
  .page02-technical-context summary,
  .page02-technical-context code
) {
  font-size: 13px !important;
}

body.ui-design-system-v1 .page02-order-identity small,
body.ui-design-system-v1 .page02-cell-stack small,
body.ui-design-system-v1 .page02-status-badge,
body.ui-design-system-v1 .page02-result-count,
body.ui-design-system-v1 .page02-technical-context summary {
  font-size: 13px;
}

body.ui-design-system-v1 .page02-order-filter-grid {
  grid-template-columns: minmax(280px, 1.8fr) minmax(150px, .8fr)
    minmax(135px, .65fr) minmax(220px, .95fr);
}

body.ui-design-system-v1 .page02-truth-strip {
  gap: 10px;
}

/* Seven-step business chain */
body.ui-design-system-v1 .stage-grid {
  gap: 10px;
}

body.ui-design-system-v1 .stage {
  min-height: 148px;
  padding: 13px;
  border-radius: 11px;
  border-left-width: 3px;
  cursor: pointer;
}

body.ui-design-system-v1 .stage.active {
  border-color: #7dc6ba;
  border-left-color: var(--ui-teal-700);
  background: #eaf7f3;
  box-shadow: 0 0 0 1px rgba(18, 135, 125, .12) inset;
}

body.ui-design-system-v1 .stage .no {
  background: #e4f3ef;
  color: var(--ui-teal-700);
}

body.ui-design-system-v1 .stage strong {
  font-size: 16px;
  line-height: 1.35;
}

body.ui-design-system-v1 .stage small {
  min-height: 38px;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Page 00 workbench */
body.ui-design-system-v1[data-page="HOME"] .page00-current-business {
  padding: 22px;
  border-top: 3px solid var(--ui-teal-600);
}

body.ui-design-system-v1[data-page="HOME"] .page00-current-main h2 {
  font-size: 22px;
}

body.ui-design-system-v1[data-page="HOME"] .page00-kicker {
  color: var(--ui-teal-700);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: .06em;
}

body.ui-design-system-v1[data-page="HOME"] .page00-business-cell {
  min-height: 100px;
  border-radius: 11px;
  background: #faf9f5;
}

body.ui-design-system-v1[data-page="HOME"] .page00-business-cell span,
body.ui-design-system-v1[data-page="HOME"] .page00-business-cell small,
body.ui-design-system-v1[data-page="HOME"] .page00-section-title span {
  font-size: 13px;
}

body.ui-design-system-v1[data-page="HOME"] .page00-business-cell strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-groups {
  gap: 14px;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-group {
  min-height: 220px;
  padding: 18px;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-link {
  min-height: 52px;
  border-radius: 10px;
  background: #faf9f5;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-link:hover {
  border-color: #92c8bf;
  background: #eff8f5;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-link strong {
  font-size: 15px;
}

body.ui-design-system-v1[data-page="HOME"] .page00-entry-link span {
  font-size: 14px;
  line-height: 1.5;
}

body.ui-design-system-v1 .page08-related-links > span {
  font-size: 14px !important;
}

/* Material Master V2 */
body.ui-design-system-v1 .mmv2 {
  --mmv2-blue: var(--ui-teal-700);
  --mmv2-blue-soft: var(--ui-teal-100);
  --mmv2-green: var(--ui-success);
  --mmv2-red: var(--ui-danger);
  --mmv2-amber: var(--ui-warning);
  --mmv2-ink: var(--ui-ink);
  --mmv2-muted: var(--ui-muted);
}

body.ui-design-system-v1 .mmv2-hero {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background:
    linear-gradient(120deg, rgba(18, 135, 125, .08), rgba(255, 253, 249, .94) 58%),
    var(--ui-surface);
  box-shadow: var(--ui-shadow-1);
}

body.ui-design-system-v1 .mmv2-kicker,
body.ui-design-system-v1 .mmv2-context span,
body.ui-design-system-v1 .mmv2-context strong,
body.ui-design-system-v1 .mmv2-status,
body.ui-design-system-v1 .mmv2-metric span,
body.ui-design-system-v1 .mmv2-toolbar label,
body.ui-design-system-v1 .mmv2-standard-fields label,
body.ui-design-system-v1 .mmv2-slot-field,
body.ui-design-system-v1 .mmv2-card-head span,
body.ui-design-system-v1 .mmv2-detail dt,
body.ui-design-system-v1 .mmv2-evidence dt,
body.ui-design-system-v1 .mmv2-detail dd,
body.ui-design-system-v1 .mmv2-evidence dd,
body.ui-design-system-v1 .mmv2-slot-readback span,
body.ui-design-system-v1 .mmv2-slot-readback strong,
body.ui-design-system-v1 .mmv2-context-line,
body.ui-design-system-v1 .mmv2-status-pill,
body.ui-design-system-v1 .mmv2-slot-index,
body.ui-design-system-v1 .mmv2-slot-meta,
body.ui-design-system-v1 .mmv2-editor-actions span {
  font-size: 13px;
  line-height: 1.45;
}

body.ui-design-system-v1[data-ui-mode="customer"] .mmv2-context-line {
  font-size: 13px;
}

body.ui-design-system-v1[data-ui-mode="customer"] .mmv2-context-line::after {
  content: none;
}

body.ui-design-system-v1[data-ui-mode="customer"]
  [data-mmv2-match-detail] dl > div:first-child {
  display: none;
}

body.ui-design-system-v1 .mmv2-toolbar label,
body.ui-design-system-v1 .mmv2-standard-fields label,
body.ui-design-system-v1 .mmv2-slot-field {
  font-size: 14px;
}

body.ui-design-system-v1 .mmv2-metric {
  border-radius: 12px;
  box-shadow: var(--ui-shadow-1);
}

body.ui-design-system-v1 .mmv2-workspace,
body.ui-design-system-v1 .mmv2-editor {
  border-color: var(--ui-line);
  border-radius: 13px;
  box-shadow: var(--ui-shadow-1);
}

body.ui-design-system-v1 .mmv2-toolbar {
  background: #faf9f5;
}

body.ui-design-system-v1 .mmv2-table-card th,
body.ui-design-system-v1 .mmv2-table-card td {
  font-size: 14px;
}

body.ui-design-system-v1 .mmv2-slot-field {
  border-radius: 10px;
  background: #faf9f5;
}

/* Template maintenance and candidate cards */
body.ui-design-system-v1[data-page="TPL"][data-ui-mode="customer"]
  .content > .panel:not([data-template-maintenance-v2]):not([data-m40-operation-console]):not([data-m41-fanin]):not([data-global-template-library]):not([data-customer-product-portfolio]) {
  display: none !important;
}

.template-maintenance-entrypoints > .row-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.template-maintenance-entrypoints > .row-actions .btn {
  min-height: 3rem;
  white-space: normal;
}

@media (max-width: 1100px) {
  .template-maintenance-entrypoints > .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.ui-design-system-v1 .tmv2-hero,
body.ui-design-system-v1 .w04m-header {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(18, 135, 125, .07), rgba(255, 253, 249, .96) 62%),
    var(--ui-surface);
}

body.ui-design-system-v1 .tmv2-eyebrow,
body.ui-design-system-v1 .tmv2-chip,
body.ui-design-system-v1 .tmv2-operation p,
body.ui-design-system-v1 .tmv2-table th,
body.ui-design-system-v1 .tmv2-advanced pre,
body.ui-design-system-v1 .w04m-header small,
body.ui-design-system-v1 .w04m-card-head small,
body.ui-design-system-v1 .w04m-chip,
body.ui-design-system-v1 .w04m-fact small,
body.ui-design-system-v1 .w04m-metric small,
body.ui-design-system-v1 .w04m-lineage span,
body.ui-design-system-v1 .w04m-disposition,
body.ui-design-system-v1 .w04m-table-meta,
body.ui-design-system-v1 .w04m-table th,
body.ui-design-system-v1 .w04m-table td {
  font-size: 13px;
  line-height: 1.45;
}

body.ui-design-system-v1 .tmv2-card,
body.ui-design-system-v1 .tmv2-operation,
body.ui-design-system-v1 .w04m-card,
body.ui-design-system-v1 .w04m-fact,
body.ui-design-system-v1 .w04m-metric {
  border-color: var(--ui-line);
  border-radius: 11px;
  box-shadow: var(--ui-shadow-1);
}

body.ui-design-system-v1 .w04m-tabs button,
body.ui-design-system-v1 .tmv2-tab {
  min-height: 38px;
  font-size: 14px;
}

body.ui-design-system-v1 .w04m-tabs button.active,
body.ui-design-system-v1 .tmv2-tab.active {
  color: var(--ui-teal-700);
  border-color: var(--ui-teal-600);
}

body.ui-design-system-v1 .w04m-body {
  background: #f5f4ef;
}

/* Page04 BOM tree: keep dense structural data legible and controls operable. */
body.ui-design-system-v1 .page04-context-strip span,
body.ui-design-system-v1 .page04-bomtree-toolbar label,
body.ui-design-system-v1 .page04-type-badge,
body.ui-design-system-v1 .page04-seq small {
  font-size: 15px;
  line-height: 1.45;
}

body.ui-design-system-v1 .page04-bomtree-toolbar input,
body.ui-design-system-v1 .page04-bomtree-toolbar select {
  min-height: 40px;
  font-size: 14px;
}

/* Drawers, alerts, empty/error/loading states */
body.ui-design-system-v1 :where(.drawer, .modal) {
  border-color: var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-ink);
}

body.ui-design-system-v1 :where(.page00-status, .page02-state, .page07-state,
  .page09-state, .mmv2-status, .tmv2-empty, .tmv2-error,
  .w04m-loading, .w04m-error, .inline-alert) {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

body.ui-design-system-v1 :where(.tmv2-empty, .tmv2-error) {
  font-size: 15px;
}

body.ui-design-system-v1 details {
  border-radius: 10px;
}

body.ui-design-system-v1 summary {
  min-height: 38px;
  color: var(--ui-ink-soft);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

body.ui-design-system-v1 .ui-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--ui-navy-950);
  color: #fff;
  transform: translateY(-160%);
}

body.ui-design-system-v1 .ui-skip-link:focus {
  transform: translateY(0);
}

/* Responsive acceptance: 1366 / 1440 / 1920 */
@media (max-width: 1439px) {
  :root {
    --ui-sidebar-width: 248px;
  }

  body.ui-design-system-v1 .content,
  body.ui-design-system-v1 .page00-content,
  body.ui-design-system-v1 .m27-bizchain-v2 .content,
  body.ui-design-system-v1 .m27-bomtree-embedded .content {
    padding: 22px 22px 56px;
  }

  body.ui-design-system-v1 .ui-business-context {
    padding: 0 22px;
  }

  body.ui-design-system-v1 .page02-order-filter-grid {
    grid-template-columns: minmax(230px, 1.5fr) minmax(140px, .8fr)
      minmax(125px, .65fr) minmax(200px, 1fr);
  }

  body.ui-design-system-v1 .w04m-facts {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
}

@media (max-width: 1240px) {
  body.ui-design-system-v1 .ui-business-context {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.ui-design-system-v1 .page02-order-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ui-design-system-v1 .stage-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --ui-sidebar-width: 100%;
  }

  body.ui-design-system-v1 .shell,
  body.ui-design-system-v1 .m27-bizchain-v2 .shell,
  body.ui-design-system-v1[data-page="BOMOVERALL"] .shell {
    display: block;
  }

  body.ui-design-system-v1 .sidebar,
  body.ui-design-system-v1 .m27-bizchain-v2 .sidebar,
  body.ui-design-system-v1 .page00-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
  }

  body.ui-design-system-v1 .sidebar .nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.ui-design-system-v1
    .sidebar
    .nav-item:not([data-customer-nav-key])
    > span:first-child,
  body.ui-design-system-v1 .ui-nav-label {
    white-space: normal;
  }

  body.ui-design-system-v1 .sidebar .nav-group-title {
    grid-column: 1 / -1;
  }

  body.ui-design-system-v1 .topbar {
    position: relative;
  }

  body.ui-design-system-v1 .ui-business-context {
    position: relative;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ui-design-system-v1 .content,
  body.ui-design-system-v1 .page00-content {
    padding: 18px 14px 48px;
  }

  body.ui-design-system-v1 .page-head {
    display: block;
  }

  body.ui-design-system-v1 .head-actions {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ui-design-system-v1 *,
  body.ui-design-system-v1 *::before,
  body.ui-design-system-v1 *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* M37 W09A productization floors: legibility, contrast and operable targets. */
body.ui-design-system-v1 {
  --ui-muted: #52666b;
}

body.ui-design-system-v1 .page-head h1 {
  font-size: clamp(26px, 2vw, 28px) !important;
  line-height: 1.2;
}

body.ui-design-system-v1 .page-head > div > p {
  color: var(--ui-ink-soft);
  font-size: 16px !important;
  line-height: 1.65;
}

body.ui-design-system-v1 :where(
  small,
  dt,
  .anno,
  .badge,
  .runtime-pill,
  .env-pill,
  .ui-env-tag,
  .ui-nav-index,
  .page00-kicker,
  .page02-status-badge,
  .page02-result-count,
  .page04-type-badge,
  .page04-seq small,
  .mmv2-kicker,
  .mmv2-status,
  .mmv2-status-pill,
  .mmv2-slot-index,
  .mmv2-slot-meta,
  .tmv2-eyebrow,
  .tmv2-chip,
  .w04m-chip,
  .w04m-disposition,
  .w04m-table-meta,
  code,
  pre,
  th,
  td
) {
  font-size: 14px !important;
}

body.ui-design-system-v1 :where(
  p,
  .muted,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .ui-context-item span,
  .ui-context-item .ui-context-value,
  .page00-business-cell span,
  .page00-business-cell small,
  .page00-section-title span,
  .page02-overview-strip span,
  .page02-order-selected,
  .page02-order-identity strong,
  .page02-cell-stack strong,
  .mmv2-context span,
  .mmv2-context strong,
  .mmv2-context-line,
  .mmv2-detail dd,
  .mmv2-evidence dd,
  .mmv2-slot-readback strong,
  .page04-context-strip span,
  .page04-context-strip strong
) {
  font-size: 15px !important;
}

body.ui-design-system-v1 :where(
  .ui-stage-chip,
  .account-chip,
  .topbar-actions,
  .ui-mode-toggle
) {
  font-size: 14px !important;
}

body.ui-design-system-v1 .filter > label {
  font-size: 15px !important;
}

body.ui-design-system-v1 .ui-context-item > span {
  color: #344a4f !important;
}

body.ui-design-system-v1 .ui-context-item[data-ui-context-key="status"] .ui-context-value {
  color: #0b6041 !important;
}

body.ui-design-system-v1 :where(
  .card p,
  .stat span,
  .stage small,
  .page00-entry-link span,
  .tmv2-card p,
  .w04m-card p
) {
  font-size: 14px !important;
}

body.ui-design-system-v1 :where(
  button,
  a.btn,
  .page-btn,
  .tree-toggle,
  .template-expand-btn,
  .tmv2-tab,
  .w04m-tabs button,
  .ui-mode-toggle,
  summary,
  input:not([type="checkbox"]):not([type="radio"]),
  select
) {
  min-height: 44px !important;
}

body.ui-design-system-v1 :where(
  .tree-toggle,
  .template-expand-btn,
  .page-btn
) {
  min-width: 44px !important;
}

body.ui-design-system-v1 .sidebar .nav-item.active .ui-nav-index,
body.ui-design-system-v1 .sidebar .nav-item[aria-current="page"] .ui-nav-index {
  color: #f5fffd !important;
}

body.ui-design-system-v1 :where(
  .page02-count.is-empty,
  .page02-result-count,
  .page02-order-selected,
  .page00-section-title span,
  .page00-entry-link span,
  .mmv2-context-line
) {
  color: #465b60 !important;
}

body.ui-design-system-v1 :where(button, a, input, select, textarea, summary):focus,
body.ui-design-system-v1 :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1c72a8 !important;
  outline-offset: 2px !important;
}

body.ui-design-system-v1 .ui-mode-toggle:focus,
body.ui-design-system-v1 .ui-mode-toggle:focus-visible {
  outline: 3px solid #1c72a8 !important;
  outline-offset: 2px !important;
}

body.ui-design-system-v1 .ui-scroll-hint {
  margin: 8px 0 6px;
  color: #465b60;
  font-size: 15px !important;
  font-weight: 650;
}

body.ui-design-system-v1 [data-ui-scrollable="true"] {
  scroll-padding: 12px;
}

body.ui-design-system-v1 .ui-control-label {
  display: inline-block;
  margin-inline-start: 6px;
}

body.ui-design-system-v1 :where(
  .bizchain-current-step-panel > div > span,
  .bizchain-current-order-card > div > span,
  .bizchain-context-grid > div > span,
  .m35-template-package-context > span,
  .tmv1-selection small
) {
  font-size: 14px !important;
}

body.ui-design-system-v1[data-page="BOMOVERALL"] .main small {
  color: #4f636d !important;
}

body.ui-design-system-v1[data-page="BOMOVERALL"] .sidebar small {
  color: #b8d7dc !important;
}

body.ui-design-system-v1 .customer-bomtree-table .tree-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
}

body.ui-design-system-v1[data-page="BOMTREE"]
  button[data-interaction-status="wired_modal"] {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
}

body.ui-design-system-v1 .mmv2 span {
  font-size: 14px !important;
}

body.ui-design-system-v1 .mmv2 label {
  font-size: 15px !important;
}

body.ui-design-system-v1 .page07-universal-filter span {
  font-size: 14px !important;
}

body.ui-design-system-v1 .m28-chip span,
body.ui-design-system-v1 .m28-trace {
  color: #4f636d !important;
  font-size: 14px !important;
  line-height: 1.45;
}

body.ui-design-system-v1 [data-m28-code-action="batch"] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

body.ui-design-system-v1 .ui-overflow-value {
  cursor: help;
  text-decoration: underline dotted #52666b;
  text-underline-offset: 3px;
}

body.ui-design-system-v1 .ui-repaired-empty-control {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
}

/* M37 W10A semantic typography gate: core copy is never below 15px.
   Dense tables and explicitly decorative identifiers retain a 14px floor. */
body.ui-design-system-v1 :where(
  .main,
  .page00-content,
  .ui-business-context,
  .topbar
) :where(p,span,small,strong,label,button,a,input,select,textarea,dt,dd,summary) {
  font-size: 15px !important;
}

body.ui-design-system-v1 .sidebar :where(
  .ui-nav-label,
  .nav-item > span,
  .brand strong,
  .brand small
) {
  font-size: 15px !important;
}

body.ui-design-system-v1 :where(
  .main table,
  .page00-content table
) :where(th,td,th *,td *) {
  font-size: 14px !important;
}

body.ui-design-system-v1 :where(
  .anno,
  .ui-nav-index,
  .runtime-pill,
  .env-pill,
  .ui-env-tag,
  code,
  pre,
  .mmv2-slot-index
) {
  font-size: 14px !important;
}

body.ui-design-system-v1 .page-head h1,
body.ui-design-system-v1 .ui-context-recovery h1 {
  font-size: clamp(26px, 2vw, 28px) !important;
}

body.ui-design-system-v1 .page-head > div > p,
body.ui-design-system-v1 .ui-context-recovery p {
  font-size: 16px !important;
}

body.ui-design-system-v1 :where(
  .page00-kicker,
  [data-page00-state],
  .page02-state,
  .page08-related-links > span,
  [role="status"],
  .page08-read-state
) {
  font-size: 15px !important;
}

body.ui-design-system-v1 button.btn {
  font-size: 15px !important;
}

body.ui-design-system-v1 .page08-related-links > span,
body.ui-design-system-v1 .mmv2 span,
body.ui-design-system-v1 .page07-universal-filter span {
  font-size: 15px !important;
}

body.ui-design-system-v1 .mmv2 .mmv2-kicker {
  font-size: 14px !important;
}

body.ui-design-system-v1 .topbar .topbar-actions
  button.ui-mode-toggle[data-ui-mode-toggle="1"] {
  width: 132px !important;
  min-width: 132px !important;
  max-width: none !important;
  padding-inline: 14px !important;
  flex: 0 0 auto !important;
}

body.ui-design-system-v1 :where(
  button,
  a.btn,
  .sidebar .nav-item,
  summary
) {
  min-height: 44px !important;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 900px) {
  body.ui-design-system-v1 .ui-context-recovery {
    grid-template-columns: 1fr;
  }

  body.ui-design-system-v1 .ui-context-recovery-actions {
    justify-content: flex-start;
  }
}


/* M38 UIP1 context readability candidate */
@media (max-width:1500px) {
  body.ui-design-system-v1 .ui-business-context { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:700px) {
  body.ui-design-system-v1 .ui-business-context { grid-template-columns:1fr; }
}


/* M38 UIP1 independent BOM-domain boundary candidate */
body.ui-design-system-v1 .ui-bom-domain-boundary {
  display:grid;
  gap:10px;
  padding:12px 24px;
  border-bottom:1px solid #c6d4cf;
  background:#eef4f1;
}
body.ui-design-system-v1 .ui-bom-domain-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; }

/* M40 A5UX: customer-first presentation without changing runtime semantics. */
body.ui-design-system-v1 .ui-business-context {
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, .8fr) minmax(220px, 1.35fr) minmax(190px, 1fr);
  gap: 1px;
  padding-inline: 20px;
}

body.ui-design-system-v1 .ui-context-item {
  padding: 7px 11px 8px;
}

body.ui-design-system-v1 .ui-context-value-row {
  display: block;
}

body.ui-design-system-v1 .ui-context-copy {
  display: none !important;
}

body.ui-design-system-v1[data-ui-mode="customer"] :where(
  .env-root,
  .runtime-pill,
  .ui-env-tag,
  [data-ui-redundant-action="audit-detail"],
  [data-ui-redundant-action="home"]
) {
  display: none !important;
}

body.ui-design-system-v1[data-page="BIZ"] .content > .page-head .head-actions,
body.ui-design-system-v1[data-page="BIZ"] .bizchain-runtime-panel ~ .process-flow-panel,
body.ui-design-system-v1[data-page="BIZ"] .bizchain-runtime-panel ~ .two-col {
  display: none !important;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-runtime-panel {
  display: grid;
  gap: 12px;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-panel-head {
  margin-bottom: 0;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-card {
  min-height: 164px;
  padding: 12px;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-card p {
  min-height: 42px;
  margin-block: 8px;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-state {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: #52666b;
  font-weight: 700;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-current-step-panel {
  padding: 12px 14px;
}

body.ui-design-system-v1[data-page="BIZ"] .bizchain-context-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ui-design-system-v1 .bizchain-technical-details,
body.ui-design-system-v1 .a5-result-trace {
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 14px;
}

body.ui-design-system-v1 .bizchain-technical-details > summary,
body.ui-design-system-v1 .a5-result-trace > summary {
  cursor: pointer;
  color: #52666b;
  font-weight: 700;
}

body.ui-design-system-v1 .template-customer-card {
  min-height: 76px;
  border-radius: 10px;
  padding: 10px 12px;
}

body.ui-design-system-v1 .template-customer-card.recommended {
  border-color: #1c8f84;
  background: #effaf7;
}

body.ui-design-system-v1 .template-choice-section {
  display: grid;
  gap: 8px;
}

body.ui-design-system-v1 .template-choice-section + .template-choice-section {
  margin-top: 14px;
}

body.ui-design-system-v1 .template-choice-section > h4 {
  margin: 0 0 2px;
  color: #344a53;
  font-size: 13px;
}

body.ui-design-system-v1 .template-customer-card.incompatible {
  cursor: not-allowed;
  border-color: #d8dee4;
  background: #f5f6f7;
  color: #69777d;
  opacity: .82;
}

body.ui-design-system-v1 .template-customer-card.incompatible:hover {
  border-color: #d8dee4;
  background: #f5f6f7;
}

body.ui-design-system-v1 .template-recommendation {
  display: inline-flex;
  margin-right: 8px;
  border-radius: 999px;
  background: #137a70;
  color: #fff;
  padding: 2px 8px;
  font-size: 12px !important;
  font-style: normal;
}

body.ui-design-system-v1 .bom-generation-progress {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid #c9d9e8;
  border-radius: 12px;
  background: #f8fbff;
  padding: 16px;
}

body.ui-design-system-v1 .bom-generation-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

body.ui-design-system-v1 .bom-generation-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9f2;
}

body.ui-design-system-v1 .bom-generation-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #168579;
  transition: width .2s ease;
}

body.ui-design-system-v1 .bom-generation-progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.ui-design-system-v1 .bom-generation-progress li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #fff;
  padding: 10px;
}

body.ui-design-system-v1 .bom-generation-progress li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e7eef5;
  font-weight: 800;
}

body.ui-design-system-v1 .bom-generation-progress li em {
  grid-column: 2;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

body.ui-design-system-v1 .bom-generation-progress li.complete > span,
body.ui-design-system-v1 .bom-generation-progress li.active > span {
  background: #168579;
  color: #fff;
}

body.ui-design-system-v1[data-page="LIST"] .content {
  gap: 10px;
}

body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-overview-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ui-design-system-v1[data-page="LIST"] :where(.a5-result-overview, .a5-result-table) {
  padding: 14px 16px;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-overview .panel-title {
  margin-bottom: 8px;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-overview .grid-5 {
  gap: 8px;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-overview .stat {
  min-height: 70px;
  padding: 9px 11px;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-table .list-toolbar {
  margin-bottom: 8px;
  padding: 8px;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-table table :where(th, td) {
  padding-block: 6px;
  line-height: 1.25;
}

body.ui-design-system-v1[data-page="LIST"] .a5-result-trace {
  margin: 0;
}

body.ui-design-system-v1 .a5-mobile-nav-open,
body.ui-design-system-v1 .a5-mobile-nav-close,
body.ui-design-system-v1 .a5-mobile-nav-backdrop {
  display: none;
}

@media (min-width: 1700px) {
  body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-board-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.ui-design-system-v1 .a5-mobile-nav-open {
    display: inline-flex;
    min-width: 82px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-weight: 750;
  }

  body.ui-design-system-v1 .a5-mobile-nav-close {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-weight: 750;
  }

  body.ui-design-system-v1 .sidebar,
  body.ui-design-system-v1 .m27-bizchain-v2 .sidebar,
  body.ui-design-system-v1 .page00-sidebar,
  body.ui-design-system-v1[data-page="BOMOVERALL"] .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 120 !important;
    width: min(86vw, 340px) !important;
    height: 100dvh !important;
    max-height: none !important;
    overflow-y: auto !important;
    border-right: 1px solid #ccd8e3 !important;
    border-bottom: 0 !important;
    background: #f8fafc !important;
    transform: translateX(-105%);
    transition: transform .18s ease;
  }

  body.ui-design-system-v1.a5-mobile-nav-opened .sidebar,
  body.ui-design-system-v1.a5-mobile-nav-opened .page00-sidebar {
    transform: translateX(0);
  }

  body.ui-design-system-v1 .a5-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(15, 23, 42, .46);
  }

  body.ui-design-system-v1.a5-mobile-nav-opened .a5-mobile-nav-backdrop {
    display: block;
  }

  body.ui-design-system-v1.a5-mobile-nav-opened {
    overflow: hidden;
  }

  body.ui-design-system-v1 .sidebar .nav-group {
    grid-template-columns: 1fr !important;
  }

  body.ui-design-system-v1 .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 10px;
  }

  body.ui-design-system-v1 .topbar-title {
    min-width: 0;
  }

  body.ui-design-system-v1 .topbar-title .ui-stage-chip,
  body.ui-design-system-v1 .topbar-actions .account-chip {
    display: none !important;
  }

  body.ui-design-system-v1 .ui-business-context {
    position: relative;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  body.ui-design-system-v1 .ui-context-item {
    padding: 6px 9px;
  }

  body.ui-design-system-v1[data-page="BIZ"] .bizchain-step-board-grid,
  body.ui-design-system-v1[data-page="BIZ"] .bizchain-context-grid,
  body.ui-design-system-v1 .bom-generation-progress ol {
    grid-template-columns: 1fr;
  }

  body.ui-design-system-v1 .page04-bomtree-layout {
    grid-template-columns: 1fr !important;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page-head {
    margin-bottom: 6px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page-head p,
  body.ui-design-system-v1[data-page="BOMOVERALL"] .page-head .head-actions,
  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-overview-panel .panel-title .toolbar,
  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-overview-strip > div:nth-child(n + 5),
  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-order-filter-grid > .filter:not(:first-child) {
    display: none !important;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .content {
    padding-top: 10px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] :where(.page02-overview-panel, .page02-business-order-panel) {
    padding: 10px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-overview-strip > div {
    padding: 7px 9px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-order-filter-grid {
    grid-template-columns: 1fr;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table {
    min-width: 0;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table thead {
    display: none;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table :where(tbody, tr, td) {
    display: block;
    width: 100%;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table tr {
    margin-bottom: 8px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    padding: 9px;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table td {
    border: 0;
    padding: 4px 0;
  }

  body.ui-design-system-v1[data-page="BOMOVERALL"] .page02-business-order-table td:nth-child(n + 3):not(:last-child) {
    display: none;
  }

  body.ui-design-system-v1[data-page="LIST"] .a5-result-overview .grid-5,
  body.ui-design-system-v1[data-page="LIST"] .a5-result-trace .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body.ui-design-system-v1 .ui-bom-domain-heading span { display:block; color:var(--ui-muted); }
body.ui-design-system-v1 .ui-bom-domain-heading strong { display:block; margin-top:2px; }
body.ui-design-system-v1 .ui-bom-domain-heading p { margin:0; color:var(--ui-muted); }
body.ui-design-system-v1 .ui-bom-domain-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
body.ui-design-system-v1 .ui-bom-domain-card { min-width:0; padding:12px; border:1px solid #c7d6d0; border-radius:10px; background:#fff; }
body.ui-design-system-v1 .ui-bom-domain-card > header { display:flex; align-items:start; justify-content:space-between; gap:12px; }
body.ui-design-system-v1 .ui-bom-domain-card > header span { display:block; margin-top:2px; color:var(--ui-muted); }
body.ui-design-system-v1 .ui-domain-state { flex:0 0 auto; padding:4px 8px; border-radius:999px; background:var(--ui-danger-soft); color:var(--ui-danger); }
body.ui-design-system-v1 .ui-domain-state.is-explicit { background:var(--ui-success-soft); color:var(--ui-success); }
body.ui-design-system-v1 .ui-bom-domain-card dl { display:grid; grid-template-columns:.7fr 1.3fr 1.5fr; gap:8px; margin:10px 0 0; }
body.ui-design-system-v1 .ui-bom-domain-card dl div { min-width:0; padding:8px; border-radius:8px; background:#f7faf8; }
body.ui-design-system-v1 .ui-bom-domain-card dt { color:var(--ui-muted); }
body.ui-design-system-v1 .ui-bom-domain-card dd { margin:3px 0 0; overflow-wrap:anywhere; font-weight:700; }
body.ui-design-system-v1 .ui-domain-advanced { margin-top:8px; border-top:1px solid #dce6e2; }
body.ui-design-system-v1 .ui-domain-advanced summary { min-height:44px; cursor:pointer; color:var(--ui-teal-700); }
body.ui-design-system-v1 .ui-domain-advanced p { margin:0; padding:8px; overflow-wrap:anywhere; color:var(--ui-muted); }
@media (max-width:1100px) {
  body.ui-design-system-v1 .ui-bom-domain-heading { align-items:start; flex-direction:column; }
  body.ui-design-system-v1 .ui-bom-domain-card dl { grid-template-columns:1fr; }
}
@media (max-width:700px) {
  body.ui-design-system-v1 .ui-bom-domain-boundary { padding:12px 14px; }
  body.ui-design-system-v1 .ui-bom-domain-grid { grid-template-columns:1fr; }
}
body.ui-design-system-v1 .page00-technical-evidence,
body.ui-design-system-v1 .bizchain-technical-details,
body.ui-design-system-v1 .ui-bom-domain-boundary,
body.ui-design-system-v1 .ui-mode-toggle,
body.ui-design-system-v1 [data-modal="auditDetail"],
body.ui-design-system-v1 [data-ui-redundant-action="audit-detail"],
body[data-page="BIZ"] .page-head,
body[data-page="BIZ"] .m35-template-package-context,
body[data-page="LIST"] .drawer,
body[data-page="LIST"] .drawer-mask,
body[data-page="LIST"] .toast {
  display: none !important;
}
